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 static java.util.List extractMedicationHotlistItemList(ims.domain.ILightweightDomainFactory domainFactory, ims.clinicaladmin.vo.MedicationHotlistItemVoCollection voCollection) { return extractMedicationHotlistItemList(domainFactory, voCollection, null, new HashMap()); }
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.clinicaladmin.vo.MedicationHotlistItemVoCollection voCollection) { return extractMedicationHotlistItemList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.clinical.configuration.domain.objects.MedicationHotlistItem list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.clinical.configuration.domain.objects.MedicationHotlistItem list from the value object collection
extractMedicationHotlistItemList
{ "repo_name": "open-health-hub/openmaxims-linux", "path": "openmaxims_workspace/ValueObjects/src/ims/clinicaladmin/vo/domain/MedicationHotlistItemVoAssembler.java", "license": "agpl-3.0", "size": 17083 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
214,274
private void RemoveQEQuoting() { final int pLen = patternLength; int i = 0; while (i < pLen-1) { if (temp[i] != '\\') i += 1; else if (temp[i + 1] != 'Q') i += 2; else break; } if (i >= pLen -...
void function() { final int pLen = patternLength; int i = 0; while (i < pLen-1) { if (temp[i] != '\\') i += 1; else if (temp[i + 1] != 'Q') i += 2; else break; } if (i >= pLen - 1) return; int j = i; i += 2; int[] newtemp = new int[j + 3*(pLen-i) + 2]; System.arraycopy(temp, 0, newtemp, 0, j); boolean inQuote = true; b...
/** * Preprocess any \Q...\E sequences in `temp', meta-quoting them. * See the description of `quotemeta' in perlfunc(1). */
Preprocess any \Q...\E sequences in `temp', meta-quoting them. See the description of `quotemeta' in perlfunc(1)
RemoveQEQuoting
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "src/java.base/share/classes/java/util/regex/Pattern.java", "license": "gpl-2.0", "size": 219396 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,512,633
private static void transitionsforDynamicStateTests( IndicatesAnnotation true_result, IndicatesAnnotation false_result, IInvocationSignature sig, StateMachine machine, StateSpace state_space, IMethodBinding method, Map<String, IConnectable> stringToNode) { assert( true_result != null || false_res...
static void function( IndicatesAnnotation true_result, IndicatesAnnotation false_result, IInvocationSignature sig, StateMachine machine, StateSpace state_space, IMethodBinding method, Map<String, IConnectable> stringToNode) { assert( true_result != null false_result != null ); for( Set<String> req_states : sig.getRequi...
/** * Add transitions for a method that has @TrueResult or @FalseResult, given * the two annotations. * @param sig * @param method * @param stringToNode */
Add transitions for a method that has @TrueResult or @FalseResult, given the two annotations
transitionsforDynamicStateTests
{ "repo_name": "plaidgroup/plural", "path": "Fiddle/src/edu/cmu/cs/fiddle/model/StateMachine.java", "license": "gpl-2.0", "size": 15231 }
[ "edu.cmu.cs.plural.states.IInvocationSignature", "edu.cmu.cs.plural.states.StateSpace", "edu.cmu.cs.plural.track.IndicatesAnnotation", "java.util.Map", "java.util.Set", "org.eclipse.jdt.core.dom.IMethodBinding" ]
import edu.cmu.cs.plural.states.IInvocationSignature; import edu.cmu.cs.plural.states.StateSpace; import edu.cmu.cs.plural.track.IndicatesAnnotation; import java.util.Map; import java.util.Set; import org.eclipse.jdt.core.dom.IMethodBinding;
import edu.cmu.cs.plural.states.*; import edu.cmu.cs.plural.track.*; import java.util.*; import org.eclipse.jdt.core.dom.*;
[ "edu.cmu.cs", "java.util", "org.eclipse.jdt" ]
edu.cmu.cs; java.util; org.eclipse.jdt;
897,696
@RPCMethod Future<Void> showHtmlContentAndReload(String content) throws CouldNotPerformException;
Future<Void> showHtmlContentAndReload(String content) throws CouldNotPerformException;
/** * Shows the given html content on the generic display. * Display will set to foreground if the panel is hided. * The content is reloaded even if currently displayed. * * @param content * * @return the future which gives feedback about the asynchronous execution process. */
Shows the given html content on the generic display. Display will set to foreground if the panel is hided. The content is reloaded even if currently displayed
showHtmlContentAndReload
{ "repo_name": "DivineCooperation/generic-display", "path": "src/main/java/org/openbase/display/Display.java", "license": "gpl-3.0", "size": 8206 }
[ "java.util.concurrent.Future", "org.openbase.jul.exception.CouldNotPerformException" ]
import java.util.concurrent.Future; import org.openbase.jul.exception.CouldNotPerformException;
import java.util.concurrent.*; import org.openbase.jul.exception.*;
[ "java.util", "org.openbase.jul" ]
java.util; org.openbase.jul;
1,200,971
@Override public void enterTerm(@NotNull LuceneSqlParser.TermContext ctx) { }
@Override public void enterTerm(@NotNull LuceneSqlParser.TermContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitNumber
{ "repo_name": "bbejeck/nosql-jdbc-driver", "path": "src/main/java/bbejeck/nosql/antlr/generated/LuceneSqlBaseListener.java", "license": "apache-2.0", "size": 18266 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,893,730
public static final SourceModel.Expr isDatabaseFieldItem(SourceModel.Expr databaseItem) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.isDatabaseFieldItem), databaseItem}); } public static final QualifiedName isDatabaseFieldItem = ...
static final SourceModel.Expr function(SourceModel.Expr databaseItem) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.isDatabaseFieldItem), databaseItem}); } static final QualifiedName function = QualifiedName.make( CAL_DataDictionary.MODULE_NAME, STR);
/** * Returns whether the database item is a field. * @param databaseItem (CAL type: <code>Cal.Data.DataDictionary.DatabaseItem</code>) * @return (CAL type: <code>Cal.Core.Prelude.Boolean</code>) */
Returns whether the database item is a field
isDatabaseFieldItem
{ "repo_name": "levans/Open-Quark", "path": "src/CAL_Libraries/src/org/openquark/cal/module/Cal/Data/CAL_DataDictionary.java", "license": "bsd-3-clause", "size": 37158 }
[ "org.openquark.cal.compiler.QualifiedName", "org.openquark.cal.compiler.SourceModel" ]
import org.openquark.cal.compiler.QualifiedName; import org.openquark.cal.compiler.SourceModel;
import org.openquark.cal.compiler.*;
[ "org.openquark.cal" ]
org.openquark.cal;
2,597,001
public static Label uniqueFromInitial(LearnerGraph graph) { if (graph.getInit() == null) return null; Set<Label> liveLabels = new HashSet<Label>();liveLabels.addAll(graph.transitionMatrix.get(graph.getInit()).keySet()); for(Entry<CmpVertex,Map<Label,CmpVertex>> entry:graph.transitionMatrix.entrySet()) ...
static Label function(LearnerGraph graph) { if (graph.getInit() == null) return null; Set<Label> liveLabels = new HashSet<Label>();liveLabels.addAll(graph.transitionMatrix.get(graph.getInit()).keySet()); for(Entry<CmpVertex,Map<Label,CmpVertex>> entry:graph.transitionMatrix.entrySet()) if (entry.getKey() != graph.getIn...
/** Finds a label that uniquely identifies the initial state. */
Finds a label that uniquely identifies the initial state
uniqueFromInitial
{ "repo_name": "kirilluk/statechum", "path": "src/statechum/analysis/learning/experiments/PairSelection/LearningSupportRoutines.java", "license": "gpl-3.0", "size": 24984 }
[ "java.util.HashSet", "java.util.Map", "java.util.Set" ]
import java.util.HashSet; import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,162,759
@ApiModelProperty(example = "null", value = "") public String getObjectId() { return objectId; }
@ApiModelProperty(example = "null", value = "") String function() { return objectId; }
/** * Get objectId * @return objectId **/
Get objectId
getObjectId
{ "repo_name": "PitneyBowes/LocationIntelligenceSDK-Java", "path": "src/main/java/pb/locationintelligence/model/Address.java", "license": "apache-2.0", "size": 19873 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,428,071
private double getMinorOffsetX(final GConnector connector) { final String type = connector.getType(); if (type.equals(DefaultConnectorTypes.LEFT_INPUT) || type.equals(DefaultConnectorTypes.RIGHT_OUTPUT)) { return MINOR_POSITIVE_OFFSET; } else { return MINOR_N...
double function(final GConnector connector) { final String type = connector.getType(); if (type.equals(DefaultConnectorTypes.LEFT_INPUT) type.equals(DefaultConnectorTypes.RIGHT_OUTPUT)) { return MINOR_POSITIVE_OFFSET; } else { return MINOR_NEGATIVE_OFFSET; } }
/** * Gets a minor x-offset of a few pixels in order that the connector's area is distributed more evenly on either * side of the node border. * * @param connector the connector to be positioned * @return an x-offset of a few pixels */
Gets a minor x-offset of a few pixels in order that the connector's area is distributed more evenly on either side of the node border
getMinorOffsetX
{ "repo_name": "tesis-dynaware/graph-editor", "path": "core/src/main/java/de/tesis/dynaware/grapheditor/core/skins/defaults/DefaultNodeSkin.java", "license": "epl-1.0", "size": 12547 }
[ "de.tesis.dynaware.grapheditor.core.skins.defaults.utils.DefaultConnectorTypes", "de.tesis.dynaware.grapheditor.model.GConnector" ]
import de.tesis.dynaware.grapheditor.core.skins.defaults.utils.DefaultConnectorTypes; import de.tesis.dynaware.grapheditor.model.GConnector;
import de.tesis.dynaware.grapheditor.core.skins.defaults.utils.*; import de.tesis.dynaware.grapheditor.model.*;
[ "de.tesis.dynaware" ]
de.tesis.dynaware;
858,880
@Deprecated public List<Integer> getAuthorizedResourceList( String strResourceType, int nIdWorkflow, int nIdWorkflowState, Integer nExternalParentId, AdminUser user ) { return getAuthorizedResourceList( strResourceType, nIdWorkflow, nIdWorkflowState, nExternalParentId, (User) user ); }
List<Integer> function( String strResourceType, int nIdWorkflow, int nIdWorkflowState, Integer nExternalParentId, AdminUser user ) { return getAuthorizedResourceList( strResourceType, nIdWorkflow, nIdWorkflowState, nExternalParentId, (User) user ); }
/** * Get all authorized resource Id * * @param strResourceType * the resource type * @param nIdWorkflow * the workflow id * @param nIdWorkflowState * The workflow state id or -1 for all workflow states * @param nExternalParentId * ...
Get all authorized resource Id
getAuthorizedResourceList
{ "repo_name": "lutece-platform/lutece-core", "path": "src/java/fr/paris/lutece/portal/service/workflow/WorkflowService.java", "license": "bsd-3-clause", "size": 36553 }
[ "fr.paris.lutece.api.user.User", "fr.paris.lutece.portal.business.user.AdminUser", "java.util.List" ]
import fr.paris.lutece.api.user.User; import fr.paris.lutece.portal.business.user.AdminUser; import java.util.List;
import fr.paris.lutece.api.user.*; import fr.paris.lutece.portal.business.user.*; import java.util.*;
[ "fr.paris.lutece", "java.util" ]
fr.paris.lutece; java.util;
117,198
public Currency getCurrency() { return _currency; }
Currency function() { return _currency; }
/** * Gets the currency. * @return the currency */
Gets the currency
getCurrency
{ "repo_name": "charles-cooper/idylfin", "path": "src/com/opengamma/analytics/financial/instrument/varianceswap/VarianceSwapDefinition.java", "license": "apache-2.0", "size": 12839 }
[ "com.opengamma.util.money.Currency" ]
import com.opengamma.util.money.Currency;
import com.opengamma.util.money.*;
[ "com.opengamma.util" ]
com.opengamma.util;
673,946
public final RunnableQueue getRunnableQueue() { if(svgCanvas != null) { if(svgCanvas.getUpdateManager() != null) { return svgCanvas.getUpdateManager().getUpdateRunnableQueue(); } } Log.println("MR2::getRunnableQueue(): RQ null ... exiting?"); return null; }// getRunnableQueue()
final RunnableQueue function() { if(svgCanvas != null) { if(svgCanvas.getUpdateManager() != null) { return svgCanvas.getUpdateManager().getUpdateRunnableQueue(); } } Log.println(STR); return null; }
/** * Gets the Runnable Queue for the canvas. * Return null if this cannot be done (e.g., we are exiting). */
Gets the Runnable Queue for the canvas. Return null if this cannot be done (e.g., we are exiting)
getRunnableQueue
{ "repo_name": "thechrisjohnson/JDip", "path": "src/dip/gui/map/MapRenderer2.java", "license": "gpl-2.0", "size": 10283 }
[ "org.apache.batik.util.RunnableQueue" ]
import org.apache.batik.util.RunnableQueue;
import org.apache.batik.util.*;
[ "org.apache.batik" ]
org.apache.batik;
912,580
public static double tag_matcher(String comment, String c_id) { Matcher m = Pattern.compile("<[^>]*>").matcher(comment); double val = 0.0; while(m.find()) { val+=0.1; } return val; }
static double function(String comment, String c_id) { Matcher m = Pattern.compile(STR).matcher(comment); double val = 0.0; while(m.find()) { val+=0.1; } return val; }
/** * This method matches HTML tags if any in the comments * @param comment: comment string * @param c_id: comment ids * @return a value indicating number of HTML tags */
This method matches HTML tags if any in the comments
tag_matcher
{ "repo_name": "tudarmstadt-lt/QASelection", "path": "src/main/java/cqa/core/ThreadTesting.java", "license": "apache-2.0", "size": 6433 }
[ "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import java.util.regex.Matcher; import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,394,748
public int hashCode() { clear(); write(); Adler32 code = new Adler32(); code.update(getPointer().getByteArray(0, size())); return (int)code.getValue(); }
int function() { clear(); write(); Adler32 code = new Adler32(); code.update(getPointer().getByteArray(0, size())); return (int)code.getValue(); }
/** Since {@link #equals} depends on the contents of memory, use that * as the basis for the hash code. */
Since <code>#equals</code> depends on the contents of memory, use that as the basis for the hash code
hashCode
{ "repo_name": "SitChenNam/jna", "path": "src/com/sun/jna/Structure.java", "license": "lgpl-2.1", "size": 61333 }
[ "java.util.zip.Adler32" ]
import java.util.zip.Adler32;
import java.util.zip.*;
[ "java.util" ]
java.util;
2,339,364
DatanodeRegistration createBPRegistration(NamespaceInfo nsInfo) { StorageInfo storageInfo = storage.getBPStorage(nsInfo.getBlockPoolID()); if (storageInfo == null) { // it's null in the case of SimulatedDataSet storageInfo = new StorageInfo( DataNodeLayoutVersion.CURRENT_LAYOUT_VERSION, ...
DatanodeRegistration createBPRegistration(NamespaceInfo nsInfo) { StorageInfo storageInfo = storage.getBPStorage(nsInfo.getBlockPoolID()); if (storageInfo == null) { storageInfo = new StorageInfo( DataNodeLayoutVersion.CURRENT_LAYOUT_VERSION, nsInfo.getNamespaceID(), nsInfo.clusterID, nsInfo.getCTime(), NodeType.DATA_N...
/** * Create a DatanodeRegistration for a specific block pool. * @param nsInfo the namespace info from the first part of the NN handshake */
Create a DatanodeRegistration for a specific block pool
createBPRegistration
{ "repo_name": "zhe-thoughts/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java", "license": "apache-2.0", "size": 116668 }
[ "org.apache.hadoop.hdfs.protocol.DatanodeID", "org.apache.hadoop.hdfs.security.token.block.ExportedBlockKeys", "org.apache.hadoop.hdfs.server.common.HdfsServerConstants", "org.apache.hadoop.hdfs.server.common.StorageInfo", "org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration", "org.apache.hadoop.h...
import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.security.token.block.ExportedBlockKeys; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants; import org.apache.hadoop.hdfs.server.common.StorageInfo; import org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration; import or...
import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.security.token.block.*; import org.apache.hadoop.hdfs.server.common.*; import org.apache.hadoop.hdfs.server.protocol.*; import org.apache.hadoop.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,699,193
// Banner width is device screen width Display display = ((Activity)context).getWindowManager().getDefaultDisplay(); Point size = new Point(); if (Build.VERSION.SDK_INT >= 17) { display.getRealSize(size); return size.x; } else if (Build.VERSION.SDK_INT >= 13) { ...
Display display = ((Activity)context).getWindowManager().getDefaultDisplay(); Point size = new Point(); if (Build.VERSION.SDK_INT >= 17) { display.getRealSize(size); return size.x; } else if (Build.VERSION.SDK_INT >= 13) { display.getSize(size); return size.x; } else { return display.getWidth(); } }
/** * Gets banner ad width in pixels * * @param context * Activity context * @return width in pixels */
Gets banner ad width in pixels
getScreenWidthPixels
{ "repo_name": "Maxim-38RUS-Zabelin/sdk-release", "path": "sdk-android/src/com/tune/crosspromo/TuneBannerSize.java", "license": "gpl-3.0", "size": 4892 }
[ "android.app.Activity", "android.graphics.Point", "android.os.Build", "android.view.Display" ]
import android.app.Activity; import android.graphics.Point; import android.os.Build; import android.view.Display;
import android.app.*; import android.graphics.*; import android.os.*; import android.view.*;
[ "android.app", "android.graphics", "android.os", "android.view" ]
android.app; android.graphics; android.os; android.view;
2,045,448
public void benchmark(int neighboursSize,DistanceMeasure measure){ long startTime = 0; double linearSearchTime = 0; double lshSearchTime = 0; int numbercorrect = 0; int falsePositives = 0; int truePositives = 0; int falseNegatives = 0; //int intersectionSize = 0; for(int i = 0 ; i < dataset.size() ...
void function(int neighboursSize,DistanceMeasure measure){ long startTime = 0; double linearSearchTime = 0; double lshSearchTime = 0; int numbercorrect = 0; int falsePositives = 0; int truePositives = 0; int falseNegatives = 0; for(int i = 0 ; i < dataset.size() ; i++){ Vector query = dataset.get(i); startTime = System...
/** * Benchmark the current LSH construction. * @param neighboursSize the expected size of the neighbourhood. * @param measure The measure to use to check for correctness. */
Benchmark the current LSH construction
benchmark
{ "repo_name": "JorenSix/TarsosLSH", "path": "src/be/tarsos/lsh/LSH.java", "license": "lgpl-3.0", "size": 10730 }
[ "be.tarsos.lsh.families.DistanceMeasure", "java.util.HashSet", "java.util.List", "java.util.Set" ]
import be.tarsos.lsh.families.DistanceMeasure; import java.util.HashSet; import java.util.List; import java.util.Set;
import be.tarsos.lsh.families.*; import java.util.*;
[ "be.tarsos.lsh", "java.util" ]
be.tarsos.lsh; java.util;
1,449,841
private static void append( StringBuilder sb, String key, String value, int indent ) throws MojoFailureException, MojoExecutionException { if ( StringUtils.isEmpty( key ) ) { throw new IllegalArgumentException( "Key is required!" ); } if ( StringUtils.isEmpty...
static void function( StringBuilder sb, String key, String value, int indent ) throws MojoFailureException, MojoExecutionException { if ( StringUtils.isEmpty( key ) ) { throw new IllegalArgumentException( STR ); } if ( StringUtils.isEmpty( value ) ) { value = UNKNOWN; } String description = key + STR + value; for ( Str...
/** * Append a description to the buffer by respecting the indentSize and lineLength parameters. * <b>Note</b>: The last character is always a new line. * * @param sb The buffer to append the description, not <code>null</code>. * @param key The key, not <code>null</code>. * @param v...
Append a description to the buffer by respecting the indentSize and lineLength parameters. Note: The last character is always a new line
append
{ "repo_name": "khmarbaise/maven-plugins", "path": "maven-help-plugin/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java", "license": "apache-2.0", "size": 43419 }
[ "org.apache.maven.plugin.MojoExecutionException", "org.apache.maven.plugin.MojoFailureException", "org.codehaus.plexus.util.StringUtils" ]
import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.codehaus.plexus.util.StringUtils;
import org.apache.maven.plugin.*; import org.codehaus.plexus.util.*;
[ "org.apache.maven", "org.codehaus.plexus" ]
org.apache.maven; org.codehaus.plexus;
283,023
protected CommonProfile getAuthenticatedProfile(final HttpServletRequest request, final HttpServletResponse response, final String requiredPermission) { val context = new JEEContext(request, response, get...
CommonProfile function(final HttpServletRequest request, final HttpServletResponse response, final String requiredPermission) { val context = new JEEContext(request, response, getUmaConfigurationContext().getSessionStore()); val manager = new ProfileManager<CommonProfile>(context, context.getSessionStore()); val profil...
/** * Gets authenticated profile. * * @param request the request * @param response the response * @param requiredPermission the required permission * @return the authenticated profile */
Gets authenticated profile
getAuthenticatedProfile
{ "repo_name": "pdrados/cas", "path": "support/cas-server-support-oauth-uma-core/src/main/java/org/apereo/cas/uma/web/controllers/BaseUmaEndpointController.java", "license": "apache-2.0", "size": 3664 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apereo.cas.authentication.AuthenticationException", "org.pac4j.core.context.JEEContext", "org.pac4j.core.profile.CommonProfile", "org.pac4j.core.profile.ProfileManager" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apereo.cas.authentication.AuthenticationException; import org.pac4j.core.context.JEEContext; import org.pac4j.core.profile.CommonProfile; import org.pac4j.core.profile.ProfileManager;
import javax.servlet.http.*; import org.apereo.cas.authentication.*; import org.pac4j.core.context.*; import org.pac4j.core.profile.*;
[ "javax.servlet", "org.apereo.cas", "org.pac4j.core" ]
javax.servlet; org.apereo.cas; org.pac4j.core;
262,128
protected List<Metaclass> getSourceTypes(Binding b) { List<Metaclass> sources = ATLUtils.getUnderlyingBindingRightMetaclasses(b); Set<String> srcModels = ATLUtils.getSourceMetamodelNames(getAnalysisResult().getATLModel()); return sources.stream().filter(m -> srcModels.contains( m.getModel().getName()) ).coll...
List<Metaclass> function(Binding b) { List<Metaclass> sources = ATLUtils.getUnderlyingBindingRightMetaclasses(b); Set<String> srcModels = ATLUtils.getSourceMetamodelNames(getAnalysisResult().getATLModel()); return sources.stream().filter(m -> srcModels.contains( m.getModel().getName()) ).collect(Collectors.toList()); }
/** * Return the list of source types for which rules will be created. * * This may be actually unnecessary since anATLyzer generates a BindingPossiblyUnresolved problem * for each different source type... */
Return the list of source types for which rules will be created. This may be actually unnecessary since anATLyzer generates a BindingPossiblyUnresolved problem for each different source type..
getSourceTypes
{ "repo_name": "gomezabajo/Wodel", "path": "anatlyzer.atl.editor.quickfix/src/anatlyzer/atl/editor/quickfix/errors/BindingPossiblyUnresolved_AddRule.java", "license": "epl-1.0", "size": 6728 }
[ "java.util.List", "java.util.Set", "java.util.stream.Collectors" ]
import java.util.List; import java.util.Set; import java.util.stream.Collectors;
import java.util.*; import java.util.stream.*;
[ "java.util" ]
java.util;
2,114,905
void initialize(MethodHandlerDictionary methodHandlers);
void initialize(MethodHandlerDictionary methodHandlers);
/** * Called during service startup with a populated MethodHandlerDictionary. * This dictionary cannot be dynamically altered during runtime. Typically, * the implementer should report the initial service state information here. */
Called during service startup with a populated MethodHandlerDictionary. This dictionary cannot be dynamically altered during runtime. Typically, the implementer should report the initial service state information here
initialize
{ "repo_name": "tomasulo/ja-micro", "path": "src/main/java/com/sixt/service/framework/registry/ServiceRegistrationProvider.java", "license": "apache-2.0", "size": 1089 }
[ "com.sixt.service.framework.MethodHandlerDictionary" ]
import com.sixt.service.framework.MethodHandlerDictionary;
import com.sixt.service.framework.*;
[ "com.sixt.service" ]
com.sixt.service;
256,035
public static void setup(GVRContext gvrContext) { AsyncBitmapTexture.setup(gvrContext); } /** * Load a compressed texture asynchronously. * * This is the implementation of * {@link GVRContext#loadCompressedTexture(GVRAndroidResource.CompressedTextureCallback, GVRAndroidResource...
static void function(GVRContext gvrContext) { AsyncBitmapTexture.setup(gvrContext); } /** * Load a compressed texture asynchronously. * * This is the implementation of * {@link GVRContext#loadCompressedTexture(GVRAndroidResource.CompressedTextureCallback, GVRAndroidResource)} * : it will usually be more convenient (and...
/** * Get device parameters and so on. * * This is an internal method, public only so it can be called across * package boundaries. Calling it from user code is both harmless and * pointless. */
Get device parameters and so on. This is an internal method, public only so it can be called across package boundaries. Calling it from user code is both harmless and pointless
setup
{ "repo_name": "douglasalipio/GearVRf", "path": "GVRf/Framework/src/org/gearvrf/asynchronous/GVRAsynchronousResourceLoader.java", "license": "apache-2.0", "size": 27413 }
[ "org.gearvrf.GVRAndroidResource", "org.gearvrf.GVRContext" ]
import org.gearvrf.GVRAndroidResource; import org.gearvrf.GVRContext;
import org.gearvrf.*;
[ "org.gearvrf" ]
org.gearvrf;
2,854,718
@Override public void enterNotEqual(@NotNull LuceneSqlParser.NotEqualContext ctx) { }
@Override public void enterNotEqual(@NotNull LuceneSqlParser.NotEqualContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitEquals
{ "repo_name": "bbejeck/nosql-jdbc-driver", "path": "src/main/java/bbejeck/nosql/antlr/generated/LuceneSqlBaseListener.java", "license": "apache-2.0", "size": 18266 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,893,688
public void testDurationFromCalendar() throws Exception { // negative date Calendar calendar = new GregorianCalendar(1, 3, 20); Duration duration = new Duration(true, calendar); assertTrue("Negative flag does not match", duration.isNegative()); assertTrue("Years do not match"...
void function() throws Exception { Calendar calendar = new GregorianCalendar(1, 3, 20); Duration duration = new Duration(true, calendar); assertTrue(STR, duration.isNegative()); assertTrue(STR, duration.getYears() == 1); assertTrue(STR, duration.getMonths() == 3); assertTrue(STR, duration.getDays() == 20); assertEquals...
/** * Test if duration object is properly created from a Calendar. * @throws Exception */
Test if duration object is properly created from a Calendar
testDurationFromCalendar
{ "repo_name": "hugosato/apache-axis", "path": "test/types/TestDuration.java", "license": "apache-2.0", "size": 10030 }
[ "java.util.Calendar", "java.util.GregorianCalendar", "org.apache.axis.types.Duration" ]
import java.util.Calendar; import java.util.GregorianCalendar; import org.apache.axis.types.Duration;
import java.util.*; import org.apache.axis.types.*;
[ "java.util", "org.apache.axis" ]
java.util; org.apache.axis;
387,436
private void executeSequential(List<CallTarget> tasks) { TaskContainer tc = (TaskContainer) getProject().createTask("sequential"); for (Task t : tasks) { tc.addTask(t); } ((Task) tc).execute(); }
void function(List<CallTarget> tasks) { TaskContainer tc = (TaskContainer) getProject().createTask(STR); for (Task t : tasks) { tc.addTask(t); } ((Task) tc).execute(); }
/** * Method executeSequential. * * @param tasks List&lt;CallTarget&gt; */
Method executeSequential
executeSequential
{ "repo_name": "antlibs/ant-contrib", "path": "src/main/java/net/sf/antcontrib/logic/ForEach.java", "license": "apache-2.0", "size": 12912 }
[ "java.util.List", "org.apache.tools.ant.Task", "org.apache.tools.ant.TaskContainer", "org.apache.tools.ant.taskdefs.CallTarget" ]
import java.util.List; import org.apache.tools.ant.Task; import org.apache.tools.ant.TaskContainer; import org.apache.tools.ant.taskdefs.CallTarget;
import java.util.*; import org.apache.tools.ant.*; import org.apache.tools.ant.taskdefs.*;
[ "java.util", "org.apache.tools" ]
java.util; org.apache.tools;
1,005,053
@RequiresApi(21) // TODO(b/200306659): Remove and replace with annotation on package-info.java public interface CaptureProcessor { void onOutputSurface(Surface surface, int imageFormat); /** * Process a {@link ImageProxyBundle} for the set of captures that were * requested. * * <p> A r...
@RequiresApi(21)interface CaptureProcessor { void function(Surface surface, int imageFormat); /** * Process a {@link ImageProxyBundle} for the set of captures that were * requested. * * <p> A result of the processing step must be written to the {@link Surface} that was * received by {@link #onOutputSurface(Surface, int...
/** * This gets called to update where the CaptureProcessor should write the output of {@link * #process(ImageProxyBundle)}. * * @param surface The {@link Surface} that the CaptureProcessor should write data into. * @param imageFormat The format of that the surface expects. */
This gets called to update where the CaptureProcessor should write the output of <code>#process(ImageProxyBundle)</code>
onOutputSurface
{ "repo_name": "AndroidX/androidx", "path": "camera/camera-core/src/main/java/androidx/camera/core/impl/CaptureProcessor.java", "license": "apache-2.0", "size": 2299 }
[ "android.view.Surface", "androidx.annotation.RequiresApi", "androidx.camera.core.ImageCapture", "androidx.camera.core.ImageProxy", "androidx.camera.core.Preview" ]
import android.view.Surface; import androidx.annotation.RequiresApi; import androidx.camera.core.ImageCapture; import androidx.camera.core.ImageProxy; import androidx.camera.core.Preview;
import android.view.*; import androidx.annotation.*; import androidx.camera.core.*;
[ "android.view", "androidx.annotation", "androidx.camera" ]
android.view; androidx.annotation; androidx.camera;
688,464
public static byte[] encodeBytesToBytes(byte[] source, int off, int len, int options) throws IOException { if(source == null) { throw new NullPointerException("Cannot serialize a null array."); } if(off < 0) { throw new IllegalArgumentException("Cannot have negative offset: " + off); } if(len ...
static byte[] function(byte[] source, int off, int len, int options) throws IOException { if(source == null) { throw new NullPointerException(STR); } if(off < 0) { throw new IllegalArgumentException(STR + off); } if(len < 0) { throw new IllegalArgumentException(STR + len); } if(off + len > source.length) { throw new Il...
/** * Similar to {@link #encodeBytes(byte[], int, int, int)} but returns * a byte array instead of instantiating a String. This is more efficient * if you're working with I/O streams and have large data sets to encode. * * * @param source The data to convert * @param off Offset in array where conversion s...
Similar to <code>#encodeBytes(byte[], int, int, int)</code> but returns a byte array instead of instantiating a String. This is more efficient if you're working with I/O streams and have large data sets to encode
encodeBytesToBytes
{ "repo_name": "andy-goryachev/FindFiles", "path": "src/goryachev/common/util/Base64.java", "license": "apache-2.0", "size": 69597 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException", "java.util.zip.GZIPOutputStream" ]
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.zip.GZIPOutputStream;
import java.io.*; import java.util.zip.*;
[ "java.io", "java.util" ]
java.io; java.util;
875,513
public Timestamp getCreated(); public static final String COLUMNNAME_CreatedBy = "CreatedBy";
Timestamp function(); public static final String COLUMNNAME_CreatedBy = STR;
/** Get Created. * Date this record was created */
Get Created. Date this record was created
getCreated
{ "repo_name": "armenrz/adempiere", "path": "base/src/org/compiere/model/I_C_RfQ.java", "license": "gpl-2.0", "size": 13723 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,630,833
private void recoverWorkers(final List<MesosWorkerStore.Worker> tasksFromPreviousAttempts) { assert(workersInNew.isEmpty()); assert(workersInLaunch.isEmpty()); assert(workersBeingReturned.isEmpty()); if (!tasksFromPreviousAttempts.isEmpty()) { LOG.info("Retrieved {} TaskManagers from previous attempt", t...
void function(final List<MesosWorkerStore.Worker> tasksFromPreviousAttempts) { assert(workersInNew.isEmpty()); assert(workersInLaunch.isEmpty()); assert(workersBeingReturned.isEmpty()); if (!tasksFromPreviousAttempts.isEmpty()) { LOG.info(STR, tasksFromPreviousAttempts.size()); List<Tuple2<TaskRequest, String>> toAssig...
/** * Recovers given framework/worker information. * * @see #getWorkersAsync() */
Recovers given framework/worker information
recoverWorkers
{ "repo_name": "mbode/flink", "path": "flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosResourceManager.java", "license": "apache-2.0", "size": 31162 }
[ "com.netflix.fenzo.TaskRequest", "java.util.ArrayList", "java.util.List", "org.apache.flink.api.java.tuple.Tuple2", "org.apache.flink.mesos.runtime.clusterframework.store.MesosWorkerStore", "org.apache.flink.mesos.scheduler.LaunchCoordinator", "org.apache.flink.mesos.scheduler.TaskMonitor" ]
import com.netflix.fenzo.TaskRequest; import java.util.ArrayList; import java.util.List; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.mesos.runtime.clusterframework.store.MesosWorkerStore; import org.apache.flink.mesos.scheduler.LaunchCoordinator; import org.apache.flink.mesos.scheduler.TaskMo...
import com.netflix.fenzo.*; import java.util.*; import org.apache.flink.api.java.tuple.*; import org.apache.flink.mesos.runtime.clusterframework.store.*; import org.apache.flink.mesos.scheduler.*;
[ "com.netflix.fenzo", "java.util", "org.apache.flink" ]
com.netflix.fenzo; java.util; org.apache.flink;
2,570,767
public List<Member> getListMember() { return listMember; }
List<Member> function() { return listMember; }
/** * Gets the list member. * * @return the list member */
Gets the list member
getListMember
{ "repo_name": "uaijug/chronos", "path": "src/main/java/br/com/uaijug/chronos/project/controller/ProjectController.java", "license": "gpl-3.0", "size": 5098 }
[ "br.com.uaijug.chronos.institution.model.Member", "java.util.List" ]
import br.com.uaijug.chronos.institution.model.Member; import java.util.List;
import br.com.uaijug.chronos.institution.model.*; import java.util.*;
[ "br.com.uaijug", "java.util" ]
br.com.uaijug; java.util;
2,824,441
public void addFileSet(FileSet fileset) { filesets.add(fileset); }
void function(FileSet fileset) { filesets.add(fileset); }
/** * Adds a file set. * @param fileset The file set to add */
Adds a file set
addFileSet
{ "repo_name": "rkrell/izpack", "path": "izpack-util/src/main/java/com/izforge/izpack/util/config/SingleXmlFileMergeTask.java", "license": "apache-2.0", "size": 6457 }
[ "com.izforge.izpack.util.file.types.FileSet" ]
import com.izforge.izpack.util.file.types.FileSet;
import com.izforge.izpack.util.file.types.*;
[ "com.izforge.izpack" ]
com.izforge.izpack;
2,119,753
public static ArrayList<UsuarioEntity> getUsuariosByTaller(int ID_TALLER, int tamano, int pagina) { int posicion = pagina * tamano; ArrayList<Object> param = new ArrayList<>(); param.add(ID_TALLER); param.add(posicion); param.add(tamano); ArrayList<UsuarioEntity> usuarios = new ArrayList<>(); ResultS...
static ArrayList<UsuarioEntity> function(int ID_TALLER, int tamano, int pagina) { int posicion = pagina * tamano; ArrayList<Object> param = new ArrayList<>(); param.add(ID_TALLER); param.add(posicion); param.add(tamano); ArrayList<UsuarioEntity> usuarios = new ArrayList<>(); ResultSet rs = CrudDAO.query(STR + STR + STR...
/** * Retorna la lista de usuarios asociados a un taller * * @param ID_TALLER * @param tamano Cantidad de registros a devolver * @param pagina pagina en la que se se está * @return */
Retorna la lista de usuarios asociados a un taller
getUsuariosByTaller
{ "repo_name": "DFOXpro/co.edu.unal-AdS6Bienestar", "path": "server/src/java/co/edu/UNal/ArquitecturaDeSoftware/Bienestar/AccesoDatos/DAO/UsuarioDAO.java", "license": "unlicense", "size": 17579 }
[ "co.edu.UNal", "java.sql.ResultSet", "java.sql.SQLException", "java.util.ArrayList" ]
import co.edu.UNal; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList;
import co.edu.*; import java.sql.*; import java.util.*;
[ "co.edu", "java.sql", "java.util" ]
co.edu; java.sql; java.util;
2,177,066
public Point[] getSelectedNoteLocations() { List<Point> points = new ArrayList<Point>(); for (NotePadMeta ni : getSelectedNotes()) { Point p = ni.getLocation(); points.add(new Point(p.x, p.y)); // explicit copy of location } return points.toArray...
Point[] function() { List<Point> points = new ArrayList<Point>(); for (NotePadMeta ni : getSelectedNotes()) { Point p = ni.getLocation(); points.add(new Point(p.x, p.y)); } return points.toArray(new Point[points.size()]); }
/** * Get an array of all the selected note locations. * * @return The selected note locations. */
Get an array of all the selected note locations
getSelectedNoteLocations
{ "repo_name": "lihongqiang/kettle-4.4.0-stable", "path": "src/org/pentaho/di/trans/TransMeta.java", "license": "apache-2.0", "size": 249634 }
[ "java.util.ArrayList", "java.util.List", "org.pentaho.di.core.NotePadMeta", "org.pentaho.di.core.gui.Point" ]
import java.util.ArrayList; import java.util.List; import org.pentaho.di.core.NotePadMeta; import org.pentaho.di.core.gui.Point;
import java.util.*; import org.pentaho.di.core.*; import org.pentaho.di.core.gui.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
643,427
public CallHandle loadROIFromServer(SecurityContext ctx, long imageID, long userID, AgentEventListener observer) { BatchCallTree cmd = new ServerSideROILoader(ctx, imageID, userID); return cmd.exec(observer); }
CallHandle function(SecurityContext ctx, long imageID, long userID, AgentEventListener observer) { BatchCallTree cmd = new ServerSideROILoader(ctx, imageID, userID); return cmd.exec(observer); }
/** * Implemented as specified by the view interface. * @see ImageDataView#loadROIFromServer(long, Long, AgentEventListener) */
Implemented as specified by the view interface
loadROIFromServer
{ "repo_name": "joansmith/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/views/ImageDataViewImpl.java", "license": "gpl-2.0", "size": 16517 }
[ "org.openmicroscopy.shoola.env.data.views.calls.ServerSideROILoader", "org.openmicroscopy.shoola.env.event.AgentEventListener" ]
import org.openmicroscopy.shoola.env.data.views.calls.ServerSideROILoader; import org.openmicroscopy.shoola.env.event.AgentEventListener;
import org.openmicroscopy.shoola.env.data.views.calls.*; import org.openmicroscopy.shoola.env.event.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
1,459,393
public static boolean isSecondaryExternalStorageMounted(File path) { if (path == null) { // fast precondition return false; } boolean result = false; if (hasKitKatOrNewer()) { result = Environment.MEDIA_MOUNTED.equals(EnvironmentCompat.getStorageState(path))...
static boolean function(File path) { if (path == null) { return false; } boolean result = false; if (hasKitKatOrNewer()) { result = Environment.MEDIA_MOUNTED.equals(EnvironmentCompat.getStorageState(path)); } else { try { String[] l = path.list(); result = l != null && l.length > 0; } catch (Throwable e) { LOG.error(ST...
/** * Use this instead of EnvironmentCompat. * <p/> * returns true if the media is present * and mounted at its mount point with read/write access. * * @see android.os.Environment#MEDIA_MOUNTED */
Use this instead of EnvironmentCompat. returns true if the media is present and mounted at its mount point with read/write access
isSecondaryExternalStorageMounted
{ "repo_name": "fighter0511/ctv.download", "path": "src/com/frostwire/android/util/SystemUtils.java", "license": "gpl-3.0", "size": 7099 }
[ "android.os.Environment", "android.support.v4.os.EnvironmentCompat", "java.io.File" ]
import android.os.Environment; import android.support.v4.os.EnvironmentCompat; import java.io.File;
import android.os.*; import android.support.v4.os.*; import java.io.*;
[ "android.os", "android.support", "java.io" ]
android.os; android.support; java.io;
628,719
public static Worker newWorker(Protos.TaskID taskID) { return new Worker( taskID, Option.<Protos.SlaveID>empty(), Option.<String>empty(), WorkerState.New); }
static Worker function(Protos.TaskID taskID) { return new Worker( taskID, Option.<Protos.SlaveID>empty(), Option.<String>empty(), WorkerState.New); }
/** * Create a new worker with the given taskID. * @return a new worker instance. */
Create a new worker with the given taskID
newWorker
{ "repo_name": "oscarceballos/flink-1.3.2", "path": "flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/store/MesosWorkerStore.java", "license": "apache-2.0", "size": 5283 }
[ "org.apache.mesos.Protos" ]
import org.apache.mesos.Protos;
import org.apache.mesos.*;
[ "org.apache.mesos" ]
org.apache.mesos;
420,525
public void refresh(String source) { verifyNotClosed(); if (canIndex()) { long bytes = getEngine().getIndexBufferRAMBytesUsed(); writingBytes.addAndGet(bytes); try { if (logger.isTraceEnabled()) { logger.trace("refresh with sou...
void function(String source) { verifyNotClosed(); if (canIndex()) { long bytes = getEngine().getIndexBufferRAMBytesUsed(); writingBytes.addAndGet(bytes); try { if (logger.isTraceEnabled()) { logger.trace(STR, source, new ByteSizeValue(bytes)); } getEngine().refresh(source); } finally { if (logger.isTraceEnabled()) { lo...
/** * Writes all indexing changes to disk and opens a new searcher reflecting all changes. This can throw {@link AlreadyClosedException}. */
Writes all indexing changes to disk and opens a new searcher reflecting all changes. This can throw <code>AlreadyClosedException</code>
refresh
{ "repo_name": "mjason3/elasticsearch", "path": "core/src/main/java/org/elasticsearch/index/shard/IndexShard.java", "license": "apache-2.0", "size": 122035 }
[ "org.elasticsearch.common.unit.ByteSizeValue" ]
import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.unit.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
158,014
public ColumnInfoTable<ColumnInfo> getColumnInfoTable();
ColumnInfoTable<ColumnInfo> function();
/** * Retrieves the ColumnInfoTable table. * * see org.melati.poem.prepro.TableDef#generateTableAccessorJava * @return the ColumnInfoTable from this database */
Retrieves the ColumnInfoTable table. see org.melati.poem.prepro.TableDef#generateTableAccessorJava
getColumnInfoTable
{ "repo_name": "timp21337/Melati", "path": "courteouspoem/src/main/java/org/melati/courteouspoem/poem/generated/CourteouspoemDatabaseTablesBase.java", "license": "gpl-2.0", "size": 3168 }
[ "org.melati.poem.ColumnInfo", "org.melati.poem.ColumnInfoTable" ]
import org.melati.poem.ColumnInfo; import org.melati.poem.ColumnInfoTable;
import org.melati.poem.*;
[ "org.melati.poem" ]
org.melati.poem;
1,705,866
KieSession unmarshall(InputStream stream, KieSessionConfiguration config, Environment environment) throws IOException, ClassNotFoundException;
KieSession unmarshall(InputStream stream, KieSessionConfiguration config, Environment environment) throws IOException, ClassNotFoundException;
/** * Creates KieSession using the given KieSessionConfiguration and * Environment. It will then unmarshall the stream into the session. Either KieSessionConfiguration or * Environment may be null and it will use the default. * * @param stream * @param config * @param environment ...
Creates KieSession using the given KieSessionConfiguration and Environment. It will then unmarshall the stream into the session. Either KieSessionConfiguration or Environment may be null and it will use the default
unmarshall
{ "repo_name": "winklerm/drools", "path": "kie-api/src/main/java/org/kie/api/marshalling/Marshaller.java", "license": "apache-2.0", "size": 2804 }
[ "java.io.IOException", "java.io.InputStream", "org.kie.api.runtime.Environment", "org.kie.api.runtime.KieSession", "org.kie.api.runtime.KieSessionConfiguration" ]
import java.io.IOException; import java.io.InputStream; import org.kie.api.runtime.Environment; import org.kie.api.runtime.KieSession; import org.kie.api.runtime.KieSessionConfiguration;
import java.io.*; import org.kie.api.runtime.*;
[ "java.io", "org.kie.api" ]
java.io; org.kie.api;
1,533,309
private boolean load(Connection c) throws SQLException { if (!m_fromDb) throw new IllegalStateException("The STP node record does not exist in the database"); final DBUtils d = new DBUtils(getClass()); try { PreparedStatement stmt = null; stmt = c.prepareStatement(SQL_...
boolean function(Connection c) throws SQLException { if (!m_fromDb) throw new IllegalStateException(STR); final DBUtils d = new DBUtils(getClass()); try { PreparedStatement stmt = null; stmt = c.prepareStatement(SQL_LOAD_STPNODE); d.watch(stmt); stmt.setInt(1, m_nodeId); stmt.setInt(2, m_basevlan); d.watch(rset); if (!...
/** * Load the current interface from the database. If the interface * was modified, the modifications are lost. The nodeid * and ip address must be set prior to this call. * * @param c The connection used to load the data. * * @throws java.sql.SQLException Thrown if an error occurs * with the ...
Load the current interface from the database. If the interface was modified, the modifications are lost. The nodeid and ip address must be set prior to this call
load
{ "repo_name": "qoswork/opennmszh", "path": "opennms-services/src/main/java/org/opennms/netmgt/linkd/DbStpNodeEntry.java", "license": "gpl-2.0", "size": 28139 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException", "org.opennms.core.utils.DBUtils", "org.opennms.core.utils.LogUtils" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import org.opennms.core.utils.DBUtils; import org.opennms.core.utils.LogUtils;
import java.sql.*; import org.opennms.core.utils.*;
[ "java.sql", "org.opennms.core" ]
java.sql; org.opennms.core;
437,122
public List<TQueryRepository> getTQueryRepositorys(Connection con) throws TorqueException { if (collTQueryRepositorys == null) { collTQueryRepositorys = getTQueryRepositorys(new Criteria(10), con); } return collTQueryRepositorys; }
List<TQueryRepository> function(Connection con) throws TorqueException { if (collTQueryRepositorys == null) { collTQueryRepositorys = getTQueryRepositorys(new Criteria(10), con); } return collTQueryRepositorys; }
/** * If this collection has already been initialized, returns * the collection. Otherwise returns the results of * getTQueryRepositorys(new Criteria(),Connection) * This method takes in the Connection also as input so that * referenced objects can also be obtained using a Connection * tha...
If this collection has already been initialized, returns the collection. Otherwise returns the results of getTQueryRepositorys(new Criteria(),Connection) This method takes in the Connection also as input so that referenced objects can also be obtained using a Connection that is taken as input
getTQueryRepositorys
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTPerson.java", "license": "gpl-3.0", "size": 1013508 }
[ "java.sql.Connection", "java.util.List", "org.apache.torque.TorqueException", "org.apache.torque.util.Criteria" ]
import java.sql.Connection; import java.util.List; import org.apache.torque.TorqueException; import org.apache.torque.util.Criteria;
import java.sql.*; import java.util.*; import org.apache.torque.*; import org.apache.torque.util.*;
[ "java.sql", "java.util", "org.apache.torque" ]
java.sql; java.util; org.apache.torque;
1,206,935
public String getDisbVchrPaymentMethodName() { return new PaymentMethodValuesFinder().getKeyLabel(disbVchrPaymentMethodCode); }
String function() { return new PaymentMethodValuesFinder().getKeyLabel(disbVchrPaymentMethodCode); }
/** * Returns the name associated with the payment method code * * @return String */
Returns the name associated with the payment method code
getDisbVchrPaymentMethodName
{ "repo_name": "bhutchinson/kfs", "path": "kfs-core/src/main/java/org/kuali/kfs/fp/document/DisbursementVoucherDocument.java", "license": "agpl-3.0", "size": 80760 }
[ "org.kuali.kfs.sys.businessobject.options.PaymentMethodValuesFinder" ]
import org.kuali.kfs.sys.businessobject.options.PaymentMethodValuesFinder;
import org.kuali.kfs.sys.businessobject.options.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
899,700
public static <R> Callback<R> callback(Handler<AsyncResult<R>> handler) { return result -> handler.handle(result); }
static <R> Callback<R> function(Handler<AsyncResult<R>> handler) { return result -> handler.handle(result); }
/** * Convert a Handler&lt;AsyncResult&lt;T&gt;&gt; into a callback * @param <R> type of the returned callback * @param handler the handler to wrap * @return a callback */
Convert a Handler&lt;AsyncResult&lt;T&gt;&gt; into a callback
callback
{ "repo_name": "bckfnn/actioner", "path": "callback/src/main/java/io/github/bckfnn/callback/Callback.java", "license": "apache-2.0", "size": 6592 }
[ "io.vertx.core.AsyncResult", "io.vertx.core.Handler" ]
import io.vertx.core.AsyncResult; import io.vertx.core.Handler;
import io.vertx.core.*;
[ "io.vertx.core" ]
io.vertx.core;
1,425,566
String getDataFormatParameterJsonSchema(String dataFormatName) throws IOException;
String getDataFormatParameterJsonSchema(String dataFormatName) throws IOException;
/** * Returns the JSON schema representation of the {@link DataFormat} parameters for the given data format name. * * @return the json or <tt>null</tt> if the data format does not exist */
Returns the JSON schema representation of the <code>DataFormat</code> parameters for the given data format name
getDataFormatParameterJsonSchema
{ "repo_name": "neoramon/camel", "path": "camel-core/src/main/java/org/apache/camel/CamelContext.java", "license": "apache-2.0", "size": 70125 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,942,792
Executions<Set<V>> spop(K key, long count);
Executions<Set<V>> spop(K key, long count);
/** * Remove and return one or multiple random members from a set. * * @param key the key * @param count number of members to pop * @return V bulk-string-reply the removed element, or {@code null} when {@code key} does not exist. */
Remove and return one or multiple random members from a set
spop
{ "repo_name": "mp911de/lettuce", "path": "src/main/java/io/lettuce/core/cluster/api/sync/NodeSelectionSetCommands.java", "license": "apache-2.0", "size": 10150 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,671,329
public void enableAggressiveHandover(int enabled) { try { mService.enableAggressiveHandover(enabled); } catch (RemoteException e) { } }
void function(int enabled) { try { mService.enableAggressiveHandover(enabled); } catch (RemoteException e) { } }
/** * Set wifi Aggressive Handover. Called from developer settings. * @hide */
Set wifi Aggressive Handover. Called from developer settings
enableAggressiveHandover
{ "repo_name": "Ant-Droid/android_frameworks_base_OLD", "path": "wifi/java/android/net/wifi/WifiManager.java", "license": "apache-2.0", "size": 103390 }
[ "android.os.RemoteException" ]
import android.os.RemoteException;
import android.os.*;
[ "android.os" ]
android.os;
335,576
@Deprecated public HFileScanner getScanner(boolean cacheBlocks, boolean pread, boolean isCompaction) { return reader.getScanner(cacheBlocks, pread, isCompaction); }
HFileScanner function(boolean cacheBlocks, boolean pread, boolean isCompaction) { return reader.getScanner(cacheBlocks, pread, isCompaction); }
/** * Warning: Do not write further code which depends on this call. Instead * use getStoreFileScanner() which uses the StoreFileScanner class/interface * which is the preferred way to scan a store with higher level concepts. * * @param cacheBlocks * should we cache the blocks? ...
Warning: Do not write further code which depends on this call. Instead use getStoreFileScanner() which uses the StoreFileScanner class/interface which is the preferred way to scan a store with higher level concepts
getScanner
{ "repo_name": "narendragoyal/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java", "license": "apache-2.0", "size": 57432 }
[ "org.apache.hadoop.hbase.io.hfile.HFileScanner" ]
import org.apache.hadoop.hbase.io.hfile.HFileScanner;
import org.apache.hadoop.hbase.io.hfile.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
377,507
public static boolean kill(final int pid, final int code) { if (pid <= 0) { return false; } final HANDLE hProcess = Kernel32.INSTANCE.OpenProcess(MyKernel32.PROCESS_TERMINATE, false, pid); if (hProcess == null) { win32ErrorRuntime("OpenProcess"); } ...
static boolean function(final int pid, final int code) { if (pid <= 0) { return false; } final HANDLE hProcess = Kernel32.INSTANCE.OpenProcess(MyKernel32.PROCESS_TERMINATE, false, pid); if (hProcess == null) { win32ErrorRuntime(STR); } boolean result = false; try { result = Kernel32.INSTANCE.TerminateProcess(hProcess, ...
/** * Kill a process from its PID. * * @param pid the PID * @param code the code * @return true, if successful */
Kill a process from its PID
kill
{ "repo_name": "nmpgaspar/PainlessProActive", "path": "src/Extensions/org/objectweb/proactive/extensions/processbuilder/WindowsProcess.java", "license": "agpl-3.0", "size": 57814 }
[ "com.sun.jna.platform.win32.Kernel32" ]
import com.sun.jna.platform.win32.Kernel32;
import com.sun.jna.platform.win32.*;
[ "com.sun.jna" ]
com.sun.jna;
1,339,177
public void setActionOutputRoot(Path actionOutputRoot) { Preconditions.checkNotNull(actionOutputRoot); this.actionLogBufferPathGenerator = new ActionLogBufferPathGenerator(actionOutputRoot); this.skyframeActionExecutor.setActionLogBufferPathGenerator(actionLogBufferPathGenerator); }
void function(Path actionOutputRoot) { Preconditions.checkNotNull(actionOutputRoot); this.actionLogBufferPathGenerator = new ActionLogBufferPathGenerator(actionOutputRoot); this.skyframeActionExecutor.setActionLogBufferPathGenerator(actionLogBufferPathGenerator); }
/** * Sets the path for action log buffers. */
Sets the path for action log buffers
setActionOutputRoot
{ "repo_name": "Asana/bazel", "path": "src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java", "license": "apache-2.0", "size": 88381 }
[ "com.google.devtools.build.lib.actions.ActionLogBufferPathGenerator", "com.google.devtools.build.lib.util.Preconditions", "com.google.devtools.build.lib.vfs.Path" ]
import com.google.devtools.build.lib.actions.ActionLogBufferPathGenerator; import com.google.devtools.build.lib.util.Preconditions; import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.util.*; import com.google.devtools.build.lib.vfs.*;
[ "com.google.devtools" ]
com.google.devtools;
1,153,914
private static Set<Interval<Double>> fetchContainingIntervals(List<Interval<Double>> master, double queryPoint) { Set<Interval<Double>> result = new HashSet<Interval<Double>>(); for (Interval<Double> next : master) { if (next.contains(query...
static Set<Interval<Double>> function(List<Interval<Double>> master, double queryPoint) { Set<Interval<Double>> result = new HashSet<Interval<Double>>(); for (Interval<Double> next : master) { if (next.contains(queryPoint)) { result.add(next); } } return result; }
/** * Helper method to fetch the set of intervals from the master list that * contain the query point using the brute force method. This gives a correct * answer against which to compare the result from the interval tree. */
Helper method to fetch the set of intervals from the master list that contain the query point using the brute force method. This gives a correct answer against which to compare the result from the interval tree
fetchContainingIntervals
{ "repo_name": "KevinStern/software-and-algorithms", "path": "src/test/java/blogspot/software_and_algorithms/stern_library/data_structure/StaticIntervalTreeTest.java", "license": "mit", "size": 12583 }
[ "java.util.HashSet", "java.util.List", "java.util.Set" ]
import java.util.HashSet; import java.util.List; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,296,191
protected void unserialize(ByteBuffer bytes) { m_index_ = ICUBinary.getChars(bytes, m_dataOffset_, 0); }
void function(ByteBuffer bytes) { m_index_ = ICUBinary.getChars(bytes, m_dataOffset_, 0); }
/** * <p>Parses the byte buffer and creates the trie index with it.</p> * <p>The position of the input ByteBuffer must be right after the trie header.</p> * <p>This is overwritten by the child classes. * @param bytes buffer containing trie data */
Parses the byte buffer and creates the trie index with it. The position of the input ByteBuffer must be right after the trie header. This is overwritten by the child classes
unserialize
{ "repo_name": "abhijitvalluri/fitnotifications", "path": "icu4j/src/main/java/com/ibm/icu/impl/Trie.java", "license": "apache-2.0", "size": 16015 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
622,980
public IMouseState createBackgroundClickedLeftState(final MouseEvent event) { final CBackgroundClickedLeftState<NodeType> state = new CBackgroundClickedLeftState<NodeType>(this, m_graph); m_factory.createBackgroundClickedLeftAction().execute(state, event); return state; }
IMouseState function(final MouseEvent event) { final CBackgroundClickedLeftState<NodeType> state = new CBackgroundClickedLeftState<NodeType>(this, m_graph); m_factory.createBackgroundClickedLeftAction().execute(state, event); return state; }
/** * Creates a new state object after the background has been clicked with the left mouse button * * @param event The mouse event that caused the state change. * * @return The state object that describes the mouse state. */
Creates a new state object after the background has been clicked with the left mouse button
createBackgroundClickedLeftState
{ "repo_name": "guiquanz/binnavi", "path": "src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/editmode/CStateFactory.java", "license": "apache-2.0", "size": 24492 }
[ "com.google.security.zynamics.zylib.gui.zygraph.editmode.IMouseState", "com.google.security.zynamics.zylib.gui.zygraph.editmode.states.CBackgroundClickedLeftState", "java.awt.event.MouseEvent" ]
import com.google.security.zynamics.zylib.gui.zygraph.editmode.IMouseState; import com.google.security.zynamics.zylib.gui.zygraph.editmode.states.CBackgroundClickedLeftState; import java.awt.event.MouseEvent;
import com.google.security.zynamics.zylib.gui.zygraph.editmode.*; import com.google.security.zynamics.zylib.gui.zygraph.editmode.states.*; import java.awt.event.*;
[ "com.google.security", "java.awt" ]
com.google.security; java.awt;
1,889,443
public void setTrustManager(TrustManager trustManager) { this.trustManager = trustManager; }
void function(TrustManager trustManager) { this.trustManager = trustManager; }
/** * Configure SSL trust manager, SSL should be enabled for this option to be effective */
Configure SSL trust manager, SSL should be enabled for this option to be effective
setTrustManager
{ "repo_name": "adessaigne/camel", "path": "components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQComponent.java", "license": "apache-2.0", "size": 30316 }
[ "javax.net.ssl.TrustManager" ]
import javax.net.ssl.TrustManager;
import javax.net.ssl.*;
[ "javax.net" ]
javax.net;
503,643
void clickOnButton(String componentName) throws QTasteException;
void clickOnButton(String componentName) throws QTasteException;
/** * Click on the specified componentName. * Can be used on {@link AbstractButton}. (see {@link AbstractButton#doClick()}) * * @param componentName an identifier of the {@link AbstractButton} component. */
Click on the specified componentName. Can be used on <code>AbstractButton</code>. (see <code>AbstractButton#doClick()</code>)
clickOnButton
{ "repo_name": "qspin/qtaste", "path": "plugins_src/javagui/src/main/java/com/qspin/qtaste/javagui/JavaGUI.java", "license": "lgpl-3.0", "size": 21383 }
[ "com.qspin.qtaste.testsuite.QTasteException" ]
import com.qspin.qtaste.testsuite.QTasteException;
import com.qspin.qtaste.testsuite.*;
[ "com.qspin.qtaste" ]
com.qspin.qtaste;
99,282
public final ServletContext getServletContext() { return this.servletContext; }
final ServletContext function() { return this.servletContext; }
/** * Return the ServletContext for this resource. */
Return the ServletContext for this resource
getServletContext
{ "repo_name": "kingtang/spring-learn", "path": "spring-web/src/main/java/org/springframework/web/context/support/ServletContextResource.java", "license": "gpl-3.0", "size": 7118 }
[ "javax.servlet.ServletContext" ]
import javax.servlet.ServletContext;
import javax.servlet.*;
[ "javax.servlet" ]
javax.servlet;
1,867,223
public DocumentMetaData getDocumentMetaData() { if ( reportDesignerContext == null ) { return defaultDocumentMetaData; } final ReportDocumentContext activeContext = reportDesignerContext.getActiveContext(); if ( activeContext == null ) { return defaultDocumentMetaData; ...
DocumentMetaData function() { if ( reportDesignerContext == null ) { return defaultDocumentMetaData; } final ReportDocumentContext activeContext = reportDesignerContext.getActiveContext(); if ( activeContext == null ) { return defaultDocumentMetaData; } return activeContext.getContextRoot().getBundle().getMetaData(); }
/** * the document metadata of the report. Can be null, if the report does not have a bundle associated or if this * context is not part of a report-processing. * * @return the document metadata. */
the document metadata of the report. Can be null, if the report does not have a bundle associated or if this context is not part of a report-processing
getDocumentMetaData
{ "repo_name": "mbatchelor/pentaho-reporting", "path": "designer/report-designer/src/main/java/org/pentaho/reporting/designer/core/editor/parameters/ParameterDialog.java", "license": "lgpl-2.1", "size": 56259 }
[ "org.pentaho.reporting.designer.core.editor.ReportDocumentContext", "org.pentaho.reporting.libraries.docbundle.DocumentMetaData" ]
import org.pentaho.reporting.designer.core.editor.ReportDocumentContext; import org.pentaho.reporting.libraries.docbundle.DocumentMetaData;
import org.pentaho.reporting.designer.core.editor.*; import org.pentaho.reporting.libraries.docbundle.*;
[ "org.pentaho.reporting" ]
org.pentaho.reporting;
2,132,099
List<Resource> getAllNonLimitingResources();
List<Resource> getAllNonLimitingResources();
/** * * Returns all {@link Resource} which are not limiting * * @return */
Returns all <code>Resource</code> which are not limiting
getAllNonLimitingResources
{ "repo_name": "bolobr/IEBT-Libreplan", "path": "libreplan-business/src/main/java/org/libreplan/business/resources/daos/IResourceDAO.java", "license": "agpl-3.0", "size": 3508 }
[ "java.util.List", "org.libreplan.business.resources.entities.Resource" ]
import java.util.List; import org.libreplan.business.resources.entities.Resource;
import java.util.*; import org.libreplan.business.resources.entities.*;
[ "java.util", "org.libreplan.business" ]
java.util; org.libreplan.business;
2,792,045
// This cannot be done by a simple comparator since an Activity weight // is computed from history. Note that Activity implements Comparable. public void sort(Intent intent, List<ActivityResolveInfo> activities, List<HistoricalRecord> historicalRecords); } public in...
void function(Intent intent, List<ActivityResolveInfo> activities, List<HistoricalRecord> historicalRecords); } public interface OnChooseActivityListener { /** * Called when an activity has been chosen. The client can decide whether * an activity can be chosen and if so the caller of * {@link ActivityChooserModel#choos...
/** * Sorts the <code>activities</code> in descending order of relevance * based on previous history and an intent. * * @param intent The {@link Intent}. * @param activities Activities to be sorted. * @param historicalRecords Historical records. */
Sorts the <code>activities</code> in descending order of relevance based on previous history and an intent
sort
{ "repo_name": "Yukarumya/Yukarum-Redfoxes", "path": "mobile/android/base/java/org/mozilla/gecko/widget/ActivityChooserModel.java", "license": "mpl-2.0", "size": 47124 }
[ "android.content.Intent", "java.util.List" ]
import android.content.Intent; import java.util.List;
import android.content.*; import java.util.*;
[ "android.content", "java.util" ]
android.content; java.util;
41,889
@Override protected TicketModel getTicketImpl(RepositoryModel repository, long ticketId) { Repository db = repositoryManager.getRepository(repository.name); try { List<Change> changes = getJournal(db, ticketId); if (ArrayUtils.isEmpty(changes)) { log.warn("Empty journal for {}:{}", repository, ticketI...
TicketModel function(RepositoryModel repository, long ticketId) { Repository db = repositoryManager.getRepository(repository.name); try { List<Change> changes = getJournal(db, ticketId); if (ArrayUtils.isEmpty(changes)) { log.warn(STR, repository, ticketId); return null; } TicketModel ticket = TicketModel.buildTicket(c...
/** * Retrieves the ticket from the repository by first looking-up the changeId * associated with the ticketId. * * @param repository * @param ticketId * @return a ticket, if it exists, otherwise null */
Retrieves the ticket from the repository by first looking-up the changeId associated with the ticketId
getTicketImpl
{ "repo_name": "paulsputer/gitblit", "path": "src/main/java/com/gitblit/tickets/BranchTicketService.java", "license": "apache-2.0", "size": 24874 }
[ "com.gitblit.models.RepositoryModel", "com.gitblit.models.TicketModel", "com.gitblit.utils.ArrayUtils", "java.util.List", "org.eclipse.jgit.lib.Repository" ]
import com.gitblit.models.RepositoryModel; import com.gitblit.models.TicketModel; import com.gitblit.utils.ArrayUtils; import java.util.List; import org.eclipse.jgit.lib.Repository;
import com.gitblit.models.*; import com.gitblit.utils.*; import java.util.*; import org.eclipse.jgit.lib.*;
[ "com.gitblit.models", "com.gitblit.utils", "java.util", "org.eclipse.jgit" ]
com.gitblit.models; com.gitblit.utils; java.util; org.eclipse.jgit;
1,015,256
public void testTautology17() throws Exception { final Element ele = BasicParser.createElement( "<EQUI><AND><NOT><PREDVAR id=\"A\"/></NOT><PREDVAR id=\"B\"/></AND>" + "<NOT><OR><NOT><PREDVAR id=\"B\"/></NOT><PREDVAR id=\"A\"/></OR></NOT></EQUI>"); // System.out.println(ele.to...
void function() throws Exception { final Element ele = BasicParser.createElement( STRA\STRB\STR + STRB\STRA\STR); assertTrue(isTautology(ele)); }
/** * Function: isTautology(Element) * Type: positive * Data: -A n B <-> -(-B v A) * * @throws Exception Test failed. */
Function: isTautology(Element) Type: positive Data: -A n B -(-B v A)
testTautology17
{ "repo_name": "m-31/qedeq", "path": "QedeqKernelBoTest/src/org/qedeq/kernel/bo/logic/model/DynamicDirectInterpreterTest.java", "license": "gpl-2.0", "size": 82947 }
[ "org.qedeq.kernel.se.base.list.Element", "org.qedeq.kernel.xml.parser.BasicParser" ]
import org.qedeq.kernel.se.base.list.Element; import org.qedeq.kernel.xml.parser.BasicParser;
import org.qedeq.kernel.se.base.list.*; import org.qedeq.kernel.xml.parser.*;
[ "org.qedeq.kernel" ]
org.qedeq.kernel;
770,786
CamelEvent createExchangeCompletedEvent(Exchange exchange);
CamelEvent createExchangeCompletedEvent(Exchange exchange);
/** * Creates an {@link CamelEvent} when an {@link org.apache.camel.Exchange} has been completed successfully * * @param exchange the exchange * @return the created event */
Creates an <code>CamelEvent</code> when an <code>org.apache.camel.Exchange</code> has been completed successfully
createExchangeCompletedEvent
{ "repo_name": "adessaigne/camel", "path": "core/camel-api/src/main/java/org/apache/camel/spi/EventFactory.java", "license": "apache-2.0", "size": 11875 }
[ "org.apache.camel.Exchange" ]
import org.apache.camel.Exchange;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
1,653,530
protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection) { Collection<IAction> actions = new ArrayList<IAction>(); if (descriptors != null) { for (Object descriptor : descriptors) { actions.add(new CreateChildAction(activeEditorPart, selection, descriptor))...
Collection<IAction> function(Collection<?> descriptors, ISelection selection) { Collection<IAction> actions = new ArrayList<IAction>(); if (descriptors != null) { for (Object descriptor : descriptors) { actions.add(new CreateChildAction(activeEditorPart, selection, descriptor)); } } return actions; }
/** * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>, * and returns the collection of these actions. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This generates a <code>org.eclipse.emf.edit.ui.action.CreateChildAction</code> for each object in <code>descriptors</code>, and returns the collection of these actions.
generateCreateChildActions
{ "repo_name": "ObeoNetwork/EAST-ADL-Designer", "path": "plugins/org.obeonetwork.dsl.eastadl.editor/src/org/obeonetwork/dsl/east_adl/structure/platform_model/presentation/Platform_modelActionBarContributor.java", "license": "epl-1.0", "size": 14196 }
[ "java.util.ArrayList", "java.util.Collection", "org.eclipse.emf.edit.ui.action.CreateChildAction", "org.eclipse.jface.action.IAction", "org.eclipse.jface.viewers.ISelection" ]
import java.util.ArrayList; import java.util.Collection; import org.eclipse.emf.edit.ui.action.CreateChildAction; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection;
import java.util.*; import org.eclipse.emf.edit.ui.action.*; import org.eclipse.jface.action.*; import org.eclipse.jface.viewers.*;
[ "java.util", "org.eclipse.emf", "org.eclipse.jface" ]
java.util; org.eclipse.emf; org.eclipse.jface;
1,928,704
public void averagePoints(Vector3D[] points) { //logger.info("Bounding Sphere calculated using average points."); center = points[0].getCopy(); for (int i = 1; i < points.length; i++) { center.addLocal(points[i]); } float quantity =...
void function(Vector3D[] points) { center = points[0].getCopy(); for (int i = 1; i < points.length; i++) { center.addLocal(points[i]); } float quantity = 1.0f / points.length; center.scaleLocal(quantity); float maxRadiusSqr = 0; for (int i = 0; i < points.length; i++) { Vector3D diff = points[i].getSubtracted(center); ...
/** * <code>averagePoints</code> selects the sphere center to be the average * of the points and the sphere radius to be the smallest value to enclose * all points. * * @param points * the list of points to contain. */
<code>averagePoints</code> selects the sphere center to be the average of the points and the sphere radius to be the smallest value to enclose all points
averagePoints
{ "repo_name": "rjmarsan/GestureSound", "path": "src/org/mt4j/components/bounds/BoundingSphere.java", "license": "gpl-2.0", "size": 43364 }
[ "org.mt4j.util.math.Vector3D" ]
import org.mt4j.util.math.Vector3D;
import org.mt4j.util.math.*;
[ "org.mt4j.util" ]
org.mt4j.util;
1,782,206
public void whileHeld(final Command command) { whileActive(command); }
void function(final Command command) { whileActive(command); }
/** * Constantly starts the given command while the button is held. * * {@link Command#start()} will be called repeatedly while the button is held, * and will be canceled when the button is released. * * @param command the command to start */
Constantly starts the given command while the button is held. <code>Command#start()</code> will be called repeatedly while the button is held, and will be canceled when the button is released
whileHeld
{ "repo_name": "multiplemonomials/FRC-Test", "path": "src/edu/wpi/first/wpilibj/buttons/Button.java", "license": "gpl-3.0", "size": 2387 }
[ "edu.wpi.first.wpilibj.command.Command" ]
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.command.*;
[ "edu.wpi.first" ]
edu.wpi.first;
1,574,690
void delete(PlayerOrder entity);
void delete(PlayerOrder entity);
/** * Delete the input PlayerOrder from the database. * * @param entity the PlayerOrder tha we want to delete */
Delete the input PlayerOrder from the database
delete
{ "repo_name": "EaW1805/data", "path": "src/main/java/com/eaw1805/data/managers/beans/PlayerOrderManagerBean.java", "license": "mit", "size": 7401 }
[ "com.eaw1805.data.model.PlayerOrder" ]
import com.eaw1805.data.model.PlayerOrder;
import com.eaw1805.data.model.*;
[ "com.eaw1805.data" ]
com.eaw1805.data;
1,596,908
InstanceBuilder nes(Nes nes);
InstanceBuilder nes(Nes nes);
/** * Returns the builder object of nes. * * @param nes value of nes * @return builder object of nes */
Returns the builder object of nes
nes
{ "repo_name": "mengmoya/onos", "path": "apps/l3vpn/netl3vpn/netmgr/src/main/java/org/onosproject/yang/gen/v1/net/l3vpn/rev20160701/netl3vpn/instances/Instance.java", "license": "apache-2.0", "size": 3353 }
[ "org.onosproject.yang.gen.v1.net.l3vpn.rev20160701.netl3vpn.instances.instance.Nes" ]
import org.onosproject.yang.gen.v1.net.l3vpn.rev20160701.netl3vpn.instances.instance.Nes;
import org.onosproject.yang.gen.v1.net.l3vpn.rev20160701.netl3vpn.instances.instance.*;
[ "org.onosproject.yang" ]
org.onosproject.yang;
898,733
public static final Triplet<Driver,Boolean,Connection> createConnection ( final DBAccessConfig cfg) throws Exception { final Map.Entry<Driver,Boolean> drvRes=registerDriver(cfg); final Connection conn= DriverManager.getConnection(cfg.getURL(), cf...
static final Triplet<Driver,Boolean,Connection> function ( final DBAccessConfig cfg) throws Exception { final Map.Entry<Driver,Boolean> drvRes=registerDriver(cfg); final Connection conn= DriverManager.getConnection(cfg.getURL(), cfg.getUser(), cfg.getPassword()); return new Triplet<Driver,Boolean,Connection>(drvRes.get...
/** * Creates a connection using the provided {@link DBAccessConfig} data * @param cfg The {@link DBAccessConfig} instance - may not be <code>null</code> * @return A {@link Triplet} containing the {@link Driver} instance, a * {@link Boolean} indicating if the driver was instantiated or pre-registere...
Creates a connection using the provided <code>DBAccessConfig</code> data
createConnection
{ "repo_name": "lgoldstein/communitychest", "path": "chest/db/src/main/java/net/community/chest/db/DBAccessConfig.java", "license": "apache-2.0", "size": 6764 }
[ "java.sql.Connection", "java.sql.Driver", "java.sql.DriverManager", "java.util.Map", "net.community.chest.Triplet" ]
import java.sql.Connection; import java.sql.Driver; import java.sql.DriverManager; import java.util.Map; import net.community.chest.Triplet;
import java.sql.*; import java.util.*; import net.community.chest.*;
[ "java.sql", "java.util", "net.community.chest" ]
java.sql; java.util; net.community.chest;
590,409
public ContextMenu add(Node n) { Computer c = n.toComputer(); return add(new MenuItem() .withDisplayName(n.getDisplayName()) .withStockIcon(c == null ? "computer.png" : c.getIcon()) .withContextRelativeUrl(n.getSearchUrl())); }
ContextMenu function(Node n) { Computer c = n.toComputer(); return add(new MenuItem() .withDisplayName(n.getDisplayName()) .withStockIcon(c == null ? STR : c.getIcon()) .withContextRelativeUrl(n.getSearchUrl())); }
/** * Adds a node * * @since 1.513 */
Adds a node
add
{ "repo_name": "rsandell/jenkins", "path": "core/src/main/java/jenkins/model/ModelObjectWithContextMenu.java", "license": "mit", "size": 12688 }
[ "hudson.model.Computer", "hudson.model.Node" ]
import hudson.model.Computer; import hudson.model.Node;
import hudson.model.*;
[ "hudson.model" ]
hudson.model;
466,588
public void flush() throws IOException { if (suspended) throw new IOException (sm.getString("responseStream.suspended")); if (closed) throw new IOException(sm.getString("responseStream.flush.closed")); if (commit) response.getResponse()....
void function() throws IOException { if (suspended) throw new IOException (sm.getString(STR)); if (closed) throw new IOException(sm.getString(STR)); if (commit) response.getResponse().flushBuffer(); }
/** * Flush any buffered data for this output stream, which also causes the * response to be committed. */
Flush any buffered data for this output stream, which also causes the response to be committed
flush
{ "repo_name": "devjin24/howtomcatworks", "path": "bookrefer/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/connector/ResponseStream.java", "license": "apache-2.0", "size": 9193 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,795,427
CPUUsage getCurrentCPULoad();
CPUUsage getCurrentCPULoad();
/** * If monitoring is enabled, gets the last measurement of the CPU load on this machine. Otherwise returns null. * @return A complex value returning some basic load metrics of the CPU. Values are averages of the last 1-minute * interval */
If monitoring is enabled, gets the last measurement of the CPU load on this machine. Otherwise returns null
getCurrentCPULoad
{ "repo_name": "xLeitix/jcloudscale", "path": "core/src/main/java/at/ac/tuwien/infosys/jcloudscale/vm/IHost.java", "license": "apache-2.0", "size": 3221 }
[ "at.ac.tuwien.infosys.jcloudscale.monitoring.CPUUsage" ]
import at.ac.tuwien.infosys.jcloudscale.monitoring.CPUUsage;
import at.ac.tuwien.infosys.jcloudscale.monitoring.*;
[ "at.ac.tuwien" ]
at.ac.tuwien;
2,706,060
int getEmptyItemId(ItemStack itemStack);
int getEmptyItemId(ItemStack itemStack);
/** * Get the item ID to use for a charge energy of 0. * * @return Item ID to use */
Get the item ID to use for a charge energy of 0
getEmptyItemId
{ "repo_name": "pixlepix/MineChem", "path": "src/main/java/ic2/api/item/IElectricItem.java", "license": "lgpl-2.1", "size": 1338 }
[ "net.minecraft.item.ItemStack" ]
import net.minecraft.item.ItemStack;
import net.minecraft.item.*;
[ "net.minecraft.item" ]
net.minecraft.item;
1,646,322
public List<ItemReference> injectVcsStatus(List<ItemReference> itemReferences) throws ServerException, NotFoundException { Optional<ItemReference> itemReferenceOptional = itemReferences .stream() .filter(itemReference -> "file".equals(itemReference.getType())) .fi...
List<ItemReference> function(List<ItemReference> itemReferences) throws ServerException, NotFoundException { Optional<ItemReference> itemReferenceOptional = itemReferences .stream() .filter(itemReference -> "file".equals(itemReference.getType())) .findAny(); if (itemReferenceOptional.isPresent()) { Optional<VcsStatusPr...
/** * Find related VCS provider and set VCS status of {@link ItemReference} file to it's attributes * to each item of the given list, if VCS provider is present. * * @param itemReferences list of {@link ItemReference} files to update */
Find related VCS provider and set VCS status of <code>ItemReference</code> file to it's attributes to each item of the given list, if VCS provider is present
injectVcsStatus
{ "repo_name": "akervern/che", "path": "wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/impl/ProjectServiceVcsStatusInjector.java", "license": "epl-1.0", "size": 7140 }
[ "java.util.HashMap", "java.util.List", "java.util.Map", "java.util.Optional", "java.util.stream.Collectors", "org.eclipse.che.api.core.NotFoundException", "org.eclipse.che.api.core.ServerException", "org.eclipse.che.api.project.server.VcsStatusProvider", "org.eclipse.che.api.project.shared.dto.ItemR...
import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; import org.eclipse.che.api.core.NotFoundException; import org.eclipse.che.api.core.ServerException; import org.eclipse.che.api.project.server.VcsStatusProvider; import org.eclipse.che.ap...
import java.util.*; import java.util.stream.*; import org.eclipse.che.api.core.*; import org.eclipse.che.api.project.server.*; import org.eclipse.che.api.project.shared.dto.*;
[ "java.util", "org.eclipse.che" ]
java.util; org.eclipse.che;
1,199,216
public void onStopAnimation(View view) { if (!checkReady()) { return; } mMap.stopAnimation(); }
void function(View view) { if (!checkReady()) { return; } mMap.stopAnimation(); }
/** * Called when the stop button is clicked. */
Called when the stop button is clicked
onStopAnimation
{ "repo_name": "gudnam/bringluck", "path": "google_play_services/samples/maps/src/com/example/mapdemo/CameraDemoActivity.java", "license": "apache-2.0", "size": 9131 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
762,742
protected void doneParsing() throws SAXException { if ( cubeFileProviderReadHandler != null && dataSourceProviderHandler != null ) { return; } if ( cubeFileProviderReadHandler == null ) { if ( mondrianCubeDefinitionFile == null ) { throw new ParseException( "Mondrian-schema file is no...
void function() throws SAXException { if ( cubeFileProviderReadHandler != null && dataSourceProviderHandler != null ) { return; } if ( cubeFileProviderReadHandler == null ) { if ( mondrianCubeDefinitionFile == null ) { throw new ParseException( STR, getLocator() ); } } if ( dataSourceProviderHandler == null ) { if ( da...
/** * Done parsing. * * @throws org.xml.sax.SAXException if there is a parsing error. */
Done parsing
doneParsing
{ "repo_name": "EgorZhuk/pentaho-reporting", "path": "engine/extensions-mondrian/src/main/java/org/pentaho/reporting/engine/classic/extensions/datasources/mondrian/parser/MondrianConnectionReadHandler.java", "license": "lgpl-2.1", "size": 9216 }
[ "org.pentaho.reporting.libraries.xmlns.parser.ParseException", "org.xml.sax.SAXException" ]
import org.pentaho.reporting.libraries.xmlns.parser.ParseException; import org.xml.sax.SAXException;
import org.pentaho.reporting.libraries.xmlns.parser.*; import org.xml.sax.*;
[ "org.pentaho.reporting", "org.xml.sax" ]
org.pentaho.reporting; org.xml.sax;
2,120,537
public void setPublicKey(String publicKeyName) { if (context != null && publicKeyName != null) { PublicKey pk = context.getRegistry().lookupByNameAndType(publicKeyName, PublicKey.class); if (pk != null) { setPublicKey(pk); } } if (publicKey...
void function(String publicKeyName) { if (context != null && publicKeyName != null) { PublicKey pk = context.getRegistry().lookupByNameAndType(publicKeyName, PublicKey.class); if (pk != null) { setPublicKey(pk); } } if (publicKeyName != null) { this.publicKeyName = publicKeyName; } }
/** * Sets the reference name for a publicKey that can be fond in the registry. */
Sets the reference name for a publicKey that can be fond in the registry
setPublicKey
{ "repo_name": "logzio/camel", "path": "components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureConfiguration.java", "license": "apache-2.0", "size": 14343 }
[ "java.security.PublicKey" ]
import java.security.PublicKey;
import java.security.*;
[ "java.security" ]
java.security;
1,935,833
@Test(dataProvider = "frequencyGenerator") public void differentRecipeFrequenciesTest(String frequency) throws Exception { LOGGER.info("Testing with frequency: " + frequency); String tblName = "myTable"; recipeMerlin.withSourceDb(DB_NAME).withSourceTable(tblName) .withFrequen...
@Test(dataProvider = STR) void function(String frequency) throws Exception { LOGGER.info(STR + frequency); String tblName = STR; recipeMerlin.withSourceDb(DB_NAME).withSourceTable(tblName) .withFrequency(new Frequency(frequency)); runSql(connection, STR + tblName + STR); final List<String> command = recipeMerlin.getSub...
/** * Run recipe with different frequencies. Submission should go through. * Check frequency of the launched oozie job */
Run recipe with different frequencies. Submission should go through. Check frequency of the launched oozie job
differentRecipeFrequenciesTest
{ "repo_name": "OpenPOWER-BigData/HDP-falcon", "path": "falcon-regression/merlin/src/test/java/org/apache/falcon/regression/hive/dr/HiveDRTest.java", "license": "apache-2.0", "size": 34277 }
[ "java.util.ArrayList", "java.util.List", "org.apache.falcon.entity.v0.EntityType", "org.apache.falcon.entity.v0.Frequency", "org.apache.falcon.regression.core.bundle.Bundle", "org.apache.falcon.regression.core.util.HiveUtil", "org.apache.falcon.regression.core.util.InstanceUtil", "org.apache.falcon.re...
import java.util.ArrayList; import java.util.List; import org.apache.falcon.entity.v0.EntityType; import org.apache.falcon.entity.v0.Frequency; import org.apache.falcon.regression.core.bundle.Bundle; import org.apache.falcon.regression.core.util.HiveUtil; import org.apache.falcon.regression.core.util.InstanceUtil; impo...
import java.util.*; import org.apache.falcon.entity.v0.*; import org.apache.falcon.regression.core.bundle.*; import org.apache.falcon.regression.core.util.*; import org.apache.oozie.client.*; import org.testng.*; import org.testng.annotations.*;
[ "java.util", "org.apache.falcon", "org.apache.oozie", "org.testng", "org.testng.annotations" ]
java.util; org.apache.falcon; org.apache.oozie; org.testng; org.testng.annotations;
2,731,704
public static void checkForRelativeNamespace(Element ctxNode) throws CanonicalizationException { if (ctxNode != null) { NamedNodeMap attributes = ctxNode.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { C14nHelper.assertNotRelativeNS((Attr)...
static void function(Element ctxNode) throws CanonicalizationException { if (ctxNode != null) { NamedNodeMap attributes = ctxNode.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { C14nHelper.assertNotRelativeNS((Attr) attributes.item(i)); } } else { throw new CanonicalizationException(STR); } }
/** * This method throws a CanonicalizationException if the supplied Element * contains any relative namespaces. * * @param ctxNode * @throws CanonicalizationException * @see C14nHelper#assertNotRelativeNS(Attr) */
This method throws a CanonicalizationException if the supplied Element contains any relative namespaces
checkForRelativeNamespace
{ "repo_name": "shun634501730/java_source_cn", "path": "src_en/com/sun/org/apache/xml/internal/security/c14n/helper/C14nHelper.java", "license": "apache-2.0", "size": 4961 }
[ "com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException", "org.w3c.dom.Attr", "org.w3c.dom.Element", "org.w3c.dom.NamedNodeMap" ]
import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException; import org.w3c.dom.Attr; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap;
import com.sun.org.apache.xml.internal.security.c14n.*; import org.w3c.dom.*;
[ "com.sun.org", "org.w3c.dom" ]
com.sun.org; org.w3c.dom;
1,570,663
public static boolean isInSphere(Vector3f point, float size, Vector3f pos, float radius){ if(distance(pos,point) < radius+size){ return true; } return false; }
static boolean function(Vector3f point, float size, Vector3f pos, float radius){ if(distance(pos,point) < radius+size){ return true; } return false; }
/** * Returns true if the point+radius is in the sphere given by the position and radius * @param point * @param size * @param pos * @param radius * @return */
Returns true if the point+radius is in the sphere given by the position and radius
isInSphere
{ "repo_name": "LeifRoss/Misc", "path": "Java/Math/VectorMath.java", "license": "apache-2.0", "size": 7954 }
[ "org.lwjgl.util.vector.Vector3f" ]
import org.lwjgl.util.vector.Vector3f;
import org.lwjgl.util.vector.*;
[ "org.lwjgl.util" ]
org.lwjgl.util;
2,359,087
public @Nullable Location getLastKnownLocation(long expirationMs) { if (mSavedLocation != null) return mSavedLocation; AndroidNativeProvider provider = new AndroidNativeProvider(); List<String> providers = provider.getFilteredProviders(); if (providers.isEmpty()) return null; retu...
@Nullable Location function(long expirationMs) { if (mSavedLocation != null) return mSavedLocation; AndroidNativeProvider provider = new AndroidNativeProvider(); List<String> providers = provider.getFilteredProviders(); if (providers.isEmpty()) return null; return provider.findBestNotExpiredLocation(providers, expirati...
/** * Obtains last known location regardless of "My position" button state. * @return {@code null} on failure. */
Obtains last known location regardless of "My position" button state
getLastKnownLocation
{ "repo_name": "65apps/omim", "path": "android/src/com/mapswithme/maps/location/LocationHelper.java", "license": "apache-2.0", "size": 13394 }
[ "android.location.Location", "android.support.annotation.Nullable", "java.util.List" ]
import android.location.Location; import android.support.annotation.Nullable; import java.util.List;
import android.location.*; import android.support.annotation.*; import java.util.*;
[ "android.location", "android.support", "java.util" ]
android.location; android.support; java.util;
2,442,668
@Override public NestedSet<Artifact> getDeclaredIncludeSrcs() { if (lipoScannables != null && lipoScannables.iterator().hasNext()) { NestedSetBuilder<Artifact> srcs = NestedSetBuilder.stableOrder(); srcs.addTransitive(context.getDeclaredIncludeSrcs()); for (IncludeScannable lipoScannable : lip...
NestedSet<Artifact> function() { if (lipoScannables != null && lipoScannables.iterator().hasNext()) { NestedSetBuilder<Artifact> srcs = NestedSetBuilder.stableOrder(); srcs.addTransitive(context.getDeclaredIncludeSrcs()); for (IncludeScannable lipoScannable : lipoScannables) { srcs.addTransitive(lipoScannable.getDeclar...
/** * Return explicit header files (i.e., header files explicitly listed). The * return value may contain duplicate elements. */
Return explicit header files (i.e., header files explicitly listed). The return value may contain duplicate elements
getDeclaredIncludeSrcs
{ "repo_name": "hermione521/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java", "license": "apache-2.0", "size": 66161 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.collect.nestedset.NestedSet", "com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.collect.nestedset.NestedSet; import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.collect.nestedset.*;
[ "com.google.devtools" ]
com.google.devtools;
2,736,617
static String getIdFromModId(ModelObjectId id, boolean isIns) { if (id == null) { return null; } List<AtomicPath> paths = id.atomicPaths(); int size = paths.size(); switch (size) { case 1: return CONS_DEVICES; case 2: ...
static String getIdFromModId(ModelObjectId id, boolean isIns) { if (id == null) { return null; } List<AtomicPath> paths = id.atomicPaths(); int size = paths.size(); switch (size) { case 1: return CONS_DEVICES; case 2: return getDevId(paths, isIns); default: throw new IllegalArgumentException(MODEL_OBJ_ID_LIMIT); } }
/** * Returns the device id from the model object id. If model object id is * not present then null is returned. If only one path is available in * the list then devices value is returned. * * @param id model object id * @param isIns if for VPN instance * @return device id */
Returns the device id from the model object id. If model object id is not present then null is returned. If only one path is available in the list then devices value is returned
getIdFromModId
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "drivers/huawei/src/main/java/org/onosproject/drivers/huawei/DriverUtil.java", "license": "apache-2.0", "size": 7413 }
[ "java.util.List", "org.onosproject.yang.model.AtomicPath", "org.onosproject.yang.model.ModelObjectId" ]
import java.util.List; import org.onosproject.yang.model.AtomicPath; import org.onosproject.yang.model.ModelObjectId;
import java.util.*; import org.onosproject.yang.model.*;
[ "java.util", "org.onosproject.yang" ]
java.util; org.onosproject.yang;
1,796,768
private void updateBaseMatrix(Drawable d) { ImageView imageView = getImageView(); if (null == imageView || null == d) { return; } final float viewWidth = imageView.getWidth(); final float viewHeight = imageView.getHeight(); final int drawableWidth = d.getIntrinsicWidth(); final int drawableHeight =...
void function(Drawable d) { ImageView imageView = getImageView(); if (null == imageView null == d) { return; } final float viewWidth = imageView.getWidth(); final float viewHeight = imageView.getHeight(); final int drawableWidth = d.getIntrinsicWidth(); final int drawableHeight = d.getIntrinsicHeight(); mBaseMatrix.res...
/** * Calculate Matrix for FIT_CENTER * * @param d * - Drawable being displayed */
Calculate Matrix for FIT_CENTER
updateBaseMatrix
{ "repo_name": "weiwenqiang/GitHub", "path": "Binding/FastDev4Android-master/app/src/main/java/uk/co/senab/photoview/PhotoViewAttacher.java", "license": "apache-2.0", "size": 25740 }
[ "android.graphics.Matrix", "android.graphics.RectF", "android.graphics.drawable.Drawable", "android.widget.ImageView" ]
import android.graphics.Matrix; import android.graphics.RectF; import android.graphics.drawable.Drawable; import android.widget.ImageView;
import android.graphics.*; import android.graphics.drawable.*; import android.widget.*;
[ "android.graphics", "android.widget" ]
android.graphics; android.widget;
2,079,310
public IDataset getExternal_field_brief();
IDataset function();
/** * <p> * <p><b>Enumeration:</b><ul> * <li><b>along beam</b> </li> * <li><b>across beam</b> </li> * <li><b>transverse</b> </li> * <li><b>solenoidal</b> </li> * <li><b>flow shear gradient</b> </li> * <li><b>flow vorticity</b> </li></ul></p> * </p> * * @return the value. */
Enumeration: along beam across beam transverse solenoidal flow shear gradient flow vorticity
getExternal_field_brief
{ "repo_name": "xen-0/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXsensor.java", "license": "epl-1.0", "size": 17164 }
[ "org.eclipse.january.dataset.IDataset" ]
import org.eclipse.january.dataset.IDataset;
import org.eclipse.january.dataset.*;
[ "org.eclipse.january" ]
org.eclipse.january;
804,482
@Deprecated public void validatePrimitiveFromDescriptor(String entryName, Object object, PropertyDescriptor propertyDescriptor, String errorPrefix, boolean validateRequired) { // validate the primitive attributes if defined in the dictionary if (null != propertyDescriptor) { ...
void function(String entryName, Object object, PropertyDescriptor propertyDescriptor, String errorPrefix, boolean validateRequired) { if (null != propertyDescriptor) { validate(object, entryName, propertyDescriptor.getName(), validateRequired); } }
/** * calls validate format and required check for the given propertyDescriptor * * @param entryName * @param object * @param propertyDescriptor * @param errorPrefix * @deprecated since 1.1 */
calls validate format and required check for the given propertyDescriptor
validatePrimitiveFromDescriptor
{ "repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua", "path": "rice-framework/krad-service-impl/src/main/java/org/kuali/rice/krad/service/impl/DictionaryValidationServiceImpl.java", "license": "apache-2.0", "size": 62433 }
[ "java.beans.PropertyDescriptor" ]
import java.beans.PropertyDescriptor;
import java.beans.*;
[ "java.beans" ]
java.beans;
1,386,553
public ConstraintSplitter<? extends Constraint> getSplitter(Class<? extends Constraint> c) { return builders.get(c); }
ConstraintSplitter<? extends Constraint> function(Class<? extends Constraint> c) { return builders.get(c); }
/** * Get the splitter associated to a {@link Constraint}. * * @param c the constraint * @return the associated builder if exists. {@code null} otherwise */
Get the splitter associated to a <code>Constraint</code>
getSplitter
{ "repo_name": "btrplace/scheduler", "path": "split/src/main/java/org/btrplace/scheduler/runner/disjoint/splitter/ConstraintSplitterMapper.java", "license": "lgpl-3.0", "size": 4119 }
[ "org.btrplace.model.constraint.Constraint" ]
import org.btrplace.model.constraint.Constraint;
import org.btrplace.model.constraint.*;
[ "org.btrplace.model" ]
org.btrplace.model;
2,110,695
final public DOMImplementation getImplementation() { return implementation; }
final DOMImplementation function() { return implementation; }
/** * <b>DOM L1</b> * Returns the document's DOMImplementation. */
DOM L1 Returns the document's DOMImplementation
getImplementation
{ "repo_name": "ivmai/JCGO", "path": "goclsp/clsp_fix/gnu/xml/dom/DomDocument.java", "license": "gpl-2.0", "size": 47179 }
[ "org.w3c.dom.DOMImplementation" ]
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,115,096
@SuppressWarnings("unchecked") public List<Notification> findByAccountId(final Long accountId, final int maxResults, final int offsetResults) throws Throwable { return (List<Notification>) JPA.em() .createQuery("FROM Notification n WHERE n.recipient.id = :accountId ORDER BY n.isRead ASC,...
@SuppressWarnings(STR) List<Notification> function(final Long accountId, final int maxResults, final int offsetResults) throws Throwable { return (List<Notification>) JPA.em() .createQuery(STR) .setParameter(STR, accountId) .setMaxResults(maxResults) .setFirstResult(offsetResults) .getResultList(); }
/** * Returns a list of notifications by a specific user account ID. * * @param accountId User account ID * @param maxResults Maximum results * @param offsetResults Offset of results * @return List of notifications * @throws Throwable */
Returns a list of notifications by a specific user account ID
findByAccountId
{ "repo_name": "socia-platform/socia", "path": "app/managers/NotificationManager.java", "license": "mit", "size": 9700 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,967,830
public void init( Object newObjectName, Object tableElementList, Object properties, Object lockGranularity) throws StandardException { tableType = TableDescriptor.BASE_TABLE_TYPE; this.lockGranularity = ((Character) lockGranularity).charValue(); implicitCreateSchema = true; if (SanityManager....
void function( Object newObjectName, Object tableElementList, Object properties, Object lockGranularity) throws StandardException { tableType = TableDescriptor.BASE_TABLE_TYPE; this.lockGranularity = ((Character) lockGranularity).charValue(); implicitCreateSchema = true; if (SanityManager.DEBUG) { if (this.lockGranular...
/** * Initializer for a CreateTableNode for a base table * * @param newObjectName The name of the new object being created (ie base table) * @param tableElementList The elements of the table: columns, * constraints, etc. * @param properties The optional list of properties associated with * the ...
Initializer for a CreateTableNode for a base table
init
{ "repo_name": "lpxz/grail-derby104", "path": "java/engine/org/apache/derby/impl/sql/compile/CreateTableNode.java", "license": "apache-2.0", "size": 20228 }
[ "java.util.Properties", "org.apache.derby.iapi.error.StandardException", "org.apache.derby.iapi.services.sanity.SanityManager", "org.apache.derby.iapi.sql.dictionary.TableDescriptor" ]
import java.util.Properties; import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.services.sanity.SanityManager; import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
import java.util.*; import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.services.sanity.*; import org.apache.derby.iapi.sql.dictionary.*;
[ "java.util", "org.apache.derby" ]
java.util; org.apache.derby;
1,692,670
@Override public List<SpanBo> selectTransactionMetadata(final TransactionMetadataQuery query) { if (query == null) { throw new NullPointerException("query must not be null"); } final List<TransactionId> transactionIdList = query.getTransactionIdList(); final List<List...
List<SpanBo> function(final TransactionMetadataQuery query) { if (query == null) { throw new NullPointerException(STR); } final List<TransactionId> transactionIdList = query.getTransactionIdList(); final List<List<SpanBo>> selectedSpans = traceDao.selectSpans(transactionIdList); final List<SpanBo> result = new ArrayLis...
/** * Queries for details on dots selected from the scatter chart. */
Queries for details on dots selected from the scatter chart
selectTransactionMetadata
{ "repo_name": "gspandy/pinpoint", "path": "web/src/main/java/com/navercorp/pinpoint/web/service/ScatterChartServiceImpl.java", "license": "apache-2.0", "size": 5947 }
[ "com.navercorp.pinpoint.common.bo.SpanBo", "com.navercorp.pinpoint.web.vo.TransactionId", "com.navercorp.pinpoint.web.vo.TransactionMetadataQuery", "java.util.ArrayList", "java.util.List" ]
import com.navercorp.pinpoint.common.bo.SpanBo; import com.navercorp.pinpoint.web.vo.TransactionId; import com.navercorp.pinpoint.web.vo.TransactionMetadataQuery; import java.util.ArrayList; import java.util.List;
import com.navercorp.pinpoint.common.bo.*; import com.navercorp.pinpoint.web.vo.*; import java.util.*;
[ "com.navercorp.pinpoint", "java.util" ]
com.navercorp.pinpoint; java.util;
515,737
public CountDownLatch getShipmentAsync(String orderId, String shipmentId, AsyncCallback<com.mozu.api.contracts.commerceruntime.fulfillment.Shipment> callback) throws Exception { return getShipmentAsync( orderId, shipmentId, null, callback); }
CountDownLatch function(String orderId, String shipmentId, AsyncCallback<com.mozu.api.contracts.commerceruntime.fulfillment.Shipment> callback) throws Exception { return getShipmentAsync( orderId, shipmentId, null, callback); }
/** * Retrieves the details of the order shipment specified in the request. * <p><pre><code> * Shipment shipment = new Shipment(); * CountDownLatch latch = shipment.getShipment( orderId, shipmentId, callback ); * latch.await() * </code></pre></p> * @param orderId Unique identifier of the order. * @param...
Retrieves the details of the order shipment specified in the request. <code><code> Shipment shipment = new Shipment(); CountDownLatch latch = shipment.getShipment( orderId, shipmentId, callback ); latch.await() * </code></code>
getShipmentAsync
{ "repo_name": "lakshmi-nair/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/commerce/orders/ShipmentResource.java", "license": "mit", "size": 11692 }
[ "com.mozu.api.AsyncCallback", "java.util.concurrent.CountDownLatch" ]
import com.mozu.api.AsyncCallback; import java.util.concurrent.CountDownLatch;
import com.mozu.api.*; import java.util.concurrent.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
1,107,435
//#ifdef JAVA6 public synchronized Reader getNCharacterStream( String parameterName) throws SQLException { return getNCharacterStream(findParameterIndex(parameterName)); } //#endif JAVA6
synchronized Reader function( String parameterName) throws SQLException { return getNCharacterStream(findParameterIndex(parameterName)); }
/** * <!-- start generic documentation --> * * Retrieves the value of the designated parameter as a * <code>java.io.Reader</code> object in the Java programming language. * It is intended for use when * accessing <code>NCHAR</code>,<code>NVARCHAR</code> * and <code>LONGNVARCHAR</code...
Retrieves the value of the designated parameter as a <code>java.io.Reader</code> object in the Java programming language. It is intended for use when accessing <code>NCHAR</code>,<code>NVARCHAR</code> and <code>LONGNVARCHAR</code> parameters. HSQLDB-Specific Information: HSQLDB does not yet support this feature. Callin...
getNCharacterStream
{ "repo_name": "ifcharming/voltdb2.0", "path": "src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCCallableStatement.java", "license": "gpl-3.0", "size": 185755 }
[ "java.io.Reader", "java.sql.SQLException" ]
import java.io.Reader; import java.sql.SQLException;
import java.io.*; import java.sql.*;
[ "java.io", "java.sql" ]
java.io; java.sql;
2,458,792
public void setCurrentMeeting(Meeting meet) { this.currentMeeting = meet; locationTxtFld.setBorder(UI.STANDARD_BORDER_INLINE); if (currentMeeting == null) { setTitle(translate("Add Meeting")); setDescription(translate("Here you can enter all information for the new review meeting.")); setIco...
void function(Meeting meet) { this.currentMeeting = meet; locationTxtFld.setBorder(UI.STANDARD_BORDER_INLINE); if (currentMeeting == null) { setTitle(translate(STR)); setDescription(translate(STR)); setIcon(Data.getInstance().getIcon(STR)); setHelpChapter(STR, "1"); DateFormat dateF = DateFormat.getDateInstance(DateFor...
/** * Sets the current meeting. * * @param meet * the new current meeting */
Sets the current meeting
setCurrentMeeting
{ "repo_name": "googol42/revager", "path": "src/org/revager/gui/dialogs/MeetingDialog.java", "license": "gpl-3.0", "size": 15137 }
[ "java.text.DateFormat", "java.util.Calendar", "java.util.Date", "org.revager.app.model.Data", "org.revager.app.model.schema.Meeting" ]
import java.text.DateFormat; import java.util.Calendar; import java.util.Date; import org.revager.app.model.Data; import org.revager.app.model.schema.Meeting;
import java.text.*; import java.util.*; import org.revager.app.model.*; import org.revager.app.model.schema.*;
[ "java.text", "java.util", "org.revager.app" ]
java.text; java.util; org.revager.app;
2,076,248
@POST(URL) @Multipart Response analyzeSentimentForFile( @Header("token") AuthenticationToken<?, ?> token, @Part("file") TypedOutput file, @Part("language") SentimentAnalysisLanguage language ) throws HodErrorException;
@POST(URL) Response analyzeSentimentForFile( @Header("token") AuthenticationToken<?, ?> token, @Part("file") TypedOutput file, @Part(STR) SentimentAnalysisLanguage language ) throws HodErrorException;
/** * Analyze the sentiment of the given file using the given token * @param token The token to use to authenticate the request * @param file The file containing the text to analyze * @param language The language of the text * @return The sentiment of the response */
Analyze the sentiment of the given file using the given token
analyzeSentimentForFile
{ "repo_name": "hpautonomy/java-hod-client", "path": "src/main/java/com/hp/autonomy/hod/client/api/analysis/sentiment/SentimentAnalysisBackend.java", "license": "mit", "size": 3011 }
[ "com.hp.autonomy.hod.client.api.authentication.AuthenticationToken", "com.hp.autonomy.hod.client.error.HodErrorException" ]
import com.hp.autonomy.hod.client.api.authentication.AuthenticationToken; import com.hp.autonomy.hod.client.error.HodErrorException;
import com.hp.autonomy.hod.client.api.authentication.*; import com.hp.autonomy.hod.client.error.*;
[ "com.hp.autonomy" ]
com.hp.autonomy;
1,457,425
@Test public void testDifferentiateComplex() { // Testing x*x*(y+x+x) -> (1*x+x*1)*(y+x+x)+x*x*(0+1+1) Expression exp = new Multiply(new Multiply(new Variable("x"), new Variable("x")), new Add(new Variable("y"), new Add(new Variable("x"), new Variable("x")))); Expression diff = exp.diff...
void function() { Expression exp = new Multiply(new Multiply(new Variable("x"), new Variable("x")), new Add(new Variable("y"), new Add(new Variable("x"), new Variable("x")))); Expression diff = exp.differentiate(new Variable("x")); assertEquals(diff, new Add(new Multiply(new Add(new Multiply( new Number(1.0), new Varia...
/** * Tests differentiating a combination of sums and products of 3+ terms. */
Tests differentiating a combination of sums and products of 3+ terms
testDifferentiateComplex
{ "repo_name": "hcgatewood/main", "path": "6.005 Expression Final Project/src/test/ExpressionTest.java", "license": "mit", "size": 26294 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,683,565
public void addSphere() throws WebServicesException { client.oneWayCall("wsAddSphere", new Object[] { i_user }); }
void function() throws WebServicesException { client.oneWayCall(STR, new Object[] { i_user }); }
/** Ask the dispatcher to add a sphere * @throws WebServicesException */
Ask the dispatcher to add a sphere
addSphere
{ "repo_name": "acontes/programming", "path": "src/Examples/org/objectweb/proactive/examples/webservices/c3dWS/WSUser.java", "license": "agpl-3.0", "size": 14381 }
[ "org.objectweb.proactive.extensions.webservices.exceptions.WebServicesException" ]
import org.objectweb.proactive.extensions.webservices.exceptions.WebServicesException;
import org.objectweb.proactive.extensions.webservices.exceptions.*;
[ "org.objectweb.proactive" ]
org.objectweb.proactive;
59,141
private int checkArmour(ItemStack stack) { int lvl; // Check/Get the level of the Galvanized on the amour piece. lvl = EnchantmentHelper.getEnchantmentLevel(Galvanized.Enchantment_ID, stack); // Return the level back. return lvl; }
int function(ItemStack stack) { int lvl; lvl = EnchantmentHelper.getEnchantmentLevel(Galvanized.Enchantment_ID, stack); return lvl; }
/** * This function checks the armor to see what level of the uncorrodible enchant it has, depending on this value * with determine on how much the player will resit against the Acid Rain. * @param stack ItemStack: This is the current ItemStack of the armour piece being checked. * @return The level ...
This function checks the armor to see what level of the uncorrodible enchant it has, depending on this value with determine on how much the player will resit against the Acid Rain
checkArmour
{ "repo_name": "TSSN/Twisted-Tweaks", "path": "src/main/java/uk/artdude/tweaks/twisted/common/addons/acidrain/modules/PlayerAcidRain.java", "license": "mit", "size": 7620 }
[ "net.minecraft.enchantment.EnchantmentHelper", "net.minecraft.item.ItemStack", "uk.artdude.tweaks.twisted.common.enchantments.Galvanized" ]
import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.item.ItemStack; import uk.artdude.tweaks.twisted.common.enchantments.Galvanized;
import net.minecraft.enchantment.*; import net.minecraft.item.*; import uk.artdude.tweaks.twisted.common.enchantments.*;
[ "net.minecraft.enchantment", "net.minecraft.item", "uk.artdude.tweaks" ]
net.minecraft.enchantment; net.minecraft.item; uk.artdude.tweaks;
2,600,171
private void closeUniqueDatabaseConnections( Result result ) { // Don't close any connections if the parent job is using the same transaction // if ( parentJob != null && transactionId != null && parentJob.getTransactionId() != null && transactionId.equals( parentJob.getTransactionId() ) ) { ...
void function( Result result ) { parentJob.getTransactionId() ) ) { return; } && parentTrans.getTransactionId() != null && transactionId.equals( parentTrans.getTransactionId() ) ) { return; } synchronized ( map ) { List<Database> databaseList = new ArrayList<Database>( map.getMap().values() ); for ( Database database :...
/** * Close unique database connections. If there are errors in the Result, perform a rollback * * @param result * the result of the transformation execution */
Close unique database connections. If there are errors in the Result, perform a rollback
closeUniqueDatabaseConnections
{ "repo_name": "denisprotopopov/pentaho-kettle", "path": "engine/src/org/pentaho/di/trans/Trans.java", "license": "apache-2.0", "size": 196543 }
[ "java.util.ArrayList", "java.util.List", "org.pentaho.di.core.Result", "org.pentaho.di.core.database.Database", "org.pentaho.di.core.database.DatabaseTransactionListener", "org.pentaho.di.core.exception.KettleDatabaseException", "org.pentaho.di.i18n.BaseMessages" ]
import java.util.ArrayList; import java.util.List; import org.pentaho.di.core.Result; import org.pentaho.di.core.database.Database; import org.pentaho.di.core.database.DatabaseTransactionListener; import org.pentaho.di.core.exception.KettleDatabaseException; import org.pentaho.di.i18n.BaseMessages;
import java.util.*; import org.pentaho.di.core.*; import org.pentaho.di.core.database.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.i18n.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
652,612
public static boolean jsFunction_isDefaultVersion(Context cx, Scriptable thisObj, Object[] args, Function funObj) throws AppManagementException { NativeArray myn = new NativeArray(0); if (args == null || args.length != 1) { handleException("Invalid input parameters. Expecting...
static boolean function(Context cx, Scriptable thisObj, Object[] args, Function funObj) throws AppManagementException { NativeArray myn = new NativeArray(0); if (args == null args.length != 1) { handleException(STR); } NativeJavaObject appIdentifierNativeJavaObject = (NativeJavaObject) args[0]; APIIdentifier apiIdentif...
/** * Check if the given WebApp is the default version. * * @param cx * @param thisObj * @param args * @param funObj * @return true if given app is the default version * @throws AppManagementException */
Check if the given WebApp is the default version
jsFunction_isDefaultVersion
{ "repo_name": "lakshani/carbon-mobile-appmgt", "path": "components/org.wso2.carbon.appmgt.hostobjects/src/main/java/org/wso2/carbon/appmgt/hostobjects/APIProviderHostObject.java", "license": "apache-2.0", "size": 89357 }
[ "org.mozilla.javascript.Context", "org.mozilla.javascript.Function", "org.mozilla.javascript.NativeArray", "org.mozilla.javascript.NativeJavaObject", "org.mozilla.javascript.Scriptable", "org.wso2.carbon.appmgt.api.APIProvider", "org.wso2.carbon.appmgt.api.AppManagementException", "org.wso2.carbon.app...
import org.mozilla.javascript.Context; import org.mozilla.javascript.Function; import org.mozilla.javascript.NativeArray; import org.mozilla.javascript.NativeJavaObject; import org.mozilla.javascript.Scriptable; import org.wso2.carbon.appmgt.api.APIProvider; import org.wso2.carbon.appmgt.api.AppManagementException; imp...
import org.mozilla.javascript.*; import org.wso2.carbon.appmgt.api.*; import org.wso2.carbon.appmgt.api.model.*;
[ "org.mozilla.javascript", "org.wso2.carbon" ]
org.mozilla.javascript; org.wso2.carbon;
459,479
default List<PipelineAggregationSpec> getPipelineAggregations() { return emptyList(); }
default List<PipelineAggregationSpec> getPipelineAggregations() { return emptyList(); }
/** * The new {@link PipelineAggregator}s added by this plugin. */
The new <code>PipelineAggregator</code>s added by this plugin
getPipelineAggregations
{ "repo_name": "robin13/elasticsearch", "path": "server/src/main/java/org/elasticsearch/plugins/SearchPlugin.java", "license": "apache-2.0", "size": 26277 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,878,157
List<Version<T>> findVersionsBetween(Timestamp start, Timestamp end);
List<Version<T>> findVersionsBetween(Timestamp start, Timestamp end);
/** * Return versions of a @History entity bean between the 2 timestamps. * <p> * Generally this query is expected to be a find by id or unique predicates query. * It will execute the query against the history returning the versions of the bean. * </p> */
Return versions of a @History entity bean between the 2 timestamps. Generally this query is expected to be a find by id or unique predicates query. It will execute the query against the history returning the versions of the bean.
findVersionsBetween
{ "repo_name": "gzwfdy/meetime", "path": "src/main/java/com/avaje/ebean/Query.java", "license": "apache-2.0", "size": 39139 }
[ "java.sql.Timestamp", "java.util.List" ]
import java.sql.Timestamp; import java.util.List;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
681,445