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 void setProblem(Problem p) { this.problem = p; }
void function(Problem p) { this.problem = p; }
/** * Sets the problem to the given problem * * @param p * the problem */
Sets the problem to the given problem
setProblem
{ "repo_name": "burks-pub/gecco2015", "path": "src/main/java/ec/research/gp/simple/util/Config.java", "license": "bsd-2-clause", "size": 34172 }
[ "ec.research.gp.simple.problem.Problem" ]
import ec.research.gp.simple.problem.Problem;
import ec.research.gp.simple.problem.*;
[ "ec.research.gp" ]
ec.research.gp;
1,054,427
AbstractFile userHome = LocalFile.getUserHome(); AbstractFile trashDir = userHome.getChildSilently(".local/share/Trash/"); if(isTrashFolder(trashDir)) { return trashDir; } // No existing user trash was found: create the folder, only if it doesn't already exist. if(!trashDir.exists()) { try { tra...
AbstractFile userHome = LocalFile.getUserHome(); AbstractFile trashDir = userHome.getChildSilently(STR); if(isTrashFolder(trashDir)) { return trashDir; } if(!trashDir.exists()) { try { trashDir.mkdirs(); trashDir.getChild("info").mkdir(); trashDir.getChild("files").mkdir(); return trashDir; } catch(IOException e) { } }...
/** * Tries to find an existing user Trash folder and returns it. If no existing * Trash folder was found, creates the standard Xfce user Trash folder and returns it. * * @return the user Trash folder, <code>null</code> if no user trash folder could be found or created */
Tries to find an existing user Trash folder and returns it. If no existing Trash folder was found, creates the standard Xfce user Trash folder and returns it
getTrashFolder
{ "repo_name": "Keltek/mucommander", "path": "src/main/com/mucommander/desktop/xfce/XfceTrash.java", "license": "gpl-3.0", "size": 12042 }
[ "com.mucommander.commons.file.AbstractFile", "com.mucommander.commons.file.impl.local.LocalFile", "java.io.IOException" ]
import com.mucommander.commons.file.AbstractFile; import com.mucommander.commons.file.impl.local.LocalFile; import java.io.IOException;
import com.mucommander.commons.file.*; import com.mucommander.commons.file.impl.local.*; import java.io.*;
[ "com.mucommander.commons", "java.io" ]
com.mucommander.commons; java.io;
2,160,086
protected Color getSelectionBackground() { return selectionBackground; }
Color function() { return selectionBackground; }
/** * This method returns the Color that the text is shown in when the bar is * not over the text. * * @return The color of the text when the bar is not over it. */
This method returns the Color that the text is shown in when the bar is not over the text
getSelectionBackground
{ "repo_name": "taciano-perez/JamVM-PH", "path": "src/classpath/javax/swing/plaf/basic/BasicProgressBarUI.java", "license": "gpl-2.0", "size": 28432 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
190,017
@Nullable private static Object convertPrimitiveField(Group g, int fieldIndex, int index, boolean binaryAsString) { PrimitiveType pt = (PrimitiveType) g.getType().getFields().get(fieldIndex); OriginalType ot = pt.getOriginalType(); try { if (ot != null) { // convert logical types ...
static Object function(Group g, int fieldIndex, int index, boolean binaryAsString) { PrimitiveType pt = (PrimitiveType) g.getType().getFields().get(fieldIndex); OriginalType ot = pt.getOriginalType(); try { if (ot != null) { switch (ot) { case DATE: long ts = g.getInteger(fieldIndex, index) * MILLIS_IN_DAY; return ts; ...
/** * Convert a primitive group field to a "ingestion friendly" java object * * @return "ingestion ready" java object, or null */
Convert a primitive group field to a "ingestion friendly" java object
convertPrimitiveField
{ "repo_name": "knoguchi/druid", "path": "extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java", "license": "apache-2.0", "size": 18640 }
[ "java.math.BigDecimal", "java.nio.ByteOrder", "java.nio.IntBuffer", "java.util.concurrent.TimeUnit", "org.apache.druid.java.util.common.StringUtils", "org.apache.parquet.example.data.Group", "org.apache.parquet.io.api.Binary", "org.apache.parquet.schema.OriginalType", "org.apache.parquet.schema.Prim...
import java.math.BigDecimal; import java.nio.ByteOrder; import java.nio.IntBuffer; import java.util.concurrent.TimeUnit; import org.apache.druid.java.util.common.StringUtils; import org.apache.parquet.example.data.Group; import org.apache.parquet.io.api.Binary; import org.apache.parquet.schema.OriginalType; import org....
import java.math.*; import java.nio.*; import java.util.concurrent.*; import org.apache.druid.java.util.common.*; import org.apache.parquet.example.data.*; import org.apache.parquet.io.api.*; import org.apache.parquet.schema.*; import org.joda.time.*;
[ "java.math", "java.nio", "java.util", "org.apache.druid", "org.apache.parquet", "org.joda.time" ]
java.math; java.nio; java.util; org.apache.druid; org.apache.parquet; org.joda.time;
387,400
private ObjectName mxBean = null; void registerMXBean(Configuration conf) { // We wrap to bypass standard mbean naming convention. // This wraping can be removed in java 6 as it is more flexible in // package naming for mbeans and their impl. mxBean = MBeans.register("DataNode", "DataNodeInfo", th...
ObjectName mxBean = null; void function(Configuration conf) { mxBean = MBeans.register(STR, STR, this); }
/** * Register the DataNode MXBean using the name * "hadoop:service=DataNode,name=DataNodeInfo" */
Register the DataNode MXBean using the name "hadoop:service=DataNode,name=DataNodeInfo"
registerMXBean
{ "repo_name": "williamsentosa/hadoop-modified", "path": "src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNode.java", "license": "apache-2.0", "size": 85969 }
[ "javax.management.ObjectName", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.metrics2.util.MBeans" ]
import javax.management.ObjectName; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.metrics2.util.MBeans;
import javax.management.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.metrics2.util.*;
[ "javax.management", "org.apache.hadoop" ]
javax.management; org.apache.hadoop;
1,016,703
@Override protected boolean verifySelection() { // Assume the dialog input is valid boolean validFlag = true; // Get the input values as strings String newMinX = minXTextField.getText().trim(); String newMaxX = maxXTextField.getText().trim(); // Regular expr...
boolean function() { boolean validFlag = true; String newMinX = minXTextField.getText().trim(); String newMaxX = maxXTextField.getText().trim(); String pattern = STR; if (!newMinX.matches(pattern) !newMaxX.matches(pattern)) { new CPMDialogHandler().showMessageDialog(this, STR, STR, JOptionPane.ERROR_MESSAGE, OK_OPTION)...
/************************************************************************** * Verify that the bounds are valid * * @return true if the x-axis values are valid *************************************************************************/
Verify that the bounds are valid
verifySelection
{ "repo_name": "CACTUS-Mission/TRAPSat", "path": "TRAPSat_cFS/cfs/cfe/tools/perfutils-java/src/CFSPerformanceMonitor/CPMSetBoundsDialog.java", "license": "mit", "size": 21180 }
[ "javax.swing.JOptionPane" ]
import javax.swing.JOptionPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
587,503
public static ComparatorProtos.Comparator toComparator(ByteArrayComparable comparator) { ComparatorProtos.Comparator.Builder builder = ComparatorProtos.Comparator.newBuilder(); builder.setName(comparator.getClass().getName()); builder.setSerializedComparator(ByteStringer.wrap(comparator.toByteArray())); ...
static ComparatorProtos.Comparator function(ByteArrayComparable comparator) { ComparatorProtos.Comparator.Builder builder = ComparatorProtos.Comparator.newBuilder(); builder.setName(comparator.getClass().getName()); builder.setSerializedComparator(ByteStringer.wrap(comparator.toByteArray())); return builder.build(); }
/** * Convert a ByteArrayComparable to a protocol buffer Comparator * * @param comparator the ByteArrayComparable to convert * @return the converted protocol buffer Comparator */
Convert a ByteArrayComparable to a protocol buffer Comparator
toComparator
{ "repo_name": "JingchengDu/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java", "license": "apache-2.0", "size": 69138 }
[ "org.apache.hadoop.hbase.filter.ByteArrayComparable", "org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos", "org.apache.hadoop.hbase.util.ByteStringer" ]
import org.apache.hadoop.hbase.filter.ByteArrayComparable; import org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos; import org.apache.hadoop.hbase.util.ByteStringer;
import org.apache.hadoop.hbase.filter.*; import org.apache.hadoop.hbase.protobuf.generated.*; import org.apache.hadoop.hbase.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
858,063
@Test public void signLikePauloGonçalvesOriginal() throws Exception { String basePath = RESULT_FOLDER.getPath() + '/'; try ( InputStream pdfResource = getClass().getResourceAsStream("/mkl/testarea/itext5/extract/test.pdf"); InputStream img1Resource = getClass().getResourceAsStr...
void function() throws Exception { String basePath = RESULT_FOLDER.getPath() + '/'; try ( InputStream pdfResource = getClass().getResourceAsStream(STR); InputStream img1Resource = getClass().getResourceAsStream(STR); InputStream img2Resource = getClass().getResourceAsStream(STR)) { Files.copy(pdfResource, Paths.get(bas...
/** * <a href="https://stackoverflow.com/questions/62271473/multiple-signings-in-pdf-file-using-itext"> * Multiple Signings in pdf File using IText * </a> * <p> * This is like the OP's original code. Already the first <code>sign</code> * call truncates the original file before iText could ...
Multiple Signings in pdf File using IText This is like the OP's original code. Already the first <code>sign</code> call truncates the original file before iText could read it. Thus, iText throws an exception.
signLikePauloGonçalvesOriginal
{ "repo_name": "mkl-public/testarea-itext5", "path": "src/test/java/mkl/testarea/itext5/signature/CreateSignature.java", "license": "agpl-3.0", "size": 47208 }
[ "java.io.FileInputStream", "java.io.FileOutputStream", "java.io.InputStream", "java.nio.file.Files", "java.nio.file.Paths", "java.nio.file.StandardCopyOption" ]
import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Paths; import java.nio.file.StandardCopyOption;
import java.io.*; import java.nio.file.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,867,308
public Builder addStringSequenceVariable(String name, ImmutableSet<String> values) { checkVariableNotPresentAlready(name); Preconditions.checkNotNull(values, "Cannot set null as a value for variable '%s'", name); ImmutableList.Builder<String> builder = ImmutableList.builder(); buil...
Builder function(String name, ImmutableSet<String> values) { checkVariableNotPresentAlready(name); Preconditions.checkNotNull(values, STR, name); ImmutableList.Builder<String> builder = ImmutableList.builder(); builder.addAll(values); variablesMap.put(name, new StringSequence(builder.build())); return this; }
/** * Add a sequence variable that expands {@code name} to {@code values}. * * <p>Accepts values as ImmutableSet. As ImmutableList has smaller memory footprint, we copy * the values into a new list. */
Add a sequence variable that expands name to values. Accepts values as ImmutableSet. As ImmutableList has smaller memory footprint, we copy the values into a new list
addStringSequenceVariable
{ "repo_name": "damienmg/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainFeatures.java", "license": "apache-2.0", "size": 85726 }
[ "com.google.common.base.Preconditions", "com.google.common.collect.ImmutableList", "com.google.common.collect.ImmutableSet" ]
import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet;
import com.google.common.base.*; import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
793,031
public Observable<ServiceResponse<Page<ResourceMetricDefinitionInner>>> listMetricDefintionsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); }
Observable<ServiceResponse<Page<ResourceMetricDefinitionInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); }
/** * Get metrics that can be queried for an App Service plan, and their definitions. * Get metrics that can be queried for an App Service plan, and their definitions. * ServiceResponse<PageImpl<ResourceMetricDefinitionInner>> * @param nextPageLink The NextLink from the previous successful call to Li...
Get metrics that can be queried for an App Service plan, and their definitions. Get metrics that can be queried for an App Service plan, and their definitions
listMetricDefintionsNextSinglePageAsync
{ "repo_name": "jianghaolu/azure-sdk-for-java", "path": "azure-mgmt-appservice/src/main/java/com/microsoft/azure/management/appservice/implementation/AppServicePlansInner.java", "license": "mit", "size": 260114 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
130,201
private int getParamMaxLength() throws UnsupportedEncodingException { int length = 0; length += 25 * 2; // tagId + tagLength length += 27; // fixed sizes length += getFilterPeriodBegin() == INVALID_VALUE_PARAMETER ? 0 : 15; length += getFilterPeriodEnd() == INVALID_VALUE_PARA...
int function() throws UnsupportedEncodingException { int length = 0; length += 25 * 2; length += 27; length += getFilterPeriodBegin() == INVALID_VALUE_PARAMETER ? 0 : 15; length += getFilterPeriodEnd() == INVALID_VALUE_PARAMETER ? 0 : 15; if (getFilterRecipient() != null) length += getFilterRecipient().getBytes("UTF-8"...
/** * Get the approximate length needed to store the appParameters in a byte * array. * * @return the length in bytes * @throws UnsupportedEncodingException * if the platform does not support UTF-8 encoding. */
Get the approximate length needed to store the appParameters in a byte array
getParamMaxLength
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "packages/apps/Bluetooth/src/com/android/bluetooth/map/BluetoothMapAppParams.java", "license": "gpl-3.0", "size": 35382 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
1,072,200
public synchronized void setReader(Reader newReader) { reader = newReader; buffer.setLength(0); }
synchronized void function(Reader newReader) { reader = newReader; buffer.setLength(0); }
/** * Sets the reader object. * * @param newReader new reader object. */
Sets the reader object
setReader
{ "repo_name": "rrobek/JapanMapTranslate", "path": "src/kanaconv/KanjiInput.java", "license": "gpl-2.0", "size": 5687 }
[ "java.io.Reader" ]
import java.io.Reader;
import java.io.*;
[ "java.io" ]
java.io;
23,179
void setTypeface(@Nullable Typeface typeface);
void setTypeface(@Nullable Typeface typeface);
/** * Sets a typeface in which the text of this view should be displayed. * <p> * <b>Note</b>, that not all Typeface families actually have bold and italic variants, so you * may need to use {@link #setTypeface(Typeface, int)} to get the appearance that you actually * want. * * @param typeface The desired...
Sets a typeface in which the text of this view should be displayed. Note, that not all Typeface families actually have bold and italic variants, so you may need to use <code>#setTypeface(Typeface, int)</code> to get the appearance that you actually want
setTypeface
{ "repo_name": "android-libraries/android_ui", "path": "library/src/base/java/com/albedinsky/android/ui/widget/FontWidget.java", "license": "apache-2.0", "size": 2958 }
[ "android.graphics.Typeface", "android.support.annotation.Nullable" ]
import android.graphics.Typeface; import android.support.annotation.Nullable;
import android.graphics.*; import android.support.annotation.*;
[ "android.graphics", "android.support" ]
android.graphics; android.support;
1,888,367
public interface IndexSearcherWrapperFactory { IndexSearcherWrapper newWrapper(IndexService indexService); }
interface IndexSearcherWrapperFactory { IndexSearcherWrapper function(IndexService indexService); }
/** * Returns a new IndexSearcherWrapper. This method is called once per index per node */
Returns a new IndexSearcherWrapper. This method is called once per index per node
newWrapper
{ "repo_name": "jprante/elasticsearch-server", "path": "server/src/main/java/org/elasticsearch/index/IndexModule.java", "license": "apache-2.0", "size": 18362 }
[ "org.elasticsearch.index.shard.IndexSearcherWrapper" ]
import org.elasticsearch.index.shard.IndexSearcherWrapper;
import org.elasticsearch.index.shard.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
157,853
@Override public void addCollisionBoxesToList(final World world, final BlockPos coord, final IBlockState bs, final AxisAlignedBB box, final List collisionBoxList, final Entity entity) { final boolean connectNorth = this.canConnectTo(world,coord,EnumFacing.NORTH, coord.north()); final boolean con...
void function(final World world, final BlockPos coord, final IBlockState bs, final AxisAlignedBB box, final List collisionBoxList, final Entity entity) { final boolean connectNorth = this.canConnectTo(world,coord,EnumFacing.NORTH, coord.north()); final boolean connectSouth = this.canConnectTo(world,coord,EnumFacing.SOU...
/** * Calculates the collision boxes for this block. */
Calculates the collision boxes for this block
addCollisionBoxesToList
{ "repo_name": "28Smiles/E-Craft", "path": "main/java/de/ecraft/blocks/SteamPipe.java", "license": "gpl-3.0", "size": 10366 }
[ "java.util.List", "net.minecraft.block.state.IBlockState", "net.minecraft.entity.Entity", "net.minecraft.util.AxisAlignedBB", "net.minecraft.util.BlockPos", "net.minecraft.util.EnumFacing", "net.minecraft.world.World" ]
import java.util.List; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.World;
import java.util.*; import net.minecraft.block.state.*; import net.minecraft.entity.*; import net.minecraft.util.*; import net.minecraft.world.*;
[ "java.util", "net.minecraft.block", "net.minecraft.entity", "net.minecraft.util", "net.minecraft.world" ]
java.util; net.minecraft.block; net.minecraft.entity; net.minecraft.util; net.minecraft.world;
1,698,747
public Set<ImmutableBitSet> getUniqueKeys(Minus rel, RelMetadataQuery mq, boolean ignoreNulls) { Set<ImmutableBitSet> uniqueKeys = mq.getUniqueKeys(rel.getInput(0), ignoreNulls); if (uniqueKeys != null) { return uniqueKeys; } if (!rel.all) { return ImmutableSet.of( Immutab...
Set<ImmutableBitSet> function(Minus rel, RelMetadataQuery mq, boolean ignoreNulls) { Set<ImmutableBitSet> uniqueKeys = mq.getUniqueKeys(rel.getInput(0), ignoreNulls); if (uniqueKeys != null) { return uniqueKeys; } if (!rel.all) { return ImmutableSet.of( ImmutableBitSet.range(rel.getRowType().getFieldCount())); } return...
/** * The unique keys of Minus are precisely the unique keys of its first input. */
The unique keys of Minus are precisely the unique keys of its first input
getUniqueKeys
{ "repo_name": "apache/calcite", "path": "core/src/main/java/org/apache/calcite/rel/metadata/RelMdUniqueKeys.java", "license": "apache-2.0", "size": 12093 }
[ "com.google.common.collect.ImmutableSet", "java.util.Set", "org.apache.calcite.rel.core.Minus", "org.apache.calcite.util.ImmutableBitSet" ]
import com.google.common.collect.ImmutableSet; import java.util.Set; import org.apache.calcite.rel.core.Minus; import org.apache.calcite.util.ImmutableBitSet;
import com.google.common.collect.*; import java.util.*; import org.apache.calcite.rel.core.*; import org.apache.calcite.util.*;
[ "com.google.common", "java.util", "org.apache.calcite" ]
com.google.common; java.util; org.apache.calcite;
1,229,865
@Nullable RenderObject commit(@NonNull Class<?> clazz, @Router.Direction int how, long identifier);
@Nullable RenderObject commit(@NonNull Class<?> clazz, @Router.Direction int how, long identifier);
/** * Commit the class into the parent. * The class should be an instance of RenderObject. You should validate that previously * (else it will throw a bad cast when returning the instance) * * @param clazz to render * @param how to commit it (animations?) * @param identifier of the tr...
Commit the class into the parent. The class should be an instance of RenderObject. You should validate that previously (else it will throw a bad cast when returning the instance)
commit
{ "repo_name": "saantiaguilera/android-api-graph_flow", "path": "core/src/main/java/com/u/core/node/NodeSwitcher.java", "license": "gpl-3.0", "size": 973 }
[ "android.support.annotation.NonNull", "android.support.annotation.Nullable", "com.u.core.Router" ]
import android.support.annotation.NonNull; import android.support.annotation.Nullable; import com.u.core.Router;
import android.support.annotation.*; import com.u.core.*;
[ "android.support", "com.u.core" ]
android.support; com.u.core;
1,387,819
public static String getAutoToggleModeOnNewWifi(final Context context) { SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context); return sp.getString(PREF_AUTO_TOGGLE_DEFAULT_VALUE_FOR_NEW_WIFI, Config .DEFAULT_AUTO_TOGGLE_VALUE); }
static String function(final Context context) { SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context); return sp.getString(PREF_AUTO_TOGGLE_DEFAULT_VALUE_FOR_NEW_WIFI, Config .DEFAULT_AUTO_TOGGLE_VALUE); }
/** * Gets wifi auto toggle value for wifis the user connects to for the first time. * * @param context * @return String */
Gets wifi auto toggle value for wifis the user connects to for the first time
getAutoToggleModeOnNewWifi
{ "repo_name": "chris-carneiro/Wi-Fi-Toggler", "path": "app/src/main/java/net/opencurlybraces/android/projects/wifitoggler/util/PrefUtils.java", "license": "apache-2.0", "size": 9009 }
[ "android.content.Context", "android.content.SharedPreferences", "android.preference.PreferenceManager", "net.opencurlybraces.android.projects.wifitoggler.Config" ]
import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; import net.opencurlybraces.android.projects.wifitoggler.Config;
import android.content.*; import android.preference.*; import net.opencurlybraces.android.projects.wifitoggler.*;
[ "android.content", "android.preference", "net.opencurlybraces.android" ]
android.content; android.preference; net.opencurlybraces.android;
322,603
public void init() { try { reloadProperties(); } catch (ProvidedConfigurationException pce) { LogService.getRoot().log(Level.SEVERE, pce.getDialogMessage(), pce); // Show error message and wait StartupFailedDialogProvider.showErrorMessage(pce); throw pce; } restartTimer(); }
void function() { try { reloadProperties(); } catch (ProvidedConfigurationException pce) { LogService.getRoot().log(Level.SEVERE, pce.getDialogMessage(), pce); StartupFailedDialogProvider.showErrorMessage(pce); throw pce; } restartTimer(); }
/** * Loads the data and starts the timer */
Loads the data and starts the timer
init
{ "repo_name": "rapidminer/rapidminer-studio", "path": "src/main/java/com/rapidminer/tools/parameter/admin/ParameterEnforcer.java", "license": "agpl-3.0", "size": 7719 }
[ "com.rapidminer.tools.LogService", "java.util.logging.Level" ]
import com.rapidminer.tools.LogService; import java.util.logging.Level;
import com.rapidminer.tools.*; import java.util.logging.*;
[ "com.rapidminer.tools", "java.util" ]
com.rapidminer.tools; java.util;
798,165
private void loadNotes() { List<Note> noteList = mModel.getNotes(); //if the list is empty - display the placeholder, otherwise show the recyclerview if (!noteList.isEmpty()) { mView.hidePlaceholder(); mView.showNotes(noteList); } else { mView.show...
void function() { List<Note> noteList = mModel.getNotes(); if (!noteList.isEmpty()) { mView.hidePlaceholder(); mView.showNotes(noteList); } else { mView.showPlaceholder(); } }
/** * load a list of notes from the model */
load a list of notes from the model
loadNotes
{ "repo_name": "bioelectromecha/CryptoBox", "path": "app/src/main/java/cryptobox/presenters/NotesFragmentPresenter.java", "license": "mit", "size": 5766 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,352,955
public static void spawnAsEntity(World worldIn, BlockPos pos, ItemStack stack) { if (!worldIn.isRemote && worldIn.getGameRules().getBoolean("doTileDrops")) { float f = 0.5F; double d0 = (double)(worldIn.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D; double...
static void function(World worldIn, BlockPos pos, ItemStack stack) { if (!worldIn.isRemote && worldIn.getGameRules().getBoolean(STR)) { float f = 0.5F; double d0 = (double)(worldIn.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D; double d1 = (double)(worldIn.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D; double d...
/** * Spawns the given ItemStack as an EntityItem into the World at the given position */
Spawns the given ItemStack as an EntityItem into the World at the given position
spawnAsEntity
{ "repo_name": "SkidJava/BaseClient", "path": "new_1.8.8/net/minecraft/block/Block.java", "license": "gpl-2.0", "size": 70456 }
[ "net.minecraft.entity.item.EntityItem", "net.minecraft.item.ItemStack", "net.minecraft.util.BlockPos", "net.minecraft.world.World" ]
import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; import net.minecraft.world.World;
import net.minecraft.entity.item.*; import net.minecraft.item.*; import net.minecraft.util.*; import net.minecraft.world.*;
[ "net.minecraft.entity", "net.minecraft.item", "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.entity; net.minecraft.item; net.minecraft.util; net.minecraft.world;
828,932
public final StringBuilder appendTo( StringBuilder builder, @Nullable Object first, @Nullable Object second, Object... rest) { return appendTo(builder, iterable(first, second, rest)); }
final StringBuilder function( StringBuilder builder, @Nullable Object first, @Nullable Object second, Object... rest) { return appendTo(builder, iterable(first, second, rest)); }
/** * Appends to {@code builder} the string representation of each of the remaining arguments. * Identical to {@link #appendTo(Appendable, Object, Object, Object...)}, except that it does not * throw {@link IOException}. */
Appends to builder the string representation of each of the remaining arguments. Identical to <code>#appendTo(Appendable, Object, Object, Object...)</code>, except that it does not throw <code>IOException</code>
appendTo
{ "repo_name": "caskdata/cdap", "path": "cdap-api/src/main/java/co/cask/cdap/internal/guava/reflect/Joiner.java", "license": "apache-2.0", "size": 15052 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,648,937
@Test public void testIsLocationDefinedFalse() { final FileHandler handler = new FileHandler(); assertFalse("Location defined", handler.isLocationDefined()); }
void function() { final FileHandler handler = new FileHandler(); assertFalse(STR, handler.isLocationDefined()); }
/** * Tests whether an undefined location can be queried. */
Tests whether an undefined location can be queried
testIsLocationDefinedFalse
{ "repo_name": "apache/commons-configuration", "path": "src/test/java/org/apache/commons/configuration2/io/TestFileHandler.java", "license": "apache-2.0", "size": 52995 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,062,776
public void setFinalReceiptSumTotal(KualiDecimal finalSumTotal) { this.finalReceiptSumTotal = finalSumTotal; }
void function(KualiDecimal finalSumTotal) { this.finalReceiptSumTotal = finalSumTotal; }
/** * Sets the finalReceiptSumTotal attribute value. * * @param finalReceiptSumTotal The finalReceiptSumTotal to set. */
Sets the finalReceiptSumTotal attribute value
setFinalReceiptSumTotal
{ "repo_name": "bhutchinson/kfs", "path": "kfs-core/src/main/java/org/kuali/kfs/fp/document/web/struts/CashManagementForm.java", "license": "agpl-3.0", "size": 42584 }
[ "org.kuali.rice.core.api.util.type.KualiDecimal" ]
import org.kuali.rice.core.api.util.type.KualiDecimal;
import org.kuali.rice.core.api.util.type.*;
[ "org.kuali.rice" ]
org.kuali.rice;
2,393,907
public static MozuClient updateTreeDocumentContentClient(java.io.InputStream stream, String documentListName, String documentName, String contentType) throws Exception { MozuUrl url = com.mozu.api.urls.content.documentlists.DocumentTreeUrl.updateTreeDocumentContentUrl(documentListName, documentName); String ve...
static MozuClient function(java.io.InputStream stream, String documentListName, String documentName, String contentType) throws Exception { MozuUrl url = com.mozu.api.urls.content.documentlists.DocumentTreeUrl.updateTreeDocumentContentUrl(documentListName, documentName); String verb = "PUT"; MozuClient mozuClient = (Mo...
/** * Updates the binary data or content associated with a document, such as a product image or PDF specifications file, by supplying the document name. * <p><pre><code> * MozuClient mozuClient=UpdateTreeDocumentContentClient( stream, documentListName, documentName, contentType); * client.setBaseAddress(url)...
Updates the binary data or content associated with a document, such as a product image or PDF specifications file, by supplying the document name. <code><code> MozuClient mozuClient=UpdateTreeDocumentContentClient( stream, documentListName, documentName, contentType); client.setBaseAddress(url); client.executeRequest()...
updateTreeDocumentContentClient
{ "repo_name": "bhewett/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/clients/content/documentlists/DocumentTreeClient.java", "license": "mit", "size": 10144 }
[ "com.mozu.api.Headers", "com.mozu.api.MozuClient", "com.mozu.api.MozuClientFactory", "com.mozu.api.MozuUrl", "org.apache.commons.lang.StringUtils" ]
import com.mozu.api.Headers; import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; import org.apache.commons.lang.StringUtils;
import com.mozu.api.*; import org.apache.commons.lang.*;
[ "com.mozu.api", "org.apache.commons" ]
com.mozu.api; org.apache.commons;
1,244,678
public static PrivateKey decodePrivateKey(File key, char[] password) throws KeyException { if (!key.exists()) { throw new KeyException("Key file " + key.getAbsolutePath() + " does not exist"); } if (!key.canRead()) { throw new KeyException("Key file " + key.getAbsolu...
static PrivateKey function(File key, char[] password) throws KeyException { if (!key.exists()) { throw new KeyException(STR + key.getAbsolutePath() + STR); } if (!key.canRead()) { throw new KeyException(STR + key.getAbsolutePath() + STR); } try { return decodePrivateKey(DatatypeHelper.fileToByteArray(key), password); }...
/** * Decodes RSA/DSA private keys in DER, PEM, or PKCS#8 (encrypted or unencrypted) formats. * * @param key encoded key * @param password decryption password or null if the key is not encrypted * * @return deocded private key * * @throws KeyException thrown if the key can not...
Decodes RSA/DSA private keys in DER, PEM, or PKCS#8 (encrypted or unencrypted) formats
decodePrivateKey
{ "repo_name": "Safewhere/kombit-service-java", "path": "XmlTooling/src/org/opensaml/xml/security/SecurityHelper.java", "license": "mit", "size": 47541 }
[ "java.io.File", "java.io.IOException", "java.security.KeyException", "java.security.PrivateKey", "org.opensaml.xml.util.DatatypeHelper" ]
import java.io.File; import java.io.IOException; import java.security.KeyException; import java.security.PrivateKey; import org.opensaml.xml.util.DatatypeHelper;
import java.io.*; import java.security.*; import org.opensaml.xml.util.*;
[ "java.io", "java.security", "org.opensaml.xml" ]
java.io; java.security; org.opensaml.xml;
2,790,334
public static void exportAPIDocumentation(List<Documentation> docList, APIIdentifier apiIdentifier, Registry registry) throws APIExportException { Gson gson = new GsonBuilder().setPrettyPrinting().create(); String archivePath = archiveBasePath.concat(File.separator + apiIdentifier.getApi...
static void function(List<Documentation> docList, APIIdentifier apiIdentifier, Registry registry) throws APIExportException { Gson gson = new GsonBuilder().setPrettyPrinting().create(); String archivePath = archiveBasePath.concat(File.separator + apiIdentifier.getApiName() + "-" + apiIdentifier.getVersion()); createDir...
/** * Retrieve documentation for the exporting API and store it in the archive directory * FILE, INLINE and URL documentations are handled * * @param apiIdentifier ID of the requesting API * @param registry Current tenant registry * @param docList documentation list of the expor...
Retrieve documentation for the exporting API and store it in the archive directory FILE, INLINE and URL documentations are handled
exportAPIDocumentation
{ "repo_name": "dhanuka84/product-apim", "path": "modules/api-import-export/src/main/java/org.wso2.carbon.apimgt/importexport/utils/APIExportUtil.java", "license": "apache-2.0", "size": 36281 }
[ "com.google.gson.Gson", "com.google.gson.GsonBuilder", "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.InputStream", "java.io.OutputStream", "java.util.List", "org.apache.commons.io.IOUtils", "org.wso2.carbon.apimgt.api.model.APIIdentifier", "org.wso2.carbon.apimgt.ap...
import com.google.gson.Gson; import com.google.gson.GsonBuilder; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.List; import org.apache.commons.io.IOUtils; import org.wso2.carbon.apimgt.api.model.APIIdentifier; ...
import com.google.gson.*; import java.io.*; import java.util.*; import org.apache.commons.io.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.utils.*; import org.wso2.carbon.apimgt.importexport.*; import org.wso2.carbon.registry.api.*; import org.wso2.carbon.registry.core.*;
[ "com.google.gson", "java.io", "java.util", "org.apache.commons", "org.wso2.carbon" ]
com.google.gson; java.io; java.util; org.apache.commons; org.wso2.carbon;
749,544
public void resize(long size, AccessCondition accessCondition, FileRequestOptions options, OperationContext opContext) throws StorageException { if (opContext == null) { opContext = new OperationContext(); } opContext.initialize(); options = FileRequestOption...
void function(long size, AccessCondition accessCondition, FileRequestOptions options, OperationContext opContext) throws StorageException { if (opContext == null) { opContext = new OperationContext(); } opContext.initialize(); options = FileRequestOptions.applyDefaults(options, this.fileServiceClient); ExecutionEngine....
/** * Resizes the file to the specified size. * * @param size * A <code>long</code> which represents the size of the file, in bytes. * @param accessCondition * An {@link AccessCondition} object which represents the access conditions for the file. * @param option...
Resizes the file to the specified size
resize
{ "repo_name": "peterhoeltschi/AzureStorage", "path": "microsoft-azure-storage/src/com/microsoft/azure/storage/file/CloudFile.java", "license": "apache-2.0", "size": 119971 }
[ "com.microsoft.azure.storage.AccessCondition", "com.microsoft.azure.storage.OperationContext", "com.microsoft.azure.storage.StorageException", "com.microsoft.azure.storage.core.ExecutionEngine" ]
import com.microsoft.azure.storage.AccessCondition; import com.microsoft.azure.storage.OperationContext; import com.microsoft.azure.storage.StorageException; import com.microsoft.azure.storage.core.ExecutionEngine;
import com.microsoft.azure.storage.*; import com.microsoft.azure.storage.core.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
2,774,556
public static void addNewActionType( final Map<Integer, ActionType> actionTypeMap, final String value, final int column, final int row ) { final String ucValue = value.toUpperCase(); ...
static void function( final Map<Integer, ActionType> actionTypeMap, final String value, final int column, final int row ) { final String ucValue = value.toUpperCase(); Code code = tag2code.get( ucValue ); if ( code == null ) { code = tag2code.get( ucValue.substring( 0, 1 ) ); } if ( code != null ) { int count = 0; for ...
/** * Create a new action type that matches this cell, and add it to the map, * keyed on that column. */
Create a new action type that matches this cell, and add it to the map, keyed on that column
addNewActionType
{ "repo_name": "droolsjbpm/drools", "path": "drools-decisiontables/src/main/java/org/drools/decisiontable/parser/ActionType.java", "license": "apache-2.0", "size": 7379 }
[ "java.util.Map", "org.drools.template.parser.DecisionTableParseException" ]
import java.util.Map; import org.drools.template.parser.DecisionTableParseException;
import java.util.*; import org.drools.template.parser.*;
[ "java.util", "org.drools.template" ]
java.util; org.drools.template;
943,801
protected Itinerary parseItinerary(JsonNode it) throws JsonParseException, JsonMappingException, IOException { Itinerary newIt = new Itinerary(); newIt.startTime = it.get("startTime").asLong(); newIt.endTime = it.get("endTime").asLong(); newIt.walkTime = it.get("walkTime").asLong(); newIt.transitTime = ...
Itinerary function(JsonNode it) throws JsonParseException, JsonMappingException, IOException { Itinerary newIt = new Itinerary(); newIt.startTime = it.get(STR).asLong(); newIt.endTime = it.get(STR).asLong(); newIt.walkTime = it.get(STR).asLong(); newIt.transitTime = it.get(STR).asLong(); newIt.waitingTime = it.get(STR)...
/** * Parses an itinerary from a Json node. * * @param it Json node. * @return Itinerary parsed from given node. * * @throws JsonParseException * @throws JsonMappingException * @throws IOException */
Parses an itinerary from a Json node
parseItinerary
{ "repo_name": "poxrucker/collaborative-learning-simulation", "path": "Simulator/src/allow/simulator/mobility/planner/AbstractOTPPlanner.java", "license": "apache-2.0", "size": 6035 }
[ "com.fasterxml.jackson.core.JsonParseException", "com.fasterxml.jackson.databind.JsonMappingException", "com.fasterxml.jackson.databind.JsonNode", "java.io.IOException", "java.util.Iterator" ]
import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.JsonNode; import java.io.IOException; import java.util.Iterator;
import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.databind.*; import java.io.*; import java.util.*;
[ "com.fasterxml.jackson", "java.io", "java.util" ]
com.fasterxml.jackson; java.io; java.util;
2,035,591
public RequestMatcher exists() { return (XpathRequestMatcher) request -> this.xpathHelper.exists(request.getBodyAsBytes(), DEFAULT_ENCODING); }
RequestMatcher function() { return (XpathRequestMatcher) request -> this.xpathHelper.exists(request.getBodyAsBytes(), DEFAULT_ENCODING); }
/** * Assert that content exists at the given XPath. */
Assert that content exists at the given XPath
exists
{ "repo_name": "spring-projects/spring-framework", "path": "spring-test/src/main/java/org/springframework/test/web/client/match/XpathRequestMatchers.java", "license": "apache-2.0", "size": 5521 }
[ "org.springframework.test.web.client.RequestMatcher" ]
import org.springframework.test.web.client.RequestMatcher;
import org.springframework.test.web.client.*;
[ "org.springframework.test" ]
org.springframework.test;
872,952
public synchronized void removeEvents(final Collection<Event> eventsToRemove) { if (eventsToRemove != null && eventsToRemove.size() > 0) { final List<Event> events = eventsList(); if (events.removeAll(eventsToRemove)) { preferences_.edit().putString(EVENTS_PREFERENCE,...
synchronized void function(final Collection<Event> eventsToRemove) { if (eventsToRemove != null && eventsToRemove.size() > 0) { final List<Event> events = eventsList(); if (events.removeAll(eventsToRemove)) { preferences_.edit().putString(EVENTS_PREFERENCE, joinEvents(events, DELIMITER)).commit(); } } }
/** * Removes the specified events from the local store. Does nothing if the event collection * is null or empty. * @param eventsToRemove collection containing the events to remove from the local store */
Removes the specified events from the local store. Does nothing if the event collection is null or empty
removeEvents
{ "repo_name": "nicolsondsouza/countly-sdk-js", "path": "src/android/CountlyStore.java", "license": "mit", "size": 10639 }
[ "java.util.Collection", "java.util.List" ]
import java.util.Collection; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,607,074
public List findAll() throws DataAccessLayerException{ return super.findAll(Role.class); }
List function() throws DataAccessLayerException{ return super.findAll(Role.class); }
/** * Finds all users in the database. * @return */
Finds all users in the database
findAll
{ "repo_name": "Creedzy/MotionLayer", "path": "src/main/java/org/cg/service/DAOS/RoleDAO.java", "license": "mit", "size": 1238 }
[ "java.util.List", "org.cg.Model", "org.cg.service.Exception" ]
import java.util.List; import org.cg.Model; import org.cg.service.Exception;
import java.util.*; import org.cg.*; import org.cg.service.*;
[ "java.util", "org.cg", "org.cg.service" ]
java.util; org.cg; org.cg.service;
456,009
private boolean containsCompositeKey(TableInfo tableInfo) { return tableInfo.getTableIdType() != null && tableInfo.getTableIdType().isAnnotationPresent(Embeddable.class); }
boolean function(TableInfo tableInfo) { return tableInfo.getTableIdType() != null && tableInfo.getTableIdType().isAnnotationPresent(Embeddable.class); }
/** * Contains composite key. * * @param tableInfo * the table info * @return true, if successful */
Contains composite key
containsCompositeKey
{ "repo_name": "impetus-opensource/Kundera", "path": "src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java", "license": "apache-2.0", "size": 123023 }
[ "com.impetus.kundera.configure.schema.TableInfo", "javax.persistence.Embeddable" ]
import com.impetus.kundera.configure.schema.TableInfo; import javax.persistence.Embeddable;
import com.impetus.kundera.configure.schema.*; import javax.persistence.*;
[ "com.impetus.kundera", "javax.persistence" ]
com.impetus.kundera; javax.persistence;
28,653
public TweetDao composeNewTweet( String msg ) throws TwitterActionException { try { Status stat = twitter.updateStatus(msg); return tweetConverter.toTweet(stat); } catch ( TwitterException e ) { LOGGER.error(e.getMessage()); throw new Tw...
TweetDao function( String msg ) throws TwitterActionException { try { Status stat = twitter.updateStatus(msg); return tweetConverter.toTweet(stat); } catch ( TwitterException e ) { LOGGER.error(e.getMessage()); throw new TwitterActionException(e.getMessage()); } }
/** * Method which compose new tweet in Tweeter account * * @param msg * textual representation of tweet * @throws TwitterActionException */
Method which compose new tweet in Tweeter account
composeNewTweet
{ "repo_name": "voncuver/cwierkacz", "path": "src/main/java/com/pk/cwierkacz/twitter/TwitterAccount.java", "license": "agpl-3.0", "size": 20730 }
[ "com.pk.cwierkacz.model.dao.TweetDao" ]
import com.pk.cwierkacz.model.dao.TweetDao;
import com.pk.cwierkacz.model.dao.*;
[ "com.pk.cwierkacz" ]
com.pk.cwierkacz;
225,481
public T photos_upload(File photo, Long albumId) throws FacebookException, IOException;
T function(File photo, Long albumId) throws FacebookException, IOException;
/** * Uploads a photo to Facebook. * @param photo an image file * @param albumId the album into which the photo should be uploaded * @return a T with the standard Facebook photo information * @see <a href="http://wiki.developers.facebook.com/index.php/Photos.upload"> * Developers wiki: Photos.upload</...
Uploads a photo to Facebook
photos_upload
{ "repo_name": "jkinner/ringside", "path": "api/clients/java/com/facebook/api/IFacebookRestClient.java", "license": "lgpl-2.1", "size": 46105 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
141,117
public FaceletTaglibTagAttributeType<T> removeAllDisplayName() { childNode.removeChildren("display-name"); return this; } // --------------------------------------------------------------------------------------------------------|| // ClassName: FaceletTaglibTagAttributeType ElementName: ja...
FaceletTaglibTagAttributeType<T> function() { childNode.removeChildren(STR); return this; }
/** * Removes the <code>display-name</code> element * @return the current instance of <code>FaceletTaglibTagAttributeType<T></code> */
Removes the <code>display-name</code> element
removeAllDisplayName
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/facelettaglibrary22/FaceletTaglibTagAttributeTypeImpl.java", "license": "epl-1.0", "size": 14291 }
[ "org.jboss.shrinkwrap.descriptor.api.facelettaglibrary22.FaceletTaglibTagAttributeType" ]
import org.jboss.shrinkwrap.descriptor.api.facelettaglibrary22.FaceletTaglibTagAttributeType;
import org.jboss.shrinkwrap.descriptor.api.facelettaglibrary22.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
953,345
public List<org.ng200.openolympus.jooq.tables.pojos.ContestParticipation> fetchByScore(BigDecimal... values) { return fetch(ContestParticipation.CONTEST_PARTICIPATION.SCORE, values); }
List<org.ng200.openolympus.jooq.tables.pojos.ContestParticipation> function(BigDecimal... values) { return fetch(ContestParticipation.CONTEST_PARTICIPATION.SCORE, values); }
/** * Fetch records that have <code>score IN (values)</code> */
Fetch records that have <code>score IN (values)</code>
fetchByScore
{ "repo_name": "nickguletskii/OpenOlympus", "path": "src-gen/main/java/org/ng200/openolympus/jooq/tables/daos/ContestParticipationDao.java", "license": "mit", "size": 4319 }
[ "java.math.BigDecimal", "java.util.List", "org.ng200.openolympus.jooq.tables.ContestParticipation" ]
import java.math.BigDecimal; import java.util.List; import org.ng200.openolympus.jooq.tables.ContestParticipation;
import java.math.*; import java.util.*; import org.ng200.openolympus.jooq.tables.*;
[ "java.math", "java.util", "org.ng200.openolympus" ]
java.math; java.util; org.ng200.openolympus;
2,200,558
public synchronized Map<TriggerDescriptor,Trigger<?>> getTriggers() { return this.getTriggers(IMode.AUTO); }
synchronized Map<TriggerDescriptor,Trigger<?>> function() { return this.getTriggers(IMode.AUTO); }
/** * Returns all triggers defined on this project; or if detected to be * necessary, also all parents. * <p> * @return a map of triggers, might be empty, but never null */
Returns all triggers defined on this project; or if detected to be necessary, also all parents.
getTriggers
{ "repo_name": "rrialq/jenkins-inheritance-plugin", "path": "src/main/java/hudson/plugins/project_inheritance/projects/InheritanceProject.java", "license": "gpl-3.0", "size": 155118 }
[ "hudson.triggers.Trigger", "hudson.triggers.TriggerDescriptor", "java.util.Map" ]
import hudson.triggers.Trigger; import hudson.triggers.TriggerDescriptor; import java.util.Map;
import hudson.triggers.*; import java.util.*;
[ "hudson.triggers", "java.util" ]
hudson.triggers; java.util;
309,138
private void registerBluetoothIntentsIfNeeded() { // Check if this process has the BLUETOOTH permission or not. mHasBluetoothPermission = hasPermission( android.Manifest.permission.BLUETOOTH); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { mHasBluetoothPer...
void function() { mHasBluetoothPermission = hasPermission( android.Manifest.permission.BLUETOOTH); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { mHasBluetoothPermission &= ApiHelperForS.hasBluetoothConnectPermission(); } if (!mHasBluetoothPermission) { Log.w(TAG, STR); return; } mAudioDevices[DEVICE_BLUETOOTH_H...
/** * Register for BT intents if we have the BLUETOOTH permission. * Also extends the list of available devices with a BT device if one exists. */
Register for BT intents if we have the BLUETOOTH permission. Also extends the list of available devices with a BT device if one exists
registerBluetoothIntentsIfNeeded
{ "repo_name": "chromium/chromium", "path": "media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java", "license": "bsd-3-clause", "size": 53660 }
[ "android.os.Build", "org.chromium.base.Log", "org.chromium.base.compat.ApiHelperForS" ]
import android.os.Build; import org.chromium.base.Log; import org.chromium.base.compat.ApiHelperForS;
import android.os.*; import org.chromium.base.*; import org.chromium.base.compat.*;
[ "android.os", "org.chromium.base" ]
android.os; org.chromium.base;
593,897
public void setMarketDataSenderFactory(final MarketDataSenderFactory marketDataSenderFactory) { ArgumentChecker.notNull(marketDataSenderFactory, "marketDataSenderFactory"); _marketDataSenderFactory = marketDataSenderFactory; }
void function(final MarketDataSenderFactory marketDataSenderFactory) { ArgumentChecker.notNull(marketDataSenderFactory, STR); _marketDataSenderFactory = marketDataSenderFactory; }
/** * Sets the market data sender factory. * * @param marketDataSenderFactory * the factory, not null */
Sets the market data sender factory
setMarketDataSenderFactory
{ "repo_name": "McLeodMoores/starling", "path": "projects/live-data/src/main/java/com/opengamma/livedata/server/StandardLiveDataServer.java", "license": "apache-2.0", "size": 53596 }
[ "com.opengamma.livedata.server.distribution.MarketDataSenderFactory", "com.opengamma.util.ArgumentChecker" ]
import com.opengamma.livedata.server.distribution.MarketDataSenderFactory; import com.opengamma.util.ArgumentChecker;
import com.opengamma.livedata.server.distribution.*; import com.opengamma.util.*;
[ "com.opengamma.livedata", "com.opengamma.util" ]
com.opengamma.livedata; com.opengamma.util;
2,740,716
public static Image getPluginImage(String symbolicName, String path) { try { URL url = getPluginImageURL(symbolicName, path); if (url != null) { return getPluginImageFromUrl(url); } } catch (Throwable e) { // Ignore any exceptions } return null; }
static Image function(String symbolicName, String path) { try { URL url = getPluginImageURL(symbolicName, path); if (url != null) { return getPluginImageFromUrl(url); } } catch (Throwable e) { } return null; }
/** * Returns an {@link Image} based on a {@link Bundle} and resource entry path. * * @param symbolicName * the symbolic name of the {@link Bundle}. * @param path * the path of the resource entry. * @return the {@link Image} stored in the file at the specified path. */
Returns an <code>Image</code> based on a <code>Bundle</code> and resource entry path
getPluginImage
{ "repo_name": "openrobots-dev/ChibiOS", "path": "tools/eclipse/debug_support/src/org/eclipse/wb/swt/ResourceManager.java", "license": "gpl-3.0", "size": 14336 }
[ "org.eclipse.swt.graphics.Image" ]
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,731,109
void unregisterForRingbackTone(Handler h);
void unregisterForRingbackTone(Handler h);
/** * Unregisters for ringback tone notification. */
Unregisters for ringback tone notification
unregisterForRingbackTone
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/com/android/internal/telephony/Phone.java", "license": "apache-2.0", "size": 62674 }
[ "android.os.Handler" ]
import android.os.Handler;
import android.os.*;
[ "android.os" ]
android.os;
1,071,500
private void breadth(final ComponentEvent<?> event) { IEventSink sink = event.getSink(); boolean targetsApplication = sink instanceof Application; boolean targetsSession = targetsApplication || sink instanceof Session; boolean targetsCycle = targetsSession || sink instanceof RequestCycle; boolean targets...
void function(final ComponentEvent<?> event) { IEventSink sink = event.getSink(); boolean targetsApplication = sink instanceof Application; boolean targetsSession = targetsApplication sink instanceof Session; boolean targetsCycle = targetsSession sink instanceof RequestCycle; boolean targetsComponent = sink instanceof ...
/** * Breadth broadcast * * @param event */
Breadth broadcast
breadth
{ "repo_name": "dashorst/wicket", "path": "wicket-core/src/main/java/org/apache/wicket/ComponentEventSender.java", "license": "apache-2.0", "size": 7719 }
[ "org.apache.wicket.event.IEventSink", "org.apache.wicket.request.cycle.RequestCycle" ]
import org.apache.wicket.event.IEventSink; import org.apache.wicket.request.cycle.RequestCycle;
import org.apache.wicket.event.*; import org.apache.wicket.request.cycle.*;
[ "org.apache.wicket" ]
org.apache.wicket;
43,457
public void addDocuments(Iterable<? extends Iterable<? extends IndexableField>> docs, Analyzer analyzer) throws IOException { updateDocuments(null, docs, analyzer); }
void function(Iterable<? extends Iterable<? extends IndexableField>> docs, Analyzer analyzer) throws IOException { updateDocuments(null, docs, analyzer); }
/** * Atomically adds a block of documents, analyzed using the * provided analyzer, with sequentially assigned document * IDs, such that an external reader will see all or none * of the documents. * * @throws CorruptIndexException if the index is corrupt * @throws IOException if there is a low-lev...
Atomically adds a block of documents, analyzed using the provided analyzer, with sequentially assigned document IDs, such that an external reader will see all or none of the documents
addDocuments
{ "repo_name": "yintaoxue/read-open-source-code", "path": "lucene-4.7.2/src/org/apache/lucene/index/IndexWriter.java", "license": "apache-2.0", "size": 176689 }
[ "java.io.IOException", "org.apache.lucene.analysis.Analyzer" ]
import java.io.IOException; import org.apache.lucene.analysis.Analyzer;
import java.io.*; import org.apache.lucene.analysis.*;
[ "java.io", "org.apache.lucene" ]
java.io; org.apache.lucene;
1,549,969
Collection<AABB> getBlockCollisionBoxes(int x, int y, int z);
Collection<AABB> getBlockCollisionBoxes(int x, int y, int z);
/** * Gets the collision boxes of the block * at the given coordinates. * * @param x The x coordinate * @param y The y coordinate * @param z The z coordinate * @return The collision boxes, or empty if none were found */
Gets the collision boxes of the block at the given coordinates
getBlockCollisionBoxes
{ "repo_name": "LanternPowered/LanternServer", "path": "src/main/java/org/lanternpowered/server/world/extent/IExtent.java", "license": "mit", "size": 1148 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,907,876
public Table getTable(final String tableName, boolean throwException) throws HiveException { String[] names = Utilities.getDbTableName(tableName); return this.getTable(names[0], names[1], throwException); }
Table function(final String tableName, boolean throwException) throws HiveException { String[] names = Utilities.getDbTableName(tableName); return this.getTable(names[0], names[1], throwException); }
/** * Returns metadata for the table named tableName * @param tableName the name of the table * @param throwException controls whether an exception is thrown or a returns a null * @return the table metadata * @throws HiveException if there's an internal error or if the * table doesn't exist */
Returns metadata for the table named tableName
getTable
{ "repo_name": "nishantmonu51/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java", "license": "apache-2.0", "size": 254947 }
[ "org.apache.hadoop.hive.ql.exec.Utilities" ]
import org.apache.hadoop.hive.ql.exec.Utilities;
import org.apache.hadoop.hive.ql.exec.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,047,537
public static String sendToSlaveServer( TransMeta transMeta, TransExecutionConfiguration executionConfiguration, Repository repository, IMetaStore metaStore ) throws KettleException { String carteObjectId; SlaveServer slaveServer = executionConfiguration.getRemoteServer(); if ( slaveServer == null ...
static String function( TransMeta transMeta, TransExecutionConfiguration executionConfiguration, Repository repository, IMetaStore metaStore ) throws KettleException { String carteObjectId; SlaveServer slaveServer = executionConfiguration.getRemoteServer(); if ( slaveServer == null ) { throw new KettleException( STR );...
/** * Send the transformation for execution to a Carte slave server. * * @param transMeta * the transformation meta-data * @param executionConfiguration * the transformation execution configuration * @param repository * the repository * @return The Carte object ID o...
Send the transformation for execution to a Carte slave server
sendToSlaveServer
{ "repo_name": "alina-ipatina/pentaho-kettle", "path": "engine/src/org/pentaho/di/trans/Trans.java", "license": "apache-2.0", "size": 197880 }
[ "java.net.URLEncoder", "org.pentaho.di.cluster.SlaveServer", "org.pentaho.di.core.Const", "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.core.util.Utils", "org.pentaho.di.core.vfs.KettleVFS", "org.pentaho.di.repository.Repository", "org.pentaho.di.resource.ResourceUtil", "org.penta...
import java.net.URLEncoder; import org.pentaho.di.cluster.SlaveServer; import org.pentaho.di.core.Const; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.util.Utils; import org.pentaho.di.core.vfs.KettleVFS; import org.pentaho.di.repository.Repository; import org.pentaho.di.resource.Reso...
import java.net.*; import org.pentaho.di.cluster.*; import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.util.*; import org.pentaho.di.core.vfs.*; import org.pentaho.di.repository.*; import org.pentaho.di.resource.*; import org.pentaho.di.www.*; import org.pentaho.metastore.a...
[ "java.net", "org.pentaho.di", "org.pentaho.metastore" ]
java.net; org.pentaho.di; org.pentaho.metastore;
2,578,113
private void enablePreferences(boolean enableBlocker, Preference channelBlacklistPreference, Preference channelWhitelistPreference) { findPreference(getString(R.string.pref_key_channel_filter_method)).setEnabled(enableBlocker); initChannelFilteringPreferences(enableBlocker, channelBlacklistPreference, channelWhi...
void function(boolean enableBlocker, Preference channelBlacklistPreference, Preference channelWhitelistPreference) { findPreference(getString(R.string.pref_key_channel_filter_method)).setEnabled(enableBlocker); initChannelFilteringPreferences(enableBlocker, channelBlacklistPreference, channelWhitelistPreference); findP...
/** * Enable/Disable the preferences "views" based on whether the video blocker is enabled or not. * * @param enableBlocker True means video blocker is enabled by the user. * @param channelBlacklistPreference {@link Preference} for channel blacklisting. * @param channelWhitelistPreference ...
Enable/Disable the preferences "views" based on whether the video blocker is enabled or not
enablePreferences
{ "repo_name": "ram-on/SkyTube", "path": "app/src/main/java/free/rm/skytube/gui/fragments/preferences/VideoBlockerPreferenceFragment.java", "license": "gpl-3.0", "size": 18037 }
[ "androidx.preference.Preference" ]
import androidx.preference.Preference;
import androidx.preference.*;
[ "androidx.preference" ]
androidx.preference;
1,927,025
public void paint(Graphics g) { if (color != RESERVED_FOR_CUSTOM_COLOR) { g2d = (Graphics2D) g; ourDimensions = getSize(); Rectangle2D.Double background = new Rectangle2D.Double(0, 0, ourDimensions.width, ourDimensions.height); g2d.setColor(color);...
void function(Graphics g) { if (color != RESERVED_FOR_CUSTOM_COLOR) { g2d = (Graphics2D) g; ourDimensions = getSize(); Rectangle2D.Double background = new Rectangle2D.Double(0, 0, ourDimensions.width, ourDimensions.height); g2d.setColor(color); g2d.fill(background); } else { if ((customColor.getRed() > TOO_LIGHT_VALUE ...
/** Makes it paint a square of color instead of a string or render the custom text with the current custom color * * @param g The graphics that are being used for the painting */
Makes it paint a square of color instead of a string or render the custom text with the current custom color
paint
{ "repo_name": "darksideprogramming/LineFit", "path": "LineFit WS/LineFit/src/linefit/ColorBoxRenderer.java", "license": "agpl-3.0", "size": 4775 }
[ "java.awt.Color", "java.awt.Graphics", "java.awt.Graphics2D", "java.awt.geom.Rectangle2D" ]
import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.geom.Rectangle2D;
import java.awt.*; import java.awt.geom.*;
[ "java.awt" ]
java.awt;
585,441
@Override public List<E> subList(final int fromIndex, final int toIndex) { return Collections.checkedList(super.subList(fromIndex, toIndex), type); }
List<E> function(final int fromIndex, final int toIndex) { return Collections.checkedList(super.subList(fromIndex, toIndex), type); }
/** * Returns a checked sublist. * * <p><b>Limitation:</b> current implementation checks only the type. * It does not prevent the insertion of {@code null} values.</p> * * @param fromIndex index of the first element. * @param toIndex index after the last element. * @return ...
Returns a checked sublist. Limitation: current implementation checks only the type. It does not prevent the insertion of null values
subList
{ "repo_name": "Geomatys/sis", "path": "core/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java", "license": "apache-2.0", "size": 14016 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,860,589
@Test(groups = "Hybrid", enabled = true, timeOut = 300000) public void AONE_15493() throws Exception { String testName = getTestName() + uniqueRun; String opUser1 = getUserNameForDomain(testName + "opUser1", testDomain); String opSiteName = getSiteName(testName) + "-OP"; ...
@Test(groups = STR, enabled = true, timeOut = 300000) void function() throws Exception { String testName = getTestName() + uniqueRun; String opUser1 = getUserNameForDomain(testName + STR, testDomain); String opSiteName = getSiteName(testName) + "-OP"; String opFileName1 = getFileName(testName) + "1"; String opFileName2...
/** * AONE-15493:Already synced files. */
AONE-15493:Already synced files
AONE_15493
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/qa-share/src/test/java/org/alfresco/share/cloudsync/HybridSyncNegativeTests2.java", "license": "lgpl-3.0", "size": 62857 }
[ "org.alfresco.po.share.site.document.DocumentLibraryPage", "org.alfresco.po.share.workflow.DestinationAndAssigneePage", "org.alfresco.share.util.ShareUser", "org.testng.Assert", "org.testng.annotations.Test" ]
import org.alfresco.po.share.site.document.DocumentLibraryPage; import org.alfresco.po.share.workflow.DestinationAndAssigneePage; import org.alfresco.share.util.ShareUser; import org.testng.Assert; import org.testng.annotations.Test;
import org.alfresco.po.share.site.document.*; import org.alfresco.po.share.workflow.*; import org.alfresco.share.util.*; import org.testng.*; import org.testng.annotations.*;
[ "org.alfresco.po", "org.alfresco.share", "org.testng", "org.testng.annotations" ]
org.alfresco.po; org.alfresco.share; org.testng; org.testng.annotations;
770,068
default @Nullable String getExpectedVersionString() { return null; }
default @Nullable String getExpectedVersionString() { return null; }
/** * Returns an expected version string. The same major version is and SDK is expected to be returned. */
Returns an expected version string. The same major version is and SDK is expected to be returned
getExpectedVersionString
{ "repo_name": "zdary/intellij-community", "path": "platform/lang-impl/src/com/intellij/openapi/roots/ui/configuration/UnknownSdk.java", "license": "apache-2.0", "size": 1691 }
[ "org.jetbrains.annotations.Nullable" ]
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
1,957,650
private boolean alreadyScheduled(String ipAddress, String pkgName) { synchronized (m_thresholdableServices) { for (ThresholdableService tSvc : m_thresholdableServices) { InetAddress addr = (InetAddress) tSvc.getAddress(); if (InetAddressUtils.str(addr).equals(Ine...
boolean function(String ipAddress, String pkgName) { synchronized (m_thresholdableServices) { for (ThresholdableService tSvc : m_thresholdableServices) { InetAddress addr = (InetAddress) tSvc.getAddress(); if (InetAddressUtils.str(addr).equals(InetAddressUtils.normalize(ipAddress)) && tSvc.getPackageName().equals(pkgNa...
/** * Returns true if specified address/pkg pair is already represented in the * thresholdable services list. False otherwise. */
Returns true if specified address/pkg pair is already represented in the thresholdable services list. False otherwise
alreadyScheduled
{ "repo_name": "bugcy013/opennms-tmp-tools", "path": "opennms-services/src/main/java/org/opennms/netmgt/threshd/Threshd.java", "license": "gpl-2.0", "size": 18208 }
[ "java.net.InetAddress", "org.opennms.core.utils.InetAddressUtils" ]
import java.net.InetAddress; import org.opennms.core.utils.InetAddressUtils;
import java.net.*; import org.opennms.core.utils.*;
[ "java.net", "org.opennms.core" ]
java.net; org.opennms.core;
514,090
public List getRowKeys() { return this.data; }
List function() { return this.data; }
/** * Returns the row keys. In this case, each series is a key. * * @return The row keys. */
Returns the row keys. In this case, each series is a key
getRowKeys
{ "repo_name": "linuxuser586/jfreechart", "path": "source/org/jfree/data/gantt/TaskSeriesCollection.java", "license": "lgpl-2.1", "size": 22000 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,026,721
public static <T extends GraphEntity> boolean containsAll(Collection<T> collection, Collection<T> toFind) { return toFind.stream().allMatch(e -> contains(collection, e)); } /** * Returns true if the <code>left</code> and <code>right</code> contain the same * elements, using {@link GraphEn...
static <T extends GraphEntity> boolean function(Collection<T> collection, Collection<T> toFind) { return toFind.stream().allMatch(e -> contains(collection, e)); } /** * Returns true if the <code>left</code> and <code>right</code> contain the same * elements, using {@link GraphEntity#deepEquals(Object)} </code> for comp...
/** * Returns true if the <code>collection</code> contains all elements of * <code>toFind</code>, using {@link GraphEntity#deepEquals(Object)} for * comparing elements. * * @param collection the collection to check * @param toFind the entities to find in the collection * @param <T> ...
Returns true if the <code>collection</code> contains all elements of <code>toFind</code>, using <code>GraphEntity#deepEquals(Object)</code> for comparing elements
containsAll
{ "repo_name": "researchstudio-sat/webofneeds", "path": "webofneeds/won-utils/won-utils-shacl2java/src/main/java/won/shacl2java/runtime/DeepEqualsUtils.java", "license": "apache-2.0", "size": 4274 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,336,566
@Override public void setProperties(Map<String, Object> props) { super.setProperties(props); if (props.get(STRATEGY_CLASS_PROP_KEY) != null) { String strategy_class = (String) props.get(STRATEGY_CLASS_PROP_KEY); try { ClusteringStrategyIfc strategy_tmp = (ClusteringStrategyIfc) Class.forName( ...
void function(Map<String, Object> props) { super.setProperties(props); if (props.get(STRATEGY_CLASS_PROP_KEY) != null) { String strategy_class = (String) props.get(STRATEGY_CLASS_PROP_KEY); try { ClusteringStrategyIfc strategy_tmp = (ClusteringStrategyIfc) Class.forName( strategy_class).newInstance(); strategy_tmp.setS...
/** * Standard component's configuration method. * * * @param props */
Standard component's configuration method
setProperties
{ "repo_name": "DanielYao/tigase-server", "path": "src/main/java/tigase/cluster/SessionManagerClustered.java", "license": "agpl-3.0", "size": 17180 }
[ "java.util.Map", "java.util.logging.Level" ]
import java.util.Map; import java.util.logging.Level;
import java.util.*; import java.util.logging.*;
[ "java.util" ]
java.util;
2,215,160
@Override public void close() throws OncRpcException, IOException { buffer = null; socket = null; }
void function() throws OncRpcException, IOException { buffer = null; socket = null; }
/** * Closes this encoding XDR stream and releases any system resources * associated with this stream. The general contract of <code>close</code> * is that it closes the encoding XDR stream. A closed XDR stream cannot * perform encoding operations and cannot be reopened. * * @throws OncRpc...
Closes this encoding XDR stream and releases any system resources associated with this stream. The general contract of <code>close</code> is that it closes the encoding XDR stream. A closed XDR stream cannot perform encoding operations and cannot be reopened
close
{ "repo_name": "SnakeDoc/GuestVM", "path": "guestvm~guestvm/com.oracle.max.ve.nfsserver/src/org/acplt/oncrpc/XdrTcpEncodingStream.java", "license": "bsd-3-clause", "size": 14120 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
273,946
public static SAML11AssertionType createSAML11Assertion(String id, XMLGregorianCalendar issueInstant, String issuer) { SAML11AssertionType assertion = new SAML11AssertionType(id, issueInstant); assertion.setIssuer(issuer); return assertion; }
static SAML11AssertionType function(String id, XMLGregorianCalendar issueInstant, String issuer) { SAML11AssertionType assertion = new SAML11AssertionType(id, issueInstant); assertion.setIssuer(issuer); return assertion; }
/** * Create an assertion * * @param id * @param issuer * * @return */
Create an assertion
createSAML11Assertion
{ "repo_name": "chameleon82/keycloak", "path": "saml-core/src/main/java/org/keycloak/saml/processing/core/saml/v2/util/AssertionUtil.java", "license": "apache-2.0", "size": 22336 }
[ "javax.xml.datatype.XMLGregorianCalendar", "org.keycloak.dom.saml.v1.assertion.SAML11AssertionType" ]
import javax.xml.datatype.XMLGregorianCalendar; import org.keycloak.dom.saml.v1.assertion.SAML11AssertionType;
import javax.xml.datatype.*; import org.keycloak.dom.saml.v1.assertion.*;
[ "javax.xml", "org.keycloak.dom" ]
javax.xml; org.keycloak.dom;
1,842,661
public InvoicePaidApplied getInvoicePaidApplied(int index) { return index < getInvoicePaidApplieds().size() ? getInvoicePaidApplieds().get(index) : new InvoicePaidApplied(); }
InvoicePaidApplied function(int index) { return index < getInvoicePaidApplieds().size() ? getInvoicePaidApplieds().get(index) : new InvoicePaidApplied(); }
/** * This method retrieves a specific applied payment from the list, by array index * * @param index the index of the applied payment to retrieve * @return an InvoicePaidApplied */
This method retrieves a specific applied payment from the list, by array index
getInvoicePaidApplied
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/document/PaymentApplicationDocument.java", "license": "agpl-3.0", "size": 79628 }
[ "org.kuali.kfs.module.ar.businessobject.InvoicePaidApplied" ]
import org.kuali.kfs.module.ar.businessobject.InvoicePaidApplied;
import org.kuali.kfs.module.ar.businessobject.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
2,666,325
public ObjectInputStream getEntrada() { return entrada; }
ObjectInputStream function() { return entrada; }
/** * Pide la entrada. * * @return Devuelve la entrada */
Pide la entrada
getEntrada
{ "repo_name": "JavaPeppers/jrpg-2017b-cliente", "path": "src/main/java/cliente/Cliente.java", "license": "mit", "size": 14040 }
[ "java.io.ObjectInputStream" ]
import java.io.ObjectInputStream;
import java.io.*;
[ "java.io" ]
java.io;
964,393
@SuppressWarnings("unchecked") public B usingDriverExecutable(File file) { checkNotNull(file); checkExecutable(file); this.exe = file; return (B) this; }
@SuppressWarnings(STR) B function(File file) { checkNotNull(file); checkExecutable(file); this.exe = file; return (B) this; }
/** * Sets which driver executable the builder will use. * * @param file The executable to use. * @return A self reference. */
Sets which driver executable the builder will use
usingDriverExecutable
{ "repo_name": "krmahadevan/selenium", "path": "java/client/src/org/openqa/selenium/remote/service/DriverService.java", "license": "apache-2.0", "size": 11194 }
[ "com.google.common.base.Preconditions", "java.io.File" ]
import com.google.common.base.Preconditions; import java.io.File;
import com.google.common.base.*; import java.io.*;
[ "com.google.common", "java.io" ]
com.google.common; java.io;
1,076,031
INaviView getView(INaviFunction function);
INaviView getView(INaviFunction function);
/** * Returns the view backed by a given function. * * @param function The function that backs the view. * * @return The view backed by a given function. */
Returns the view backed by a given function
getView
{ "repo_name": "google/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/disassembly/views/IViewContainer.java", "license": "apache-2.0", "size": 6097 }
[ "com.google.security.zynamics.binnavi.disassembly.INaviFunction" ]
import com.google.security.zynamics.binnavi.disassembly.INaviFunction;
import com.google.security.zynamics.binnavi.disassembly.*;
[ "com.google.security" ]
com.google.security;
818,761
protected ZonelessTime getTime() { ZonelessTime zt = new ZonelessTime(); zt.setZonelessTime(getCal().getTimeInMillis()); return zt; }
ZonelessTime function() { ZonelessTime zt = new ZonelessTime(); zt.setZonelessTime(getCal().getTimeInMillis()); return zt; }
/** * Converts this literal to a * {@link org.apache.calcite.util.ZonelessTime} object. */
Converts this literal to a <code>org.apache.calcite.util.ZonelessTime</code> object
getTime
{ "repo_name": "YrAuYong/incubator-calcite", "path": "core/src/main/java/org/apache/calcite/sql/SqlAbstractDateTimeLiteral.java", "license": "apache-2.0", "size": 4501 }
[ "org.apache.calcite.util.ZonelessTime" ]
import org.apache.calcite.util.ZonelessTime;
import org.apache.calcite.util.*;
[ "org.apache.calcite" ]
org.apache.calcite;
1,296,727
public ServiceCall<List<CertificateIssuerItem>> listCertificateIssuersAsync(final String vaultBaseUrl, final Integer maxresults, final ListOperationCallback<CertificateIssuerItem> serviceCallback) { return innerKeyVaultClient.getCertificateIssuersAsync(vaultBaseUrl, maxresults, serviceCallback); }
ServiceCall<List<CertificateIssuerItem>> function(final String vaultBaseUrl, final Integer maxresults, final ListOperationCallback<CertificateIssuerItem> serviceCallback) { return innerKeyVaultClient.getCertificateIssuersAsync(vaultBaseUrl, maxresults, serviceCallback); }
/** * List certificate issuers for the specified vault. * * @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results. * @param serviceCallback the async S...
List certificate issuers for the specified vault
listCertificateIssuersAsync
{ "repo_name": "pomortaz/azure-sdk-for-java", "path": "azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClient.java", "license": "mit", "size": 85271 }
[ "com.microsoft.azure.ListOperationCallback", "com.microsoft.azure.keyvault.models.CertificateIssuerItem", "com.microsoft.rest.ServiceCall", "java.util.List" ]
import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.keyvault.models.CertificateIssuerItem; import com.microsoft.rest.ServiceCall; import java.util.List;
import com.microsoft.azure.*; import com.microsoft.azure.keyvault.models.*; import com.microsoft.rest.*; import java.util.*;
[ "com.microsoft.azure", "com.microsoft.rest", "java.util" ]
com.microsoft.azure; com.microsoft.rest; java.util;
1,164,509
private void deleteIPCondition(Connection connection, int conID) throws SQLException { final String query = "DELETE FROM AM_IP_CONDITION WHERE CONDITION_GROUP_ID = ?"; try (PreparedStatement preparedStatement = connection.prepareStatement(query)) { preparedStatement.setInt(1, conID); ...
void function(Connection connection, int conID) throws SQLException { final String query = STR; try (PreparedStatement preparedStatement = connection.prepareStatement(query)) { preparedStatement.setInt(1, conID); preparedStatement.execute(); } }
/** * Deleting IP condition from database * * @param connection connection to the database * @param conID condition group id/ pipeline id of the ip condition * @throws SQLException if error occurred when ip condition is deleted */
Deleting IP condition from database
deleteIPCondition
{ "repo_name": "lakmali/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.core/src/main/java/org/wso2/carbon/apimgt/core/dao/impl/PolicyDAOImpl.java", "license": "apache-2.0", "size": 109019 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,241,615
public static Document createDocument(String xmlString) { log.debug("createDocument()"); Document document = null; DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); builderFactory.setNamespaceAware(true); try { setDocumentBuilderFactoryFeatures(build...
static Document function(String xmlString) { log.debug(STR); Document document = null; DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); builderFactory.setNamespaceAware(true); try { setDocumentBuilderFactoryFeatures(builderFactory); DocumentBuilder documentBuilder = builderFactory.newDocume...
/** * Create document object from XML string * * @return Document */
Create document object from XML string
createDocument
{ "repo_name": "clhedrick/sakai", "path": "samigo/samigo-qti/src/java/org/sakaiproject/tool/assessment/qti/util/XmlUtil.java", "license": "apache-2.0", "size": 20571 }
[ "java.io.IOException", "javax.xml.parsers.DocumentBuilder", "javax.xml.parsers.DocumentBuilderFactory", "javax.xml.parsers.ParserConfigurationException", "org.w3c.dom.Document", "org.xml.sax.SAXException" ]
import java.io.IOException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; import org.xml.sax.SAXException;
import java.io.*; import javax.xml.parsers.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "java.io", "javax.xml", "org.w3c.dom", "org.xml.sax" ]
java.io; javax.xml; org.w3c.dom; org.xml.sax;
1,504,431
public OffsetDateTime getExpirationDateTime() { return this.expirationDateTime; }
OffsetDateTime function() { return this.expirationDateTime; }
/** * Get the expirationDateTime property: The expirationDateTime property. * * @return the expirationDateTime value. */
Get the expirationDateTime property: The expirationDateTime property
getExpirationDateTime
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/JobMetadata.java", "license": "mit", "size": 3872 }
[ "java.time.OffsetDateTime" ]
import java.time.OffsetDateTime;
import java.time.*;
[ "java.time" ]
java.time;
2,897,591
@Test public void testAddDiscardStateHandleAfterFailure() throws Exception { // Setup LongStateStorage stateHandleProvider = new LongStateStorage(); CuratorFramework client = spy(ZooKeeper.getClient()); when(client.create()).thenThrow(new RuntimeException("Expected test Exception.")); ZooKeeperStateHand...
void function() throws Exception { LongStateStorage stateHandleProvider = new LongStateStorage(); CuratorFramework client = spy(ZooKeeper.getClient()); when(client.create()).thenThrow(new RuntimeException(STR)); ZooKeeperStateHandleStore<Long> store = new ZooKeeperStateHandleStore<>( client, stateHandleProvider, Execut...
/** * Tests that the created state handle is discarded if ZooKeeper create fails. */
Tests that the created state handle is discarded if ZooKeeper create fails
testAddDiscardStateHandleAfterFailure
{ "repo_name": "DieBauer/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/zookeeper/ZooKeeperStateHandleStoreITCase.java", "license": "apache-2.0", "size": 19399 }
[ "org.apache.curator.framework.CuratorFramework", "org.apache.flink.runtime.concurrent.Executors", "org.junit.Assert", "org.mockito.Mockito" ]
import org.apache.curator.framework.CuratorFramework; import org.apache.flink.runtime.concurrent.Executors; import org.junit.Assert; import org.mockito.Mockito;
import org.apache.curator.framework.*; import org.apache.flink.runtime.concurrent.*; import org.junit.*; import org.mockito.*;
[ "org.apache.curator", "org.apache.flink", "org.junit", "org.mockito" ]
org.apache.curator; org.apache.flink; org.junit; org.mockito;
1,357,500
public Object clone() throws CloneNotSupportedException { SimilarityProfile clone = (SimilarityProfile) super.clone(); //new SimilarityProfile((CaseStruct) caseStruct.clone(), username, domain); List keys = caseStruct.getFeaturePaths(); for (int i = 0; i < keys.size(); i++) { St...
Object function() throws CloneNotSupportedException { SimilarityProfile clone = (SimilarityProfile) super.clone(); List keys = caseStruct.getFeaturePaths(); for (int i = 0; i < keys.size(); i++) { String key = (String) keys.get(i); Double relevance = (Double) relevances.get(key); if (relevance != null) clone.relevances...
/** * Creates and returns a copy of this SimilarityProfile. * * @return a clone of this instance. */
Creates and returns a copy of this SimilarityProfile
clone
{ "repo_name": "knoxsp/Concept", "path": "src/cbml/cbr/SimilarityProfile.java", "license": "gpl-2.0", "size": 39835 }
[ "java.util.ArrayList", "java.util.Hashtable", "java.util.List" ]
import java.util.ArrayList; import java.util.Hashtable; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,411,738
public void setFilldbl3(BigDecimal filldbl3) { this.filldbl3 = filldbl3; }
void function(BigDecimal filldbl3) { this.filldbl3 = filldbl3; }
/** * This method was generated by MyBatis Generator. * This method sets the value of the database column PTOPER.FILLDBL3 * * @param filldbl3 the value for PTOPER.FILLDBL3 * * @mbggenerated Fri Jul 22 13:16:43 CST 2011 */
This method was generated by MyBatis Generator. This method sets the value of the database column PTOPER.FILLDBL3
setFilldbl3
{ "repo_name": "zhanrui/ky-epss", "path": "src/main/java/platform/repository/model/Ptoper.java", "license": "gpl-2.0", "size": 27817 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
458,677
// Setup the command line options CommandLine commandLine = new CommandLineHelper().startApp(createOptions(), "flatnj [options] <input>", "An implementation of the Flat Net Joining (FlatNJ) algorithm to produce planar networks where labels can appear inside the network.\n" + ...
CommandLine commandLine = new CommandLineHelper().startApp(createOptions(), STR, STR + STR + STR, args); if (commandLine == null) { return; } try { LogConfig.defaultConfig(commandLine.hasOption(OPT_VERBOSE)); log.info(STR); log.debug(STR); FlatNJOptions opts = processArgs(commandLine); FlatNJ flatNJ = new FlatNJ(opts);...
/** * Main method * * @param args the command line arguments */
Main method
main
{ "repo_name": "maplesond/spectre", "path": "flatnj/src/main/java/uk/ac/uea/cmp/spectre/flatnj/FlatNJCLI.java", "license": "gpl-3.0", "size": 6903 }
[ "org.apache.commons.cli.CommandLine", "org.apache.commons.lang3.StringUtils", "uk.ac.uea.cmp.spectre.core.ui.cli.CommandLineHelper", "uk.ac.uea.cmp.spectre.core.util.LogConfig" ]
import org.apache.commons.cli.CommandLine; import org.apache.commons.lang3.StringUtils; import uk.ac.uea.cmp.spectre.core.ui.cli.CommandLineHelper; import uk.ac.uea.cmp.spectre.core.util.LogConfig;
import org.apache.commons.cli.*; import org.apache.commons.lang3.*; import uk.ac.uea.cmp.spectre.core.ui.cli.*; import uk.ac.uea.cmp.spectre.core.util.*;
[ "org.apache.commons", "uk.ac.uea" ]
org.apache.commons; uk.ac.uea;
571,491
@ApiModelProperty(value = "") public String getEnQueueTime() { return enQueueTime; }
@ApiModelProperty(value = "") String function() { return enQueueTime; }
/** * Get enQueueTime * @return enQueueTime **/
Get enQueueTime
getEnQueueTime
{ "repo_name": "cliffano/swaggy-jenkins", "path": "clients/java-pkmst/generated/src/main/java/com/prokarma/pkmst/model/PipelinelatestRun.java", "license": "mit", "size": 10421 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
185,495
public Viewer getViewer() { return currentViewer; }
Viewer function() { return currentViewer; }
/** * This returns the viewer as required by the {@link IViewerProvider} interface. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This returns the viewer as required by the <code>IViewerProvider</code> interface.
getViewer
{ "repo_name": "florianpirchner/nndesigner", "path": "org.eclipse.athene.nn.model.editor/src/org/eclipse/athene/nn/model/tensorflow/presentation/TensorflowEditor.java", "license": "epl-1.0", "size": 54430 }
[ "org.eclipse.jface.viewers.Viewer" ]
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
1,032,427
private boolean overridesSuperclassMethod(JavaClass javaClass, Method method) { if (method.isStatic()) return false; try { JavaClass[] superclassList = javaClass.getSuperClasses(); if (superclassList != null) { JavaClassAndMethod match = Hierarchy...
boolean function(JavaClass javaClass, Method method) { if (method.isStatic()) return false; try { JavaClass[] superclassList = javaClass.getSuperClasses(); if (superclassList != null) { JavaClassAndMethod match = Hierarchy.findMethod(superclassList, method.getName(), method.getSignature(), Hierarchy.INSTANCE_METHOD); i...
/** * Determine if given method overrides a superclass or superinterface * method. * * @param javaClass * class defining the method * @param method * the method * @return true if the method overrides a superclass/superinterface method, * false ...
Determine if given method overrides a superclass or superinterface method
overridesSuperclassMethod
{ "repo_name": "jesusaplsoft/FindAllBugs", "path": "findbugs/src/java/edu/umd/cs/findbugs/model/ClassFeatureSet.java", "license": "gpl-2.0", "size": 11989 }
[ "edu.umd.cs.findbugs.ba.Hierarchy", "edu.umd.cs.findbugs.ba.JavaClassAndMethod", "org.apache.bcel.classfile.JavaClass", "org.apache.bcel.classfile.Method" ]
import edu.umd.cs.findbugs.ba.Hierarchy; import edu.umd.cs.findbugs.ba.JavaClassAndMethod; import org.apache.bcel.classfile.JavaClass; import org.apache.bcel.classfile.Method;
import edu.umd.cs.findbugs.ba.*; import org.apache.bcel.classfile.*;
[ "edu.umd.cs", "org.apache.bcel" ]
edu.umd.cs; org.apache.bcel;
1,149,161
@Override public void update(LineEvent event) { LineEvent.Type type = event.getType(); if (type == LineEvent.Type.STOP) playCompleted = true; }
void function(LineEvent event) { LineEvent.Type type = event.getType(); if (type == LineEvent.Type.STOP) playCompleted = true; }
/** * Listens to the START and STOP events of the audio line. */
Listens to the START and STOP events of the audio line
update
{ "repo_name": "JonasAndree/Programmering2", "path": "src/UML/exercise/AudioPlayer.java", "license": "mit", "size": 2557 }
[ "javax.sound.sampled.LineEvent" ]
import javax.sound.sampled.LineEvent;
import javax.sound.sampled.*;
[ "javax.sound" ]
javax.sound;
1,378,729
@Test public void testDataflowSideInputEmpty() throws Exception { PipelineOptions options = PipelineOptionsFactory.create(); ExecutionContext executionContext = DataflowExecutionContext.withoutSideInputs(); DataflowSideInputReader sideInputReader = DataflowSideInputReader.of( Collections.<SideIn...
void function() throws Exception { PipelineOptions options = PipelineOptionsFactory.create(); ExecutionContext executionContext = DataflowExecutionContext.withoutSideInputs(); DataflowSideInputReader sideInputReader = DataflowSideInputReader.of( Collections.<SideInputInfo>emptyList(), options, executionContext); assert...
/** * Tests that when a {@link PCollectionView} is not available in a * {@link DataflowSideInputReader}, it is reflected properly. */
Tests that when a <code>PCollectionView</code> is not available in a <code>DataflowSideInputReader</code>, it is reflected properly
testDataflowSideInputEmpty
{ "repo_name": "dhananjaypatkar/DataflowJavaSDK", "path": "sdk/src/test/java/com/google/cloud/dataflow/sdk/runners/worker/DataflowSideInputReaderTest.java", "license": "apache-2.0", "size": 7350 }
[ "com.google.api.services.dataflow.model.SideInputInfo", "com.google.cloud.dataflow.sdk.options.PipelineOptions", "com.google.cloud.dataflow.sdk.options.PipelineOptionsFactory", "com.google.cloud.dataflow.sdk.util.ExecutionContext", "java.util.Collections", "org.junit.Assert" ]
import com.google.api.services.dataflow.model.SideInputInfo; import com.google.cloud.dataflow.sdk.options.PipelineOptions; import com.google.cloud.dataflow.sdk.options.PipelineOptionsFactory; import com.google.cloud.dataflow.sdk.util.ExecutionContext; import java.util.Collections; import org.junit.Assert;
import com.google.api.services.dataflow.model.*; import com.google.cloud.dataflow.sdk.options.*; import com.google.cloud.dataflow.sdk.util.*; import java.util.*; import org.junit.*;
[ "com.google.api", "com.google.cloud", "java.util", "org.junit" ]
com.google.api; com.google.cloud; java.util; org.junit;
2,870,733
public int getRotation() { return this.getCOSObject().getInt(COSName.R, 0); }
int function() { return this.getCOSObject().getInt(COSName.R, 0); }
/** * This will retrieve the rotation of the annotation widget. It must be a multiple of 90. Default is 0 * * @return the rotation */
This will retrieve the rotation of the annotation widget. It must be a multiple of 90. Default is 0
getRotation
{ "repo_name": "mdamt/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAppearanceCharacteristicsDictionary.java", "license": "apache-2.0", "size": 6534 }
[ "org.apache.pdfbox.cos.COSName" ]
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
1,525,116
public Observable<ServiceResponse<IssuerBundle>> updateCertificateIssuerWithServiceResponseAsync(String vaultBaseUrl, String issuerName) { if (vaultBaseUrl == null) { throw new IllegalArgumentException("Parameter vaultBaseUrl is required and cannot be null."); } if (issuerName ==...
Observable<ServiceResponse<IssuerBundle>> function(String vaultBaseUrl, String issuerName) { if (vaultBaseUrl == null) { throw new IllegalArgumentException(STR); } if (issuerName == null) { throw new IllegalArgumentException(STR); } if (this.apiVersion() == null) { throw new IllegalArgumentException(STR); }
/** * Updates the specified certificate issuer. * The UpdateCertificateIssuer operation performs an update on the specified certificate issuer entity. This operation requires the certificates/setissuers permission. * * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. ...
Updates the specified certificate issuer. The UpdateCertificateIssuer operation performs an update on the specified certificate issuer entity. This operation requires the certificates/setissuers permission
updateCertificateIssuerWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/keyvault/microsoft-azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java", "license": "mit", "size": 884227 }
[ "com.microsoft.azure.keyvault.models.IssuerBundle", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.keyvault.models.IssuerBundle; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.keyvault.models.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
1,553,099
public void display(float offsetX, float offsetY, float offsetZ, float speed, int amount, Location center, List<Player> players) throws ParticleVersionException, ParticleDataException, IllegalArgumentException { if (!isSupported()) { throw new ParticleVersionException("This particle effect is not supported by y...
void function(float offsetX, float offsetY, float offsetZ, float speed, int amount, Location center, List<Player> players) throws ParticleVersionException, ParticleDataException, IllegalArgumentException { if (!isSupported()) { throw new ParticleVersionException(STR); } if (hasProperty(ParticleProperty.REQUIRES_DATA)) ...
/** * Displays a particle effect which is only visible for the specified players * * @param offsetX Maximum distance particles can fly away from the center on the x-axis * @param offsetY Maximum distance particles can fly away from the center on the y-axis * @param offsetZ Maximum distance particles can fly ...
Displays a particle effect which is only visible for the specified players
display
{ "repo_name": "fahlur/MonsterSnatcher", "path": "src/me.Fahlur.MonsterSnatcher/ParticleEffect.java", "license": "gpl-3.0", "size": 59984 }
[ "java.util.List", "org.bukkit.Location", "org.bukkit.entity.Player" ]
import java.util.List; import org.bukkit.Location; import org.bukkit.entity.Player;
import java.util.*; import org.bukkit.*; import org.bukkit.entity.*;
[ "java.util", "org.bukkit", "org.bukkit.entity" ]
java.util; org.bukkit; org.bukkit.entity;
789,417
public void testFullTest() { resetCounter(); XMPPTCPConnection x0 = getConnection(0); XMPPTCPConnection x1 = getConnection(1); XMPPSmackConfiguration.DEBUG = true; FixedResolver tr0 = new FixedResolver("127.0.0.1", 20080); FixedTransportManager ftm0 = new FixedTra...
void function() { resetCounter(); XMPPTCPConnection x0 = getConnection(0); XMPPTCPConnection x1 = getConnection(1); XMPPSmackConfiguration.DEBUG = true; FixedResolver tr0 = new FixedResolver(STR, 20080); FixedTransportManager ftm0 = new FixedTransportManager(tr0); JmfMediaManager jmf0 = new JmfMediaManager(ftm0); List<...
/** * This is a full test in the Jingle API. */
This is a full test in the Jingle API
testFullTest
{ "repo_name": "igniterealtime/Smack", "path": "smack-jingle-old/src/integration-test/java/org/jivesoftware/smackx/jingle/JingleManagerTest.java", "license": "apache-2.0", "size": 38730 }
[ "java.util.ArrayList", "java.util.List", "org.jivesoftware.smackx.jingle.media.JingleMediaManager", "org.jivesoftware.smackx.jingle.mediaimpl.jmf.JmfMediaManager", "org.jivesoftware.smackx.jingle.nat.FixedResolver", "org.jivesoftware.smackx.jingle.nat.FixedTransportManager" ]
import java.util.ArrayList; import java.util.List; import org.jivesoftware.smackx.jingle.media.JingleMediaManager; import org.jivesoftware.smackx.jingle.mediaimpl.jmf.JmfMediaManager; import org.jivesoftware.smackx.jingle.nat.FixedResolver; import org.jivesoftware.smackx.jingle.nat.FixedTransportManager;
import java.util.*; import org.jivesoftware.smackx.jingle.media.*; import org.jivesoftware.smackx.jingle.mediaimpl.jmf.*; import org.jivesoftware.smackx.jingle.nat.*;
[ "java.util", "org.jivesoftware.smackx" ]
java.util; org.jivesoftware.smackx;
1,326,955
public ShaderNodeDefinition findDefinition(Statement statement) throws IOException { String defLine[] = statement.getLine().split(":"); String defName = defLine[1].trim(); ShaderNodeDefinition def = getNodeDefinitions().get(defName); if (def == null) { if (defLine.length...
ShaderNodeDefinition function(Statement statement) throws IOException { String defLine[] = statement.getLine().split(":"); String defName = defLine[1].trim(); ShaderNodeDefinition def = getNodeDefinitions().get(defName); if (def == null) { if (defLine.length == 3) { List<ShaderNodeDefinition> defs = null; try { defs = ...
/** * find the definition from this statement (loads it if necessary) * * @param statement the statement being read * @return the definition * @throws IOException */
find the definition from this statement (loads it if necessary)
findDefinition
{ "repo_name": "PlanetWaves/clockworkengine", "path": "trunk/jme3-core/src/plugins/java/com/jme3/material/plugins/ShaderNodeLoaderDelegate.java", "license": "apache-2.0", "size": 44651 }
[ "com.jme3.asset.AssetNotFoundException", "com.jme3.asset.ShaderNodeDefinitionKey", "com.jme3.shader.ShaderNodeDefinition", "com.jme3.util.blockparser.Statement", "java.io.IOException", "java.util.List" ]
import com.jme3.asset.AssetNotFoundException; import com.jme3.asset.ShaderNodeDefinitionKey; import com.jme3.shader.ShaderNodeDefinition; import com.jme3.util.blockparser.Statement; import java.io.IOException; import java.util.List;
import com.jme3.asset.*; import com.jme3.shader.*; import com.jme3.util.blockparser.*; import java.io.*; import java.util.*;
[ "com.jme3.asset", "com.jme3.shader", "com.jme3.util", "java.io", "java.util" ]
com.jme3.asset; com.jme3.shader; com.jme3.util; java.io; java.util;
2,534,873
// request extensions; single extensions not supported public void setOcspExtensions(List<Extension> extensions) { this.ocspExtensions = (extensions == null) ? Collections.<Extension>emptyList() : new ArrayList<Extension>(extensions); ...
void function(List<Extension> extensions) { this.ocspExtensions = (extensions == null) ? Collections.<Extension>emptyList() : new ArrayList<Extension>(extensions); }
/** * Sets the optional OCSP request extensions. * * @param extensions a list of extensions. The list is copied to protect * against subsequent modification. */
Sets the optional OCSP request extensions
setOcspExtensions
{ "repo_name": "wangsongpeng/jdk-src", "path": "src/main/java/java/security/cert/PKIXRevocationChecker.java", "license": "apache-2.0", "size": 12302 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,893,188
@Test public void testInitialRefresh4Consumers() throws Exception { //System.out.println( "\n--->Running testInitialRefresh4Consumers" ); ReplicationConsumer consumer1 = createConsumer(); ReplicationConsumer consumer2 = createConsumer(); ReplicationConsumer consumer3 = creat...
void function() throws Exception { ReplicationConsumer consumer1 = createConsumer(); ReplicationConsumer consumer2 = createConsumer(); ReplicationConsumer consumer3 = createConsumer(); ReplicationConsumer consumer4 = createConsumer(); assertTrue( waitUntilLimitSyncReplClient( TOTAL_COUNT, consumer1, consumer2, consumer...
/** * Test with 2 consumers */
Test with 2 consumers
testInitialRefresh4Consumers
{ "repo_name": "lucastheisen/apache-directory-server", "path": "server-integ/src/test/java/org/apache/directory/server/replication/ClientInitialRefreshIT.java", "license": "apache-2.0", "size": 14697 }
[ "org.apache.directory.server.ldap.replication.consumer.ReplicationConsumer", "org.junit.Assert" ]
import org.apache.directory.server.ldap.replication.consumer.ReplicationConsumer; import org.junit.Assert;
import org.apache.directory.server.ldap.replication.consumer.*; import org.junit.*;
[ "org.apache.directory", "org.junit" ]
org.apache.directory; org.junit;
755,663
protected boolean setLastWriteTime(String fileName, long time) { try { DirectoryEntryInformation dirEntInf = findDirectoryEntry(fileName); if (dirEntInf == null || dirEntInf.directoryEntry == null) return false; setWriteTime(dirEntInf.directoryEntry, time); writeDirectoryEntry(dirEntInf); ...
boolean function(String fileName, long time) { try { DirectoryEntryInformation dirEntInf = findDirectoryEntry(fileName); if (dirEntInf == null dirEntInf.directoryEntry == null) return false; setWriteTime(dirEntInf.directoryEntry, time); writeDirectoryEntry(dirEntInf); return true; } catch(DirectoryException e) { return...
/** * Set the last write time of the directory entry given by * fileName. * @param fileName the name of the file. * @param time is the last write time in milliseconds since * January 1, 1970, 00:00:00 GMT. * @return true if the last write time could be set otherwise false. */
Set the last write time of the directory entry given by fileName
setLastWriteTime
{ "repo_name": "hannoman/xxl", "path": "src/xxl/core/io/fat/DIR.java", "license": "lgpl-3.0", "size": 132958 }
[ "xxl.core.io.fat.errors.DirectoryException" ]
import xxl.core.io.fat.errors.DirectoryException;
import xxl.core.io.fat.errors.*;
[ "xxl.core.io" ]
xxl.core.io;
2,545,905
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<ScriptInner> updateAsync( String resourceGroupName, String clusterName, String databaseName, String scriptName, ScriptInner parameters, Context context) { return beginUpdateAsync(resourceGroupName, c...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<ScriptInner> function( String resourceGroupName, String clusterName, String databaseName, String scriptName, ScriptInner parameters, Context context) { return beginUpdateAsync(resourceGroupName, clusterName, databaseName, scriptName, parameters, context) .last() .flatMap...
/** * Updates a database script. * * @param resourceGroupName The name of the resource group containing the Kusto cluster. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param scriptName The name of the Kusto data...
Updates a database script
updateAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptsClientImpl.java", "license": "mit", "size": 84671 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.util.Context", "com.azure.resourcemanager.kusto.fluent.models.ScriptInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.kusto.fluent.models.ScriptInner;
import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.kusto.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
887,597
public ManagedClusterWindowsProfile windowsProfile() { return this.windowsProfile; }
ManagedClusterWindowsProfile function() { return this.windowsProfile; }
/** * Get profile for Windows VMs in the container service cluster. * * @return the windowsProfile value */
Get profile for Windows VMs in the container service cluster
windowsProfile
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/containerservice/mgmt-v2020_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_02_01/implementation/ManagedClusterInner.java", "license": "mit", "size": 16893 }
[ "com.microsoft.azure.management.containerservice.v2020_02_01.ManagedClusterWindowsProfile" ]
import com.microsoft.azure.management.containerservice.v2020_02_01.ManagedClusterWindowsProfile;
import com.microsoft.azure.management.containerservice.v2020_02_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
2,501,319
public URL[] getURLs() { if (repositoryURLs != null) { return repositoryURLs.clone(); } URL[] external = super.getURLs(); int filesLength = files.length; int jarFilesLength = jarRealFiles.length; int externalsLength = external.length; ...
URL[] function() { if (repositoryURLs != null) { return repositoryURLs.clone(); } URL[] external = super.getURLs(); int filesLength = files.length; int jarFilesLength = jarRealFiles.length; int externalsLength = external.length; int off = 0; int i; try { URL[] urls = new URL[filesLength + jarFilesLength + externalsLeng...
/** * Returns the search path of URLs for loading classes and resources. * This includes the original list of URLs specified to the constructor, * along with any URLs subsequently appended by the addURL() method. * @return the search path of URLs for loading classes and resources. */
Returns the search path of URLs for loading classes and resources. This includes the original list of URLs specified to the constructor, along with any URLs subsequently appended by the addURL() method
getURLs
{ "repo_name": "yuyupapa/OpenSource", "path": "apache-tomcat-6.0.48/java/org/apache/catalina/loader/WebappClassLoader.java", "license": "apache-2.0", "size": 126194 }
[ "java.net.MalformedURLException" ]
import java.net.MalformedURLException;
import java.net.*;
[ "java.net" ]
java.net;
2,523,724
public static void setParameters(File file) throws FileNotFoundException, IOException { setParameters(new FileInputStream(file)); }
static void function(File file) throws FileNotFoundException, IOException { setParameters(new FileInputStream(file)); }
/** * This sets the parameters to the values given by a properties file denoted by the given file * object. * * @throws IOException * @throws FileNotFoundException */
This sets the parameters to the values given by a properties file denoted by the given file object
setParameters
{ "repo_name": "boob-sbcm/3838438", "path": "src/main/java/com/rapidminer/tools/ParameterService.java", "license": "agpl-3.0", "size": 22466 }
[ "java.io.File", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.IOException" ]
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,225,929
@Action public void showHelp() { if (helpBox == null) { JFrame mainFrame = SwordfishApp.getApplication().getMainFrame(); helpBox = new SwordfishHelpDialog(mainFrame); helpBox.setLocationRelativeTo(mainFrame); } SwordfishApp.getApplication().show(helpBo...
void function() { if (helpBox == null) { JFrame mainFrame = SwordfishApp.getApplication().getMainFrame(); helpBox = new SwordfishHelpDialog(mainFrame); helpBox.setLocationRelativeTo(mainFrame); } SwordfishApp.getApplication().show(helpBox); }
/** * Show the help box, formatted for the help.html */
Show the help box, formatted for the help.html
showHelp
{ "repo_name": "secondfoundation/Second-Foundation-Src", "path": "src/turk/src/interface/acpc_2010_server/Swordfish/src/swordfish/view/SwordfishView.java", "license": "lgpl-2.1", "size": 52335 }
[ "javax.swing.JFrame" ]
import javax.swing.JFrame;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,151,592
@ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux<OperationValueInner> listAsync() { return new PagedFlux<>(() -> listSinglePageAsync()); }
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<OperationValueInner> function() { return new PagedFlux<>(() -> listSinglePageAsync()); }
/** * Gets a list of hybrid compute operations. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of hybrid compute operations. */
Gets a list of hybrid compute operations
listAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsClientImpl.java", "license": "mit", "size": 7894 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.resourcemanager.hybridcompute.fluent.models.OperationValueInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.hybridcompute.fluent.models.OperationValueInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.hybridcompute.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,178,452
public final Index getIndex(int i) { return indexList[i]; }
final Index function(int i) { return indexList[i]; }
/** * Returns the Index object at the given index */
Returns the Index object at the given index
getIndex
{ "repo_name": "Julien35/dev-courses", "path": "tutoriel-spring-mvc/lib/hsqldb/src/org/hsqldb/TableBase.java", "license": "mit", "size": 18351 }
[ "org.hsqldb.index.Index" ]
import org.hsqldb.index.Index;
import org.hsqldb.index.*;
[ "org.hsqldb.index" ]
org.hsqldb.index;
1,152,394
boolean precedes(final String s1, final String s2) { String symbol1 = s1.toLowerCase(Locale.ENGLISH); String symbol2 = s2.toLowerCase(Locale.ENGLISH); if (!precedenceMap.keySet().contains(symbol1)) { return false; } if (!precedenceMap.keySet().contains(symbol2)) { return false; }...
boolean precedes(final String s1, final String s2) { String symbol1 = s1.toLowerCase(Locale.ENGLISH); String symbol2 = s2.toLowerCase(Locale.ENGLISH); if (!precedenceMap.keySet().contains(symbol1)) { return false; } if (!precedenceMap.keySet().contains(symbol2)) { return false; } int index1 = ((Integer) precedenceMap.g...
/** * Determines whether one symbol precedes another. * @param s1 symbol 1 * @param s2 symbol 2 * @return true if symbol 1 precedes symbol 2 */
Determines whether one symbol precedes another
precedes
{ "repo_name": "karolaug/log4j-extras", "path": "src/main/java/org/apache/log4j/rule/InFixToPostFix.java", "license": "apache-2.0", "size": 11808 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
894,584
@Override public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) { return compareBytes(b1, s1 + 4, l1 - 4, b2, s2 + 4, l2 - 4); } } static { // register this comparator WritableComparator.define(HiveBytesArrayWritable.class, new Comparator()); }
int function(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) { return compareBytes(b1, s1 + 4, l1 - 4, b2, s2 + 4, l2 - 4); } } static { WritableComparator.define(HiveBytesArrayWritable.class, new Comparator()); }
/** * Compare the buffers in serialized form. */
Compare the buffers in serialized form
compare
{ "repo_name": "jasontedor/elasticsearch-hadoop", "path": "hive/src/main/java/org/elasticsearch/hadoop/hive/HiveBytesArrayWritable.java", "license": "apache-2.0", "size": 3632 }
[ "org.apache.hadoop.io.WritableComparator" ]
import org.apache.hadoop.io.WritableComparator;
import org.apache.hadoop.io.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,020,202
public final Property<Expiry> expiry() { return metaBean().expiry().createProperty(this); }
final Property<Expiry> function() { return metaBean().expiry().createProperty(this); }
/** * Gets the the {@code expiry} property. * @return the property, not null */
Gets the the expiry property
expiry
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-FinancialTypes/src/main/java/com/opengamma/financial/security/option/EquityWarrantSecurity.java", "license": "apache-2.0", "size": 20805 }
[ "com.opengamma.util.time.Expiry", "org.joda.beans.Property" ]
import com.opengamma.util.time.Expiry; import org.joda.beans.Property;
import com.opengamma.util.time.*; import org.joda.beans.*;
[ "com.opengamma.util", "org.joda.beans" ]
com.opengamma.util; org.joda.beans;
966,231
public int getDropDownVerticalOffset() { if(mAutoCompleteMode == AUTOCOMPLETE_MODE_NONE) return 0; return ((AutoCompleteTextView)mInputView).getDropDownVerticalOffset(); }
int function() { if(mAutoCompleteMode == AUTOCOMPLETE_MODE_NONE) return 0; return ((AutoCompleteTextView)mInputView).getDropDownVerticalOffset(); }
/** * <p>Gets the vertical offset used for the auto-complete drop-down list.</p> * <p>Only work when autoComplete mode is {@link #AUTOCOMPLETE_MODE_SINGLE} or {@link #AUTOCOMPLETE_MODE_MULTI}</p> * * @return the vertical offset * * @attr ref android.R.styleable#ListPopupWindow_dropDownVert...
Gets the vertical offset used for the auto-complete drop-down list. Only work when autoComplete mode is <code>#AUTOCOMPLETE_MODE_SINGLE</code> or <code>#AUTOCOMPLETE_MODE_MULTI</code>
getDropDownVerticalOffset
{ "repo_name": "android9527/AndroidDemo", "path": "material/src/main/java/com/rey/material/widget/EditText.java", "license": "apache-2.0", "size": 149798 }
[ "android.widget.AutoCompleteTextView" ]
import android.widget.AutoCompleteTextView;
import android.widget.*;
[ "android.widget" ]
android.widget;
2,832,249
public void allowTypeHierarchy(Class type) { addPermission(new TypeHierarchyPermission(type)); }
void function(Class type) { addPermission(new TypeHierarchyPermission(type)); }
/** * Add security permission for a type hierarchy. * * @param type the base type to allow * @since 1.4.7 */
Add security permission for a type hierarchy
allowTypeHierarchy
{ "repo_name": "Groostav/XStream-GG", "path": "xstream/src/java/com/thoughtworks/xstream/XStream.java", "license": "bsd-3-clause", "size": 90964 }
[ "com.thoughtworks.xstream.security.TypeHierarchyPermission" ]
import com.thoughtworks.xstream.security.TypeHierarchyPermission;
import com.thoughtworks.xstream.security.*;
[ "com.thoughtworks.xstream" ]
com.thoughtworks.xstream;
1,265,235
public static boolean hideKeyboard(View view) { InputMethodManager imm = (InputMethodManager) view.getContext().getSystemService( Context.INPUT_METHOD_SERVICE); return imm.hideSoftInputFromWindow(view.getWindowToken(), 0); }
static boolean function(View view) { InputMethodManager imm = (InputMethodManager) view.getContext().getSystemService( Context.INPUT_METHOD_SERVICE); return imm.hideSoftInputFromWindow(view.getWindowToken(), 0); }
/** * Hides the keyboard. * @param view The {@link View} that is currently accepting input. * @return Whether the keyboard was visible before. */
Hides the keyboard
hideKeyboard
{ "repo_name": "guorendong/iridium-browser-ubuntu", "path": "ui/android/java/src/org/chromium/ui/UiUtils.java", "license": "bsd-3-clause", "size": 12780 }
[ "android.content.Context", "android.view.View", "android.view.inputmethod.InputMethodManager" ]
import android.content.Context; import android.view.View; import android.view.inputmethod.InputMethodManager;
import android.content.*; import android.view.*; import android.view.inputmethod.*;
[ "android.content", "android.view" ]
android.content; android.view;
1,038,981
public void stop(LensEventService service) { if (service == null) { LOG.warn("Unable to stop store as Event service is null"); } }
void function(LensEventService service) { if (service == null) { LOG.warn(STR); } }
/** * Stop the store. * * @param service * the service */
Stop the store
stop
{ "repo_name": "rajubairishetti/lens", "path": "lens-server/src/main/java/org/apache/lens/server/stats/store/StatisticsStore.java", "license": "apache-2.0", "size": 2086 }
[ "org.apache.lens.server.api.events.LensEventService" ]
import org.apache.lens.server.api.events.LensEventService;
import org.apache.lens.server.api.events.*;
[ "org.apache.lens" ]
org.apache.lens;
963,823
public void setMzTolerance(MZTolerance mzTolerance) { this.mzTolerance = mzTolerance; }
void function(MZTolerance mzTolerance) { this.mzTolerance = mzTolerance; }
/** * the mz tolerance that was used to find identity * * @param mzTolerance */
the mz tolerance that was used to find identity
setMzTolerance
{ "repo_name": "du-lab/mzmine2", "path": "src/main/java/net/sf/mzmine/datamodel/identities/ms2/interf/AbstractMSMSIdentity.java", "license": "gpl-2.0", "size": 1593 }
[ "net.sf.mzmine.parameters.parametertypes.tolerances.MZTolerance" ]
import net.sf.mzmine.parameters.parametertypes.tolerances.MZTolerance;
import net.sf.mzmine.parameters.parametertypes.tolerances.*;
[ "net.sf.mzmine" ]
net.sf.mzmine;
1,678,431