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
List<T> list(int ... interval);
List<T> list(int ... interval);
/** * List existing entities, given a range. * * @param interval * Array of size 2 with the interval [a, b) (retrieves objects from index a through b-1). * * @return A list of existing entities in the given range (an empty list if none exist). */
List existing entities, given a range
list
{ "repo_name": "manzoli2122/Vip", "path": "src/br/ufes/inf/nemo/jbutler/ejb/application/ListingService.java", "license": "apache-2.0", "size": 2663 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,443,979
static boolean isSimpleOperatorType(int type) { switch (type) { case Token.ADD: case Token.BITAND: case Token.BITNOT: case Token.BITOR: case Token.BITXOR: case Token.COMMA: case Token.DIV: case Token.EQ: case Token.GE: case Token.GETELEM: case Toke...
static boolean isSimpleOperatorType(int type) { switch (type) { case Token.ADD: case Token.BITAND: case Token.BITNOT: case Token.BITOR: case Token.BITXOR: case Token.COMMA: case Token.DIV: case Token.EQ: case Token.GE: case Token.GETELEM: case Token.GETPROP: case Token.GT: case Token.INSTANCEOF: case Token.LE: case Tok...
/** * A "simple" operator is one whose children are expressions, * has no direct side-effects (unlike '+='), and has no * conditional aspects (unlike '||'). */
A "simple" operator is one whose children are expressions, has no direct side-effects (unlike '+='), and has no conditional aspects (unlike '||')
isSimpleOperatorType
{ "repo_name": "PengXing/closure-compiler", "path": "src/com/google/javascript/jscomp/NodeUtil.java", "license": "apache-2.0", "size": 99223 }
[ "com.google.javascript.rhino.Token" ]
import com.google.javascript.rhino.Token;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,825,288
@Abstract(ifExported = {"getDeclaringMetaObject"}) public boolean hasDeclaringMetaObject(Object receiver) { return false; }
@Abstract(ifExported = {STR}) boolean function(Object receiver) { return false; }
/** * Returns {@code true} if the receiver has a declaring meta object. The declaring meta object * is the meta object of the executable or meta object that declares the receiver value. * Invoking this message does not cause any observable side-effects. Returns {@code false} by * default. * ...
Returns true if the receiver has a declaring meta object. The declaring meta object is the meta object of the executable or meta object that declares the receiver value. Invoking this message does not cause any observable side-effects. Returns false by default
hasDeclaringMetaObject
{ "repo_name": "smarr/Truffle", "path": "truffle/src/com.oracle.truffle.api.interop/src/com/oracle/truffle/api/interop/InteropLibrary.java", "license": "gpl-2.0", "size": 247630 }
[ "com.oracle.truffle.api.library.GenerateLibrary" ]
import com.oracle.truffle.api.library.GenerateLibrary;
import com.oracle.truffle.api.library.*;
[ "com.oracle.truffle" ]
com.oracle.truffle;
430,473
public static File findFile(String name, File folder) { File[] files = folder.listFiles(); if (files == null) return null; for (File file : files) { if (file.isDirectory()) { File result = findFile(name, file); if (result != null) ...
static File function(String name, File folder) { File[] files = folder.listFiles(); if (files == null) return null; for (File file : files) { if (file.isDirectory()) { File result = findFile(name, file); if (result != null) return result; } else if (file.getName().equals(name)) { return file; } } return null; }
/** * Find a file by case sensitive name. (Recursive) * * @param name The name of the file. * @param folder THe folder to search in. * * @return The file or null if not found. */
Find a file by case sensitive name. (Recursive)
findFile
{ "repo_name": "JCThePants/ResourcePackerMC", "path": "src/com/jcwhatever/resourcepackermc/Utils.java", "license": "mit", "size": 5560 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,032,356
private void setupPermissions() { // If we don't have the record audio permission... if (ActivityCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) { // And if we're on SDK M or later... if (Build.VERSION.SDK_INT >= Build....
void function() { if (ActivityCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { String[] permissionsWeNeed = new String[]{ Manifest.permission.RECORD_AUDIO }; requestPermissions(permissionsWeNeed, MY_PERMISSIO...
/** * App Permissions for Audio **/
App Permissions for Audio
setupPermissions
{ "repo_name": "dalinaum/ud851-Exercises-student", "path": "Lesson06-Visualizer-Preferences/T06.05-Exercise-PreferenceChangeListener/app/src/main/java/android/example/com/visualizerpreferences/VisualizerActivity.java", "license": "apache-2.0", "size": 6739 }
[ "android.content.pm.PackageManager", "android.example.com.visualizerpreferences.AudioVisuals", "android.os.Build", "android.support.v4.app.ActivityCompat" ]
import android.content.pm.PackageManager; import android.example.com.visualizerpreferences.AudioVisuals; import android.os.Build; import android.support.v4.app.ActivityCompat;
import android.content.pm.*; import android.example.com.visualizerpreferences.*; import android.os.*; import android.support.v4.app.*;
[ "android.content", "android.example", "android.os", "android.support" ]
android.content; android.example; android.os; android.support;
1,586,228
public Vector3f getAxesAnglesRad() { final double roll; final double pitch; double yaw; final double test = w * x - y * z; if (Math.abs(test) < 0.4999) { roll = TrigMath.atan2(2 * (w * z + x * y), 1 - 2 * (x * x + z * z)); pitch = TrigMath.asin(2 * tes...
Vector3f function() { final double roll; final double pitch; double yaw; final double test = w * x - y * z; if (Math.abs(test) < 0.4999) { roll = TrigMath.atan2(2 * (w * z + x * y), 1 - 2 * (x * x + z * z)); pitch = TrigMath.asin(2 * test); yaw = TrigMath.atan2(2 * (w * y + z * x), 1 - 2 * (x * x + y * y)); } else { fi...
/** * Returns the angles in radians around the x, y and z axes that correspond to the rotation represented by this quaternion. * * @return The angle in radians for each axis, stored in a vector, in the corresponding component */
Returns the angles in radians around the x, y and z axes that correspond to the rotation represented by this quaternion
getAxesAnglesRad
{ "repo_name": "DragonSphereZ/DragonSphereZ", "path": "src/com/flowpowered/math/imaginary/Quaternionf.java", "license": "mit", "size": 29581 }
[ "com.flowpowered.math.TrigMath", "com.flowpowered.math.vector.Vector3f" ]
import com.flowpowered.math.TrigMath; import com.flowpowered.math.vector.Vector3f;
import com.flowpowered.math.*; import com.flowpowered.math.vector.*;
[ "com.flowpowered.math" ]
com.flowpowered.math;
1,286,033
public static class Reflective { public static Class classOf(Object obj) { return obj.getClass(); } /** * Returns the Class object representing the class or interface * that declares the field represented by the given Field object.
static class Reflective { public static Class function(Object obj) { return obj.getClass(); } /** * Returns the Class object representing the class or interface * that declares the field represented by the given Field object.
/** * Returns the runtime class of the given Object. * * @param obj the Object whose Class is returned * @return the Class object of given object */
Returns the runtime class of the given Object
classOf
{ "repo_name": "haitaoyao/btrace", "path": "src/share/classes/com/sun/btrace/BTraceUtils.java", "license": "gpl-2.0", "size": 234341 }
[ "java.lang.reflect.Field" ]
import java.lang.reflect.Field;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,733,999
public static SortedSet<Literal> literals(final Formula... formulas) { final SortedSet<Literal> literals = new TreeSet<>(); for (final Formula f : formulas) { literals.addAll(f.literals()); } return literals; }
static SortedSet<Literal> function(final Formula... formulas) { final SortedSet<Literal> literals = new TreeSet<>(); for (final Formula f : formulas) { literals.addAll(f.literals()); } return literals; }
/** * Returns all literals occurring in the given formulas. * @param formulas formulas * @return all literals occurring in the given formulas */
Returns all literals occurring in the given formulas
literals
{ "repo_name": "logic-ng/LogicNG", "path": "src/main/java/org/logicng/util/FormulaHelper.java", "license": "apache-2.0", "size": 10939 }
[ "java.util.SortedSet", "java.util.TreeSet", "org.logicng.formulas.Formula", "org.logicng.formulas.Literal" ]
import java.util.SortedSet; import java.util.TreeSet; import org.logicng.formulas.Formula; import org.logicng.formulas.Literal;
import java.util.*; import org.logicng.formulas.*;
[ "java.util", "org.logicng.formulas" ]
java.util; org.logicng.formulas;
2,887,896
@Nullable protected Integer top; @Nonnull public ReportRootManagedDeviceEnrollmentFailureDetailsParameterSetBuilder withTop(@Nullable final Integer val) { this.top = val; return this; }
Integer top; public ReportRootManagedDeviceEnrollmentFailureDetailsParameterSetBuilder function(@Nullable final Integer val) { this.top = val; return this; }
/** * Sets the Top * @param val the value to set it to * @return the current builder object */
Sets the Top
withTop
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/models/ReportRootManagedDeviceEnrollmentFailureDetailsParameterSet.java", "license": "mit", "size": 6083 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
206,086
public T caseIConstruct(IConstruct object) { return null; }
T function(IConstruct object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>IConstruct</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * * @param object * the target o...
Returns the result of interpreting the object as an instance of 'IConstruct'. This implementation returns null; returning a non-null result will terminate the switch.
caseIConstruct
{ "repo_name": "ObeoNetwork/M2Doc", "path": "plugins/org.obeonetwork.m2doc/src-gen/org/obeonetwork/m2doc/template/util/TemplateSwitch.java", "license": "epl-1.0", "size": 27479 }
[ "org.obeonetwork.m2doc.template.IConstruct" ]
import org.obeonetwork.m2doc.template.IConstruct;
import org.obeonetwork.m2doc.template.*;
[ "org.obeonetwork.m2doc" ]
org.obeonetwork.m2doc;
1,738,393
public void writeCandidatesToDatabase( Connection connection, CandidateDatabaseManager candidateDatabase) throws SQLException, IOException, IllegalFormatException { this.createTableMetaTable(connection); // build tables with the candidate data this.cr...
void function( Connection connection, CandidateDatabaseManager candidateDatabase) throws SQLException, IOException, IllegalFormatException { this.createTableMetaTable(connection); this.createExperimentMetadataTable( connection, candidateDatabase.getExperimentMetadata()); this.buildDesignTable(connection, candidateDatab...
/** * Write the given candidate database to the real database * @param connection * the connection to use * @param candidateDatabase * the candidates to write to DB * @throws SQLException * if we get an exception from JDBC * @throws IOException * ...
Write the given candidate database to the real database
writeCandidatesToDatabase
{ "repo_name": "cgd/pub-array", "path": "modules/pub-array-core/src/java/org/jax/pubarray/db/PersistenceManager.java", "license": "gpl-3.0", "size": 80927 }
[ "java.io.IOException", "java.sql.Connection", "java.sql.SQLException", "java.util.List", "java.util.Map", "org.jax.util.datastructure.SequenceUtilities", "org.jax.util.io.IllegalFormatException" ]
import java.io.IOException; import java.sql.Connection; import java.sql.SQLException; import java.util.List; import java.util.Map; import org.jax.util.datastructure.SequenceUtilities; import org.jax.util.io.IllegalFormatException;
import java.io.*; import java.sql.*; import java.util.*; import org.jax.util.datastructure.*; import org.jax.util.io.*;
[ "java.io", "java.sql", "java.util", "org.jax.util" ]
java.io; java.sql; java.util; org.jax.util;
2,215,030
private void sendParameterProc() { // send parameter. if (mCacheHvcPrm == null || !mCacheHvcPrm.equals(mHvcPrm)) { // no hit cache, send parameter. if (DEBUG) { Log.d(TAG, "mHvcBle.setParam()"); } int result = mHvcBle.setPa...
void function() { if (mCacheHvcPrm == null !mCacheHvcPrm.equals(mHvcPrm)) { if (DEBUG) { Log.d(TAG, STR); } int result = mHvcBle.setParam(mHvcPrm); if (result != HVC.HVC_NORMAL) { mListener.onSetParamError(result); } } else { sendDetectRequestProc(); } }
/** * send parameter(if cache hit, no send). */
send parameter(if cache hit, no send)
sendParameterProc
{ "repo_name": "ssdwa/android", "path": "dConnectDevicePlugin/dConnectDeviceHVC/src/org/deviceconnect/android/deviceplugin/hvc/comm/HvcCommManager.java", "license": "mit", "size": 19978 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,495,856
public ExternalTraversalEngine out(final BsonArray labels, final int branchFactor) { // Check Input element class checkInputElementClass(ChronoVertex.class); // Pipeline Update if (isPathEnabled) { // Get Sub-Path Map intermediate = (Map) stream.map(v -> { ChronoVertex cv = (ChronoVertex) v; r...
ExternalTraversalEngine function(final BsonArray labels, final int branchFactor) { checkInputElementClass(ChronoVertex.class); if (isPathEnabled) { Map intermediate = (Map) stream.map(v -> { ChronoVertex cv = (ChronoVertex) v; return new AbstractMap.SimpleImmutableEntry(cv, cv.getChronoVertexSet(Direction.OUT, labels, ...
/** * Add an OutPipe to the end of the Pipeline. Emit the adjacent outgoing * vertices of the incoming vertex. * * Path Enabled -> Greedy, * * Path Disabled -> Lazy * * Pipeline: Stream<CachedChronoVertex> -> Stream<CachedChronoVertex> * * Path: Map<CachedChronoVertex, Set<CachedChronoVertex>> * ...
Add an OutPipe to the end of the Pipeline. Emit the adjacent outgoing vertices of the incoming vertex. Path Enabled -> Greedy, Path Disabled -> Lazy Pipeline: Stream -> Stream Path: Map<CachedChronoVertex, Set>
out
{ "repo_name": "JaewookByun/epcis", "path": "otg/src/main/java/org/oliot/khronos/persistent/engine/ExternalTraversalEngine.java", "license": "apache-2.0", "size": 79867 }
[ "com.tinkerpop.blueprints.Direction", "java.util.AbstractMap", "java.util.Map", "java.util.stream.Collectors", "org.bson.BsonArray", "org.oliot.khronos.common.Step", "org.oliot.khronos.persistent.ChronoVertex" ]
import com.tinkerpop.blueprints.Direction; import java.util.AbstractMap; import java.util.Map; import java.util.stream.Collectors; import org.bson.BsonArray; import org.oliot.khronos.common.Step; import org.oliot.khronos.persistent.ChronoVertex;
import com.tinkerpop.blueprints.*; import java.util.*; import java.util.stream.*; import org.bson.*; import org.oliot.khronos.common.*; import org.oliot.khronos.persistent.*;
[ "com.tinkerpop.blueprints", "java.util", "org.bson", "org.oliot.khronos" ]
com.tinkerpop.blueprints; java.util; org.bson; org.oliot.khronos;
1,786,006
public static IAST Log(final IExpr z, final IExpr base) { return new AST2(Log, z, base); }
static IAST function(final IExpr z, final IExpr base) { return new AST2(Log, z, base); }
/** * Returns the logarithm of <code>z</code> for the <code>base</code>. * * <p> * See: <a href= * "https://raw.githubusercontent.com/axkr/symja_android_library/master/symja_android_library/doc/functions/Log.md">Log</a> * * @param z * @return */
Returns the logarithm of <code>z</code> for the <code>base</code>. See: Log
Log
{ "repo_name": "axkr/symja_android_library", "path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java", "license": "gpl-3.0", "size": 283472 }
[ "org.matheclipse.core.interfaces.IExpr" ]
import org.matheclipse.core.interfaces.IExpr;
import org.matheclipse.core.interfaces.*;
[ "org.matheclipse.core" ]
org.matheclipse.core;
140,840
public LinkedServiceReference withParameters(Map<String, Object> parameters) { this.parameters = parameters; return this; }
LinkedServiceReference function(Map<String, Object> parameters) { this.parameters = parameters; return this; }
/** * Set arguments for LinkedService. * * @param parameters the parameters value to set * @return the LinkedServiceReference object itself. */
Set arguments for LinkedService
withParameters
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/datafactory/mgmt-v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/LinkedServiceReference.java", "license": "mit", "size": 2537 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,271,217
protected FileInfo buildExpectedStructure() throws FileSystemException { // Build the expected structure final FileInfo base = new FileInfo(getReadFolder().getName().getBaseName(), FileType.FOLDER); base.addFile("file1.txt", FILE1_CONTENT); // file%.txt - test out encoding ...
FileInfo function() throws FileSystemException { final FileInfo base = new FileInfo(getReadFolder().getName().getBaseName(), FileType.FOLDER); base.addFile(STR, FILE1_CONTENT); base.addFile(STR, FILE1_CONTENT); base.addFile(STR, FILE1_CONTENT); base.addFile(STR, STRemptydirSTRdir1"); dir.addFile(STR, TEST_FILE_CONTENT)...
/** * Builds the expected structure of the read tests folder. * @throws FileSystemException (possibly) */
Builds the expected structure of the read tests folder
buildExpectedStructure
{ "repo_name": "easel/commons-vfs", "path": "core/src/test/java/org/apache/commons/vfs2/test/AbstractProviderTestCase.java", "license": "apache-2.0", "size": 12979 }
[ "org.apache.commons.vfs2.FileSystemException", "org.apache.commons.vfs2.FileType" ]
import org.apache.commons.vfs2.FileSystemException; import org.apache.commons.vfs2.FileType;
import org.apache.commons.vfs2.*;
[ "org.apache.commons" ]
org.apache.commons;
2,634,075
private void pickerActualizedPerformed() { Log.d("P", "element actualized"); OnPickerEventListener[] aux = listeners.toArray(new OnPickerEventListener[listeners.size()]); for(int i = 0; i < aux.length; i++) aux[i].onActualize(this.getIndex()); }
void function() { Log.d("P", STR); OnPickerEventListener[] aux = listeners.toArray(new OnPickerEventListener[listeners.size()]); for(int i = 0; i < aux.length; i++) aux[i].onActualize(this.getIndex()); }
/** * Fires onActualize method on all listeners. */
Fires onActualize method on all listeners
pickerActualizedPerformed
{ "repo_name": "GuillermoBlasco/AndViewUtil", "path": "src/com/andviewutil/picker/Picker.java", "license": "gpl-3.0", "size": 9754 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,235,628
@Nonnull public IosVppEBookRequest expand(@Nonnull final String value) { addExpandOption(value); return this; }
IosVppEBookRequest function(@Nonnull final String value) { addExpandOption(value); return this; }
/** * Sets the expand clause for the request * * @param value the expand clause * @return the updated request */
Sets the expand clause for the request
expand
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/IosVppEBookRequest.java", "license": "mit", "size": 5776 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
292,638
@SuppressWarnings("unchecked") private void setList() { ArrayList<ControlledVoc> oldList; if(projectTypesList!=null) { oldList = (ArrayList<ControlledVoc>) projectTypesList.clone(); } else { oldList = null; } TridasDictionaryItemSelectDialog dialog = new TridasDictionaryItemSelectDialog(dictio...
@SuppressWarnings(STR) void function() { ArrayList<ControlledVoc> oldList; if(projectTypesList!=null) { oldList = (ArrayList<ControlledVoc>) projectTypesList.clone(); } else { oldList = null; } TridasDictionaryItemSelectDialog dialog = new TridasDictionaryItemSelectDialog(dictionary, allowMultiple, label, oldList); dia...
/** * Pop up a dialog and select a new list */
Pop up a dialog and select a new list
setList
{ "repo_name": "petebrew/tellervo", "path": "src/main/java/org/tellervo/desktop/tridasv2/ui/TridasDictionaryItemSelectEditor.java", "license": "gpl-3.0", "size": 4362 }
[ "java.util.ArrayList", "org.tridas.schema.ControlledVoc" ]
import java.util.ArrayList; import org.tridas.schema.ControlledVoc;
import java.util.*; import org.tridas.schema.*;
[ "java.util", "org.tridas.schema" ]
java.util; org.tridas.schema;
2,785,202
public void transmitToTablePlayers (int tableNum, ITransmittable transObject) { if (transObject instanceof CommTableMessage) ((CommTableMessage)transObject).setTableNum (tableNum); Table table = tableList.getTable(tableNum); if (table != null) { Vector players = table.getPlayerList().getPlayers(); ...
void function (int tableNum, ITransmittable transObject) { if (transObject instanceof CommTableMessage) ((CommTableMessage)transObject).setTableNum (tableNum); Table table = tableList.getTable(tableNum); if (table != null) { Vector players = table.getPlayerList().getPlayers(); for (int i = 0; i < players.size(); i++) {...
/** * Transmit a message to the specified table. * * @param tableNum * @param transObject */
Transmit a message to the specified table
transmitToTablePlayers
{ "repo_name": "lsilvestre/Jogre", "path": "server/src/org/jogre/server/ServerConnectionThread.java", "license": "gpl-2.0", "size": 14329 }
[ "java.util.Vector", "org.jogre.common.Player", "org.jogre.common.Table", "org.jogre.common.comm.CommTableMessage", "org.jogre.common.comm.ITransmittable" ]
import java.util.Vector; import org.jogre.common.Player; import org.jogre.common.Table; import org.jogre.common.comm.CommTableMessage; import org.jogre.common.comm.ITransmittable;
import java.util.*; import org.jogre.common.*; import org.jogre.common.comm.*;
[ "java.util", "org.jogre.common" ]
java.util; org.jogre.common;
1,767,070
public void deserialize(TBase base, byte[] bytes) throws TException { base.read( protocolFactory_.getProtocol( new TIOStreamTransport( new ByteArrayInputStream(bytes)))); }
void function(TBase base, byte[] bytes) throws TException { base.read( protocolFactory_.getProtocol( new TIOStreamTransport( new ByteArrayInputStream(bytes)))); }
/** * Deserialize the Thrift object from a byte array. * * @param base The object to read into * @param bytes The array to read from */
Deserialize the Thrift object from a byte array
deserialize
{ "repo_name": "jcgruenhage/dendrite", "path": "vendor/src/github.com/apache/thrift/lib/javame/src/org/apache/thrift/TDeserializer.java", "license": "apache-2.0", "size": 2944 }
[ "java.io.ByteArrayInputStream", "org.apache.thrift.transport.TIOStreamTransport" ]
import java.io.ByteArrayInputStream; import org.apache.thrift.transport.TIOStreamTransport;
import java.io.*; import org.apache.thrift.transport.*;
[ "java.io", "org.apache.thrift" ]
java.io; org.apache.thrift;
2,875,626
public void setLinkBean(CmsLinkBean link) { if (link == null) { link = new CmsLinkBean("", true); } m_textbox.setFormValueAsString(link.getLink()); setInternal(link.isInternal()); }
void function(CmsLinkBean link) { if (link == null) { link = new CmsLinkBean("", true); } m_textbox.setFormValueAsString(link.getLink()); setInternal(link.isInternal()); }
/** * Sets the link from a bean.<p> * * @param link the link bean */
Sets the link from a bean
setLinkBean
{ "repo_name": "serrapos/opencms-core", "path": "src-gwt/org/opencms/gwt/client/ui/input/CmsLinkSelector.java", "license": "lgpl-2.1", "size": 11672 }
[ "org.opencms.gwt.shared.CmsLinkBean" ]
import org.opencms.gwt.shared.CmsLinkBean;
import org.opencms.gwt.shared.*;
[ "org.opencms.gwt" ]
org.opencms.gwt;
948,922
private Path toPrimary(Path path) { return convertPath(path, getUri()); }
Path function(Path path) { return convertPath(path, getUri()); }
/** * Convert the given path to path acceptable by the primary file system. * * @param path Path. * @return Primary file system path. */
Convert the given path to path acceptable by the primary file system
toPrimary
{ "repo_name": "agura/incubator-ignite", "path": "modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v2/IgniteHadoopFileSystem.java", "license": "apache-2.0", "size": 37436 }
[ "org.apache.hadoop.fs.Path" ]
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,197,441
@Nullable @StarlarkConfigurationField( name = "dead_code_report", doc = "The label of the dead code report generated by ProGuard for dead code elimination, " + "or <code>None</code> if no such report was requested.", defaultLabel = "") public Label deadCodeReport() { ...
@StarlarkConfigurationField( name = STR, doc = STR + STR, defaultLabel = "") Label function() { return deadCodeReport; }
/** * Returns the label of the dead code report generated by ProGuard for J2ObjC to eliminate dead * code. The dead Java code in the report will not be translated to Objective-C code. * * <p>Returns null if no such report was requested. */
Returns the label of the dead code report generated by ProGuard for J2ObjC to eliminate dead code. The dead Java code in the report will not be translated to Objective-C code. Returns null if no such report was requested
deadCodeReport
{ "repo_name": "davidzchen/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/objc/J2ObjcConfiguration.java", "license": "apache-2.0", "size": 6975 }
[ "com.google.devtools.build.lib.analysis.starlark.annotations.StarlarkConfigurationField", "com.google.devtools.build.lib.cmdline.Label" ]
import com.google.devtools.build.lib.analysis.starlark.annotations.StarlarkConfigurationField; import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.analysis.starlark.annotations.*; import com.google.devtools.build.lib.cmdline.*;
[ "com.google.devtools" ]
com.google.devtools;
832,503
public User create(User user) { JsonUser jsonUser = new JsonUser(user); JsonNode node = getClient().post(Routes.USER_CREATE, toJsonNode(jsonUser)); return getMapper().convertValue(node, User.class); }
User function(User user) { JsonUser jsonUser = new JsonUser(user); JsonNode node = getClient().post(Routes.USER_CREATE, toJsonNode(jsonUser)); return getMapper().convertValue(node, User.class); }
/** * Create a new user * * @param user * @return */
Create a new user
create
{ "repo_name": "raptorbox/raptor", "path": "raptor-sdk/src/main/java/org/createnet/raptor/sdk/admin/UserClient.java", "license": "apache-2.0", "size": 10253 }
[ "com.fasterxml.jackson.databind.JsonNode", "org.createnet.raptor.models.auth.User", "org.createnet.raptor.sdk.Routes" ]
import com.fasterxml.jackson.databind.JsonNode; import org.createnet.raptor.models.auth.User; import org.createnet.raptor.sdk.Routes;
import com.fasterxml.jackson.databind.*; import org.createnet.raptor.models.auth.*; import org.createnet.raptor.sdk.*;
[ "com.fasterxml.jackson", "org.createnet.raptor" ]
com.fasterxml.jackson; org.createnet.raptor;
1,969,592
public void set(Configuration conf, float value) { conf.setFloat(getKey(), value); }
void function(Configuration conf, float value) { conf.setFloat(getKey(), value); }
/** * Set value * @param conf Configuration * @param value to set */
Set value
set
{ "repo_name": "zfighter/giraph-research", "path": "giraph-core/target/munged/munged/main/org/apache/giraph/conf/FloatConfOption.java", "license": "apache-2.0", "size": 2183 }
[ "org.apache.hadoop.conf.Configuration" ]
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
616,964
public void resetWidthAndHeight(Node node) { // TODO: Also reset shape DataMap nodeMap = descriptor2Map.get(GraphMLmaps.NODE_SIZE); if (nodeMap == null) { log.severe("Could not find original node sizes."); return; } String splitBy = Pattern.quote("|"); //for (Node nod...
void function(Node node) { DataMap nodeMap = descriptor2Map.get(GraphMLmaps.NODE_SIZE); if (nodeMap == null) { log.severe(STR); return; } String splitBy = Pattern.quote(" "); Object pos = nodeMap.get(node); if (pos==null) { return; } String[] WH = pos.toString().split(splitBy); graph.getRealizer(node).setWidth(Integer....
/** * Resets the node width and height to the values given * in the original KGML. * @param node */
Resets the node width and height to the values given in the original KGML
resetWidthAndHeight
{ "repo_name": "cogsys-tuebingen/KEGGtranslator", "path": "src/de/zbit/util/TranslatorTools.java", "license": "lgpl-3.0", "size": 23696 }
[ "de.zbit.graph.io.def.GraphMLmaps", "java.util.Map", "java.util.regex.Pattern" ]
import de.zbit.graph.io.def.GraphMLmaps; import java.util.Map; import java.util.regex.Pattern;
import de.zbit.graph.io.def.*; import java.util.*; import java.util.regex.*;
[ "de.zbit.graph", "java.util" ]
de.zbit.graph; java.util;
90,201
public interface OnItemScrollListener { public void onItemScroll( int _location, List<Bitmap> _bitmaps ); }
interface OnItemScrollListener { public void function( int _location, List<Bitmap> _bitmaps ); }
/** * Item<strong>s</strong>'re moving. * <p> * It could be < 0, because the view show the last item and begin to show the first one automatically(swipable==false). * <p> * Please check before handling event. * * @param _location * the ...
Items're moving. It could be < 0, because the view show the last item and begin to show the first one automatically(swipable==false). Please check before handling event
onItemScroll
{ "repo_name": "XinyueZ/SlidingGallery", "path": "src/de/cellular/lib/lightlib/ui/view/gallery/LLSlideView.java", "license": "apache-2.0", "size": 26077 }
[ "android.graphics.Bitmap", "java.util.List" ]
import android.graphics.Bitmap; import java.util.List;
import android.graphics.*; import java.util.*;
[ "android.graphics", "java.util" ]
android.graphics; java.util;
2,024,478
private void initializeChatContext(RemoteServerContext communication) { assert (communication != null); try { chatContext = communication.getTableChatContext(new AsynchronousChatListener(displayExecutor, gameWindow .getUserInputComposite()), gameWindow.getDetailedTable().getId()); } catch (RemoteE...
void function(RemoteServerContext communication) { assert (communication != null); try { chatContext = communication.getTableChatContext(new AsynchronousChatListener(displayExecutor, gameWindow .getUserInputComposite()), gameWindow.getDetailedTable().getId()); } catch (RemoteException e) { throw new IllegalStateExcepti...
/** * Retrieves a {@link RemoteChatContext} from the server. * * @param communication The {@link RemoteServerContext} to as k for the chat * context */
Retrieves a <code>RemoteChatContext</code> from the server
initializeChatContext
{ "repo_name": "BeyondTheBoundary/cspoker", "path": "client/gui/swt/src/main/java/org/cspoker/client/gui/swt/control/UserSeatedPlayer.java", "license": "gpl-2.0", "size": 7553 }
[ "java.rmi.RemoteException", "org.cspoker.common.api.chat.listener.AsynchronousChatListener", "org.cspoker.common.api.shared.context.RemoteServerContext", "org.cspoker.common.api.shared.exception.IllegalActionException" ]
import java.rmi.RemoteException; import org.cspoker.common.api.chat.listener.AsynchronousChatListener; import org.cspoker.common.api.shared.context.RemoteServerContext; import org.cspoker.common.api.shared.exception.IllegalActionException;
import java.rmi.*; import org.cspoker.common.api.chat.listener.*; import org.cspoker.common.api.shared.context.*; import org.cspoker.common.api.shared.exception.*;
[ "java.rmi", "org.cspoker.common" ]
java.rmi; org.cspoker.common;
934,912
protected boolean isValidFragment(String fragmentName) { return PreferenceFragment.class.getName().equals(fragmentName) || UploadPreferenceFragment.class.getName().equals(fragmentName) || RecordingPreferenceFragment.class.getName().equals(fragmentName) || Gene...
boolean function(String fragmentName) { return PreferenceFragment.class.getName().equals(fragmentName) UploadPreferenceFragment.class.getName().equals(fragmentName) RecordingPreferenceFragment.class.getName().equals(fragmentName) GeneralPreferenceFragment.class.getName().equals(fragmentName) DataSyncPreferenceFragment....
/** * This method stops fragment injection in malicious applications. * Make sure to deny any unknown fragments here. */
This method stops fragment injection in malicious applications. Make sure to deny any unknown fragments here
isValidFragment
{ "repo_name": "scaidermern/TrackMe", "path": "app/src/main/java/cernunnos/trackme/SettingsActivity.java", "license": "gpl-3.0", "size": 14442 }
[ "android.preference.PreferenceFragment" ]
import android.preference.PreferenceFragment;
import android.preference.*;
[ "android.preference" ]
android.preference;
247,835
public static Map<TypeParameter, Type> mapTypeArgument(final Tree.BinaryOperatorExpression expr, final String methodName, final String rightTpName, final String leftTpName) { Function md = (Function)expr.getLeftTerm().getTypeModel().getDeclaration().getMember(methodName, null, false); if...
static Map<TypeParameter, Type> function(final Tree.BinaryOperatorExpression expr, final String methodName, final String rightTpName, final String leftTpName) { Function md = (Function)expr.getLeftTerm().getTypeModel().getDeclaration().getMember(methodName, null, false); if (md == null) { expr.addUnexpectedError(STR + ...
/** Generates the right type arguments for operators that are sugar for method calls. * @param methodName The name of the method that is to be invoked * @param rightTpName The name of the type argument on the right term * @param leftTpName The name of the type parameter on the method * @return A map...
Generates the right type arguments for operators that are sugar for method calls
mapTypeArgument
{ "repo_name": "ceylon/ceylon", "path": "compiler-js/src/main/java/org/eclipse/ceylon/compiler/js/util/TypeUtils.java", "license": "apache-2.0", "size": 74218 }
[ "java.util.HashMap", "java.util.Map", "org.eclipse.ceylon.common.Backend", "org.eclipse.ceylon.compiler.typechecker.tree.Tree", "org.eclipse.ceylon.model.typechecker.model.Function", "org.eclipse.ceylon.model.typechecker.model.Type", "org.eclipse.ceylon.model.typechecker.model.TypeParameter" ]
import java.util.HashMap; import java.util.Map; import org.eclipse.ceylon.common.Backend; import org.eclipse.ceylon.compiler.typechecker.tree.Tree; import org.eclipse.ceylon.model.typechecker.model.Function; import org.eclipse.ceylon.model.typechecker.model.Type; import org.eclipse.ceylon.model.typechecker.model.TypePa...
import java.util.*; import org.eclipse.ceylon.common.*; import org.eclipse.ceylon.compiler.typechecker.tree.*; import org.eclipse.ceylon.model.typechecker.model.*;
[ "java.util", "org.eclipse.ceylon" ]
java.util; org.eclipse.ceylon;
218,632
new ChatClient(); } public ChatClient() { getClientUserName(); String serverLocation = JOptionPane.showInputDialog(null, "Enter the address or name of the server you'd like to connect to.\n" + "Leave blank to connect to localhost.", "Enter Server", JOptionPane.QUESTION_MESSAGE); i...
new ChatClient(); } public ChatClient() { getClientUserName(); String serverLocation = JOptionPane.showInputDialog(null, STR + STR, STR, JOptionPane.QUESTION_MESSAGE); if (serverLocation.equals(STRlocalhostSTRUser name already in use.\nSTRUser Name In UseSTRChat Client for: STRSuccessfully connected as STR to chat serv...
/** * The main driver of the chat client. * @param args String[] */
The main driver of the chat client
main
{ "repo_name": "sweetnhappy/multi-chat", "path": "src/hmw/ChatClient.java", "license": "mit", "size": 9589 }
[ "javax.swing.JOptionPane" ]
import javax.swing.JOptionPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
684,576
@Override public Size2D arrange(Graphics2D g2, RectangleConstraint constraint) { RectangleConstraint cc = toContentConstraint(constraint); LengthConstraintType w = cc.getWidthConstraintType(); LengthConstraintType h = cc.getHeightConstraintType(); Size2D contentSize = null; ...
Size2D function(Graphics2D g2, RectangleConstraint constraint) { RectangleConstraint cc = toContentConstraint(constraint); LengthConstraintType w = cc.getWidthConstraintType(); LengthConstraintType h = cc.getHeightConstraintType(); Size2D contentSize = null; if (w == LengthConstraintType.NONE) { if (h == LengthConstrai...
/** * Arranges the contents of the block, within the given constraints, and * returns the block size. * * @param g2 the graphics device. * @param constraint the constraint ({@code null} not permitted). * * @return The block size (in Java2D units, never {@code null}). */
Arranges the contents of the block, within the given constraints, and returns the block size
arrange
{ "repo_name": "jfree/jfreechart", "path": "src/main/java/org/jfree/chart/legend/PaintScaleLegend.java", "license": "lgpl-2.1", "size": 25636 }
[ "java.awt.Graphics2D", "org.jfree.chart.block.LengthConstraintType", "org.jfree.chart.block.RectangleConstraint", "org.jfree.chart.block.Size2D" ]
import java.awt.Graphics2D; import org.jfree.chart.block.LengthConstraintType; import org.jfree.chart.block.RectangleConstraint; import org.jfree.chart.block.Size2D;
import java.awt.*; import org.jfree.chart.block.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
1,257,091
private DFSPacket createHeartbeatPacket() throws InterruptedIOException { final byte[] buf = new byte[PacketHeader.PKT_MAX_HEADER_LEN]; return new DFSPacket(buf, 0, 0, DFSPacket.HEART_BEAT_SEQNO, 0, false); }
DFSPacket function() throws InterruptedIOException { final byte[] buf = new byte[PacketHeader.PKT_MAX_HEADER_LEN]; return new DFSPacket(buf, 0, 0, DFSPacket.HEART_BEAT_SEQNO, 0, false); }
/** * For heartbeat packets, create buffer directly by new byte[] * since heartbeats should not be blocked. */
For heartbeat packets, create buffer directly by new byte[] since heartbeats should not be blocked
createHeartbeatPacket
{ "repo_name": "jth/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java", "license": "apache-2.0", "size": 64924 }
[ "java.io.InterruptedIOException", "org.apache.hadoop.hdfs.protocol.datatransfer.PacketHeader" ]
import java.io.InterruptedIOException; import org.apache.hadoop.hdfs.protocol.datatransfer.PacketHeader;
import java.io.*; import org.apache.hadoop.hdfs.protocol.datatransfer.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,720,402
public boolean hasSameValue(Constant otherConstant) { if (this == otherConstant) return true; int typeID; if ((typeID = typeID()) != otherConstant.typeID()) return false; switch (typeID) { case TypeIds.T_boolean: return booleanValue() == otherConstant.booleanValue(); case TypeIds.T_byte: ...
boolean function(Constant otherConstant) { if (this == otherConstant) return true; int typeID; if ((typeID = typeID()) != otherConstant.typeID()) return false; switch (typeID) { case TypeIds.T_boolean: return booleanValue() == otherConstant.booleanValue(); case TypeIds.T_byte: return byteValue() == otherConstant.byteVa...
/** * Returns true if both constants have the same type and the same actual value * @param otherConstant */
Returns true if both constants have the same type and the same actual value
hasSameValue
{ "repo_name": "elucash/eclipse-oxygen", "path": "org.eclipse.jdt.core/src/org/eclipse/jdt/internal/compiler/impl/Constant.java", "license": "epl-1.0", "size": 88087 }
[ "org.eclipse.jdt.internal.compiler.lookup.TypeIds" ]
import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
import org.eclipse.jdt.internal.compiler.lookup.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
612,260
public String runJobUsingDescription ( ServiceInstance serviceInstance, String description ) { String jobResult = "Did not find matching job: " + description; if ( description.equals( "Log Rotation" ) ) { jobResult = "Log Rotation: " + csapApplication.getOsManager().getLogRoller().rotate( serviceInstance ); ...
String function ( ServiceInstance serviceInstance, String description ) { String jobResult = STR + description; if ( description.equals( STR ) ) { jobResult = STR + csapApplication.getOsManager().getLogRoller().rotate( serviceInstance ); } else { Optional<ServiceBaseParser.ServiceJob> matchedJob = serviceInstance.getJo...
/** * * Manually triggering a job from UI * */
Manually triggering a job from UI
runJobUsingDescription
{ "repo_name": "peterdnight/csap-core", "path": "csap-core-service/src/main/java/org/csap/agent/linux/ServiceJobRunner.java", "license": "mit", "size": 8438 }
[ "java.util.HashMap", "java.util.Optional", "org.csap.agent.model.ServiceBaseParser", "org.csap.agent.model.ServiceInstance" ]
import java.util.HashMap; import java.util.Optional; import org.csap.agent.model.ServiceBaseParser; import org.csap.agent.model.ServiceInstance;
import java.util.*; import org.csap.agent.model.*;
[ "java.util", "org.csap.agent" ]
java.util; org.csap.agent;
1,531,401
public static byte[] downloadGravatar(final String email, int size) throws EnMeGenericException { InputStream stream = null; try { URL url = new URL(getUrl(email, size)); stream = url.openStream(); return IOUtils.toByteArray(stream); } catch (F...
static byte[] function(final String email, int size) throws EnMeGenericException { InputStream stream = null; try { URL url = new URL(getUrl(email, size)); stream = url.openStream(); return IOUtils.toByteArray(stream); } catch (FileNotFoundException e) { return null; } catch (Exception e) { throw new EnMeGenericExcepti...
/** * Download the generated gravatar image. * * @param email * @return * @throws EnMeGenericException */
Download the generated gravatar image
downloadGravatar
{ "repo_name": "cristiani/encuestame", "path": "enme-utils/src/main/java/org/encuestame/utils/PictureUtils.java", "license": "apache-2.0", "size": 4799 }
[ "java.io.FileNotFoundException", "java.io.InputStream", "org.apache.commons.io.IOUtils", "org.encuestame.utils.exception.EnMeGenericException" ]
import java.io.FileNotFoundException; import java.io.InputStream; import org.apache.commons.io.IOUtils; import org.encuestame.utils.exception.EnMeGenericException;
import java.io.*; import org.apache.commons.io.*; import org.encuestame.utils.exception.*;
[ "java.io", "org.apache.commons", "org.encuestame.utils" ]
java.io; org.apache.commons; org.encuestame.utils;
1,037,383
void manageRequestTimeout(HttpRequestContext context);
void manageRequestTimeout(HttpRequestContext context);
/** * Manage the timeout for the provided context. * * @param context The request context to monitor. Timeout value is extracted from {@link * com.biasedbit.hotpotato.client.HttpRequestContext#getTimeout()}. */
Manage the timeout for the provided context
manageRequestTimeout
{ "repo_name": "jasondevj/hotpotato", "path": "src/main/java/com/biasedbit/hotpotato/client/timeout/TimeoutManager.java", "license": "apache-2.0", "size": 1232 }
[ "com.biasedbit.hotpotato.client.HttpRequestContext" ]
import com.biasedbit.hotpotato.client.HttpRequestContext;
import com.biasedbit.hotpotato.client.*;
[ "com.biasedbit.hotpotato" ]
com.biasedbit.hotpotato;
2,865,415
private ArrayList<Tuple> loadTuple() { ArrayList<Tuple> idArray = new ArrayList<Tuple>(); try { FileInputStream fileInputStream = context.openFileInput(SAVE_FILE); InputStreamReader inputStreamReader = new InputStreamReader( fileInputStream); Type listType = new TypeToken<ArrayList<Tuple>>() { ...
ArrayList<Tuple> function() { ArrayList<Tuple> idArray = new ArrayList<Tuple>(); try { FileInputStream fileInputStream = context.openFileInput(SAVE_FILE); InputStreamReader inputStreamReader = new InputStreamReader( fileInputStream); Type listType = new TypeToken<ArrayList<Tuple>>() { }.getType(); GsonBuilder builder =...
/** * Retrieves an array of tuples from the local drive * * @return A list of tuples, each containing (questionID, answerID, comment Object) */
Retrieves an array of tuples from the local drive
loadTuple
{ "repo_name": "CMPUT301F14T03/lotsofcodingkitty", "path": "cmput301t03app/src/ca/ualberta/cs/cmput301t03app/datamanagers/LocalDataManager.java", "license": "apache-2.0", "size": 12464 }
[ "ca.ualberta.cs.cmput301t03app.models.Tuple", "com.google.gson.Gson", "com.google.gson.GsonBuilder", "com.google.gson.reflect.TypeToken", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStreamReader", "java.lang.reflect.Type", "java.util.ArrayList" ]
import ca.ualberta.cs.cmput301t03app.models.Tuple; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.lang.reflect.Type; import java.util.ArrayList;
import ca.ualberta.cs.cmput301t03app.models.*; import com.google.gson.*; import com.google.gson.reflect.*; import java.io.*; import java.lang.reflect.*; import java.util.*;
[ "ca.ualberta.cs", "com.google.gson", "java.io", "java.lang", "java.util" ]
ca.ualberta.cs; com.google.gson; java.io; java.lang; java.util;
544,951
public void addAllTabsParent(int level) { checkLevel(level); HashSet<String> list = parentImport.get(level); if (list == null) { list = new HashSet<String>(); parentImport.put(level, list); } list.clear(); list.add("*"); }
void function(int level) { checkLevel(level); HashSet<String> list = parentImport.get(level); if (list == null) { list = new HashSet<String>(); parentImport.put(level, list); } list.clear(); list.add("*"); }
/** * Add all tabs of a 'parent' {@code CI} for data import. * * @param level * parent level, value must be > 0 */
Add all tabs of a 'parent' CI for data import
addAllTabsParent
{ "repo_name": "pezi/treedb-cmdb", "path": "src/main/java/at/treedb/at/treedb/ui/Import.java", "license": "lgpl-2.1", "size": 9399 }
[ "java.util.HashSet" ]
import java.util.HashSet;
import java.util.*;
[ "java.util" ]
java.util;
2,514,163
public static String toString(ToXContent toXContent, Params params) { try { XContentBuilder builder = XContentFactory.jsonBuilder(); if (params.paramAsBoolean("pretty", true)) { builder.prettyPrint(); } if (params.paramAsBoolean("human", true))...
static String function(ToXContent toXContent, Params params) { try { XContentBuilder builder = XContentFactory.jsonBuilder(); if (params.paramAsBoolean(STR, true)) { builder.prettyPrint(); } if (params.paramAsBoolean("human", true)) { builder.humanReadable(true); } builder.startObject(); toXContent.toXContent(builder, ...
/** * Writes serialized toXContent to pretty-printed JSON string. * * @param toXContent object to be pretty printed * @param params serialization parameters * @return pretty-printed JSON serialization */
Writes serialized toXContent to pretty-printed JSON string
toString
{ "repo_name": "Ansh90/elasticsearch", "path": "core/src/main/java/org/elasticsearch/common/xcontent/XContentHelper.java", "license": "apache-2.0", "size": 19869 }
[ "java.io.IOException", "org.elasticsearch.ElasticsearchException", "org.elasticsearch.common.xcontent.ToXContent" ]
import java.io.IOException; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.xcontent.ToXContent;
import java.io.*; import org.elasticsearch.*; import org.elasticsearch.common.xcontent.*;
[ "java.io", "org.elasticsearch", "org.elasticsearch.common" ]
java.io; org.elasticsearch; org.elasticsearch.common;
2,705,087
if (SWTUtil.getDisplay() == null && SWTUtil.getDisplay().isDisposed()) { BACKGROUND = null; return BACKGROUND; } try { BACKGROUND = new Color(SWTUtil.getDisplay(), new RGB(SWTUtil .getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND) .getRed() - 10, SWTUtil.getDisplay().getSystemColor( S...
if (SWTUtil.getDisplay() == null && SWTUtil.getDisplay().isDisposed()) { BACKGROUND = null; return BACKGROUND; } try { BACKGROUND = new Color(SWTUtil.getDisplay(), new RGB(SWTUtil .getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND) .getRed() - 10, SWTUtil.getDisplay().getSystemColor( SWT.COLOR_LIST_BACKGROUND).getG...
/** * Pull a BackgroundColor for a list for shading (rgb of listbackground - * 10) * * @return Color */
Pull a BackgroundColor for a list for shading (rgb of listbackground - 10)
getBackgroundColor
{ "repo_name": "dkarlinsky/azsmrc", "path": "plugin/src/main/java/lbms/azsmrc/plugin/gui/ColorUtilities.java", "license": "gpl-2.0", "size": 2071 }
[ "org.eclipse.swt.graphics.Color" ]
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,789,721
byte[] newStr = null; try { MessageDigest md5 = MessageDigest.getInstance("MD5"); Encoder base = Base64.getEncoder(); newStr = base.encode(md5.digest(str.getBytes("UTF-8"))); } catch (Exception e) { e.printStackTrace(); } return newStr.toString(); }
byte[] newStr = null; try { MessageDigest md5 = MessageDigest.getInstance("MD5"); Encoder base = Base64.getEncoder(); newStr = base.encode(md5.digest(str.getBytes("UTF-8"))); } catch (Exception e) { e.printStackTrace(); } return newStr.toString(); }
/** * encrypt string with MD5 * @param str: the string needs to be encrypted * @return String: encrypted string * @throws */
encrypt string with MD5
md5Encryption
{ "repo_name": "gavinfish/Assaic", "path": "src/com/cineplex/util/Util.java", "license": "apache-2.0", "size": 1008 }
[ "java.security.MessageDigest", "java.util.Base64" ]
import java.security.MessageDigest; import java.util.Base64;
import java.security.*; import java.util.*;
[ "java.security", "java.util" ]
java.security; java.util;
1,867,387
private void addToPinnedInodes(Long inode) { LOG.debug("addToPinnedInodes: inode={}", inode); synchronized (mPinnedInodes) { mPinnedInodes.add(Preconditions.checkNotNull(inode)); } }
void function(Long inode) { LOG.debug(STR, inode); synchronized (mPinnedInodes) { mPinnedInodes.add(Preconditions.checkNotNull(inode)); } }
/** * Add a single inode to set of pinned ids. * * @param inode an inode that is pinned */
Add a single inode to set of pinned ids
addToPinnedInodes
{ "repo_name": "calvinjia/tachyon", "path": "core/server/worker/src/main/java/alluxio/worker/block/TieredBlockStore.java", "license": "apache-2.0", "size": 44802 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,377,956
public AttributeInfo copy(ConstPool newCp, Map<String, String> classnames) { int index = getConstPool().copy(getConstantValue(), newCp, classnames); return new ConstantAttribute(newCp, index); }
AttributeInfo function(ConstPool newCp, Map<String, String> classnames) { int index = getConstPool().copy(getConstantValue(), newCp, classnames); return new ConstantAttribute(newCp, index); }
/** * Makes a copy. Class names are replaced according to the * given <code>Map</code> object. * * @param newCp the constant pool table used by the new copy. * @param classnames pairs of replaced and substituted * class names. */
Makes a copy. Class names are replaced according to the given <code>Map</code> object
copy
{ "repo_name": "AndreJCL/JCL", "path": "JCL_Android/app/src/main/java/javassist/bytecode/ConstantAttribute.java", "license": "apache-2.0", "size": 2388 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
81,540
public void onComplete(Map<TopicPartition, OffsetAndMetadata> map, Exception e) { if (logger.isDebugEnabled()) { logger.debug("Commit offsets complete {} ", Joiner.on(';').withKeyValueSeparator("=").join(map)); } if (e != null) { logger.warn("Exceptions in committing offsets {} : {} ", ...
void function(Map<TopicPartition, OffsetAndMetadata> map, Exception e) { if (logger.isDebugEnabled()) { logger.debug(STR, Joiner.on(';').withKeyValueSeparator("=").join(map)); } if (e != null) { logger.warn(STR, Joiner.on(';').withKeyValueSeparator("=").join(map), e); } }
/** * * A callback from consumer after it commits the offset * @param map * @param e */
A callback from consumer after it commits the offset
onComplete
{ "repo_name": "chandnisingh/apex-malhar", "path": "kafka/src/main/java/org/apache/apex/malhar/kafka/AbstractKafkaInputOperator.java", "license": "apache-2.0", "size": 18240 }
[ "com.google.common.base.Joiner", "java.util.Map", "org.apache.kafka.clients.consumer.OffsetAndMetadata", "org.apache.kafka.common.TopicPartition" ]
import com.google.common.base.Joiner; import java.util.Map; import org.apache.kafka.clients.consumer.OffsetAndMetadata; import org.apache.kafka.common.TopicPartition;
import com.google.common.base.*; import java.util.*; import org.apache.kafka.clients.consumer.*; import org.apache.kafka.common.*;
[ "com.google.common", "java.util", "org.apache.kafka" ]
com.google.common; java.util; org.apache.kafka;
58,047
private boolean isCacheValid() { long now = Alarm.getCurrentTime(); if ((now - _lastTime < 100) && ! Alarm.isTest()) return true; long oldLastModified = _lastModified; long oldLength = _length; long newLastModified = _backing.getLastModified(); long newLength = _backing.getLengt...
boolean function() { long now = Alarm.getCurrentTime(); if ((now - _lastTime < 100) && ! Alarm.isTest()) return true; long oldLastModified = _lastModified; long oldLength = _length; long newLastModified = _backing.getLastModified(); long newLength = _backing.getLength(); _lastTime = now; if (newLastModified == oldLastM...
/** * Returns the last modified time for the path. * * @param path path into the jar. * * @return the last modified time of the jar in milliseconds. */
Returns the last modified time for the path
isCacheValid
{ "repo_name": "dlitz/resin", "path": "modules/kernel/src/com/caucho/vfs/Jar.java", "license": "gpl-2.0", "size": 22557 }
[ "com.caucho.util.Alarm" ]
import com.caucho.util.Alarm;
import com.caucho.util.*;
[ "com.caucho.util" ]
com.caucho.util;
2,129,518
@Test public void testNtlmBind() throws Exception { BogusNtlmProvider provider = getNtlmProviderUsingReflection(); NtlmSaslBindClient client = new NtlmSaslBindClient( SupportedSaslMechanisms.NTLM ); BindResponse type2response = client.bindType1( "type1_test".getBytes() ); as...
void function() throws Exception { BogusNtlmProvider provider = getNtlmProviderUsingReflection(); NtlmSaslBindClient client = new NtlmSaslBindClient( SupportedSaslMechanisms.NTLM ); BindResponse type2response = client.bindType1( STR.getBytes() ); assertEquals( 1, type2response.getMessageId() ); assertEquals( ResultCode...
/** * Tests that the plumbing for NTLM bind works. */
Tests that the plumbing for NTLM bind works
testNtlmBind
{ "repo_name": "drankye/directory-server", "path": "server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java", "license": "apache-2.0", "size": 33230 }
[ "org.apache.commons.lang.ArrayUtils", "org.apache.directory.api.ldap.model.constants.SupportedSaslMechanisms", "org.apache.directory.api.ldap.model.message.BindResponse", "org.apache.directory.api.ldap.model.message.ResultCodeEnum", "org.junit.Assert" ]
import org.apache.commons.lang.ArrayUtils; import org.apache.directory.api.ldap.model.constants.SupportedSaslMechanisms; import org.apache.directory.api.ldap.model.message.BindResponse; import org.apache.directory.api.ldap.model.message.ResultCodeEnum; import org.junit.Assert;
import org.apache.commons.lang.*; import org.apache.directory.api.ldap.model.constants.*; import org.apache.directory.api.ldap.model.message.*; import org.junit.*;
[ "org.apache.commons", "org.apache.directory", "org.junit" ]
org.apache.commons; org.apache.directory; org.junit;
17,574
private void setCurPatient(Patient patient){ if (patient == null) { form.setText(Messages.MessungenUebersicht_kein_Patient); } else { form.setText(patient.getLabel()); } // Tabs benachrichtigen for (MessungstypSeite mts : seiten) { mts.setCurPatient(patient); } }
void function(Patient patient){ if (patient == null) { form.setText(Messages.MessungenUebersicht_kein_Patient); } else { form.setText(patient.getLabel()); } for (MessungstypSeite mts : seiten) { mts.setCurPatient(patient); } }
/** * Aktuell ausgewaehlten Patient festlegen * * @param patient * Ausgewaehlter Patient oder null falls keiner ausgewaehlt ist. */
Aktuell ausgewaehlten Patient festlegen
setCurPatient
{ "repo_name": "DavidGutknecht/elexis-3-base", "path": "bundles/com.hilotec.elexis.messwerte.v2/src/com/hilotec/elexis/messwerte/v2/views/MessungenUebersichtV20.java", "license": "epl-1.0", "size": 15060 }
[ "ch.elexis.data.Patient" ]
import ch.elexis.data.Patient;
import ch.elexis.data.*;
[ "ch.elexis.data" ]
ch.elexis.data;
2,368,608
static List<CountsHashCodeAndEquals> createAdversarialObjects(int power, CallsCounter counter) { String str1 = "Aa"; String str2 = "BB"; assertEquals(str1.hashCode(), str2.hashCode()); List<String> haveSameHashes2 = Arrays.asList(str1, str2); List<CountsHashCodeAndEquals> result = Lists.ne...
static List<CountsHashCodeAndEquals> createAdversarialObjects(int power, CallsCounter counter) { String str1 = "Aa"; String str2 = "BB"; assertEquals(str1.hashCode(), str2.hashCode()); List<String> haveSameHashes2 = Arrays.asList(str1, str2); List<CountsHashCodeAndEquals> result = Lists.newArrayList( Lists.transform( L...
/** * Returns a list of objects with the same hash code, of size 2^power, counting calls to equals, * hashCode, and compareTo in counter. */
Returns a list of objects with the same hash code, of size 2^power, counting calls to equals, hashCode, and compareTo in counter
createAdversarialObjects
{ "repo_name": "EdwardLee03/guava", "path": "guava-tests/test/com/google/common/collect/ImmutableBiMapTest.java", "license": "apache-2.0", "size": 33833 }
[ "java.util.Arrays", "java.util.Collections", "java.util.List" ]
import java.util.Arrays; import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,698,141
FeatureTransaction ft = mapWidget.getMapModel().getFeatureEditor().getFeatureTransaction(); if (ft != null && index != null) { mapWidget.render(ft, RenderGroup.VECTOR, RenderStatus.DELETE); RemoveRingOp op = new RemoveRingOp(index); ft.execute(op); mapWidget.render(ft, RenderGroup.VECTOR, RenderStatus.A...
FeatureTransaction ft = mapWidget.getMapModel().getFeatureEditor().getFeatureTransaction(); if (ft != null && index != null) { mapWidget.render(ft, RenderGroup.VECTOR, RenderStatus.DELETE); RemoveRingOp op = new RemoveRingOp(index); ft.execute(op); mapWidget.render(ft, RenderGroup.VECTOR, RenderStatus.ALL); } }
/** * Remove an existing ring from a Polygon or MultiPolygon at a given index. * * @param event * The {@link MenuItemClickEvent} from clicking the action. */
Remove an existing ring from a Polygon or MultiPolygon at a given index
onClick
{ "repo_name": "lat-lon/geomajas", "path": "face/geomajas-face-gwt/client/src/main/java/org/geomajas/gwt/client/action/menu/RemoveRingAction.java", "license": "agpl-3.0", "size": 3248 }
[ "org.geomajas.gwt.client.map.feature.FeatureTransaction", "org.geomajas.gwt.client.map.feature.operation.RemoveRingOp", "org.geomajas.gwt.client.widget.MapWidget" ]
import org.geomajas.gwt.client.map.feature.FeatureTransaction; import org.geomajas.gwt.client.map.feature.operation.RemoveRingOp; import org.geomajas.gwt.client.widget.MapWidget;
import org.geomajas.gwt.client.map.feature.*; import org.geomajas.gwt.client.map.feature.operation.*; import org.geomajas.gwt.client.widget.*;
[ "org.geomajas.gwt" ]
org.geomajas.gwt;
612,117
deliveryList.clear(); Stream<DomsItem> items = null; switch (eventStatus) { case READYFORMANUALCHECK://Search for deliveries where all events is written, which is minimal on order to start manual checks items = getReadyForManual(deliveryFilter); break; ...
deliveryList.clear(); Stream<DomsItem> items = null; switch (eventStatus) { case READYFORMANUALCHECK: items = getReadyForManual(deliveryFilter); break; case DONEMANUALMINIMALCHECK: items = getDoneManualMinimal(deliveryFilter); break; case DONEMANUALCHECK: items = getDoneManual(deliveryFilter); break; case CREATEDONLY: ...
/** * Initiate the list of deliveries * * @param eventStatus * @param deliveryFilter */
Initiate the list of deliveries
initiateDeliveries
{ "repo_name": "statsbiblioteket/digital-pligtaflevering-aviser-tools", "path": "tools/dpa-manualcontrol/src/main/java/org/statsbiblioteket/digital_pligtaflevering_aviser/ui/datamodel/serializers/DeliveryFedoraCommunication.java", "license": "apache-2.0", "size": 14786 }
[ "dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.DomsItem", "java.util.stream.Stream" ]
import dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.DomsItem; import java.util.stream.Stream;
import dk.statsbiblioteket.digital_pligtaflevering_aviser.doms.*; import java.util.stream.*;
[ "dk.statsbiblioteket.digital_pligtaflevering_aviser", "java.util" ]
dk.statsbiblioteket.digital_pligtaflevering_aviser; java.util;
155,585
public String compile(String resourcePath, String coffeeScriptSource) { StopWatch stopWatch = new StopWatch("Compiling resource '"+resourcePath+"' with CoffeeScript"); stopWatch.start(); String result = null; try { result = (String) jsEngine.invokeMethod(coffeeScript, "compile", coffeeScriptSource, opti...
String function(String resourcePath, String coffeeScriptSource) { StopWatch stopWatch = new StopWatch(STR+resourcePath+STR); stopWatch.start(); String result = null; try { result = (String) jsEngine.invokeMethod(coffeeScript, STR, coffeeScriptSource, options); } catch (NoSuchMethodException ScriptException e) { throw n...
/** * Compile the CoffeeScript source to a JS source * * @param coffeeScriptSource * the CoffeeScript source * @return the JS source */
Compile the CoffeeScript source to a JS source
compile
{ "repo_name": "diorcety/jawr", "path": "jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/js/coffee/CoffeeScriptGenerator.java", "license": "apache-2.0", "size": 7000 }
[ "javax.script.ScriptException", "net.jawr.web.exception.BundlingProcessException", "net.jawr.web.util.StopWatch" ]
import javax.script.ScriptException; import net.jawr.web.exception.BundlingProcessException; import net.jawr.web.util.StopWatch;
import javax.script.*; import net.jawr.web.exception.*; import net.jawr.web.util.*;
[ "javax.script", "net.jawr.web" ]
javax.script; net.jawr.web;
2,243,017
void urlField_caretUpdate(CaretEvent e) { checkOkEnabled(); }
void urlField_caretUpdate(CaretEvent e) { checkOkEnabled(); }
/** * disable the ok button if urlField is empty */
disable the ok button if urlField is empty
urlField_caretUpdate
{ "repo_name": "cst316/spring16project-Team-Juneau", "path": "src/net/sf/memoranda/ui/AddResourceDialog.java", "license": "gpl-2.0", "size": 13031 }
[ "javax.swing.event.CaretEvent" ]
import javax.swing.event.CaretEvent;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
416,481
public static <T> LinkedBindingBuilder<T> bind(Binder binder, Class<T> type) { return bind(binder, TypeLiteral.get(type)); }
static <T> LinkedBindingBuilder<T> function(Binder binder, Class<T> type) { return bind(binder, TypeLiteral.get(type)); }
/** * Bind one implementation as the item using a unique annotation. * * @param binder a new binder created in the module. * @param type type of entry to store. * @return a binder to continue configuring the new item. */
Bind one implementation as the item using a unique annotation
bind
{ "repo_name": "Team-OctOS/host_gerrit", "path": "gerrit-extension-api/src/main/java/com/google/gerrit/extensions/registration/DynamicItem.java", "license": "apache-2.0", "size": 7923 }
[ "com.google.inject.Binder", "com.google.inject.TypeLiteral", "com.google.inject.binder.LinkedBindingBuilder" ]
import com.google.inject.Binder; import com.google.inject.TypeLiteral; import com.google.inject.binder.LinkedBindingBuilder;
import com.google.inject.*; import com.google.inject.binder.*;
[ "com.google.inject" ]
com.google.inject;
1,335,273
public void pollNode(ZWaveNode node) { for (ZWaveCommandClass zwaveCommandClass : node.getCommandClasses()) { logger.trace("NODE {}: Inspecting command class {}", node.getNodeId(), zwaveCommandClass.getCommandClass().getLabel()); if (zwaveCommandClass instanceof Z...
void function(ZWaveNode node) { for (ZWaveCommandClass zwaveCommandClass : node.getCommandClasses()) { logger.trace(STR, node.getNodeId(), zwaveCommandClass.getCommandClass().getLabel()); if (zwaveCommandClass instanceof ZWaveCommandClassDynamicState) { logger.debug(STR, node.getNodeId(), zwaveCommandClass.getCommandCl...
/** * Polls a node for any dynamic information * * @param node */
Polls a node for any dynamic information
pollNode
{ "repo_name": "paolodenti/openhab", "path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/ZWaveController.java", "license": "epl-1.0", "size": 67674 }
[ "java.util.Collection", "org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveCommandClass", "org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveCommandClassDynamicState", "org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveMultiInstanceCommandClass" ]
import java.util.Collection; import org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveCommandClass; import org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveCommandClassDynamicState; import org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveMultiInstanceCommandClass;
import java.util.*; import org.openhab.binding.zwave.internal.protocol.commandclass.*;
[ "java.util", "org.openhab.binding" ]
java.util; org.openhab.binding;
363,760
LogicalGraph execute(LogicalGraph firstGraph, LogicalGraph... otherGraphs);
LogicalGraph execute(LogicalGraph firstGraph, LogicalGraph... otherGraphs);
/** * Executes this operator. * * @param firstGraph first input graph * @param otherGraphs other input graphs * @return operator result */
Executes this operator
execute
{ "repo_name": "rostam/gradoop", "path": "gradoop-flink/src/main/java/org/gradoop/flink/model/api/operators/GraphsToGraphOperator.java", "license": "apache-2.0", "size": 1119 }
[ "org.gradoop.flink.model.impl.epgm.LogicalGraph" ]
import org.gradoop.flink.model.impl.epgm.LogicalGraph;
import org.gradoop.flink.model.impl.epgm.*;
[ "org.gradoop.flink" ]
org.gradoop.flink;
2,097,356
private void parseComponents(HostGroupEntity entity) { for (HostGroupComponentEntity componentEntity : entity.getComponents() ) { addComponent(componentEntity.getName()); } }
void function(HostGroupEntity entity) { for (HostGroupComponentEntity componentEntity : entity.getComponents() ) { addComponent(componentEntity.getName()); } }
/** * Parse component information. */
Parse component information
parseComponents
{ "repo_name": "zouzhberk/ambaridemo", "path": "demo-server/src/main/java/org/apache/ambari/server/topology/HostGroupImpl.java", "license": "apache-2.0", "size": 6736 }
[ "org.apache.ambari.server.orm.entities.HostGroupComponentEntity", "org.apache.ambari.server.orm.entities.HostGroupEntity" ]
import org.apache.ambari.server.orm.entities.HostGroupComponentEntity; import org.apache.ambari.server.orm.entities.HostGroupEntity;
import org.apache.ambari.server.orm.entities.*;
[ "org.apache.ambari" ]
org.apache.ambari;
315,704
protected void checkModTurretFields(Turret t) { String turret = String.format("Engine %s: ", t.name); if(t.compatibility.isEmpty()) { report(t, turret + "has no compatible tanks"); } if(t.cost < 0) { // stock modules are for free! report(t, turret ...
void function(Turret t) { String turret = String.format(STR, t.name); if(t.compatibility.isEmpty()) { report(t, turret + STR); } if(t.cost < 0) { report(t, turret + STR + t.cost); } if(t.currency == null) { report(t, turret + STR); } if(t.name.length() < 2) { report(t, turret + STR + t.name); } if(t.nation == null) { r...
/** * Checks all fields of a single turret * @param t the turret to check */
Checks all fields of a single turret
checkModTurretFields
{ "repo_name": "Klamann/WotCrawler", "path": "src/main/java/de/nx42/wotcrawler/ext/Evaluator.java", "license": "gpl-3.0", "size": 19554 }
[ "de.nx42.wotcrawler.db.module.Turret" ]
import de.nx42.wotcrawler.db.module.Turret;
import de.nx42.wotcrawler.db.module.*;
[ "de.nx42.wotcrawler" ]
de.nx42.wotcrawler;
623,881
public Observable<ServiceResponse<SuppressionContractInner>> getWithServiceResponseAsync(String resourceUri, String recommendationId, String name) { if (resourceUri == null) { throw new IllegalArgumentException("Parameter resourceUri is required and cannot be null."); } if (recom...
Observable<ServiceResponse<SuppressionContractInner>> function(String resourceUri, String recommendationId, String name) { if (resourceUri == null) { throw new IllegalArgumentException(STR); } if (recommendationId == null) { throw new IllegalArgumentException(STR); } if (name == null) { throw new IllegalArgumentExcepti...
/** * Obtains the details of a suppression. * * @param resourceUri The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies. * @param recommendationId The recommendation ID. * @param name The name of the suppression. * @throws IllegalArgumen...
Obtains the details of a suppression
getWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/advisor/mgmt-v2017_04_19/src/main/java/com/microsoft/azure/management/advisor/v2017_04_19/implementation/SuppressionsInner.java", "license": "mit", "size": 42165 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,324,026
public boolean isPlayer2Turn() { if(gorillas.getCurrentStateID() == TestGorillas.GAMEPLAYSTATE) { return Game.getInstance().getPlayer(1) == Game.getInstance().getActivePlayer(); // TODO: Turn of anyone does that mean if we are currently having an active banana? } re...
boolean function() { if(gorillas.getCurrentStateID() == TestGorillas.GAMEPLAYSTATE) { return Game.getInstance().getPlayer(1) == Game.getInstance().getActivePlayer(); } return false; }
/** * if the game is in the GamePlayState, this method should return whether it * is the turn of player two * <p> * If it is the turn of a player is decided on the fact if the player is * currently able to parameterize a shot. * * @return true if it is the turn of player two, false if...
if the game is in the GamePlayState, this method should return whether it is the turn of player two If it is the turn of a player is decided on the fact if the player is currently able to parameterize a shot
isPlayer2Turn
{ "repo_name": "joshimoo/gdi1-project", "path": "src/de/tu_darmstadt/gdi1/gorillas/test/adapter/GorillasTestAdapterExtended1.java", "license": "mit", "size": 13122 }
[ "de.tu_darmstadt.gdi1.gorillas.main.Game", "de.tu_darmstadt.gdi1.gorillas.test.setup.TestGorillas" ]
import de.tu_darmstadt.gdi1.gorillas.main.Game; import de.tu_darmstadt.gdi1.gorillas.test.setup.TestGorillas;
import de.tu_darmstadt.gdi1.gorillas.main.*; import de.tu_darmstadt.gdi1.gorillas.test.setup.*;
[ "de.tu_darmstadt.gdi1" ]
de.tu_darmstadt.gdi1;
2,459,359
public final Exp getDefinition() { return myBodyItem == null ? null : myBodyItem.getDefinition(); }
final Exp function() { return myBodyItem == null ? null : myBodyItem.getDefinition(); }
/** * <p> * This method returns the definition expression of a standard definition. * </p> * * @return An {@code Exp} representing the definition expression or {@code null}. */
This method returns the definition expression of a standard definition.
getDefinition
{ "repo_name": "yushan87/RESOLVE", "path": "src/java/edu/clemson/rsrg/absyn/declarations/mathdecl/MathDefinitionDec.java", "license": "bsd-3-clause", "size": 8034 }
[ "edu.clemson.rsrg.absyn.expressions.Exp" ]
import edu.clemson.rsrg.absyn.expressions.Exp;
import edu.clemson.rsrg.absyn.expressions.*;
[ "edu.clemson.rsrg" ]
edu.clemson.rsrg;
2,819,363
public RuleConfiguredTargetBuilder setFilesToBuild(NestedSet<Artifact> filesToBuild) { this.filesToBuild = filesToBuild; return this; }
RuleConfiguredTargetBuilder function(NestedSet<Artifact> filesToBuild) { this.filesToBuild = filesToBuild; return this; }
/** * Set the files to build. */
Set the files to build
setFilesToBuild
{ "repo_name": "davidzchen/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/RuleConfiguredTargetBuilder.java", "license": "apache-2.0", "size": 27974 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.collect.nestedset.NestedSet" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.collect.nestedset.*;
[ "com.google.devtools" ]
com.google.devtools;
2,506,878
void raw(String text) throws IOException;
void raw(String text) throws IOException;
/** * Output raw contents that should not be encoded. * * @param text * @throws IOException */
Output raw contents that should not be encoded
raw
{ "repo_name": "LevelFourAB/dust", "path": "dust-core/src/main/java/se/l4/dust/api/template/TemplateOutputStream.java", "license": "apache-2.0", "size": 1778 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
597,290
public Path findPath(String name) { ArrayList<Loader> loaders = getLoaders(); for (int i = 0; i < loaders.size(); i++) { Loader loader = loaders.get(i); Path path = loader.getPath(name); if (path != null && path.canRead()) { return path; } } return null; }
Path function(String name) { ArrayList<Loader> loaders = getLoaders(); for (int i = 0; i < loaders.size(); i++) { Loader loader = loaders.get(i); Path path = loader.getPath(name); if (path != null && path.canRead()) { return path; } } return null; }
/** * Returns the matching single-level path. */
Returns the matching single-level path
findPath
{ "repo_name": "bertrama/resin", "path": "modules/kernel/src/com/caucho/loader/DynamicClassLoader.java", "license": "gpl-2.0", "size": 58059 }
[ "com.caucho.vfs.Path", "java.util.ArrayList" ]
import com.caucho.vfs.Path; import java.util.ArrayList;
import com.caucho.vfs.*; import java.util.*;
[ "com.caucho.vfs", "java.util" ]
com.caucho.vfs; java.util;
1,515,188
public Observable<ServiceResponse<Void>> beginDeleteWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } ...
Observable<ServiceResponse<Void>> function(String resourceGroupName, String virtualNetworkGatewayConnectionName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (virtualNetworkGatewayConnectionName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() ==...
/** * Deletes the specified virtual network Gateway connection. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. * @throws IllegalArgumentException thrown if parameters fail the validati...
Deletes the specified virtual network Gateway connection
beginDeleteWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VirtualNetworkGatewayConnectionsInner.java", "license": "mit", "size": 146427 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
507,983
protected Settings restClientSettings() { return Settings.EMPTY; }
Settings function() { return Settings.EMPTY; }
/** * Used to obtain settings for the REST client that is used to send REST requests. */
Used to obtain settings for the REST client that is used to send REST requests
restClientSettings
{ "repo_name": "baishuo/elasticsearch_v2.1.0-baishuo", "path": "core/src/test/java/org/elasticsearch/test/rest/ESRestTestCase.java", "license": "apache-2.0", "size": 17128 }
[ "org.elasticsearch.common.settings.Settings" ]
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
13,055
public void setAkteraUserDao(de.iritgo.aktera.authentication.defaultauth.entity.UserDAO akteraUserDao) { this.akteraUserDao = akteraUserDao; }
void function(de.iritgo.aktera.authentication.defaultauth.entity.UserDAO akteraUserDao) { this.akteraUserDao = akteraUserDao; }
/** * Set the Aktera user DAO. * * @param akteraUserDao The user DAO */
Set the Aktera user DAO
setAkteraUserDao
{ "repo_name": "iritgo/iritgo-aktera", "path": "aktera-nexim/src/main/java/de/iritgo/aktera/nexim/NeximUserDAOImpl.java", "license": "apache-2.0", "size": 3020 }
[ "de.iritgo.nexim.user.UserDAO" ]
import de.iritgo.nexim.user.UserDAO;
import de.iritgo.nexim.user.*;
[ "de.iritgo.nexim" ]
de.iritgo.nexim;
1,937,996
private final static Object[] noParams = {}; private final static Class[] noTypes = {}; public static Object adjMinusIndexArg(Object argument, Object o, InternalContextAdapter context, SimpleNode node) { if (argument instanceof Integer && ((Integer)argument)....
final static Object[] noParams = {}; private final static Class[] noTypes = {}; public static Object function(Object argument, Object o, InternalContextAdapter context, SimpleNode node) { if (argument instanceof Integer && ((Integer)argument).intValue() < 0) { VelMethod method = ClassUtils.getMethod("size", noParams, n...
/** * If argument is an Integer and negative, then return (o.size() - argument). * Otherwise return the original argument. We use this to calculate the true * index of a negative index e.g., $foo[-1]. If no size() method is found on the * 'o' object, then we throw an VelocityException. * @par...
If argument is an Integer and negative, then return (o.size() - argument). Otherwise return the original argument. We use this to calculate the true index of a negative index e.g., $foo[-1]. If no size() method is found on the 'o' object, then we throw an VelocityException
adjMinusIndexArg
{ "repo_name": "fbrier/velocity", "path": "src/main/java/org/apache/velocity/runtime/parser/node/ASTIndex.java", "license": "apache-2.0", "size": 6629 }
[ "org.apache.velocity.context.InternalContextAdapter", "org.apache.velocity.exception.VelocityException", "org.apache.velocity.util.ClassUtils", "org.apache.velocity.util.Formatter", "org.apache.velocity.util.introspection.VelMethod" ]
import org.apache.velocity.context.InternalContextAdapter; import org.apache.velocity.exception.VelocityException; import org.apache.velocity.util.ClassUtils; import org.apache.velocity.util.Formatter; import org.apache.velocity.util.introspection.VelMethod;
import org.apache.velocity.context.*; import org.apache.velocity.exception.*; import org.apache.velocity.util.*; import org.apache.velocity.util.introspection.*;
[ "org.apache.velocity" ]
org.apache.velocity;
2,524,116
public static List<Integer> toIntList(@Nullable int[] arr, IgnitePredicate<Integer>... p) { if (arr == null || arr.length == 0) return Collections.emptyList(); List<Integer> ret = new ArrayList<>(arr.length); if (F.isEmpty(p)) for (int i : arr) ret.a...
static List<Integer> function(@Nullable int[] arr, IgnitePredicate<Integer>... p) { if (arr == null arr.length == 0) return Collections.emptyList(); List<Integer> ret = new ArrayList<>(arr.length); if (F.isEmpty(p)) for (int i : arr) ret.add(i); else { for (int i : arr) if (F.isAll(i, p)) ret.add(i); } return ret; }
/** * Converts array of integers into list. * * @param arr Array of integers. * @param p Optional predicate array. * @return List of integers. */
Converts array of integers into list
toIntList
{ "repo_name": "agoncharuk/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 289549 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List", "org.apache.ignite.internal.util.typedef.F", "org.apache.ignite.lang.IgnitePredicate", "org.jetbrains.annotations.Nullable" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.lang.IgnitePredicate; import org.jetbrains.annotations.Nullable;
import java.util.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.lang.*; import org.jetbrains.annotations.*;
[ "java.util", "org.apache.ignite", "org.jetbrains.annotations" ]
java.util; org.apache.ignite; org.jetbrains.annotations;
1,222,323
private void acceptInvitation(final Button buttonAgree, final Button buttonRefuse, final InviteMessage msg) { final ProgressDialog pd = new ProgressDialog(context); String str1 = context.getResources().getString(R.string.Are_agree_with); final String str2 = context.getResources().getString(R.string.Has_agreed_...
void function(final Button buttonAgree, final Button buttonRefuse, final InviteMessage msg) { final ProgressDialog pd = new ProgressDialog(context); String str1 = context.getResources().getString(R.string.Are_agree_with); final String str2 = context.getResources().getString(R.string.Has_agreed_to); final String str3 = ...
/** * accept invitation * */
accept invitation
acceptInvitation
{ "repo_name": "xumorden/WoZai", "path": "app/src/main/java/com/a200fang/wozai/adapter/NewFriendsMsgAdapter.java", "license": "mit", "size": 12088 }
[ "android.app.ProgressDialog", "android.widget.Button", "com.a200fang.wozai.db.InviteMessage" ]
import android.app.ProgressDialog; import android.widget.Button; import com.a200fang.wozai.db.InviteMessage;
import android.app.*; import android.widget.*; import com.a200fang.wozai.db.*;
[ "android.app", "android.widget", "com.a200fang.wozai" ]
android.app; android.widget; com.a200fang.wozai;
1,411,388
interface WithDestinationApplicationSecurityGroups { WithCreate withDestinationApplicationSecurityGroups(List<ApplicationSecurityGroupInner> destinationApplicationSecurityGroups); }
interface WithDestinationApplicationSecurityGroups { WithCreate withDestinationApplicationSecurityGroups(List<ApplicationSecurityGroupInner> destinationApplicationSecurityGroups); }
/** * Specifies destinationApplicationSecurityGroups. * @param destinationApplicationSecurityGroups The application security group specified as destination * @return the next definition stage */
Specifies destinationApplicationSecurityGroups
withDestinationApplicationSecurityGroups
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/network/v2019_11_01/NetworkSecurityGroupSecurityRule.java", "license": "mit", "size": 22310 }
[ "com.microsoft.azure.management.network.v2019_11_01.implementation.ApplicationSecurityGroupInner", "java.util.List" ]
import com.microsoft.azure.management.network.v2019_11_01.implementation.ApplicationSecurityGroupInner; import java.util.List;
import com.microsoft.azure.management.network.v2019_11_01.implementation.*; import java.util.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
2,382,659
public StoredFieldsContext storedFields() { return storedFieldsContext; }
StoredFieldsContext function() { return storedFieldsContext; }
/** * Gets the stored fields context. */
Gets the stored fields context
storedFields
{ "repo_name": "LeoYao/elasticsearch", "path": "core/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java", "license": "apache-2.0", "size": 58763 }
[ "org.elasticsearch.search.fetch.StoredFieldsContext" ]
import org.elasticsearch.search.fetch.StoredFieldsContext;
import org.elasticsearch.search.fetch.*;
[ "org.elasticsearch.search" ]
org.elasticsearch.search;
377,691
void synchronizeWorkflowRequests(OperationResult parentResult) throws SchemaException, SecurityViolationException;
void synchronizeWorkflowRequests(OperationResult parentResult) throws SchemaException, SecurityViolationException;
/** * Synchronizes information in midPoint repository and activiti database. * Not needed to use during normal operation (only when problems occur). * * @param parentResult */
Synchronizes information in midPoint repository and activiti database. Not needed to use during normal operation (only when problems occur)
synchronizeWorkflowRequests
{ "repo_name": "PetrGasparik/midpoint", "path": "model/model-api/src/main/java/com/evolveum/midpoint/model/api/TaskService.java", "license": "apache-2.0", "size": 8511 }
[ "com.evolveum.midpoint.schema.result.OperationResult", "com.evolveum.midpoint.util.exception.SchemaException", "com.evolveum.midpoint.util.exception.SecurityViolationException" ]
import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.util.exception.SchemaException; import com.evolveum.midpoint.util.exception.SecurityViolationException;
import com.evolveum.midpoint.schema.result.*; import com.evolveum.midpoint.util.exception.*;
[ "com.evolveum.midpoint" ]
com.evolveum.midpoint;
474,739
public static boolean compile(Project project, Set<String> compTypes, PrintStream out, PrintStream err, PrintStream userErrors, boolean isForCompanion, String keystoreFilePath, int childProcessRam, String dexCacheDir) thro...
static boolean function(Project project, Set<String> compTypes, PrintStream out, PrintStream err, PrintStream userErrors, boolean isForCompanion, String keystoreFilePath, int childProcessRam, String dexCacheDir) throws IOException, JSONException { long start = System.currentTimeMillis(); Compiler compiler = new Compile...
/** * Builds a YAIL project. * * @param project project to build * @param compTypes component types used in the project * @param out stdout stream for compiler messages * @param err stderr stream for compiler messages * @param userErrors stream to write user-visible error messages * @param ke...
Builds a YAIL project
compile
{ "repo_name": "dengxinyue0420/appinventor-sources", "path": "appinventor/buildserver/src/com/google/appinventor/buildserver/Compiler.java", "license": "apache-2.0", "size": 62929 }
[ "java.io.File", "java.io.IOException", "java.io.PrintStream", "java.util.Set", "org.codehaus.jettison.json.JSONException" ]
import java.io.File; import java.io.IOException; import java.io.PrintStream; import java.util.Set; import org.codehaus.jettison.json.JSONException;
import java.io.*; import java.util.*; import org.codehaus.jettison.json.*;
[ "java.io", "java.util", "org.codehaus.jettison" ]
java.io; java.util; org.codehaus.jettison;
47,785
public static ArrayDescription elementsOf( ReifiableTypeDescription elementType, ValueDescription... elements) { return elementsOf(elementType, Arrays.asList(elements)); }
static ArrayDescription function( ReifiableTypeDescription elementType, ValueDescription... elements) { return elementsOf(elementType, Arrays.asList(elements)); }
/** * Creates a new instance. * @param elementType the element type * @param elements the array elements * @return the created instance */
Creates a new instance
elementsOf
{ "repo_name": "cocoatomo/asakusafw", "path": "operator/core/src/main/java/com/asakusafw/operator/description/ArrayDescription.java", "license": "apache-2.0", "size": 4304 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
327,351
public void validateSearchParameters(Map<String, String> fieldValues);
void function(Map<String, String> fieldValues);
/** * Validates the values filled in as search criteria, also checks for required field values. * * @param fieldValues - Map of property/value pairs */
Validates the values filled in as search criteria, also checks for required field values
validateSearchParameters
{ "repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua", "path": "rice-middleware/kns/src/main/java/org/kuali/rice/kns/lookup/Lookupable.java", "license": "apache-2.0", "size": 8275 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,079,671
@PostMapping(value = { '/' + OidcConstants.BASE_OIDC_URL + '/' + OidcConstants.REGISTRATION_URL, "/**/" + OidcConstants.REGISTRATION_URL }, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity handleRequestInternal( @RequestB...
@PostMapping(value = { '/' + OidcConstants.BASE_OIDC_URL + '/' + OidcConstants.REGISTRATION_URL, "/**/" + OidcConstants.REGISTRATION_URL }, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity function( final String jsonInput, final HttpServletRequest request, final H...
/** * Handle request. * * @param jsonInput the json input * @param request the request * @param response the response * @return the model and view * @throws Exception the exception */
Handle request
handleRequestInternal
{ "repo_name": "apereo/cas", "path": "support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/web/controllers/dynareg/OidcDynamicClientRegistrationEndpointController.java", "license": "apache-2.0", "size": 15160 }
[ "java.util.HashMap", "java.util.HashSet", "java.util.LinkedHashSet", "java.util.Objects", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.commons.lang3.StringUtils", "org.apereo.cas.oidc.OidcConstants", "org.apereo.cas.oidc.dynareg.OidcClientRegistratio...
import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.Objects; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; import org.apereo.cas.oidc.OidcConstants; import org.apereo.cas.oidc.dyn...
import java.util.*; import javax.servlet.http.*; import org.apache.commons.lang3.*; import org.apereo.cas.oidc.*; import org.apereo.cas.oidc.dynareg.*; import org.apereo.cas.oidc.profile.*; import org.apereo.cas.services.*; import org.apereo.cas.support.oauth.util.*; import org.apereo.cas.support.oauth.web.response.acc...
[ "java.util", "javax.servlet", "org.apache.commons", "org.apereo.cas", "org.pac4j.core", "org.springframework.http", "org.springframework.web" ]
java.util; javax.servlet; org.apache.commons; org.apereo.cas; org.pac4j.core; org.springframework.http; org.springframework.web;
1,790,203
Iterator<Edge> setBaseNode(long baseNode);
Iterator<Edge> setBaseNode(long baseNode);
/** * This method sets the base node for iteration through neighboring edges. * @return EdgeIterator around specified baseNode. The resulting iterator can be a new instance * or a reused instance returned in a previous call. So be sure you do not use the explorer from * multiple threads or in a nest...
This method sets the base node for iteration through neighboring edges
setBaseNode
{ "repo_name": "daedafusion/graph", "path": "src/main/java/com/daedafusion/graph/util/EdgeExplorer.java", "license": "apache-2.0", "size": 1443 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,097,344
@Test public void testGetPlotScalarError() throws Exception { final String serviceUrl = "http://example/url"; final String logId = "unique-id"; final Integer width = 1; final Integer height = 2; final Integer startDepth = 3; final Integer endDepth = 4; ...
void function() throws Exception { final String serviceUrl = STRunique-id"; final Integer width = 1; final Integer height = 2; final Integer startDepth = 3; final Integer endDepth = 4; final Double samplingInterval = 1.5; final Integer graphTypeInt = 1; final PlotScalarGraphType graphType = PlotScalarGraphType.StackedB...
/** * Tests getting PlotScalar fails correctly. * * @throws Exception */
Tests getting PlotScalar fails correctly
testGetPlotScalarError
{ "repo_name": "victortey/AuScope-Portal", "path": "src/test/java/org/auscope/portal/server/web/controllers/TestNVCLController.java", "license": "lgpl-3.0", "size": 35181 }
[ "java.net.ConnectException", "org.apache.http.HttpStatus", "org.auscope.portal.server.web.NVCLDataServiceMethodMaker", "org.jmock.Expectations" ]
import java.net.ConnectException; import org.apache.http.HttpStatus; import org.auscope.portal.server.web.NVCLDataServiceMethodMaker; import org.jmock.Expectations;
import java.net.*; import org.apache.http.*; import org.auscope.portal.server.web.*; import org.jmock.*;
[ "java.net", "org.apache.http", "org.auscope.portal", "org.jmock" ]
java.net; org.apache.http; org.auscope.portal; org.jmock;
1,767,343
@Test public void testDeleteWithLimitAndComplexWhereCriterion() { DeleteStatement stmt = DeleteStatement .delete(new TableReference(TEST_TABLE)) .where(Criterion.or(Criterion.eq(new FieldReference(new TableReference(TEST_TABLE), STRING_FIELD), "A001003657"), Criterion.eq(new FieldRefere...
void function() { DeleteStatement stmt = DeleteStatement .delete(new TableReference(TEST_TABLE)) .where(Criterion.or(Criterion.eq(new FieldReference(new TableReference(TEST_TABLE), STRING_FIELD), STR), Criterion.eq(new FieldReference(new TableReference(TEST_TABLE), STRING_FIELD), STR))) .limit(1000) .build(); String va...
/** * Tests that a delete string with a limit and a complex where criterion (involving an 'OR') is created correctly (i.e. brackets around the 'OR' are preserved). */
Tests that a delete string with a limit and a complex where criterion (involving an 'OR') is created correctly (i.e. brackets around the 'OR' are preserved)
testDeleteWithLimitAndComplexWhereCriterion
{ "repo_name": "badgerwithagun/morf", "path": "morf-testsupport/src/main/java/org/alfasoftware/morf/jdbc/AbstractSqlDialectTest.java", "license": "apache-2.0", "size": 201465 }
[ "org.alfasoftware.morf.sql.DeleteStatement", "org.alfasoftware.morf.sql.element.Criterion", "org.alfasoftware.morf.sql.element.FieldReference", "org.alfasoftware.morf.sql.element.TableReference", "org.junit.Assert", "org.mockito.Matchers" ]
import org.alfasoftware.morf.sql.DeleteStatement; import org.alfasoftware.morf.sql.element.Criterion; import org.alfasoftware.morf.sql.element.FieldReference; import org.alfasoftware.morf.sql.element.TableReference; import org.junit.Assert; import org.mockito.Matchers;
import org.alfasoftware.morf.sql.*; import org.alfasoftware.morf.sql.element.*; import org.junit.*; import org.mockito.*;
[ "org.alfasoftware.morf", "org.junit", "org.mockito" ]
org.alfasoftware.morf; org.junit; org.mockito;
2,713,306
public static URI toURI(URL url) throws URISyntaxException { String uri = url.toString(); if (SandboxUrlUtils.isSandboxUrl(url)) { return SandboxUrlUtils.toURI(url); } else { uri = SPACE_PATTERN.matcher(uri).replaceAll(ENCODED_SPACE); return new URI(uri); // URI can't contain spaces } }
static URI function(URL url) throws URISyntaxException { String uri = url.toString(); if (SandboxUrlUtils.isSandboxUrl(url)) { return SandboxUrlUtils.toURI(url); } else { uri = SPACE_PATTERN.matcher(uri).replaceAll(ENCODED_SPACE); return new URI(uri); } }
/** * CLO-3052: Generic URL.toURI() method that escapes space characters. * CLO-6374: Sandbox URLs are handled in a special way. * * @param url * @return * @throws URISyntaxException */
CLO-3052: Generic URL.toURI() method that escapes space characters. CLO-6374: Sandbox URLs are handled in a special way
toURI
{ "repo_name": "CloverETL/CloverETL-Engine", "path": "cloveretl.engine/src/org/jetel/component/fileoperation/URIUtils.java", "license": "lgpl-2.1", "size": 7607 }
[ "java.net.URISyntaxException", "org.jetel.util.file.SandboxUrlUtils" ]
import java.net.URISyntaxException; import org.jetel.util.file.SandboxUrlUtils;
import java.net.*; import org.jetel.util.file.*;
[ "java.net", "org.jetel.util" ]
java.net; org.jetel.util;
1,089,296
public static Calendar allocateCalendar() { Calendar calendar = getCalendarCache().poll(); if (calendar == null) { calendar = Calendar.getInstance(); } return calendar; }
static Calendar function() { Calendar calendar = getCalendarCache().poll(); if (calendar == null) { calendar = Calendar.getInstance(); } return calendar; }
/** * PERF: This is used to optimize Calendar conversion/printing. * This should only be used when a calendar is temporarily required, * when finished it must be released back. */
This should only be used when a calendar is temporarily required, when finished it must be released back
allocateCalendar
{ "repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/helper/Helper.java", "license": "epl-1.0", "size": 92748 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
1,286,207
@javax.annotation.Nullable @ApiModelProperty(value = "") public V1ObjectMeta getMetadata() { return metadata; }
@javax.annotation.Nullable @ApiModelProperty(value = "") V1ObjectMeta function() { return metadata; }
/** * Get metadata * * @return metadata */
Get metadata
getMetadata
{ "repo_name": "kubernetes-client/java", "path": "client-java-contrib/prometheus-operator/src/main/java/com/coreos/monitoring/models/V1ServiceMonitor.java", "license": "apache-2.0", "size": 5779 }
[ "io.kubernetes.client.openapi.models.V1ObjectMeta", "io.swagger.annotations.ApiModelProperty" ]
import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.swagger.annotations.ApiModelProperty;
import io.kubernetes.client.openapi.models.*; import io.swagger.annotations.*;
[ "io.kubernetes.client", "io.swagger.annotations" ]
io.kubernetes.client; io.swagger.annotations;
659,305
public T ruby(String text) { return expression(new RubyExpression(text)); }
T function(String text) { return expression(new RubyExpression(text)); }
/** * Evaluates a <a href="http://camel.apache.org/ruby.html">Ruby * expression</a> * * @param text the expression to be evaluated * @return the builder to continue processing the DSL */
Evaluates a Ruby expression
ruby
{ "repo_name": "shuliangtao/apache-camel-2.13.0-src", "path": "camel-core/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java", "license": "apache-2.0", "size": 33544 }
[ "org.apache.camel.model.language.RubyExpression" ]
import org.apache.camel.model.language.RubyExpression;
import org.apache.camel.model.language.*;
[ "org.apache.camel" ]
org.apache.camel;
363,237
@Column(name = "design_code") @Type(type = "designCode") @Deprecated public Design getDesign() { return design; }
@Column(name = STR) @Type(type = STR) Design function() { return design; }
/** * Gets the design. * * @return the design */
Gets the design
getDesign
{ "repo_name": "CBIIT/caaers", "path": "caAERS/software/core/src/main/java/gov/nih/nci/cabig/caaers/domain/Study.java", "license": "bsd-3-clause", "size": 80505 }
[ "javax.persistence.Column", "org.hibernate.annotations.Type" ]
import javax.persistence.Column; import org.hibernate.annotations.Type;
import javax.persistence.*; import org.hibernate.annotations.*;
[ "javax.persistence", "org.hibernate.annotations" ]
javax.persistence; org.hibernate.annotations;
832,122
public void setIsLayoutOnly(boolean isLayoutOnly) { Assertions.assertCondition(getParent() == null, "Must remove from no opt parent first"); Assertions.assertCondition(mNativeParent == null, "Must remove from native parent first"); Assertions.assertCondition(getNativeChildCount() == 0, "Must remove all na...
void function(boolean isLayoutOnly) { Assertions.assertCondition(getParent() == null, STR); Assertions.assertCondition(mNativeParent == null, STR); Assertions.assertCondition(getNativeChildCount() == 0, STR); mIsLayoutOnly = isLayoutOnly; }
/** * Sets whether this node only contributes to the layout of its children without doing any * drawing or functionality itself. */
Sets whether this node only contributes to the layout of its children without doing any drawing or functionality itself
setIsLayoutOnly
{ "repo_name": "Helena-High/school-app", "path": "node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java", "license": "apache-2.0", "size": 15296 }
[ "com.facebook.infer.annotation.Assertions" ]
import com.facebook.infer.annotation.Assertions;
import com.facebook.infer.annotation.*;
[ "com.facebook.infer" ]
com.facebook.infer;
783,413
public void setFloorCeilColor(Color floorColor, Color ceilColor) { colorMap.setCeilColor(ceilColor); }
void function(Color floorColor, Color ceilColor) { colorMap.setCeilColor(ceilColor); }
/** * Sets the floor and ceiling colors. * * @param floorColor not supported * @param ceilColor ceiling color */
Sets the floor and ceiling colors
setFloorCeilColor
{ "repo_name": "dobrown/tracker-mvn", "path": "src/main/java/org/opensourcephysics/display2d/ComplexGridPlot.java", "license": "gpl-3.0", "size": 11429 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,044,455
EAttribute getModel_Values();
EAttribute getModel_Values();
/** * Returns the meta object for the attribute list '{@link org.eclipse.xtext.parser.antlr.bug296889Test.Model#getValues <em>Values</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute list '<em>Values</em>'. * @see org.eclipse.xtext.parser.antlr.bug29688...
Returns the meta object for the attribute list '<code>org.eclipse.xtext.parser.antlr.bug296889Test.Model#getValues Values</code>'.
getModel_Values
{ "repo_name": "miklossy/xtext-core", "path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parser/antlr/bug296889Test/Bug296889TestPackage.java", "license": "epl-1.0", "size": 15502 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,075,818
protected String getUsername(Metadata metadata, PropertyList propertyList) throws WebServiceException { // Check PropertyList of Action and Metadata TextProperty usernameProperty = (TextProperty) PropertyHelper.getFromList(propertyList, PropertyType.TEXT, WsConstants.USERNAME); ...
String function(Metadata metadata, PropertyList propertyList) throws WebServiceException { TextProperty usernameProperty = (TextProperty) PropertyHelper.getFromList(propertyList, PropertyType.TEXT, WsConstants.USERNAME); if (usernameProperty != null && usernameProperty.getValue() != null) { return usernameProperty.getV...
/** * Gets the username specified in the given Metadata object or PropertyList. * * @param metadata * the Metadata * @param propertyList * the PropertyList * @return the username or null, if not provided * @throws WebServiceException * thro...
Gets the username specified in the given Metadata object or PropertyList
getUsername
{ "repo_name": "NABUCCO/org.nabucco.testautomation.engine.proxy.ws", "path": "org.nabucco.testautomation.engine.proxy.ws/src/main/org/nabucco/testautomation/engine/proxy/ws/command/rest/client/AbstractRestCommand.java", "license": "epl-1.0", "size": 10955 }
[ "org.nabucco.testautomation.engine.proxy.ws.WsConstants", "org.nabucco.testautomation.engine.proxy.ws.exception.WebServiceException", "org.nabucco.testautomation.property.facade.datatype.PropertyList", "org.nabucco.testautomation.property.facade.datatype.TextProperty", "org.nabucco.testautomation.property.f...
import org.nabucco.testautomation.engine.proxy.ws.WsConstants; import org.nabucco.testautomation.engine.proxy.ws.exception.WebServiceException; import org.nabucco.testautomation.property.facade.datatype.PropertyList; import org.nabucco.testautomation.property.facade.datatype.TextProperty; import org.nabucco.testautomat...
import org.nabucco.testautomation.engine.proxy.ws.*; import org.nabucco.testautomation.engine.proxy.ws.exception.*; import org.nabucco.testautomation.property.facade.datatype.*; import org.nabucco.testautomation.property.facade.datatype.base.*; import org.nabucco.testautomation.property.facade.datatype.util.*; import o...
[ "org.nabucco.testautomation" ]
org.nabucco.testautomation;
990,087
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { }
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { }
/** * Handles the HTTP * <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>GET</code> method
doGet
{ "repo_name": "ashokkumarsand/vrms_old", "path": "vrms/src/java/com/vrms/viewallocations/ViewRequestManagerServlet.java", "license": "gpl-3.0", "size": 3363 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
2,752,553
public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException { return new GenericProcessingInstruction(target, data, this); }
ProcessingInstruction function(String target, String data) throws DOMException { return new GenericProcessingInstruction(target, data, this); }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.Document#createProcessingInstruction(String,String)}. * @return a {@link StyleSheetProcessingInstruction} if target is * "xml-stylesheet" or a GenericProcessingInstruction otherwise. */
DOM: Implements <code>org.w3c.dom.Document#createProcessingInstruction(String,String)</code>
createProcessingInstruction
{ "repo_name": "apache/batik", "path": "batik-dom/src/main/java/org/apache/batik/dom/GenericDocument.java", "license": "apache-2.0", "size": 6105 }
[ "org.w3c.dom.DOMException", "org.w3c.dom.ProcessingInstruction" ]
import org.w3c.dom.DOMException; import org.w3c.dom.ProcessingInstruction;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
979,942
public void testCreateReadFile() throws Throwable { CmsObject cms = getCmsObject(); echo("Testing file creation"); String content = "this is a test content"; // create a file in the root directory cms.createResource("/file1", CmsResourceTypePlain.g...
void function() throws Throwable { CmsObject cms = getCmsObject(); echo(STR); String content = STR; cms.createResource(STR, CmsResourceTypePlain.getStaticTypeId(), content.getBytes(), null); this.assertContent(cms, STR , content.getBytes()); }
/** * Tests the create and read file methods.<p> * * @throws Throwable if something goes wrong */
Tests the create and read file methods
testCreateReadFile
{ "repo_name": "it-tavis/opencms-core", "path": "test/org/opencms/file/TestResourceOperations.java", "license": "lgpl-2.1", "size": 13807 }
[ "org.opencms.file.types.CmsResourceTypePlain" ]
import org.opencms.file.types.CmsResourceTypePlain;
import org.opencms.file.types.*;
[ "org.opencms.file" ]
org.opencms.file;
2,814,740
public static PoolingDataSourceWrapper setupPoolingDataSource(Properties dsProps) { return setupPoolingDataSource(dsProps, "jdbc/testDS1"); }
static PoolingDataSourceWrapper function(Properties dsProps) { return setupPoolingDataSource(dsProps, STR); }
/** * This method uses the "jdbc/testDS1" datasource, which is the default. * @param dsProps The properties used to setup the data source. * @return a PoolingDataSourceWrapper */
This method uses the "jdbc/testDS1" datasource, which is the default
setupPoolingDataSource
{ "repo_name": "romartin/jbpm", "path": "jbpm-persistence/jbpm-persistence-jpa/src/test/java/org/jbpm/persistence/util/PersistenceUtil.java", "license": "apache-2.0", "size": 13911 }
[ "java.util.Properties", "org.kie.test.util.db.PoolingDataSourceWrapper" ]
import java.util.Properties; import org.kie.test.util.db.PoolingDataSourceWrapper;
import java.util.*; import org.kie.test.util.db.*;
[ "java.util", "org.kie.test" ]
java.util; org.kie.test;
2,088,864
public ApplicationContext getApplicationContext();
ApplicationContext function();
/** * Returns the {@link ApplicationContext} for which the AuthorizationManager is instantiated. This * ApplicationContext object contains the information about the application as well all the associated * data for the application * @return ApplicationContext The {@link ApplicationContext} object for which the...
Returns the <code>ApplicationContext</code> for which the AuthorizationManager is instantiated. This ApplicationContext object contains the information about the application as well all the associated data for the application
getApplicationContext
{ "repo_name": "NCIP/cagrid-general", "path": "external/csmapi-42/api/src/gov/nih/nci/security/AuthorizationManager.java", "license": "bsd-3-clause", "size": 72380 }
[ "gov.nih.nci.security.authorization.domainobjects.ApplicationContext" ]
import gov.nih.nci.security.authorization.domainobjects.ApplicationContext;
import gov.nih.nci.security.authorization.domainobjects.*;
[ "gov.nih.nci" ]
gov.nih.nci;
1,676,456
private void registerMXBean() { MBeans.register("NodeManager", "NodeManager", this); }
void function() { MBeans.register(STR, STR, this); }
/** * Register NodeManagerMXBean. */
Register NodeManagerMXBean
registerMXBean
{ "repo_name": "apurtell/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.java", "license": "apache-2.0", "size": 37619 }
[ "org.apache.hadoop.metrics2.util.MBeans" ]
import org.apache.hadoop.metrics2.util.MBeans;
import org.apache.hadoop.metrics2.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,730,431
public BlobsGetAccessControlHeaders setLastModified(OffsetDateTime lastModified) { if (lastModified == null) { this.lastModified = null; } else { this.lastModified = new DateTimeRfc1123(lastModified); } return this; }
BlobsGetAccessControlHeaders function(OffsetDateTime lastModified) { if (lastModified == null) { this.lastModified = null; } else { this.lastModified = new DateTimeRfc1123(lastModified); } return this; }
/** * Set the lastModified property: The Last-Modified property. * * @param lastModified the lastModified value to set. * @return the BlobsGetAccessControlHeaders object itself. */
Set the lastModified property: The Last-Modified property
setLastModified
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccessControlHeaders.java", "license": "mit", "size": 6967 }
[ "com.azure.core.util.DateTimeRfc1123", "java.time.OffsetDateTime" ]
import com.azure.core.util.DateTimeRfc1123; import java.time.OffsetDateTime;
import com.azure.core.util.*; import java.time.*;
[ "com.azure.core", "java.time" ]
com.azure.core; java.time;
2,637,729
public int uLobs(String sql, JSEngine.JSList lobs) throws SQLException { if (con != null) { //try { PreparedStatement ps = con.prepareStatement(sql); int i = 0; for(Object lob : lobs) { i++; if (lob instanceof org.mozilla.javascript.NativeJavaArray) { lob = ((org...
int function(String sql, JSEngine.JSList lobs) throws SQLException { if (con != null) { PreparedStatement ps = con.prepareStatement(sql); int i = 0; for(Object lob : lobs) { i++; if (lob instanceof org.mozilla.javascript.NativeJavaArray) { lob = ((org.mozilla.javascript.NativeJavaArray) lob).unwrap(); } if (lob instanc...
/** * <odoc> * <key>DB.uLobs(aSQL, anArray) : Number</key> * Executes a SQL statement on the current DB object instance that can have CLOB or BLOB bind * variables that can be specified on anArray. On success it will return the number of rows * affected. In case of error an exception will be thrown. *...
DB.uLobs(aSQL, anArray) : Number Executes a SQL statement on the current DB object instance that can have CLOB or BLOB bind variables that can be specified on anArray. On success it will return the number of rows affected. In case of error an exception will be thrown.
uLobs
{ "repo_name": "OpenAF/openaf", "path": "src/openaf/core/DB.java", "license": "apache-2.0", "size": 29945 }
[ "java.io.ByteArrayInputStream", "java.io.StringReader", "java.lang.String", "java.sql.PreparedStatement", "java.sql.SQLException" ]
import java.io.ByteArrayInputStream; import java.io.StringReader; import java.lang.String; import java.sql.PreparedStatement; import java.sql.SQLException;
import java.io.*; import java.lang.*; import java.sql.*;
[ "java.io", "java.lang", "java.sql" ]
java.io; java.lang; java.sql;
1,160,947
public static IExpr extractFactorFromExpression(final IExpr expression, INumber factor) { return extractFactorFromExpression(expression, factor, true); }
static IExpr function(final IExpr expression, INumber factor) { return extractFactorFromExpression(expression, factor, true); }
/** * Check if the expression has a complex number factor I. * * @param expression * @param factor * @return the negated negative expression or <code>null</code> if a negative expression couldn't * be extracted. */
Check if the expression has a complex number factor I
extractFactorFromExpression
{ "repo_name": "axkr/symja_android_library", "path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/eval/interfaces/AbstractFunctionEvaluator.java", "license": "gpl-3.0", "size": 27756 }
[ "org.matheclipse.core.interfaces.IExpr", "org.matheclipse.core.interfaces.INumber" ]
import org.matheclipse.core.interfaces.IExpr; import org.matheclipse.core.interfaces.INumber;
import org.matheclipse.core.interfaces.*;
[ "org.matheclipse.core" ]
org.matheclipse.core;
1,566,931
T sort(String columnId, SortOrder order);
T sort(String columnId, SortOrder order);
/** * Will apply the specified sort order over the indicated data set column. * @param columnId The identifier of the column that should be sorted. * @param order The sort order. * @see org.dashbuilder.dataset.sort.SortOrder * @return The DataSetLookupBuilder instance that is being used to conf...
Will apply the specified sort order over the indicated data set column
sort
{ "repo_name": "dgutierr/dashbuilder", "path": "dashbuilder-shared/dashbuilder-dataset-api/src/main/java/org/dashbuilder/dataset/DataSetLookupBuilder.java", "license": "apache-2.0", "size": 16893 }
[ "org.dashbuilder.dataset.sort.SortOrder" ]
import org.dashbuilder.dataset.sort.SortOrder;
import org.dashbuilder.dataset.sort.*;
[ "org.dashbuilder.dataset" ]
org.dashbuilder.dataset;
448,187