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 setStart(DateTime start) { this.start = start; }
void function(DateTime start) { this.start = start; }
/** * Set start time * * @param start * The start to set. */
Set start time
setStart
{ "repo_name": "shane-axiom/SOS", "path": "core/api/src/main/java/org/n52/sos/ogc/gml/time/TimePeriod.java", "license": "gpl-2.0", "size": 18369 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,010,070
public InputStream getBinaryResource(String name) throws ResourceNotFoundException;
InputStream function(String name) throws ResourceNotFoundException;
/** * Loads a binary resource * * @param name * the resource name, expressed as a path (see the comments on ResourceProvider) * * @return * * @throws ResourceNotFoundException */
Loads a binary resource
getBinaryResource
{ "repo_name": "petergeneric/stdlib", "path": "guice/common/src/main/java/com/peterphi/std/guice/common/resource/iface/ResourceProvider.java", "license": "mit", "size": 1354 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,103,115
public void test_fill$FF() { // Test for method void java.util.Arrays.fill(float [], float) float d[] = new float[1000]; Arrays.fill(d, Float.MAX_VALUE); for (int i = 0; i < d.length; i++) assertTrue("Failed to fill float array correctly", d[i] == Floa...
public void test_fill$FF() { float d[] = new float[1000]; Arrays.fill(d, Float.MAX_VALUE); for (int i = 0; i < d.length; i++) assertTrue(STR, d[i] == Float.MAX_VALUE); }
/** * java.util.Arrays#fill(float[], float) */
java.util.Arrays#fill(float[], float)
test_fill$FF
{ "repo_name": "debian-pkg-android-tools/android-platform-libcore", "path": "harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ArraysTest.java", "license": "gpl-2.0", "size": 207677 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
656,274
this.executor.setRejectedExecutionHandler(new RejectedExecutionHandler() { @Override public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { overflowQueue.add(r); } }); }
this.executor.setRejectedExecutionHandler(new RejectedExecutionHandler() { void function(Runnable r, ThreadPoolExecutor executor) { overflowQueue.add(r); } }); }
/** * Once the ThreadPoolExecutor is at full capacity, it starts to reject * submissions which are queued for later submission. */
Once the ThreadPoolExecutor is at full capacity, it starts to reject submissions which are queued for later submission
rejectedExecution
{ "repo_name": "radicalbit/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/BufferedThreadPoolExecutorCompletionService.java", "license": "apache-2.0", "size": 5411 }
[ "java.util.concurrent.RejectedExecutionHandler", "java.util.concurrent.ThreadPoolExecutor" ]
import java.util.concurrent.RejectedExecutionHandler; import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
797,321
private void processPorts(Draft3Job parentJob, Draft3Job job, List<? extends ApplicationPort> ports) throws Draft3Exception { for (ApplicationPort port : ports) { String prefix = job.getId().substring(job.getId().lastIndexOf(DOT_SEPARATOR) + 1) + SLASH_SEPARATOR; setScatter(job, prefix, port); // if i...
void function(Draft3Job parentJob, Draft3Job job, List<? extends ApplicationPort> ports) throws Draft3Exception { for (ApplicationPort port : ports) { String prefix = job.getId().substring(job.getId().lastIndexOf(DOT_SEPARATOR) + 1) + SLASH_SEPARATOR; setScatter(job, prefix, port); if (parentJob != null && parentJob.ge...
/** * Process input or output ports */
Process input or output ports
processPorts
{ "repo_name": "rabix/bunny", "path": "rabix-bindings-draft3/src/main/java/org/rabix/bindings/draft3/Draft3JobProcessor.java", "license": "apache-2.0", "size": 9847 }
[ "java.util.List", "org.rabix.bindings.draft3.bean.Draft3Job", "org.rabix.bindings.draft3.bean.Draft3Workflow", "org.rabix.bindings.model.ApplicationPort" ]
import java.util.List; import org.rabix.bindings.draft3.bean.Draft3Job; import org.rabix.bindings.draft3.bean.Draft3Workflow; import org.rabix.bindings.model.ApplicationPort;
import java.util.*; import org.rabix.bindings.draft3.bean.*; import org.rabix.bindings.model.*;
[ "java.util", "org.rabix.bindings" ]
java.util; org.rabix.bindings;
666,401
public RectangleAlignment getBackgroundImageAlignment() { return this.backgroundImageAlignment; }
RectangleAlignment function() { return this.backgroundImageAlignment; }
/** * Returns the background image alignment. * * @return The alignment (never {@code null}). * * @see #setBackgroundImageAlignment(RectangleAlignment) */
Returns the background image alignment
getBackgroundImageAlignment
{ "repo_name": "jfree/jfreechart", "path": "src/main/java/org/jfree/chart/JFreeChart.java", "license": "lgpl-2.1", "size": 55514 }
[ "org.jfree.chart.api.RectangleAlignment" ]
import org.jfree.chart.api.RectangleAlignment;
import org.jfree.chart.api.*;
[ "org.jfree.chart" ]
org.jfree.chart;
2,001,642
public void visit(SmcState state) { SmcMap map = state.getMap(); String packageName = map.getFSM().getPackage(); String context = map.getFSM().getContext(); String fsmClassName = map.getFSM().getFsmClassName(); String mapName = map.getName(); String instanceName =...
void function(SmcState state) { SmcMap map = state.getMap(); String packageName = map.getFSM().getPackage(); String context = map.getFSM().getContext(); String fsmClassName = map.getFSM().getFsmClassName(); String mapName = map.getName(); String instanceName = state.getInstanceName(); String indent2; List<SmcAction> ac...
/** * Emits C code for this FSM state. Generates entry and exit * action routines first (if any) and then the transition * routines. * @param state emit C code for this FSM state. */
Emits C code for this FSM state. Generates entry and exit action routines first (if any) and then the transition routines
visit
{ "repo_name": "Praveen-1987/devstack-Quantumleap", "path": "smc/net/sf/smc/generator/SmcCGenerator.java", "license": "apache-2.0", "size": 51242 }
[ "java.util.List", "net.sf.smc.model.SmcAction", "net.sf.smc.model.SmcMap", "net.sf.smc.model.SmcState", "net.sf.smc.model.SmcTransition" ]
import java.util.List; import net.sf.smc.model.SmcAction; import net.sf.smc.model.SmcMap; import net.sf.smc.model.SmcState; import net.sf.smc.model.SmcTransition;
import java.util.*; import net.sf.smc.model.*;
[ "java.util", "net.sf.smc" ]
java.util; net.sf.smc;
2,656,239
public Builder market(final CountryCode market) { assert (market != null); return setQueryParameter("market", market); }
Builder function(final CountryCode market) { assert (market != null); return setQueryParameter(STR, market); }
/** * The market country code setter. * * @param market Optional. An ISO 3166-1 alpha-2 country code. If a country code is given, only artists, * albums, and tracks with content playable in that market will be returned. (Playlist * results are not affected by the mar...
The market country code setter
market
{ "repo_name": "thelinmichael/spotify-web-api-java", "path": "src/main/java/com/wrapper/spotify/requests/data/search/simplified/SearchPlaylistsRequest.java", "license": "mit", "size": 5139 }
[ "com.neovisionaries.i18n.CountryCode" ]
import com.neovisionaries.i18n.CountryCode;
import com.neovisionaries.i18n.*;
[ "com.neovisionaries.i18n" ]
com.neovisionaries.i18n;
1,123,612
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<DenyAssignmentInner> listForScope(String scope, String filter, Context context);
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<DenyAssignmentInner> listForScope(String scope, String filter, Context context);
/** * Gets deny assignments for a scope. * * @param scope The scope of the deny assignments. * @param filter The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at or * above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignme...
Gets deny assignments for a scope
listForScope
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/DenyAssignmentsClient.java", "license": "mit", "size": 26696 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.core.util.Context", "com.azure.resourcemanager.authorization.fluent.models.DenyAssignmentInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.authorization.fluent.models.DenyAssignmentInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.authorization.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
477,760
public static Asset createFromUri(Uri uri) { return null; }
static Asset function(Uri uri) { return null; }
/** * Creates an Asset using a content URI. Google Play services must have permission to read this * Uri. */
Creates an Asset using a content URI. Google Play services must have permission to read this Uri
createFromUri
{ "repo_name": "microg/android_packages_apps_GmsCore", "path": "play-services-wearable-api/src/main/java/com/google/android/gms/wearable/Asset.java", "license": "apache-2.0", "size": 4596 }
[ "android.net.Uri" ]
import android.net.Uri;
import android.net.*;
[ "android.net" ]
android.net;
2,702,661
public Output<U> output() { return output; }
Output<U> function() { return output; }
/** * Gets output. * Random values with specified shape. * @return output. */
Gets output. Random values with specified shape
output
{ "repo_name": "tensorflow/java", "path": "tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/StatelessRandomUniformFullIntV2.java", "license": "apache-2.0", "size": 5428 }
[ "org.tensorflow.Output" ]
import org.tensorflow.Output;
import org.tensorflow.*;
[ "org.tensorflow" ]
org.tensorflow;
675,860
private double testModel() { try { double runningLoss = 0; double runningWeightOfValidationSet = 0; boolean gotNextCycle = false; int cycle = 0; while (dataCycler.hasMore() || gotNextCycle) { BufferedWriter trainingWriter = new Bu...
double function() { try { double runningLoss = 0; double runningWeightOfValidationSet = 0; boolean gotNextCycle = false; int cycle = 0; while (dataCycler.hasMore() gotNextCycle) { BufferedWriter trainingWriter = new BufferedWriter(new FileWriter(STR + cycle)); trainingWriter.write(STR); for (T instance : dataCycler.get...
/** * We keep cycling through the test data, updating the running losses for each run. */
We keep cycling through the test data, updating the running losses for each run
testModel
{ "repo_name": "sanity/quickml", "path": "src/main/java/quickml/supervised/crossValidation/SimpleCrossValidatorWithWriter.java", "license": "lgpl-3.0", "size": 3627 }
[ "java.io.BufferedWriter", "java.io.FileWriter" ]
import java.io.BufferedWriter; import java.io.FileWriter;
import java.io.*;
[ "java.io" ]
java.io;
2,395,599
public void unselectAll() { int i; for ( i = 0; i < nrJobEntries(); i++ ) { JobEntryCopy ce = getJobEntry( i ); ce.setSelected( false ); } for ( i = 0; i < nrNotes(); i++ ) { NotePadMeta ni = getNote( i ); ni.setSelected( false ); } }
void function() { int i; for ( i = 0; i < nrJobEntries(); i++ ) { JobEntryCopy ce = getJobEntry( i ); ce.setSelected( false ); } for ( i = 0; i < nrNotes(); i++ ) { NotePadMeta ni = getNote( i ); ni.setSelected( false ); } }
/** * Unselect all. */
Unselect all
unselectAll
{ "repo_name": "ma459006574/pentaho-kettle", "path": "engine/src/org/pentaho/di/job/JobMeta.java", "license": "apache-2.0", "size": 85011 }
[ "org.pentaho.di.core.NotePadMeta", "org.pentaho.di.job.entry.JobEntryCopy" ]
import org.pentaho.di.core.NotePadMeta; import org.pentaho.di.job.entry.JobEntryCopy;
import org.pentaho.di.core.*; import org.pentaho.di.job.entry.*;
[ "org.pentaho.di" ]
org.pentaho.di;
6,049
public void close() throws IOException { returnTable(table); }
void function() throws IOException { returnTable(table); }
/** * Returns the actual table back to the pool * * @throws IOException */
Returns the actual table back to the pool
close
{ "repo_name": "indi60/hbase-pmc", "path": "target/hbase-0.94.1/hbase-0.94.1/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java", "license": "apache-2.0", "size": 15537 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
109,107
public boolean isConfigurationValid() { if (channelId == null || daoFactory == null || sourceConnector == null || sourceFilterTransformerExecutor == null) { return false; } for (DestinationChain chain : destinationChains) { Map<Integer, FilterTransformerExecutor> fil...
boolean function() { if (channelId == null daoFactory == null sourceConnector == null sourceFilterTransformerExecutor == null) { return false; } for (DestinationChain chain : destinationChains) { Map<Integer, FilterTransformerExecutor> filterTransformerExecutors = chain.getFilterTransformerExecutors(); for (Integer met...
/** * Tell whether or not the channel is configured correctly and is able to be deployed */
Tell whether or not the channel is configured correctly and is able to be deployed
isConfigurationValid
{ "repo_name": "encapturemd/MirthConnect", "path": "donkey/src/main/java/com/mirth/connect/donkey/server/channel/Channel.java", "license": "mpl-2.0", "size": 82383 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,661,379
private boolean hasVibratePermission(Context context) { PackageManager pm = context.getPackageManager(); int hasPerm = pm.checkPermission(android.Manifest.permission.VIBRATE, context.getPackageName()); return hasPerm == PackageManager.PERMISSION_GRANTED; }
boolean function(Context context) { PackageManager pm = context.getPackageManager(); int hasPerm = pm.checkPermission(android.Manifest.permission.VIBRATE, context.getPackageName()); return hasPerm == PackageManager.PERMISSION_GRANTED; }
/** * Method to verify that vibrate permission has been granted. * * Allows users of the library to disabled vibrate support if desired. * @return true if Vibrate permission has been granted */
Method to verify that vibrate permission has been granted. Allows users of the library to disabled vibrate support if desired
hasVibratePermission
{ "repo_name": "isg245/MaterialDateRangePicker", "path": "library/src/main/java/com/isg245/materialdaterangepicker/HapticFeedbackController.java", "license": "apache-2.0", "size": 3043 }
[ "android.content.Context", "android.content.pm.PackageManager" ]
import android.content.Context; import android.content.pm.PackageManager;
import android.content.*; import android.content.pm.*;
[ "android.content" ]
android.content;
1,226,220
private void secondWalk( TreeNode v, double m, int level, double levelStart ) { // construct the position from the prelim and the level information // The rootLocation affects the way how x and y are changed and ...
void function( TreeNode v, double m, int level, double levelStart ) { double levelChangeSign = getLevelChangeSign(); boolean levelChangeOnYAxis = isLevelChangeInYAxis(); double levelSize = getSizeOfLevel( level ); double x = getPrelim( v ) + m; double y; Configuration.AlignmentInLevel alignment = configuration.getAlign...
/** * In difference to the original algorithm we also pass in extra level * information. * @param v * @param m * @param level * @param levelStart */
In difference to the original algorithm we also pass in extra level information
secondWalk
{ "repo_name": "dgutierr/uberfire-extensions", "path": "uberfire-wires/uberfire-wires-core/uberfire-wires-core-trees/src/main/java/org/uberfire/ext/wires/core/trees/client/layout/treelayout/TreeLayout.java", "license": "apache-2.0", "size": 29776 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,319,553
private static int getBytesPerPixel(Bitmap.Config config) { if (config == Bitmap.Config.ARGB_8888) { return 4; } else if (config == Bitmap.Config.RGB_565) { return 2; } else if (config == Bitmap.Config.ARGB_4444) { return 2; } else if (config == Bi...
static int function(Bitmap.Config config) { if (config == Bitmap.Config.ARGB_8888) { return 4; } else if (config == Bitmap.Config.RGB_565) { return 2; } else if (config == Bitmap.Config.ARGB_4444) { return 2; } else if (config == Bitmap.Config.ALPHA_8) { return 1; } return 1; }
/** * A helper function to return the byte usage per pixel of a bitmap based on its configuration. */
A helper function to return the byte usage per pixel of a bitmap based on its configuration
getBytesPerPixel
{ "repo_name": "zhgeaits/ZGDanmaku", "path": "library/src/main/java/org/zhgeaits/zgdanmaku/utils/BitmapPool.java", "license": "apache-2.0", "size": 5919 }
[ "android.graphics.Bitmap" ]
import android.graphics.Bitmap;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
95,560
public static void serializeWorkflowParams(Serializable params, NodeRef workflowRef) { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(params); oos.close(); // write the ...
static void function(Serializable params, NodeRef workflowRef) { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(params); oos.close(); ContentService cs = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getContentSer...
/** * Serialize the workflow params to a content stream * * @param params Serializable workflow params * @param workflowRef The noderef to write the property too */
Serialize the workflow params to a content stream
serializeWorkflowParams
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/web-client/source/java/org/alfresco/web/bean/wcm/AVMWorkflowUtil.java", "license": "lgpl-3.0", "size": 9295 }
[ "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.IOException", "java.io.ObjectOutputStream", "java.io.Serializable", "javax.faces.context.FacesContext", "org.alfresco.error.AlfrescoRuntimeException", "org.alfresco.model.WCMAppModel", "org.alfresco.repo.content.MimetypeMap", ...
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectOutputStream; import java.io.Serializable; import javax.faces.context.FacesContext; import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.model.WCMAppModel; import org.alfresco.r...
import java.io.*; import javax.faces.context.*; import org.alfresco.error.*; import org.alfresco.model.*; import org.alfresco.repo.content.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.web.bean.repository.*;
[ "java.io", "javax.faces", "org.alfresco.error", "org.alfresco.model", "org.alfresco.repo", "org.alfresco.service", "org.alfresco.web" ]
java.io; javax.faces; org.alfresco.error; org.alfresco.model; org.alfresco.repo; org.alfresco.service; org.alfresco.web;
2,548,123
protected JTextField getModifiedTextField() { return modifiedTextField; }
JTextField function() { return modifiedTextField; }
/** * Get the modifiedTextField object. This method should be * used only by the ViewHelper object. * @return The modifiedTextField object. */
Get the modifiedTextField object. This method should be used only by the ViewHelper object
getModifiedTextField
{ "repo_name": "danielfm/obexftp-frontend", "path": "obexftp-frontend-core/src/main/java/net/sourceforge/obexftpfrontend/gui/FilePropertiesDialog.java", "license": "gpl-2.0", "size": 20585 }
[ "javax.swing.JTextField" ]
import javax.swing.JTextField;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
270,252
@Override public Instances getDataSet() throws IOException { if ((m_sourceFile == null) && (m_sourceReader == null)) { throw new IOException("No source has been specified"); } if (m_structure == null) { getStructure(); } if (m_st == null) { m_st = new StreamTokenizer(m_source...
Instances function() throws IOException { if ((m_sourceFile == null) && (m_sourceReader == null)) { throw new IOException(STR); } if (m_structure == null) { getStructure(); } if (m_st == null) { m_st = new StreamTokenizer(m_sourceReader); initTokenizer(m_st); } m_st.ordinaryChar(','); m_st.ordinaryChar('\t'); m_cumulat...
/** * Return the full data set. If the structure hasn't yet been determined by a * call to getStructure then method should do so before processing the rest of * the data set. * * @return the structure of the data set as an empty set of Instances * @exception IOException if there is no source or parsi...
Return the full data set. If the structure hasn't yet been determined by a call to getStructure then method should do so before processing the rest of the data set
getDataSet
{ "repo_name": "BaldoAgosta/weka-dev", "path": "src/weka/core/converters/CSVLoader.java", "license": "apache-2.0", "size": 30289 }
[ "java.io.IOException", "java.io.StreamTokenizer", "java.util.Enumeration", "java.util.Hashtable" ]
import java.io.IOException; import java.io.StreamTokenizer; import java.util.Enumeration; import java.util.Hashtable;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,338,040
@Nonnull public static UBL23WriterBuilder<OrderType> order(){return UBL23WriterBuilder.create(OrderType.class);}
@Nonnull public static UBL23WriterBuilder<OrderType> order(){return UBL23WriterBuilder.create(OrderType.class);}
/** Create a writer builder for Manifest. @return The builder and never <code>null</code> */
Create a writer builder for Manifest
manifest
{ "repo_name": "phax/ph-ubl", "path": "ph-ubl23/src/main/java/com/helger/ubl23/UBL23Writer.java", "license": "apache-2.0", "size": 32994 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
141,807
public static void store(final PortletPreferences preferences, final String prefix, final Object instance) { for (final PreferenceFieldDescription<?> field : getPreferenceFields(instance.getClass())) { field.store(preferences, prefix, instance); } } private PreferenceFieldRegistry() { throw new Asserti...
static void function(final PortletPreferences preferences, final String prefix, final Object instance) { for (final PreferenceFieldDescription<?> field : getPreferenceFields(instance.getClass())) { field.store(preferences, prefix, instance); } } private PreferenceFieldRegistry() { throw new AssertionError(STR); }
/** * Stores all annotated fields of an object to the preferences. * * This method does not invoke {@link PortletPreferences#store()}, that should be done by the caller. * * @param preferences * the current portlet preferences * @param prefix * the prefix for all used keys - useful...
Stores all annotated fields of an object to the preferences. This method does not invoke <code>PortletPreferences#store()</code>, that should be done by the caller
store
{ "repo_name": "liefke/org.portletbeans", "path": "portletbeans-preferences/src/main/java/org/portletbeans/preferences/PreferenceFieldRegistry.java", "license": "apache-2.0", "size": 12199 }
[ "javax.portlet.PortletPreferences" ]
import javax.portlet.PortletPreferences;
import javax.portlet.*;
[ "javax.portlet" ]
javax.portlet;
613,884
public void setWhiteBalanceTemperature(int new_temperature) { if (MyDebug.LOG) Log.d(TAG, "seWhiteBalanceTemperature(): " + new_temperature); if (camera_controller != null) { if (camera_controller.setWhiteBalanceTemperature(new_temperature)) { // now save applicationInterface.setWhiteBal...
void function(int new_temperature) { if (MyDebug.LOG) Log.d(TAG, STR + new_temperature); if (camera_controller != null) { if (camera_controller.setWhiteBalanceTemperature(new_temperature)) { applicationInterface.setWhiteBalanceTemperaturePref(new_temperature); showToast( seekbar_toast, getResources().getString(R.string...
/** * Set a manual white balance temperature. The white balance mode must be set to "manual" for this * to have an effect. */
Set a manual white balance temperature. The white balance mode must be set to "manual" for this to have an effect
setWhiteBalanceTemperature
{ "repo_name": "phimpme/android-prototype", "path": "app/src/main/java/org/fossasia/phimpme/opencamera/Preview/Preview.java", "license": "apache-2.0", "size": 178799 }
[ "android.util.Log", "org.fossasia.phimpme.opencamera.Camera" ]
import android.util.Log; import org.fossasia.phimpme.opencamera.Camera;
import android.util.*; import org.fossasia.phimpme.opencamera.*;
[ "android.util", "org.fossasia.phimpme" ]
android.util; org.fossasia.phimpme;
1,648,236
@Override protected void assembleCore(AssemblyBuilder builder) throws IOException { fail(); }
void function(AssemblyBuilder builder) throws IOException { fail(); }
/** * Always throws an {@link AssertionError}. */
Always throws an <code>AssertionError</code>
assembleCore
{ "repo_name": "reasm/reasm-commons", "path": "src/test/java/org/reasm/commons/source/Block0Block.java", "license": "mit", "size": 1102 }
[ "java.io.IOException", "org.junit.Assert", "org.reasm.AssemblyBuilder" ]
import java.io.IOException; import org.junit.Assert; import org.reasm.AssemblyBuilder;
import java.io.*; import org.junit.*; import org.reasm.*;
[ "java.io", "org.junit", "org.reasm" ]
java.io; org.junit; org.reasm;
1,268,807
private void forceDownload(String url, ImageView imageView, boolean isDiskCaching) { // State sanity: url is guaranteed to never be null in // DownloadedDrawable and cache keys. if (url == null) { imageView.setImageDrawable(null); return; } if (cancel...
void function(String url, ImageView imageView, boolean isDiskCaching) { if (url == null) { imageView.setImageDrawable(null); return; } if (cancelPotentialDownload(url, imageView)) { BitmapDownloaderTask task = new BitmapDownloaderTask(imageView, isDiskCaching); DownloadedDrawable downloadedDrawable = new DownloadedDraw...
/** * Same as download but the image is always downloaded and the cache is not * used. Kept private at the moment as its interest is not clear. */
Same as download but the image is always downloaded and the cache is not used. Kept private at the moment as its interest is not clear
forceDownload
{ "repo_name": "UweTrottmann/MovieTracker", "path": "SeriesGuideMovies/src/com/uwetrottmann/movies/util/ImageDownloader.java", "license": "apache-2.0", "size": 15825 }
[ "android.widget.ImageView" ]
import android.widget.ImageView;
import android.widget.*;
[ "android.widget" ]
android.widget;
1,023,173
private ImmutableList<Artifact> substituteJ2ObjcPrunedLibraries(ObjcProvider objcProvider) { ImmutableList.Builder<Artifact> libraries = new ImmutableList.Builder<>(); Set<Artifact> unprunedJ2ObjcLibs = objcProvider.get(ObjcProvider.J2OBJC_LIBRARY).toSet(); for (Artifact library : objcProvider.getObjcLib...
ImmutableList<Artifact> function(ObjcProvider objcProvider) { ImmutableList.Builder<Artifact> libraries = new ImmutableList.Builder<>(); Set<Artifact> unprunedJ2ObjcLibs = objcProvider.get(ObjcProvider.J2OBJC_LIBRARY).toSet(); for (Artifact library : objcProvider.getObjcLibraries()) { if (unprunedJ2ObjcLibs.contains(li...
/** * Returns a nested set of Bazel-built ObjC libraries with all unpruned J2ObjC libraries * substituted with pruned ones. */
Returns a nested set of Bazel-built ObjC libraries with all unpruned J2ObjC libraries substituted with pruned ones
substituteJ2ObjcPrunedLibraries
{ "repo_name": "dropbox/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java", "license": "apache-2.0", "size": 82429 }
[ "com.google.common.collect.ImmutableList", "com.google.devtools.build.lib.actions.Artifact", "java.util.Set" ]
import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.actions.Artifact; import java.util.Set;
import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
2,483,516
public Vector3f getAngularVelocity() { return Converter.convert(rBody.getAngularVelocity(tempVec)); }
Vector3f function() { return Converter.convert(rBody.getAngularVelocity(tempVec)); }
/** * Get the current angular velocity of this PhysicsRigidBody * @return the current linear velocity */
Get the current angular velocity of this PhysicsRigidBody
getAngularVelocity
{ "repo_name": "PlanetWaves/clockworkengine", "path": "branches/3.0/engine/src/jbullet/com/clockwork/bullet/objects/PhysicsRigidBody.java", "license": "apache-2.0", "size": 22094 }
[ "com.clockwork.bullet.util.Converter", "com.clockwork.math.Vector3f" ]
import com.clockwork.bullet.util.Converter; import com.clockwork.math.Vector3f;
import com.clockwork.bullet.util.*; import com.clockwork.math.*;
[ "com.clockwork.bullet", "com.clockwork.math" ]
com.clockwork.bullet; com.clockwork.math;
1,368,073
public QueryBuilder getNestedFilter() { return this.nestedFilter; }
QueryBuilder function() { return this.nestedFilter; }
/** * Returns the nested filter that the nested objects should match with in order to be taken into account * for sorting. **/
Returns the nested filter that the nested objects should match with in order to be taken into account for sorting
getNestedFilter
{ "repo_name": "MaineC/elasticsearch", "path": "core/src/main/java/org/elasticsearch/search/sort/GeoDistanceSortBuilder.java", "license": "apache-2.0", "size": 26514 }
[ "org.elasticsearch.index.query.QueryBuilder" ]
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.index.query.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
253,929
public void onShowHelp(View view) { Intent intent = new Intent(this, HelpAndInfo.class); startActivity(intent); }
void function(View view) { Intent intent = new Intent(this, HelpAndInfo.class); startActivity(intent); }
/** * Show the {@link HelpAndInfo}. * @param view The View object that triggered the method * (in this case the help/info button). */
Show the <code>HelpAndInfo</code>
onShowHelp
{ "repo_name": "hezlog/MifareClassicTool", "path": "Mifare Classic Tool/app/src/main/java/de/syss/MifareClassicTool/Activities/MainMenu.java", "license": "gpl-3.0", "size": 32137 }
[ "android.content.Intent", "android.view.View" ]
import android.content.Intent; import android.view.View;
import android.content.*; import android.view.*;
[ "android.content", "android.view" ]
android.content; android.view;
51,153
protected String artifactoryVersion() { final String version = cli.getOptionValue(VERSION); final Matcher matcher = RE_DASH.matcher(version); return matcher.replaceAll("--"); }
String function() { final String version = cli.getOptionValue(VERSION); final Matcher matcher = RE_DASH.matcher(version); return matcher.replaceAll("--"); }
/** * Returns the encoded, Artifactory version for a Shields IO image. * @return Artifactory verseion for Shields IO. */
Returns the encoded, Artifactory version for a Shields IO image
artifactoryVersion
{ "repo_name": "universal-automata/liblevenshtein-java", "path": "src/task/java/com/github/liblevenshtein/task/Action.java", "license": "mit", "size": 25871 }
[ "java.util.regex.Matcher" ]
import java.util.regex.Matcher;
import java.util.regex.*;
[ "java.util" ]
java.util;
1,301,470
protected final void addAlignLeft(ComponentAligner group) { getAlignLeftGroup().add(group); }
final void function(ComponentAligner group) { getAlignLeftGroup().add(group); }
/** * Adds the given group for left alignment. Its preferred width will be used * along with the width of all the other components in order to get the * widest component and use its width as the width for all the components. * * @param component The group containing component to be aligned with...
Adds the given group for left alignment. Its preferred width will be used along with the width of all the other components in order to get the widest component and use its width as the width for all the components
addAlignLeft
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/ui/view/AbstractPanel.java", "license": "epl-1.0", "size": 23291 }
[ "org.eclipse.persistence.tools.workbench.framework.uitools.ComponentAligner" ]
import org.eclipse.persistence.tools.workbench.framework.uitools.ComponentAligner;
import org.eclipse.persistence.tools.workbench.framework.uitools.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
2,075,371
public void removeDisruption(MockTransportService sourceTransportService, MockTransportService targetTransportService) { sourceTransportService.clearOutboundRules(targetTransportService); }
void function(MockTransportService sourceTransportService, MockTransportService targetTransportService) { sourceTransportService.clearOutboundRules(targetTransportService); }
/** * Removes network disruption that was added by {@link #applyDisruption}. * * @param sourceTransportService source transport service from which requests are sent * @param targetTransportService target transport service to which requests are sent */
Removes network disruption that was added by <code>#applyDisruption</code>
removeDisruption
{ "repo_name": "crate/crate", "path": "server/src/testFixtures/java/org/elasticsearch/test/disruption/NetworkDisruption.java", "license": "apache-2.0", "size": 19033 }
[ "org.elasticsearch.test.transport.MockTransportService" ]
import org.elasticsearch.test.transport.MockTransportService;
import org.elasticsearch.test.transport.*;
[ "org.elasticsearch.test" ]
org.elasticsearch.test;
779,420
public void setOutputCalendar(Calendar outputCalendar) { dateAdapterOptions.setOutputCalendar(outputCalendar); // checks if all parents are attached checkAndAddToParent(); }
void function(Calendar outputCalendar) { dateAdapterOptions.setOutputCalendar(outputCalendar); checkAndAddToParent(); }
/** * Sets the name of calendaring systems that LUXON must use by the date adapter.<br> * See <a href="https://moment.github.io/luxon/#/calendars">here</a> the list of implemented and available. output calendar systems. * * @param outputCalendar the name of calendaring systems that LUXON must use by the date a...
Sets the name of calendaring systems that LUXON must use by the date adapter. See here the list of implemented and available. output calendar systems
setOutputCalendar
{ "repo_name": "pepstock-org/Charba", "path": "src/org/pepstock/charba/client/options/ScaleDateAdapter.java", "license": "apache-2.0", "size": 5848 }
[ "org.pepstock.charba.client.intl.enums.Calendar" ]
import org.pepstock.charba.client.intl.enums.Calendar;
import org.pepstock.charba.client.intl.enums.*;
[ "org.pepstock.charba" ]
org.pepstock.charba;
2,421,608
private String markdownToHtml(String buffer) { Parser parser = Parser.builder().build(); Node document = parser.parse(buffer); HtmlRenderer renderer = HtmlRenderer.builder().build(); String asHtml = renderer.render(document); return asHtml; }
String function(String buffer) { Parser parser = Parser.builder().build(); Node document = parser.parse(buffer); HtmlRenderer renderer = HtmlRenderer.builder().build(); String asHtml = renderer.render(document); return asHtml; }
/** * Converts a markdown buffer to a Html buffer * * @param buffer * @return String */
Converts a markdown buffer to a Html buffer
markdownToHtml
{ "repo_name": "VISNode/VISNode", "path": "src/main/java/visnode/commons/swing/components/MarkdownViewer.java", "license": "apache-2.0", "size": 2530 }
[ "org.commonmark.node.Node", "org.commonmark.parser.Parser", "org.commonmark.renderer.html.HtmlRenderer" ]
import org.commonmark.node.Node; import org.commonmark.parser.Parser; import org.commonmark.renderer.html.HtmlRenderer;
import org.commonmark.node.*; import org.commonmark.parser.*; import org.commonmark.renderer.html.*;
[ "org.commonmark.node", "org.commonmark.parser", "org.commonmark.renderer" ]
org.commonmark.node; org.commonmark.parser; org.commonmark.renderer;
547,391
@Test public void shouldAllowingMovingSharedNode() throws RepositoryException { String originalPath = "/Cars/Utility"; String sharedPath = "/NewArea/SharedUtility"; // Make the original a shareable node ... Node original = makeShareable(originalPath); session.save(); ...
void function() throws RepositoryException { String originalPath = STR; String sharedPath = STR; Node original = makeShareable(originalPath); session.save(); Node sharedNode = makeShare(originalPath, sharedPath); assertSharedSetIncludes(original, originalPath, sharedPath); assertSharedSetIncludes(sharedNode, originalPa...
/** * Verify that it is possible to move a (proxy) node in a shared set. * * @throws RepositoryException */
Verify that it is possible to move a (proxy) node in a shared set
shouldAllowingMovingSharedNode
{ "repo_name": "weebl2000/modeshape", "path": "modeshape-jcr/src/test/java/org/modeshape/jcr/ShareableNodesTest.java", "license": "apache-2.0", "size": 30754 }
[ "javax.jcr.Node", "javax.jcr.RepositoryException" ]
import javax.jcr.Node; import javax.jcr.RepositoryException;
import javax.jcr.*;
[ "javax.jcr" ]
javax.jcr;
1,378,209
protected boolean isTagValid(DockstoreTool tool, String name) { Optional<Tag> tag = tool.getWorkflowVersions().stream().filter(version -> Objects.equals(name, version.getName())).findFirst(); if (tag.isPresent()) { return tag.get().isValid(); } return false; }
boolean function(DockstoreTool tool, String name) { Optional<Tag> tag = tool.getWorkflowVersions().stream().filter(version -> Objects.equals(name, version.getName())).findFirst(); if (tag.isPresent()) { return tag.get().isValid(); } return false; }
/** * Returns whether a tag with the given name for a tool is valid or not * * @param tool * @param name * @return is tag valid */
Returns whether a tag with the given name for a tool is valid or not
isTagValid
{ "repo_name": "CancerCollaboratory/dockstore", "path": "dockstore-integration-testing/src/test/java/io/dockstore/client/cli/ValidationIT.java", "license": "gpl-2.0", "size": 19170 }
[ "io.swagger.client.model.DockstoreTool", "io.swagger.client.model.Tag", "java.util.Objects", "java.util.Optional" ]
import io.swagger.client.model.DockstoreTool; import io.swagger.client.model.Tag; import java.util.Objects; import java.util.Optional;
import io.swagger.client.model.*; import java.util.*;
[ "io.swagger.client", "java.util" ]
io.swagger.client; java.util;
774,889
return ImmutableList.of(); } public void globalInit(OptionsParsingResult startupOptions) throws AbruptExitException {}
return ImmutableList.of(); } public void globalInit(OptionsParsingResult startupOptions) throws AbruptExitException {}
/** * Returns the extra startup options this module contributes. * * <p>This method will be called at the beginning of Blaze startup (before {@link #globalInit}). * The startup options need to be parsed very early in the process, which requires this to be * separate from {@link #serverInit}. */
Returns the extra startup options this module contributes. This method will be called at the beginning of Blaze startup (before <code>#globalInit</code>). The startup options need to be parsed very early in the process, which requires this to be separate from <code>#serverInit</code>
getStartupOptions
{ "repo_name": "bazelbuild/bazel", "path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeModule.java", "license": "apache-2.0", "size": 18421 }
[ "com.google.common.collect.ImmutableList", "com.google.devtools.build.lib.util.AbruptExitException", "com.google.devtools.common.options.OptionsParsingResult" ]
import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.util.AbruptExitException; import com.google.devtools.common.options.OptionsParsingResult;
import com.google.common.collect.*; import com.google.devtools.build.lib.util.*; import com.google.devtools.common.options.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
226,624
protected void applyNamedParameterToQuery(Query queryObject, String paramName, Object value) throws HibernateException { if (value instanceof Collection) { queryObject.setParameterList(paramName, (Collection) value); } else if (value instanceof Object[]) { queryObject.setParameterList(paramName, (Obj...
void function(Query queryObject, String paramName, Object value) throws HibernateException { if (value instanceof Collection) { queryObject.setParameterList(paramName, (Collection) value); } else if (value instanceof Object[]) { queryObject.setParameterList(paramName, (Object[]) value); } else { queryObject.setParamete...
/** * Apply the given name parameter to the given Query object. * @param queryObject the Query object * @param paramName the name of the parameter * @param value the value of the parameter * @throws HibernateException if thrown by the Query object */
Apply the given name parameter to the given Query object
applyNamedParameterToQuery
{ "repo_name": "kingtang/spring-learn", "path": "spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTemplate.java", "license": "gpl-3.0", "size": 45672 }
[ "java.lang.reflect.InvocationHandler", "java.util.Collection", "org.hibernate.HibernateException", "org.hibernate.Query", "org.hibernate.Session" ]
import java.lang.reflect.InvocationHandler; import java.util.Collection; import org.hibernate.HibernateException; import org.hibernate.Query; import org.hibernate.Session;
import java.lang.reflect.*; import java.util.*; import org.hibernate.*;
[ "java.lang", "java.util", "org.hibernate" ]
java.lang; java.util; org.hibernate;
2,055,716
private List<CmsResourceTypeBean> getResourceTypeBeans( GalleryMode galleryMode, String referenceSitePath, List<String> resourceTypesList, final List<String> typesForTypeTab) { List<I_CmsResourceType> resourceTypes = null; Set<String> creatableTypes = null; s...
List<CmsResourceTypeBean> function( GalleryMode galleryMode, String referenceSitePath, List<String> resourceTypesList, final List<String> typesForTypeTab) { List<I_CmsResourceType> resourceTypes = null; Set<String> creatableTypes = null; switch (galleryMode) { case editor: case view: case adeView: case widget: resource...
/** * Returns the resource types configured to be used within the given gallery mode.<p> * * @param galleryMode the gallery mode * @param referenceSitePath the reference site-path to check permissions for * @param resourceTypesList the resource types parameter * @param typesForTypeTab the ...
Returns the resource types configured to be used within the given gallery mode
getResourceTypeBeans
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/ade/galleries/CmsGalleryService.java", "license": "lgpl-2.1", "size": 125842 }
[ "com.google.common.collect.Lists", "java.util.Collections", "java.util.List", "java.util.Set", "org.opencms.ade.galleries.shared.CmsResourceTypeBean", "org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants" ]
import com.google.common.collect.Lists; import java.util.Collections; import java.util.List; import java.util.Set; import org.opencms.ade.galleries.shared.CmsResourceTypeBean; import org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants;
import com.google.common.collect.*; import java.util.*; import org.opencms.ade.galleries.shared.*;
[ "com.google.common", "java.util", "org.opencms.ade" ]
com.google.common; java.util; org.opencms.ade;
1,679,931
public void add(double space, RectangleEdge edge) { if (edge == null) { throw new IllegalArgumentException("Null 'edge' argument."); } if (edge == RectangleEdge.TOP) { this.top += space; } else if (edge == RectangleEdge.BOTTOM) { this....
void function(double space, RectangleEdge edge) { if (edge == null) { throw new IllegalArgumentException(STR); } if (edge == RectangleEdge.TOP) { this.top += space; } else if (edge == RectangleEdge.BOTTOM) { this.bottom += space; } else if (edge == RectangleEdge.LEFT) { this.left += space; } else if (edge == RectangleE...
/** * Adds space to the top, bottom, left or right edge of the plot area. * * @param space the space (in Java2D units). * @param edge the edge (<code>null</code> not permitted). */
Adds space to the top, bottom, left or right edge of the plot area
add
{ "repo_name": "ibestvina/multithread-centiscape", "path": "CentiScaPe2.1/src/main/java/org/jfree/chart/axis/AxisSpace.java", "license": "mit", "size": 11035 }
[ "org.jfree.ui.RectangleEdge" ]
import org.jfree.ui.RectangleEdge;
import org.jfree.ui.*;
[ "org.jfree.ui" ]
org.jfree.ui;
757,690
void addParametersForCurrentState(Map<String, String[]> parameters);
void addParametersForCurrentState(Map<String, String[]> parameters);
/** Add the request parameters that reflect the controllers current state (useful for link generation outside of a form). * @param parameters The request parameters reflecting the controllers currents state. */
Add the request parameters that reflect the controllers current state (useful for link generation outside of a form)
addParametersForCurrentState
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/jsp/search/controller/I_CmsSearchController.java", "license": "lgpl-2.1", "size": 3181 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,153,475
public static String getPidFromPidFile(String pidFileName) { BufferedReader pidFile = null; FileReader fReader = null; String pid = null; try { fReader = new FileReader(pidFileName); pidFile = new BufferedReader(fReader); } catch (FileNotFoundException f) { LOG.debug("PidFile do...
static String function(String pidFileName) { BufferedReader pidFile = null; FileReader fReader = null; String pid = null; try { fReader = new FileReader(pidFileName); pidFile = new BufferedReader(fReader); } catch (FileNotFoundException f) { LOG.debug(STR + pidFileName); return pid; } try { pid = pidFile.readLine(); } ...
/** * Get PID from a pid-file. * * @param pidFileName * Name of the pid-file. * @return the PID string read from the pid-file. Returns null if the * pidFileName points to a non-existing file or if read fails from the * file. */
Get PID from a pid-file
getPidFromPidFile
{ "repo_name": "toddlipcon/hadoop", "path": "src/test/org/apache/hadoop/mapred/UtilsForTests.java", "license": "apache-2.0", "size": 22008 }
[ "java.io.BufferedReader", "java.io.FileNotFoundException", "java.io.FileReader", "java.io.IOException" ]
import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,422,617
@Path("/{team_id}") @GET @Produces("application/json") Response teams_get_legacy(@PathParam("team_id") Integer teamId);
@Path(STR) @Produces(STR) Response teams_get_legacy(@PathParam(STR) Integer teamId);
/** * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://developer.github.com/v3/teams/#get-a-team-by-name) endpoint. */
Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](HREF) endpoint
teams_get_legacy
{ "repo_name": "apiman/apiman-studio", "path": "back-end/hub-codegen/src/test/resources/OpenApi2QuarkusTest/_expected-github/generated-api/src/main/java/org/example/api/TeamsResource.java", "license": "apache-2.0", "size": 33902 }
[ "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.core.Response" ]
import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.Response;
import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "javax.ws" ]
javax.ws;
2,798,324
private static void writeSiteReportDependencyHeader(Sink sink, Dependency d) { sink.sectionTitle2(); sink.anchor("sha1" + d.getSha1sum()); sink.text(d.getFileName()); sink.anchor_(); sink.sectionTitle2_(); if (d.getDescription() != null && d.getDescription().length() ...
static void function(Sink sink, Dependency d) { sink.sectionTitle2(); sink.anchor("sha1" + d.getSha1sum()); sink.text(d.getFileName()); sink.anchor_(); sink.sectionTitle2_(); if (d.getDescription() != null && d.getDescription().length() > 0) { sink.paragraph(); sink.bold(); sink.text(STR); sink.bold_(); sink.text(d.get...
/** * Writes the dependency header to the site report. * * @param d the dependency * @param sink the sink to write the data to */
Writes the dependency header to the site report
writeSiteReportDependencyHeader
{ "repo_name": "simon-eastwood/DependencyCheckCM", "path": "dependency-check-maven/src/main/java/org/owasp/dependencycheck/maven/ReportingUtil.java", "license": "apache-2.0", "size": 17340 }
[ "org.apache.maven.doxia.sink.Sink", "org.owasp.dependencycheck.dependency.Dependency" ]
import org.apache.maven.doxia.sink.Sink; import org.owasp.dependencycheck.dependency.Dependency;
import org.apache.maven.doxia.sink.*; import org.owasp.dependencycheck.dependency.*;
[ "org.apache.maven", "org.owasp.dependencycheck" ]
org.apache.maven; org.owasp.dependencycheck;
193,293
@Override public void process() { MultitenantPrimaryKeyMapping mapping = new MultitenantPrimaryKeyMapping(); setMapping(mapping); // Set the tenant discriminator field. mapping.setField(m_tenantDiscriminatorField); // Set the context property. mapping.setContext...
void function() { MultitenantPrimaryKeyMapping mapping = new MultitenantPrimaryKeyMapping(); setMapping(mapping); mapping.setField(m_tenantDiscriminatorField); mapping.setContextProperty(m_contextProperty); getDescriptor().addPrimaryKeyField(m_tenantDiscriminatorField, this); }
/** * INTERNAL: * Process a multitenant id accessor. */
Process a multitenant id accessor
process
{ "repo_name": "gameduell/eclipselink.runtime", "path": "jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/MultitenantIdAccessor.java", "license": "epl-1.0", "size": 2901 }
[ "org.eclipse.persistence.mappings.MultitenantPrimaryKeyMapping" ]
import org.eclipse.persistence.mappings.MultitenantPrimaryKeyMapping;
import org.eclipse.persistence.mappings.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
1,982,421
public static StateRequestHandler forSideInputHandlerFactory( Map<String, Map<String, SideInputSpec>> sideInputSpecs, SideInputHandlerFactory sideInputHandlerFactory) { return new StateRequestHandlerToSideInputHandlerFactoryAdapter( sideInputSpecs, sideInputHandlerFactory); } static cl...
static StateRequestHandler function( Map<String, Map<String, SideInputSpec>> sideInputSpecs, SideInputHandlerFactory sideInputHandlerFactory) { return new StateRequestHandlerToSideInputHandlerFactoryAdapter( sideInputSpecs, sideInputHandlerFactory); } static class StateRequestHandlerToSideInputHandlerFactoryAdapter imp...
/** * Returns an adapter which converts a {@link SideInputHandlerFactory} to a {@link * StateRequestHandler}. * * <p>The {@link SideInputHandlerFactory} is required to handle all side inputs contained within * the {@link ExecutableProcessBundleDescriptor}. See {@link * ExecutableProcessBundleDescripto...
Returns an adapter which converts a <code>SideInputHandlerFactory</code> to a <code>StateRequestHandler</code>. The <code>SideInputHandlerFactory</code> is required to handle all side inputs contained within the <code>ExecutableProcessBundleDescriptor</code>. See <code>ExecutableProcessBundleDescriptor#getSideInputSpec...
forSideInputHandlerFactory
{ "repo_name": "mxm/incubator-beam", "path": "runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/state/StateRequestHandlers.java", "license": "apache-2.0", "size": 19777 }
[ "java.util.Map", "java.util.concurrent.ConcurrentHashMap", "org.apache.beam.runners.fnexecution.control.ProcessBundleDescriptors" ]
import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.apache.beam.runners.fnexecution.control.ProcessBundleDescriptors;
import java.util.*; import java.util.concurrent.*; import org.apache.beam.runners.fnexecution.control.*;
[ "java.util", "org.apache.beam" ]
java.util; org.apache.beam;
1,658,055
public void echoInfoFile() throws MaltChainedException { checkConfigDirectory(); JarInputStream jis; try { if (url == null) { jis = new JarInputStream(new FileInputStream(workingDirectory.getPath()+File.separator+getName()+".mco")); } else { jis = new JarInputStream(u...
void function() throws MaltChainedException { checkConfigDirectory(); JarInputStream jis; try { if (url == null) { jis = new JarInputStream(new FileInputStream(workingDirectory.getPath()+File.separator+getName()+".mco")); } else { jis = new JarInputStream(url.openConnection().getInputStream()); } JarEntry je; while ((j...
/** * Prints the content of the configuration information file to the system logger * * @throws MaltChainedException */
Prints the content of the configuration information file to the system logger
echoInfoFile
{ "repo_name": "gitpan/uplug-main", "path": "share/ext/parser/malt/src/org/maltparser/core/config/ConfigurationDir.java", "license": "gpl-3.0", "size": 42985 }
[ "java.io.File", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.IOException", "java.util.jar.JarEntry", "java.util.jar.JarInputStream", "org.maltparser.core.exception.MaltChainedException", "org.maltparser.core.helper.SystemLogger" ]
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.jar.JarEntry; import java.util.jar.JarInputStream; import org.maltparser.core.exception.MaltChainedException; import org.maltparser.core.helper.SystemLogger;
import java.io.*; import java.util.jar.*; import org.maltparser.core.exception.*; import org.maltparser.core.helper.*;
[ "java.io", "java.util", "org.maltparser.core" ]
java.io; java.util; org.maltparser.core;
1,008,863
public void testGetByExternalIdBundleVersion() { final ExternalIdBundle eids = ExternalIdBundle.of(ExternalId.of("abc", "1"), ExternalId.of("def", "2")); final VersionCorrection version = VersionCorrection.of(Instant.ofEpochSecond(10000), Instant.ofEpochSecond(20000)); final LegalEntity legalEntity = new ...
void function() { final ExternalIdBundle eids = ExternalIdBundle.of(ExternalId.of("abc", "1"), ExternalId.of("def", "2")); final VersionCorrection version = VersionCorrection.of(Instant.ofEpochSecond(10000), Instant.ofEpochSecond(20000)); final LegalEntity legalEntity = new TestLegalEntity(null, STR); final DummyLegalE...
/** * Tests getting by external id bundle and version. */
Tests getting by external id bundle and version
testGetByExternalIdBundleVersion
{ "repo_name": "McLeodMoores/starling", "path": "projects/core-rest-client/src/test/java/com/opengamma/core/legalentity/impl/RemoteLegalEntitySourceTest.java", "license": "apache-2.0", "size": 21798 }
[ "com.opengamma.core.legalentity.LegalEntity", "com.opengamma.id.ExternalId", "com.opengamma.id.ExternalIdBundle", "com.opengamma.id.VersionCorrection", "java.util.Collections", "org.testng.Assert", "org.threeten.bp.Instant" ]
import com.opengamma.core.legalentity.LegalEntity; import com.opengamma.id.ExternalId; import com.opengamma.id.ExternalIdBundle; import com.opengamma.id.VersionCorrection; import java.util.Collections; import org.testng.Assert; import org.threeten.bp.Instant;
import com.opengamma.core.legalentity.*; import com.opengamma.id.*; import java.util.*; import org.testng.*; import org.threeten.bp.*;
[ "com.opengamma.core", "com.opengamma.id", "java.util", "org.testng", "org.threeten.bp" ]
com.opengamma.core; com.opengamma.id; java.util; org.testng; org.threeten.bp;
814,786
public static String getFormattedMonthDay(Context context, long dateInMillis) { Time time = new Time(); time.setToNow(); SimpleDateFormat dbDateFormat = new SimpleDateFormat(Utility.DATE_FORMAT); SimpleDateFormat monthDayFormat = new SimpleDateFormat("MMMM dd"); String month...
static String function(Context context, long dateInMillis) { Time time = new Time(); time.setToNow(); SimpleDateFormat dbDateFormat = new SimpleDateFormat(Utility.DATE_FORMAT); SimpleDateFormat monthDayFormat = new SimpleDateFormat(STR); String monthDayString = monthDayFormat.format(dateInMillis); return monthDayString...
/** * Converts db date format to the format "Month day", e.g "June 24". * * @param context Context to use for resource localization * @param dateInMillis The db formatted date string, expected to be of the form specified * in Utility.DATE_FORMAT * @return The day i...
Converts db date format to the format "Month day", e.g "June 24"
getFormattedMonthDay
{ "repo_name": "revanatar/Sunshine", "path": "app/src/main/java/com/example/android/sunshine/app/Utility.java", "license": "apache-2.0", "size": 10268 }
[ "android.content.Context", "android.text.format.Time", "java.text.SimpleDateFormat" ]
import android.content.Context; import android.text.format.Time; import java.text.SimpleDateFormat;
import android.content.*; import android.text.format.*; import java.text.*;
[ "android.content", "android.text", "java.text" ]
android.content; android.text; java.text;
2,889,660
@Before public void startUp() throws IOException, URISyntaxException { tearDownDone = false; conf = new HdfsConfiguration(); conf.set(DFSConfigKeys.DFS_DATANODE_DATA_DIR_KEY, DATA_DIR); conf.set(DFSConfigKeys.DFS_DATANODE_ADDRESS_KEY, "0.0.0.0:0"); conf.set(DFSConfigKeys.DFS_DATANODE_HTTP_ADDRES...
void function() throws IOException, URISyntaxException { tearDownDone = false; conf = new HdfsConfiguration(); conf.set(DFSConfigKeys.DFS_DATANODE_DATA_DIR_KEY, DATA_DIR); conf.set(DFSConfigKeys.DFS_DATANODE_ADDRESS_KEY, STR); conf.set(DFSConfigKeys.DFS_DATANODE_HTTP_ADDRESS_KEY, STR); conf.set(DFSConfigKeys.DFS_DATANO...
/** * Starts an instance of DataNode * @throws IOException */
Starts an instance of DataNode
startUp
{ "repo_name": "ronny-macmaster/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockRecovery.java", "license": "apache-2.0", "size": 39967 }
[ "java.io.File", "java.io.IOException", "java.net.URISyntaxException", "java.util.ArrayList", "org.apache.hadoop.fs.CommonConfigurationKeys", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.FileUtil", "org.apache.hadoop.hdfs.DFSConfigKeys", "org.apache.hadoop.hdfs.HdfsConfiguration", "org....
import java.io.File; import java.io.IOException; import java.net.URISyntaxException; import java.util.ArrayList; import org.apache.hadoop.fs.CommonConfigurationKeys; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.FileUtil; import org.apache.hadoop.hdfs.DFSConfigKeys; import org.apache.hadoop.hdfs.H...
import java.io.*; import java.net.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.mockito.*;
[ "java.io", "java.net", "java.util", "org.apache.hadoop", "org.mockito" ]
java.io; java.net; java.util; org.apache.hadoop; org.mockito;
1,679,081
@EventHandler (priority = EventPriority.HIGH) public void onPlayerJoin (PlayerJoinEvent event) { event.getPlayer ().teleport (event.getPlayer ().getWorld ().getSpawnLocation ().add (0.5d, 0.0d, 0.5d)); }
@EventHandler (priority = EventPriority.HIGH) void function (PlayerJoinEvent event) { event.getPlayer ().teleport (event.getPlayer ().getWorld ().getSpawnLocation ().add (0.5d, 0.0d, 0.5d)); }
/** * Handles player joins. * @param event The event. */
Handles player joins
onPlayerJoin
{ "repo_name": "LinEvil/spigot-join-spawn", "path": "src/main/java/rocks/spud/server/joinspawn/JoinSpawnPlugin.java", "license": "apache-2.0", "size": 1532 }
[ "org.bukkit.event.EventHandler", "org.bukkit.event.EventPriority", "org.bukkit.event.player.PlayerJoinEvent" ]
import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.*; import org.bukkit.event.player.*;
[ "org.bukkit.event" ]
org.bukkit.event;
995,131
EReference getSimpleOutPatternElement_ReverseBindings();
EReference getSimpleOutPatternElement_ReverseBindings();
/** * Returns the meta object for the containment reference list '{@link anatlyzer.atlext.ATL.SimpleOutPatternElement#getReverseBindings <em>Reverse Bindings</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference list '<em>Reverse Bindings</em>'. * @s...
Returns the meta object for the containment reference list '<code>anatlyzer.atlext.ATL.SimpleOutPatternElement#getReverseBindings Reverse Bindings</code>'.
getSimpleOutPatternElement_ReverseBindings
{ "repo_name": "jesusc/anatlyzer", "path": "plugins/anatlyzer.atl.typing/src-gen/anatlyzer/atlext/ATL/ATLPackage.java", "license": "epl-1.0", "size": 222096 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
570,073
public Builder setMissingFragmentPolicy(MissingFragmentPolicy missingFragmentPolicy) { configurationFragmentPolicy.setMissingFragmentPolicy(missingFragmentPolicy); return this; }
Builder function(MissingFragmentPolicy missingFragmentPolicy) { configurationFragmentPolicy.setMissingFragmentPolicy(missingFragmentPolicy); return this; }
/** * Sets the policy for the case where the configuration is missing required fragments (see * {@link #requiresConfigurationFragments}). */
Sets the policy for the case where the configuration is missing required fragments (see <code>#requiresConfigurationFragments</code>)
setMissingFragmentPolicy
{ "repo_name": "akira-baruah/bazel", "path": "src/main/java/com/google/devtools/build/lib/packages/AspectDefinition.java", "license": "apache-2.0", "size": 20235 }
[ "com.google.devtools.build.lib.packages.ConfigurationFragmentPolicy" ]
import com.google.devtools.build.lib.packages.ConfigurationFragmentPolicy;
import com.google.devtools.build.lib.packages.*;
[ "com.google.devtools" ]
com.google.devtools;
1,353,492
public void backgroundLoad(TTableName tblName) { // Only queue for background loading if the table doesn't already exist // in the table loading set. if (tableLoadingSet_.add(tblName)) { tableLoadingDeque_.offerLast(tblName); } }
void function(TTableName tblName) { if (tableLoadingSet_.add(tblName)) { tableLoadingDeque_.offerLast(tblName); } }
/** * Submits a single table for background (low priority) loading. */
Submits a single table for background (low priority) loading
backgroundLoad
{ "repo_name": "ImpalaToGo/ImpalaToGo", "path": "fe/src/main/java/com/cloudera/impala/catalog/TableLoadingMgr.java", "license": "apache-2.0", "size": 14475 }
[ "com.cloudera.impala.thrift.TTableName" ]
import com.cloudera.impala.thrift.TTableName;
import com.cloudera.impala.thrift.*;
[ "com.cloudera.impala" ]
com.cloudera.impala;
593,515
private HashMap<Action, ArrayList<ERTPoint>> intializeERTPoints(HashMap<Action, HashMap<String, ArrayList<Double>>> features) { HashMap<Action, ArrayList<ERTPoint>> points = new HashMap<Action, ArrayList<ERTPoint>>(); for(Action act : data.getActionSet()) { points.put(act, ERTPoint.getERTPoints(features.g...
HashMap<Action, ArrayList<ERTPoint>> function(HashMap<Action, HashMap<String, ArrayList<Double>>> features) { HashMap<Action, ArrayList<ERTPoint>> points = new HashMap<Action, ArrayList<ERTPoint>>(); for(Action act : data.getActionSet()) { points.put(act, ERTPoint.getERTPoints(features.get(act))); } return points; }
/** * Initializes mapping of actions to list of ERT points * * @param features Mapping of actions to list of features/ * @return Mapping of actions to list of ERT points */
Initializes mapping of actions to list of ERT points
intializeERTPoints
{ "repo_name": "williamleif/PSRToolbox", "path": "src/cpsr/planning/ertapprox/actionensembles/ActionERTQPlanner.java", "license": "apache-2.0", "size": 9327 }
[ "java.util.ArrayList", "java.util.HashMap" ]
import java.util.ArrayList; import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,631,783
public static List<StateOption> getStateOptions() { List<StateOption> options = new ArrayList<>(); for (SonyProjectorBlockNr value : SonyProjectorBlockNr.values()) { options.add(new StateOption(value.getName(), value.getName())); } return options; }
static List<StateOption> function() { List<StateOption> options = new ArrayList<>(); for (SonyProjectorBlockNr value : SonyProjectorBlockNr.values()) { options.add(new StateOption(value.getName(), value.getName())); } return options; }
/** * Get the list of {@link StateOption} associated to the available block noise reduction modes * * @return the list of {@link StateOption} associated to the available block noise reduction modes */
Get the list of <code>StateOption</code> associated to the available block noise reduction modes
getStateOptions
{ "repo_name": "paulianttila/openhab2", "path": "bundles/org.openhab.binding.sonyprojector/src/main/java/org/openhab/binding/sonyprojector/internal/communication/SonyProjectorBlockNr.java", "license": "epl-1.0", "size": 3954 }
[ "java.util.ArrayList", "java.util.List", "org.openhab.core.types.StateOption" ]
import java.util.ArrayList; import java.util.List; import org.openhab.core.types.StateOption;
import java.util.*; import org.openhab.core.types.*;
[ "java.util", "org.openhab.core" ]
java.util; org.openhab.core;
1,415,226
public Optional<Flow.Builder> getFlow(BDD bdd) { return getFlow(bdd, FlowPreference.DEBUGGING); }
Optional<Flow.Builder> function(BDD bdd) { return getFlow(bdd, FlowPreference.DEBUGGING); }
/** * Get a representative flow in a BDD. First, try to get an ICMP echo request flow; second, try to * get a UDP flow used for traceroute; third, try to get a TCP flow with a named port; finally try * to get an arbitrary one. * * @param bdd a BDD representing a set of packet headers * @return A Flow....
Get a representative flow in a BDD. First, try to get an ICMP echo request flow; second, try to get a UDP flow used for traceroute; third, try to get a TCP flow with a named port; finally try to get an arbitrary one
getFlow
{ "repo_name": "batfish/batfish", "path": "projects/batfish-common-protocol/src/main/java/org/batfish/common/bdd/BDDPacket.java", "license": "apache-2.0", "size": 16909 }
[ "java.util.Optional", "org.batfish.common.bdd.BDDFlowConstraintGenerator", "org.batfish.datamodel.Flow" ]
import java.util.Optional; import org.batfish.common.bdd.BDDFlowConstraintGenerator; import org.batfish.datamodel.Flow;
import java.util.*; import org.batfish.common.bdd.*; import org.batfish.datamodel.*;
[ "java.util", "org.batfish.common", "org.batfish.datamodel" ]
java.util; org.batfish.common; org.batfish.datamodel;
1,370,308
HtmlWriter<T> setPrintStream(PrintStream out);
HtmlWriter<T> setPrintStream(PrintStream out);
/** * Sets the current PrintStream. */
Sets the current PrintStream
setPrintStream
{ "repo_name": "fmcarvalho/HtmlFlow", "path": "src/main/java/htmlflow/HtmlWriter.java", "license": "mit", "size": 2164 }
[ "java.io.PrintStream" ]
import java.io.PrintStream;
import java.io.*;
[ "java.io" ]
java.io;
470,874
@Override public void init( PortletConfig portletConfig, ServletContext servletContext, HttpServletRequest servletRequest, HttpServletResponse servletResponse) { Assert.notNull(portletConfig, "portletConfig cannot be null"); Assert.notNull(servletC...
void function( PortletConfig portletConfig, ServletContext servletContext, HttpServletRequest servletRequest, HttpServletResponse servletResponse) { Assert.notNull(portletConfig, STR); Assert.notNull(servletContext, STR); super.init(servletRequest, servletResponse); this.portletConfig = portletConfig; this.servletConte...
/** * Called by {@link PortletServlet} after the cross context dispatch but before the portlet * invocation * * @see org.apache.pluto.container.PortletRequestContext#init(javax.portlet.PortletConfig, * javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, * javax.ser...
Called by <code>PortletServlet</code> after the cross context dispatch but before the portlet invocation
init
{ "repo_name": "jhelmer-unicon/uPortal", "path": "uportal-war/src/main/java/org/apereo/portal/portlet/container/PortletRequestContextImpl.java", "license": "apache-2.0", "size": 11357 }
[ "javax.portlet.PortletConfig", "javax.servlet.ServletContext", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.springframework.util.Assert" ]
import javax.portlet.PortletConfig; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.util.Assert;
import javax.portlet.*; import javax.servlet.*; import javax.servlet.http.*; import org.springframework.util.*;
[ "javax.portlet", "javax.servlet", "org.springframework.util" ]
javax.portlet; javax.servlet; org.springframework.util;
2,003,795
protected String format(ChannelHandlerContext ctx, String eventName, Object firstArg, Object secondArg) { if (secondArg == null) { return formatSimple(ctx, eventName, firstArg); } String chStr = ctx.channel().toString(); String arg1Str = String.valueOf(firstArg); ...
String function(ChannelHandlerContext ctx, String eventName, Object firstArg, Object secondArg) { if (secondArg == null) { return formatSimple(ctx, eventName, firstArg); } String chStr = ctx.channel().toString(); String arg1Str = String.valueOf(firstArg); String arg2Str = secondArg.toString(); StringBuilder buf = new S...
/** * Formats an event and returns the formatted message. This method is currently only used for formatting * {@link ChannelOutboundHandler#connect(ChannelHandlerContext, SocketAddress, SocketAddress, ChannelPromise)}. * * @param eventName the name of the event * @param firstArg the first arg...
Formats an event and returns the formatted message. This method is currently only used for formatting <code>ChannelOutboundHandler#connect(ChannelHandlerContext, SocketAddress, SocketAddress, ChannelPromise)</code>
format
{ "repo_name": "NiteshKant/netty", "path": "handler/src/main/java/io/netty/handler/logging/LoggingHandler.java", "license": "apache-2.0", "size": 15783 }
[ "io.netty.channel.ChannelHandlerContext" ]
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.*;
[ "io.netty.channel" ]
io.netty.channel;
111,388
public Set<EntityInterface> getAllSourceClasses(Category category) { return new HashSet<EntityInterface>(categoryVsClasseSet.get(category.getId())); // avoid modification from outside }
Set<EntityInterface> function(Category category) { return new HashSet<EntityInterface>(categoryVsClasseSet.get(category.getId())); }
/** * Returns all source classes * @param category * @return Set of all source classes */
Returns all source classes
getAllSourceClasses
{ "repo_name": "NCIP/cab2b", "path": "software/cab2b/src/java/server/edu/wustl/cab2b/server/category/CategoryCache.java", "license": "bsd-3-clause", "size": 5133 }
[ "edu.common.dynamicextensions.domaininterface.EntityInterface", "edu.wustl.common.querysuite.metadata.category.Category", "java.util.HashSet", "java.util.Set" ]
import edu.common.dynamicextensions.domaininterface.EntityInterface; import edu.wustl.common.querysuite.metadata.category.Category; import java.util.HashSet; import java.util.Set;
import edu.common.dynamicextensions.domaininterface.*; import edu.wustl.common.querysuite.metadata.category.*; import java.util.*;
[ "edu.common.dynamicextensions", "edu.wustl.common", "java.util" ]
edu.common.dynamicextensions; edu.wustl.common; java.util;
1,267,585
public final native Vector3 projectVector(Vector3 vector, Camera camera);
final native Vector3 function(Vector3 vector, Camera camera);
/** * Projects a vector with the camera. Caution, this method changes 'vector'. * @param vector * @param camera * @return projected vector */
Projects a vector with the camera. Caution, this method changes 'vector'
projectVector
{ "repo_name": "sebasbaumh/gwt-three.js", "path": "src/com/akjava/gwt/three/client/examples/renderers/Projector.java", "license": "apache-2.0", "size": 8196 }
[ "com.akjava.gwt.three.client.js.cameras.Camera", "com.akjava.gwt.three.client.js.math.Vector3" ]
import com.akjava.gwt.three.client.js.cameras.Camera; import com.akjava.gwt.three.client.js.math.Vector3;
import com.akjava.gwt.three.client.js.cameras.*; import com.akjava.gwt.three.client.js.math.*;
[ "com.akjava.gwt" ]
com.akjava.gwt;
2,585,039
private void launchBrowser(final String folder, final String url, final String name) { String destUrl = url; if (null == url || "".equals(url)) { destUrl = "file:///" + folder.replaceAll(" ", "%20") + '/' + name.replaceAll(" ", "%20") + HTML_SUFFIX; } else { if (!url.endsWith(HTML_SUFFIX)) ...
void function(final String folder, final String url, final String name) { String destUrl = url; if (null == url STRfile: name.replaceAll(" ", "%20") + HTML_SUFFIX; } else { if (!url.endsWith(HTML_SUFFIX)) { if (!url.endsWith("/")) { destUrl += '/'; } destUrl += name + HTML_SUFFIX; } } BareBonesBrowserLaunch.openURL(des...
/** * Launches a browser window with the tiled image. * * @param folder file folder to use * @param url URL to use; may be empty string, then use file folder * @param name name of HTML file */
Launches a browser window with the tiled image
launchBrowser
{ "repo_name": "uw-loci/deep-zoom-plugin", "path": "src/main/java/loci/chainableplugin/deepzoom/DeepZoomExporter.java", "license": "bsd-2-clause", "size": 12143 }
[ "com.centerkey.utils.BareBonesBrowserLaunch" ]
import com.centerkey.utils.BareBonesBrowserLaunch;
import com.centerkey.utils.*;
[ "com.centerkey.utils" ]
com.centerkey.utils;
664,560
public static List<DistributionScenarioResult> runScenarios(String scenarioFileDirPath, String dcpPath, String propFilePath, String selectorClass) throws Exception { // Parse command line parameters File scenarioDir = new File(scenarioFileDirPath); if (!scenarioDir.isDirectory()) { LOG....
static List<DistributionScenarioResult> function(String scenarioFileDirPath, String dcpPath, String propFilePath, String selectorClass) throws Exception { File scenarioDir = new File(scenarioFileDirPath); if (!scenarioDir.isDirectory()) { LOG.log(Level.SEVERE, STR + STR + scenarioFileDirPath + STR); return null; } List...
/** * Run a scenario with the given command line parameters. * * @param scenarios A list of distribution scenarios that should be tested against. * @param dcpProfiles A list of connector profiles that will be run against the given scenarios. * @param props Application configuration file. * @param sele...
Run a scenario with the given command line parameters
runScenarios
{ "repo_name": "chrismattmann/disco", "path": "src/java/edu/usc/softarch/disco/tools/ScenarioRunner.java", "license": "apache-2.0", "size": 8066 }
[ "edu.usc.softarch.disco.structs.DistributionScenario", "edu.usc.softarch.disco.structs.DistributionScenarioResult", "edu.usc.softarch.disco.util.DCPReader", "edu.usc.softarch.disco.util.DistributionScenarioReader", "java.io.File", "java.util.LinkedList", "java.util.List", "java.util.Properties", "ja...
import edu.usc.softarch.disco.structs.DistributionScenario; import edu.usc.softarch.disco.structs.DistributionScenarioResult; import edu.usc.softarch.disco.util.DCPReader; import edu.usc.softarch.disco.util.DistributionScenarioReader; import java.io.File; import java.util.LinkedList; import java.util.List; import java....
import edu.usc.softarch.disco.structs.*; import edu.usc.softarch.disco.util.*; import java.io.*; import java.util.*; import java.util.logging.*;
[ "edu.usc.softarch", "java.io", "java.util" ]
edu.usc.softarch; java.io; java.util;
1,742,093
public List<T> execute(int p1, int p2) throws DataAccessException { return execute(p1, p2, null); }
List<T> function(int p1, int p2) throws DataAccessException { return execute(p1, p2, null); }
/** * Convenient method to execute with two int parameters. * @param p1 first int parameter * @param p2 second int parameter */
Convenient method to execute with two int parameters
execute
{ "repo_name": "kingtang/spring-learn", "path": "spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlQuery.java", "license": "gpl-3.0", "size": 13142 }
[ "java.util.List", "org.springframework.dao.DataAccessException" ]
import java.util.List; import org.springframework.dao.DataAccessException;
import java.util.*; import org.springframework.dao.*;
[ "java.util", "org.springframework.dao" ]
java.util; org.springframework.dao;
620,522
@Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(TopoPrimitiveMemberType.class)) { case GmlPackage.TOPO_PRIMITIVE_MEMBER_TYPE__ACTUATE: case GmlPackage.TOPO_PRIMITIVE_MEMBER_TYPE__ARCROLE: case GmlPackage.TOPO_PRIMITIVE_ME...
void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(TopoPrimitiveMemberType.class)) { case GmlPackage.TOPO_PRIMITIVE_MEMBER_TYPE__ACTUATE: case GmlPackage.TOPO_PRIMITIVE_MEMBER_TYPE__ARCROLE: case GmlPackage.TOPO_PRIMITIVE_MEMBER_TYPE__HREF: case GmlPackage.TOPO_PR...
/** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>.
notifyChanged
{ "repo_name": "markus1978/citygml4emf", "path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/gml/provider/TopoPrimitiveMemberTypeItemProvider.java", "license": "apache-2.0", "size": 13175 }
[ "net.opengis.gml.GmlPackage", "net.opengis.gml.TopoPrimitiveMemberType", "org.eclipse.emf.common.notify.Notification", "org.eclipse.emf.edit.provider.ViewerNotification" ]
import net.opengis.gml.GmlPackage; import net.opengis.gml.TopoPrimitiveMemberType; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification;
import net.opengis.gml.*; import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*;
[ "net.opengis.gml", "org.eclipse.emf" ]
net.opengis.gml; org.eclipse.emf;
2,476,353
public void trace(Object message, Throwable exception) { log(Level.FINEST, String.valueOf(message), exception); }
void function(Object message, Throwable exception) { log(Level.FINEST, String.valueOf(message), exception); }
/** * Logs a message with <code>java.util.logging.Level.FINEST</code>. * * @param message to log * @param exception log this cause * @see org.apache.commons.logging.Log#trace(Object, Throwable) */
Logs a message with <code>java.util.logging.Level.FINEST</code>
trace
{ "repo_name": "mohanaraosv/commons-logging", "path": "src/main/java/org/apache/commons/logging/impl/Jdk14Logger.java", "license": "apache-2.0", "size": 8427 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
1,245,522
public static boolean isRelationManyToMany(Class classObj1,Class classObj2,String roleAttributeName) { ClassRelationshipData crd=new ClassRelationshipData(classObj1.getName(),classObj2.getName(),roleAttributeName); Iterator itr=mappings.iterator(); while(itr.hasNext()) { ClassRelationshipData crd...
static boolean function(Class classObj1,Class classObj2,String roleAttributeName) { ClassRelationshipData crd=new ClassRelationshipData(classObj1.getName(),classObj2.getName(),roleAttributeName); Iterator itr=mappings.iterator(); while(itr.hasNext()) { ClassRelationshipData crd1=(ClassRelationshipData)itr.next(); if(cr...
/** This function checks weather relation is Many-Many * * @param classObj1 * @param classObj2 * @return true is relation is Many-Many otherwise false */
This function checks weather relation is Many-Many
isRelationManyToMany
{ "repo_name": "NCIP/cab2b", "path": "software/dependencies/commonpackage/HEAD_TAG_10_Jan_2007_RELEASE_BRANCH_FOR_V11/src/edu/wustl/common/util/dbManager/HibernateMetaData.java", "license": "bsd-3-clause", "size": 14639 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
325,360
protected void writeJobEntryLogInformation() throws KettleException { Database db = null; JobEntryLogTable jobEntryLogTable = jobMeta.getJobEntryLogTable(); try { db = new Database( this, jobEntryLogTable.getDatabaseMeta() ); db.shareVariablesWith( this ); db.connect(); db.setCommi...
void function() throws KettleException { Database db = null; JobEntryLogTable jobEntryLogTable = jobMeta.getJobEntryLogTable(); try { db = new Database( this, jobEntryLogTable.getDatabaseMeta() ); db.shareVariablesWith( this ); db.connect(); db.setCommit( logCommitSize ); for ( JobEntryCopy copy : jobMeta.getJobCopies(...
/** * Write job entry log information. * * @throws KettleException * the kettle exception */
Write job entry log information
writeJobEntryLogInformation
{ "repo_name": "codek/pentaho-kettle", "path": "engine/src/org/pentaho/di/job/Job.java", "license": "apache-2.0", "size": 72341 }
[ "org.pentaho.di.core.database.Database", "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.core.logging.JobEntryLogTable", "org.pentaho.di.core.logging.LogStatus", "org.pentaho.di.i18n.BaseMessages", "org.pentaho.di.job.entry.JobEntryCopy" ]
import org.pentaho.di.core.database.Database; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.logging.JobEntryLogTable; import org.pentaho.di.core.logging.LogStatus; import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.job.entry.JobEntryCopy;
import org.pentaho.di.core.database.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.logging.*; import org.pentaho.di.i18n.*; import org.pentaho.di.job.entry.*;
[ "org.pentaho.di" ]
org.pentaho.di;
1,628,519
default void finishStatisticsCollection(ConnectorSession session, ConnectorTableHandle tableHandle, Collection<ComputedStatistics> computedStatistics) { throw new TrinoException(GENERIC_INTERNAL_ERROR, "ConnectorMetadata beginStatisticsCollection() is implemented without finishStatisticsCollection()"); ...
default void finishStatisticsCollection(ConnectorSession session, ConnectorTableHandle tableHandle, Collection<ComputedStatistics> computedStatistics) { throw new TrinoException(GENERIC_INTERNAL_ERROR, STR); }
/** * Finish statistics collection */
Finish statistics collection
finishStatisticsCollection
{ "repo_name": "electrum/presto", "path": "core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java", "license": "apache-2.0", "size": 48062 }
[ "io.trino.spi.TrinoException", "io.trino.spi.statistics.ComputedStatistics", "java.util.Collection" ]
import io.trino.spi.TrinoException; import io.trino.spi.statistics.ComputedStatistics; import java.util.Collection;
import io.trino.spi.*; import io.trino.spi.statistics.*; import java.util.*;
[ "io.trino.spi", "java.util" ]
io.trino.spi; java.util;
2,402,632
public final void setParameterBlockOffset(int off) { setParameter(4, off != 0 ? off - RFCNetBIOSProtocol.HEADER_LEN : 0); }
final void function(int off) { setParameter(4, off != 0 ? off - RFCNetBIOSProtocol.HEADER_LEN : 0); }
/** * Set the parameter block offset * * @param off int */
Set the parameter block offset
setParameterBlockOffset
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/alfresco-jlan/source/java/org/alfresco/jlan/smb/server/SMBSrvTransPacket.java", "license": "lgpl-3.0", "size": 18714 }
[ "org.alfresco.jlan.netbios.RFCNetBIOSProtocol" ]
import org.alfresco.jlan.netbios.RFCNetBIOSProtocol;
import org.alfresco.jlan.netbios.*;
[ "org.alfresco.jlan" ]
org.alfresco.jlan;
2,373,833
public void setSelectedPackage(@NonNull String packId) { this.selectedPackageNumber = packId; }
void function(@NonNull String packId) { this.selectedPackageNumber = packId; }
/** * Work with the activity which fragment attached to. * Store the number which is selected. * @param packId The selected package number. */
Work with the activity which fragment attached to. Store the number which is selected
setSelectedPackage
{ "repo_name": "TonnyL/Espresso", "path": "app/src/main/java/io/github/marktony/espresso/mvp/packages/PackagesFragment.java", "license": "apache-2.0", "size": 16808 }
[ "android.support.annotation.NonNull" ]
import android.support.annotation.NonNull;
import android.support.annotation.*;
[ "android.support" ]
android.support;
617,860
@Override void sendCancel() throws AMQException { _0_10session.getQpidSession().messageCancel(getConsumerTagString()); try { _0_10session.getQpidSession().sync(); getSession().confirmConsumerCancelled(getConsumerTag()); // confirm cancel } catch (S...
@Override void sendCancel() throws AMQException { _0_10session.getQpidSession().messageCancel(getConsumerTagString()); try { _0_10session.getQpidSession().sync(); getSession().confirmConsumerCancelled(getConsumerTag()); } catch (SessionException se) { _0_10session.setCurrentException(se); } AMQException amqe = _0_10ses...
/** * This method is invoked when this consumer is stopped. * It tells the broker to stop delivering messages to this consumer. */
This method is invoked when this consumer is stopped. It tells the broker to stop delivering messages to this consumer
sendCancel
{ "repo_name": "hastef88/andes", "path": "modules/andes-core/client/src/main/java/org/wso2/andes/client/BasicMessageConsumer_0_10.java", "license": "apache-2.0", "size": 19190 }
[ "org.wso2.andes.AMQException", "org.wso2.andes.transport.SessionException" ]
import org.wso2.andes.AMQException; import org.wso2.andes.transport.SessionException;
import org.wso2.andes.*; import org.wso2.andes.transport.*;
[ "org.wso2.andes" ]
org.wso2.andes;
1,480,810
private String figurePageTitle(HttpServletRequest req, Individual entity, String noNameTitleKey, String nameTitleKey) { if (entity != null) { String name = entity.getName(); if (name != null) { return I18n.text(req, nameTitleKey, name); } } return I18n.text(req, noNameTitleKey); } static c...
String function(HttpServletRequest req, Individual entity, String noNameTitleKey, String nameTitleKey) { if (entity != null) { String name = entity.getName(); if (name != null) { return I18n.text(req, nameTitleKey, name); } } return I18n.text(req, noNameTitleKey); } static class UserMistakeException extends Exception {...
/** * Format one of two page titles, depending on whether the entity has a * name. */
Format one of two page titles, depending on whether the entity has a name
figurePageTitle
{ "repo_name": "tetherless-world/dco-vivo", "path": "src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ImageUploadController.java", "license": "lgpl-3.0", "size": 22036 }
[ "edu.cornell.mannlib.vitro.webapp.beans.Individual", "edu.cornell.mannlib.vitro.webapp.i18n.I18n", "javax.servlet.http.HttpServletRequest" ]
import edu.cornell.mannlib.vitro.webapp.beans.Individual; import edu.cornell.mannlib.vitro.webapp.i18n.I18n; import javax.servlet.http.HttpServletRequest;
import edu.cornell.mannlib.vitro.webapp.beans.*; import edu.cornell.mannlib.vitro.webapp.i18n.*; import javax.servlet.http.*;
[ "edu.cornell.mannlib", "javax.servlet" ]
edu.cornell.mannlib; javax.servlet;
2,378,634
public void setAllEntry(Map<String, NXentry> entry);
void function(Map<String, NXentry> entry);
/** * Set multiple child nodes of a particular type. * <ul> * <li> * entries</li> * </ul> * * @param entry the child nodes to add */
Set multiple child nodes of a particular type. entries
setAllEntry
{ "repo_name": "jamesmudd/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXroot.java", "license": "epl-1.0", "size": 7699 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,754,587
private boolean parseFileInfoSet(Iterator<YangFileInfo> yangFileInfoIterator) { YangFileInfo yangFileInfo = yangFileInfoIterator.next(); while (yangFileInfoIterator.hasNext()) { if (yangFileInfo.getRootNode().getName().equals("port-pair")) { return true; } els...
boolean function(Iterator<YangFileInfo> yangFileInfoIterator) { YangFileInfo yangFileInfo = yangFileInfoIterator.next(); while (yangFileInfoIterator.hasNext()) { if (yangFileInfo.getRootNode().getName().equals(STR)) { return true; } else if (yangFileInfo.getRootNode().getName().equals(STR)) { return true; } yangFileInf...
/** * Parses file info list and returns true if file info list contains the serialized file info. * * @param yangFileInfoIterator file info list iterator * @return true if present */
Parses file info list and returns true if file info list contains the serialized file info
parseFileInfoSet
{ "repo_name": "VinodKumarS-Huawei/ietf96yang", "path": "utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/plugin/manager/InterJarLinkerTest.java", "license": "apache-2.0", "size": 13238 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
313,912
public static String escapeHtml (String content) { if (isEmpty(content)) return content; return StringEscapeUtils.escapeHtml(content); }
static String function (String content) { if (isEmpty(content)) return content; return StringEscapeUtils.escapeHtml(content); }
/** * Escape HTML content. * i.e. replace characters with &values; * @param content content * @return escaped content */
Escape HTML content. i.e. replace characters with &values
escapeHtml
{ "repo_name": "lihongqiang/kettle-4.4.0-stable", "path": "src-core/org/pentaho/di/core/Const.java", "license": "apache-2.0", "size": 78488 }
[ "org.apache.commons.lang.StringEscapeUtils" ]
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
1,577,452
void setAuthors(List authors);
void setAuthors(List authors);
/** * Sets the entry author. * <p> * For Atom feeds, this sets the authors as a list of SyndPerson * objects, for RSS feeds this method is a convenience method, it maps * to the Dublin Core module creator. * <p> * @param author the feed author to set, <b>null</b> if none. * ...
Sets the entry author. For Atom feeds, this sets the authors as a list of SyndPerson objects, for RSS feeds this method is a convenience method, it maps to the Dublin Core module creator.
setAuthors
{ "repo_name": "simeshev/parabuild-ci", "path": "3rdparty/rome08/src/java/com/sun/syndication/feed/synd/SyndEntry.java", "license": "lgpl-3.0", "size": 8554 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,163,855
private SSLConfig configureLegacyGatewaySSL(final DistributionConfig distributionConfig, final SSLConfig sslConfig) { sslConfig.setCiphers(distributionConfig.getGatewaySSLCiphers()); sslConfig.setEnabled(distributionConfig.getGatewaySSLEnabled()); sslConfig.setKeystore(distributionConfig.getGatewayS...
SSLConfig function(final DistributionConfig distributionConfig, final SSLConfig sslConfig) { sslConfig.setCiphers(distributionConfig.getGatewaySSLCiphers()); sslConfig.setEnabled(distributionConfig.getGatewaySSLEnabled()); sslConfig.setKeystore(distributionConfig.getGatewaySSLKeyStore()); sslConfig.setKeystorePassword(...
/** * Configure a sslConfig for the gateway using the legacy configuration * * @return A sslConfig object describing the ssl config for the gateway component * @deprecated as of Geode 1.0 */
Configure a sslConfig for the gateway using the legacy configuration
configureLegacyGatewaySSL
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/net/SSLConfigurationFactory.java", "license": "apache-2.0", "size": 17434 }
[ "org.apache.geode.distributed.internal.DistributionConfig", "org.apache.geode.internal.admin.SSLConfig" ]
import org.apache.geode.distributed.internal.DistributionConfig; import org.apache.geode.internal.admin.SSLConfig;
import org.apache.geode.distributed.internal.*; import org.apache.geode.internal.admin.*;
[ "org.apache.geode" ]
org.apache.geode;
540,155
protected void addAntiSpoofingIp2Mac(String addrSpace, Short vlan, Long mac, Integer ip) { ScopedIp scopedIp = new ScopedIp(addrSpace, ip); DeviceId host = new DeviceId(addrSpac...
void function(String addrSpace, Short vlan, Long mac, Integer ip) { ScopedIp scopedIp = new ScopedIp(addrSpace, ip); DeviceId host = new DeviceId(addrSpace, vlan, mac); Collection<DeviceId> hosts = hostSecurityIpMap.get(scopedIp); if (hosts == null) { hosts = Collections.newSetFromMap( new ConcurrentHashMap<DeviceId, B...
/** * Add an IP to MAC anti-spoofing entry. Lock MAC to IP * * NOTE: The caller needs to hold the anti-spoofing write lock. * @param addrSpace * @param vlan * @param mac * @param ip */
Add an IP to MAC anti-spoofing entry. Lock MAC to IP
addAntiSpoofingIp2Mac
{ "repo_name": "mandeepdhami/netvirt-ctrl", "path": "sdnplatform/src/main/java/org/sdnplatform/devicemanager/internal/BetterDeviceManagerImpl.java", "license": "epl-1.0", "size": 78077 }
[ "java.util.Collection", "java.util.Collections", "java.util.concurrent.ConcurrentHashMap" ]
import java.util.Collection; import java.util.Collections; import java.util.concurrent.ConcurrentHashMap;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,370,947
public void runManualErrorCheck() { log("Error Check."); textModified.incrementAndGet(); } protected SketchChangedListener sketchChangedListener; protected class SketchChangedListener implements DocumentListener{ private SketchChangedListener(){ }
void function() { log(STR); textModified.incrementAndGet(); } protected SketchChangedListener sketchChangedListener; protected class SketchChangedListener implements DocumentListener{ private SketchChangedListener(){ }
/** * Triggers error check */
Triggers error check
runManualErrorCheck
{ "repo_name": "phiLangley/openPHD", "path": "[CODE]/processing/modes/ExperimentalMode/src/processing/mode/experimental/ErrorCheckerService.java", "license": "gpl-2.0", "size": 52289 }
[ "javax.swing.event.DocumentListener" ]
import javax.swing.event.DocumentListener;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
2,427,649
CGImage transform(CGImage image);
CGImage transform(CGImage image);
/** Transforms the supplied platform image into a new platform image which will be used as the * source data for a new PlayN image. <em>Do not</em> modify the platform image passed into this * method or you will break things. */
Transforms the supplied platform image into a new platform image which will be used as the source data for a new PlayN image. Do not modify the platform image passed into this
transform
{ "repo_name": "ruslansennov/playn2", "path": "robovm/src/playn/robovm/RoboBitmapTransformer.java", "license": "apache-2.0", "size": 1099 }
[ "org.robovm.apple.coregraphics.CGImage" ]
import org.robovm.apple.coregraphics.CGImage;
import org.robovm.apple.coregraphics.*;
[ "org.robovm.apple" ]
org.robovm.apple;
1,076,445
public static String toString(Object obj, int maxLevel, int initialLevel) { StringBuilder sb = new StringBuilder(); toString(obj, sb, initialLevel, maxLevel == -1 ? -1 : maxLevel + initialLevel, new HashSet<>()); return sb.toString(); }
static String function(Object obj, int maxLevel, int initialLevel) { StringBuilder sb = new StringBuilder(); toString(obj, sb, initialLevel, maxLevel == -1 ? -1 : maxLevel + initialLevel, new HashSet<>()); return sb.toString(); }
/** * Convert an object to a to a pretty-printed JSON-esque string, with automatic recursive handling of arrays, * Iterable, Map and {@link Stringable} objects. * * @param obj The object to convert to a String. * @param maxLevel The maximum recursion level. -1 for no limit. * @param initialLevel The initia...
Convert an object to a to a pretty-printed JSON-esque string, with automatic recursive handling of arrays, Iterable, Map and <code>Stringable</code> objects
toString
{ "repo_name": "OliverColeman/europa", "path": "src/main/java/com/ojcoleman/europa/util/Stringer.java", "license": "gpl-3.0", "size": 4636 }
[ "java.util.HashSet" ]
import java.util.HashSet;
import java.util.*;
[ "java.util" ]
java.util;
2,887,315
public static SimSectionRSDepOjbectAssignment getById(String schema, Long ssrsdoa_id) { MultiSchemaHibernateUtil.beginTransaction(schema); SimSectionRSDepOjbectAssignment ssrsdoa = (SimSectionRSDepOjbectAssignment) MultiSchemaHibernateUtil .getSession(schema).get(SimSectionRSDepOjbectAssignment.class, s...
static SimSectionRSDepOjbectAssignment function(String schema, Long ssrsdoa_id) { MultiSchemaHibernateUtil.beginTransaction(schema); SimSectionRSDepOjbectAssignment ssrsdoa = (SimSectionRSDepOjbectAssignment) MultiSchemaHibernateUtil .getSession(schema).get(SimSectionRSDepOjbectAssignment.class, ssrsdoa_id); MultiSchem...
/** * Pulls the simulation out of the database base on its id and schema. * @param schema * @param sim_id * @return */
Pulls the simulation out of the database base on its id and schema
getById
{ "repo_name": "skipcole/opensimplatform", "path": "WEB-INF/classes/org/usip/osp/baseobjects/SimSectionRSDepOjbectAssignment.java", "license": "bsd-3-clause", "size": 5102 }
[ "org.usip.osp.persistence.MultiSchemaHibernateUtil" ]
import org.usip.osp.persistence.MultiSchemaHibernateUtil;
import org.usip.osp.persistence.*;
[ "org.usip.osp" ]
org.usip.osp;
2,170,476
@Generated @CVariable() @MappedReturn(ObjCStringMapper.class) public static native String GCKeyLeftArrow();
@CVariable() @MappedReturn(ObjCStringMapper.class) static native String function();
/** * Left Arrow */
Left Arrow
GCKeyLeftArrow
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/gamecontroller/c/GameController.java", "license": "apache-2.0", "size": 61506 }
[ "org.moe.natj.c.ann.CVariable", "org.moe.natj.general.ann.MappedReturn", "org.moe.natj.objc.map.ObjCStringMapper" ]
import org.moe.natj.c.ann.CVariable; import org.moe.natj.general.ann.MappedReturn; import org.moe.natj.objc.map.ObjCStringMapper;
import org.moe.natj.c.ann.*; import org.moe.natj.general.ann.*; import org.moe.natj.objc.map.*;
[ "org.moe.natj" ]
org.moe.natj;
1,250,365
Runnable getTask() throws InterruptedException { for (;;) { switch(runState) { case RUNNING: { if (poolSize <= corePoolSize) // untimed wait if core return workQueue.take(); long timeout = keepAliveTime; ...
Runnable getTask() throws InterruptedException { for (;;) { switch(runState) { case RUNNING: { if (poolSize <= corePoolSize) return workQueue.take(); long timeout = keepAliveTime; if (timeout <= 0) return null; Runnable r = workQueue.poll(timeout, TimeUnit.NANOSECONDS); if (r != null) return r; if (poolSize > corePoolS...
/** * Get the next task for a worker thread to run. * @return the task * @throws InterruptedException if interrupted while waiting for task */
Get the next task for a worker thread to run
getTask
{ "repo_name": "WilliamRen/bbossgroups-3.5", "path": "bboss-rpc/src-thread/org/frameworkset/thread/ThreadPoolExecutor.java", "license": "apache-2.0", "size": 57994 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
911,941
public VirtualNetworkGatewayConnectionInner withConnectionType(VirtualNetworkGatewayConnectionType connectionType) { this.connectionType = connectionType; return this; }
VirtualNetworkGatewayConnectionInner function(VirtualNetworkGatewayConnectionType connectionType) { this.connectionType = connectionType; return this; }
/** * Set gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'. * * @param connectionType the connectionType value to set * @return the VirtualNetworkGatewayConnectionInner object ...
Set gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
withConnectionType
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewayConnectionInner.java", "license": "mit", "size": 14651 }
[ "com.microsoft.azure.management.network.v2018_04_01.VirtualNetworkGatewayConnectionType" ]
import com.microsoft.azure.management.network.v2018_04_01.VirtualNetworkGatewayConnectionType;
import com.microsoft.azure.management.network.v2018_04_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,444,159
@FIXVersion(introduced="5.0SP1") @TagNumRef(tagNum=TagNum.UnderlyingLegSecurityID) public String getUnderlyingLegSecurityID() { return underlyingLegSecurityID; }
@FIXVersion(introduced=STR) @TagNumRef(tagNum=TagNum.UnderlyingLegSecurityID) String function() { return underlyingLegSecurityID; }
/** * Message field getter. * @return field value */
Message field getter
getUnderlyingLegSecurityID
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/comp/UnderlyingLegInstrument.java", "license": "gpl-3.0", "size": 27982 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
1,046,774
public void setTestOutput(File testOutput) { this.testOutput = testOutput; }
void function(File testOutput) { this.testOutput = testOutput; }
/** Set the output file for tests. * * @param testOutput the testOutput to set */
Set the output file for tests
setTestOutput
{ "repo_name": "jgfoster/sarl", "path": "main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/SARLConfiguration.java", "license": "apache-2.0", "size": 4511 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,295,574
public void checkHibernate(XWikiContext context) throws HibernateException { if (getSessionFactory() == null) { // If not already initialized make sure to check/init but protected by a lock this time to make sure it's // not done by several threads checkHibernateSynch...
void function(XWikiContext context) throws HibernateException { if (getSessionFactory() == null) { checkHibernateSynchronized(); } }
/** * Initializes Hibernate. * * @param context * @throws HibernateException */
Initializes Hibernate
checkHibernate
{ "repo_name": "xwiki/xwiki-platform", "path": "xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateBaseStore.java", "license": "lgpl-2.1", "size": 33783 }
[ "com.xpn.xwiki.XWikiContext", "org.hibernate.HibernateException" ]
import com.xpn.xwiki.XWikiContext; import org.hibernate.HibernateException;
import com.xpn.xwiki.*; import org.hibernate.*;
[ "com.xpn.xwiki", "org.hibernate" ]
com.xpn.xwiki; org.hibernate;
1,035,071
private String getDefinition(SiddhiElement siddhiElement, String siddhiAppString) { int[] startIndex = siddhiElement.getQueryContextStartIndex(); int[] endIndex = siddhiElement.getQueryContextEndIndex(); int startLinePosition = ordinalIndexOf(startIndex[0], siddhiAppString); int end...
String function(SiddhiElement siddhiElement, String siddhiAppString) { int[] startIndex = siddhiElement.getQueryContextStartIndex(); int[] endIndex = siddhiElement.getQueryContextEndIndex(); int startLinePosition = ordinalIndexOf(startIndex[0], siddhiAppString); int endLinePosition = ordinalIndexOf(endIndex[0], siddhiA...
/** * Obtains the piece of the code from the siddhiAppString variable where the given SiddhiElement object is defined. * * @param siddhiElement The SiddhiElement object where the definition needs to be obtained from * @return The definition of the given SiddhiElement object as a String */
Obtains the piece of the code from the siddhiAppString variable where the given SiddhiElement object is defined
getDefinition
{ "repo_name": "wso2/carbon-analytics", "path": "components/org.wso2.carbon.streaming.integrator.core/src/main/java/org/wso2/carbon/streaming/integrator/core/impl/SiddhiAppsApiServiceImpl.java", "license": "apache-2.0", "size": 57611 }
[ "io.siddhi.query.api.SiddhiElement" ]
import io.siddhi.query.api.SiddhiElement;
import io.siddhi.query.api.*;
[ "io.siddhi.query" ]
io.siddhi.query;
2,103,830
public String toString() { StringBuffer s = new StringBuffer("["); Enumeration e = getParameterNames(); while (e.hasMoreElements()) { String key = (String) e.nextElement(); s.append(key + "=" + getParameterValues(key)[0]); // FIXME: Other values? if (e.hasMoreElements()) { ...
String function() { StringBuffer s = new StringBuffer("["); Enumeration e = getParameterNames(); while (e.hasMoreElements()) { String key = (String) e.nextElement(); s.append(key + "=" + getParameterValues(key)[0]); if (e.hasMoreElements()) { s.append(","); } } s.append("]"); return (s.toString()); }
/** * Description of the Method * * @return Description of the Return Value */
Description of the Method
toString
{ "repo_name": "paulnguyen/cmpe279", "path": "eclipse/Webgoat/src/org/owasp/webgoat/session/ParameterParser.java", "license": "apache-2.0", "size": 28306 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
2,197,340
public com.squareup.okhttp.Call createOccurrenceAsync(String parent, ApiOccurrence body, final ApiCallback<ApiOccurrence> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
com.squareup.okhttp.Call function(String parent, ApiOccurrence body, final ApiCallback<ApiOccurrence> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
/** * Creates a new &#x60;Occurrence&#x60;. Use this method to create &#x60;Occurrences&#x60; for a resource. (asynchronously) * * @param parent (required) * @param body (required) * @param callback The callback to be executed when the API call finishes * @return The request call *...
Creates a new &#x60;Occurrence&#x60;. Use this method to create &#x60;Occurrences&#x60; for a resource. (asynchronously)
createOccurrenceAsync
{ "repo_name": "grafeas/client-java", "path": "src/main/java/io/grafeas/api/GrafeasApi.java", "license": "apache-2.0", "size": 55376 }
[ "io.grafeas.ApiCallback", "io.grafeas.ApiException", "io.grafeas.ProgressRequestBody", "io.grafeas.ProgressResponseBody", "io.grafeas.model.ApiOccurrence" ]
import io.grafeas.ApiCallback; import io.grafeas.ApiException; import io.grafeas.ProgressRequestBody; import io.grafeas.ProgressResponseBody; import io.grafeas.model.ApiOccurrence;
import io.grafeas.*; import io.grafeas.model.*;
[ "io.grafeas", "io.grafeas.model" ]
io.grafeas; io.grafeas.model;
373,132
public InferredTarget findEqualTarget(final Equalities equalities, AnnotationMirrorSet tops) { for (Map.Entry<TypeVariable, AnnotationMirrorSet> targetToHierarchies : equalities.targets.entrySet()) { final TypeVariable equalTarget = targetToHierarchies.getKey(); final...
InferredTarget function(final Equalities equalities, AnnotationMirrorSet tops) { for (Map.Entry<TypeVariable, AnnotationMirrorSet> targetToHierarchies : equalities.targets.entrySet()) { final TypeVariable equalTarget = targetToHierarchies.getKey(); final AnnotationMirrorSet hierarchies = targetToHierarchies.getValue();...
/** * Attempt to find a target which is equal to this target. * * @return a target equal to this target in all hierarchies, or null */
Attempt to find a target which is equal to this target
findEqualTarget
{ "repo_name": "CharlesZ-Chen/checker-framework", "path": "framework/src/org/checkerframework/framework/util/typeinference/solver/EqualitiesSolver.java", "license": "gpl-2.0", "size": 23674 }
[ "java.util.Map", "javax.lang.model.type.TypeVariable", "org.checkerframework.framework.util.AnnotationMirrorSet", "org.checkerframework.framework.util.typeinference.solver.InferredValue", "org.checkerframework.framework.util.typeinference.solver.TargetConstraints" ]
import java.util.Map; import javax.lang.model.type.TypeVariable; import org.checkerframework.framework.util.AnnotationMirrorSet; import org.checkerframework.framework.util.typeinference.solver.InferredValue; import org.checkerframework.framework.util.typeinference.solver.TargetConstraints;
import java.util.*; import javax.lang.model.type.*; import org.checkerframework.framework.util.*; import org.checkerframework.framework.util.typeinference.solver.*;
[ "java.util", "javax.lang", "org.checkerframework.framework" ]
java.util; javax.lang; org.checkerframework.framework;
100,785
private void initRepositoryNode(RepoBaseDescriptor repo, String repoType) { setRepoType(repoType); RepoPath repoPath = InternalRepoPathFactory.create(repo.getKey(), ""); super.setText(repoPath.getRepoKey()); setLocal(false); setHasChild(true); repoPkgType = repo.getTy...
void function(RepoBaseDescriptor repo, String repoType) { setRepoType(repoType); RepoPath repoPath = InternalRepoPathFactory.create(repo.getKey(), ""); super.setText(repoPath.getRepoKey()); setLocal(false); setHasChild(true); repoPkgType = repo.getType(); }
/** * initialize repository node * * @param repo - repository descriptor * @param repoType - repo type */
initialize repository node
initRepositoryNode
{ "repo_name": "alancnet/artifactory", "path": "web/rest-ui/src/main/java/org/artifactory/ui/rest/model/artifacts/browse/treebrowser/nodes/VirtualRemoteRepositoryNode.java", "license": "apache-2.0", "size": 7209 }
[ "org.artifactory.descriptor.repo.RepoBaseDescriptor", "org.artifactory.repo.InternalRepoPathFactory", "org.artifactory.repo.RepoPath" ]
import org.artifactory.descriptor.repo.RepoBaseDescriptor; import org.artifactory.repo.InternalRepoPathFactory; import org.artifactory.repo.RepoPath;
import org.artifactory.descriptor.repo.*; import org.artifactory.repo.*;
[ "org.artifactory.descriptor", "org.artifactory.repo" ]
org.artifactory.descriptor; org.artifactory.repo;
2,686,464
public CcLibraryHelper addSources(Artifact... sources) { return addSources(Arrays.asList(sources)); }
CcLibraryHelper function(Artifact... sources) { return addSources(Arrays.asList(sources)); }
/** * Add the corresponding files as source files. These may also be header files, in which case * they will not be compiled, but also not made visible as includes to dependent rules. */
Add the corresponding files as source files. These may also be header files, in which case they will not be compiled, but also not made visible as includes to dependent rules
addSources
{ "repo_name": "wakashige/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java", "license": "apache-2.0", "size": 40893 }
[ "com.google.devtools.build.lib.actions.Artifact", "java.util.Arrays" ]
import com.google.devtools.build.lib.actions.Artifact; import java.util.Arrays;
import com.google.devtools.build.lib.actions.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
2,749
@Test public void testPushFilterPastAggThree() { final HepProgram program = HepProgram.builder() .addRuleInstance(FilterAggregateTransposeRule.INSTANCE) .build(); final String sql = "select deptno from emp\n" + "group by deptno having count(*) > 1"; checkPlanUnchang...
@Test void function() { final HepProgram program = HepProgram.builder() .addRuleInstance(FilterAggregateTransposeRule.INSTANCE) .build(); final String sql = STR + STR; checkPlanUnchanged(new HepPlanner(program), sql); }
/** Test case for * <a href="https://issues.apache.org/jira/browse/CALCITE-799">[CALCITE-799] * Incorrect result for {@code HAVING count(*) > 1}</a>. */
Test case for [CALCITE-799]
testPushFilterPastAggThree
{ "repo_name": "sreev/incubator-calcite", "path": "core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java", "license": "apache-2.0", "size": 120819 }
[ "org.apache.calcite.plan.hep.HepPlanner", "org.apache.calcite.plan.hep.HepProgram", "org.apache.calcite.rel.rules.FilterAggregateTransposeRule", "org.junit.Test" ]
import org.apache.calcite.plan.hep.HepPlanner; import org.apache.calcite.plan.hep.HepProgram; import org.apache.calcite.rel.rules.FilterAggregateTransposeRule; import org.junit.Test;
import org.apache.calcite.plan.hep.*; import org.apache.calcite.rel.rules.*; import org.junit.*;
[ "org.apache.calcite", "org.junit" ]
org.apache.calcite; org.junit;
859,856
@Test public void testGetRunning() throws Exception { org.apache.gobblin.service.monitoring.JobStatus js1 = org.apache.gobblin.service.monitoring.JobStatus.builder().flowGroup("fgroup1").flowName("flow1") .jobGroup("jgroup1").jobName("job1").startTime(1000L).endTime(5000L) .event...
void function() throws Exception { org.apache.gobblin.service.monitoring.JobStatus js1 = org.apache.gobblin.service.monitoring.JobStatus.builder().flowGroup(STR).flowName("flow1") .jobGroup(STR).jobName("job1").startTime(1000L).endTime(5000L) .eventName(ExecutionStatus.RUNNING.name()).flowExecutionId(0).message(STR).pr...
/** * Test a flow that has some jobs still running * @throws Exception */
Test a flow that has some jobs still running
testGetRunning
{ "repo_name": "linkedin/gobblin", "path": "gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-client/src/test/java/org/apache/gobblin/service/FlowStatusTest.java", "license": "apache-2.0", "size": 19211 }
[ "com.google.common.base.Suppliers", "com.google.common.collect.Lists", "java.util.Collections", "java.util.List", "org.apache.gobblin.service.monitoring.JobStatusRetriever", "org.testng.Assert" ]
import com.google.common.base.Suppliers; import com.google.common.collect.Lists; import java.util.Collections; import java.util.List; import org.apache.gobblin.service.monitoring.JobStatusRetriever; import org.testng.Assert;
import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import org.apache.gobblin.service.monitoring.*; import org.testng.*;
[ "com.google.common", "java.util", "org.apache.gobblin", "org.testng" ]
com.google.common; java.util; org.apache.gobblin; org.testng;
1,295,288
public ServiceFuture<ExpressRouteCircuitConnectionInner> getAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, final ServiceCallback<ExpressRouteCircuitConnectionInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupN...
ServiceFuture<ExpressRouteCircuitConnectionInner> function(String resourceGroupName, String circuitName, String peeringName, String connectionName, final ServiceCallback<ExpressRouteCircuitConnectionInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, circuitName, p...
/** * Gets the specified Express Route Circuit Connection from the specified express route circuit. * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @param peeringName The name of the peering. * @param connectionName...
Gets the specified Express Route Circuit Connection from the specified express route circuit
getAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionsInner.java", "license": "mit", "size": 53215 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,204,103