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
private static void insetListViewDrawables(ListView view, int insetSide) { final Drawable selector = view.getSelector(); final Drawable divider = view.getDivider(); // fully unregister these drawables so callbacks can be maintained after // wrapping below. final Drawable stu...
static void function(ListView view, int insetSide) { final Drawable selector = view.getSelector(); final Drawable divider = view.getDivider(); final Drawable stub = new ColorDrawable(Color.TRANSPARENT); view.setSelector(stub); view.setDivider(stub); view.setSelector(new InsetBoundsDrawable(selector, insetSide)); view.s...
/** * Inset both selector and divider {@link Drawable} on the given * {@link ListView} by the requested dimensions. */
Inset both selector and divider <code>Drawable</code> on the given <code>ListView</code> by the requested dimensions
insetListViewDrawables
{ "repo_name": "rex-xxx/mt6572_x201", "path": "packages/apps/Settings/src/com/android/settings/DataUsageSummary.java", "license": "gpl-2.0", "size": 144878 }
[ "android.graphics.Color", "android.graphics.drawable.ColorDrawable", "android.graphics.drawable.Drawable", "android.widget.ListView", "com.android.settings.drawable.InsetBoundsDrawable" ]
import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.widget.ListView; import com.android.settings.drawable.InsetBoundsDrawable;
import android.graphics.*; import android.graphics.drawable.*; import android.widget.*; import com.android.settings.drawable.*;
[ "android.graphics", "android.widget", "com.android.settings" ]
android.graphics; android.widget; com.android.settings;
2,395,326
@Override public void init(IEditorSite site, IEditorInput editorInput) { setSite(site); setInputWithNotify(editorInput); setPartName(editorInput.getName()); site.setSelectionProvider(this); site.getPage().addPartListener(partListener); ResourcesPlugin.getWorkspace().addResourceChangeListener(reso...
void function(IEditorSite site, IEditorInput editorInput) { setSite(site); setInputWithNotify(editorInput); setPartName(editorInput.getName()); site.setSelectionProvider(this); site.getPage().addPartListener(partListener); ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeE...
/** * This is called during startup. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This is called during startup.
init
{ "repo_name": "KAMP-Research/KAMP4APS", "path": "edu.kit.ipd.sdq.kamp4aps.aps.editor/src/edu/kit/ipd/sdq/kamp4aps/model/aPS/presentation/apsEditor.java", "license": "apache-2.0", "size": 57529 }
[ "org.eclipse.core.resources.IResourceChangeEvent", "org.eclipse.core.resources.ResourcesPlugin", "org.eclipse.ui.IEditorInput", "org.eclipse.ui.IEditorSite" ]
import org.eclipse.core.resources.IResourceChangeEvent; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorSite;
import org.eclipse.core.resources.*; import org.eclipse.ui.*;
[ "org.eclipse.core", "org.eclipse.ui" ]
org.eclipse.core; org.eclipse.ui;
1,365,970
@SuppressWarnings("incomplete-switch") // Other cases are handled by action() @Override public void actionInternal(ActionCode actionCode, Object param) { switch (actionCode) { case REQ_SSL_ATTRIBUTE: { try { if (sslSupport != null) { Object ss...
@SuppressWarnings(STR) void function(ActionCode actionCode, Object param) { switch (actionCode) { case REQ_SSL_ATTRIBUTE: { try { if (sslSupport != null) { Object sslO = sslSupport.getCipherSuite(); if (sslO != null) request.setAttribute (SSLSupport.CIPHER_SUITE_KEY, sslO); sslO = sslSupport.getPeerCertificateChain(fal...
/** * Send an action to the connector. * * @param actionCode Type of the action * @param param Action parameter */
Send an action to the connector
actionInternal
{ "repo_name": "lizanle521/apache-tomcat-7.0.81-src", "path": "java/org/apache/coyote/http11/Http11Processor.java", "license": "apache-2.0", "size": 14063 }
[ "java.net.InetAddress", "org.apache.coyote.ActionCode", "org.apache.coyote.http11.filters.BufferedInputFilter", "org.apache.tomcat.util.net.JIoEndpoint", "org.apache.tomcat.util.net.SSLSupport", "org.apache.tomcat.util.net.SocketStatus" ]
import java.net.InetAddress; import org.apache.coyote.ActionCode; import org.apache.coyote.http11.filters.BufferedInputFilter; import org.apache.tomcat.util.net.JIoEndpoint; import org.apache.tomcat.util.net.SSLSupport; import org.apache.tomcat.util.net.SocketStatus;
import java.net.*; import org.apache.coyote.*; import org.apache.coyote.http11.filters.*; import org.apache.tomcat.util.net.*;
[ "java.net", "org.apache.coyote", "org.apache.tomcat" ]
java.net; org.apache.coyote; org.apache.tomcat;
2,029,097
EOperation getTask__SetMaxEndTime__int();
EOperation getTask__SetMaxEndTime__int();
/** * Returns the meta object for the '{@link ch.hilbri.assist.model.Task#setMaxEndTime(int) <em>Set Max End Time</em>}' operation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the '<em>Set Max End Time</em>' operation. * @see ch.hilbri.assist.model.Task#setMa...
Returns the meta object for the '<code>ch.hilbri.assist.model.Task#setMaxEndTime(int) Set Max End Time</code>' operation.
getTask__SetMaxEndTime__int
{ "repo_name": "RobertHilbrich/assist", "path": "ch.hilbri.assist.model/src-gen/ch/hilbri/assist/model/ModelPackage.java", "license": "gpl-2.0", "size": 419306 }
[ "org.eclipse.emf.ecore.EOperation" ]
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
304,209
public void SlewSteer(double outputValue) throws CANTimeoutException { front.Steer(outputValue * 0.75); rear.Steer((outputValue * 0.75) * -1.0); }
void function(double outputValue) throws CANTimeoutException { front.Steer(outputValue * 0.75); rear.Steer((outputValue * 0.75) * -1.0); }
/** * * * SlewSteer() * * this method turns the front and rear wheels to opposite angles from each * other allowing the robot to turn in a circle * * @param outputValue is the position to steer the wheels to in the range of * -1.0 ... 0.0 ... 1.0 where 0.0 is centered, 1.0 is ___...
SlewSteer() this method turns the front and rear wheels to opposite angles from each other allowing the robot to turn in a circle
SlewSteer
{ "repo_name": "FIRST-FRC-Team-2028/2012", "path": "src/com/phoebushighschool/phoebusrobotics/telepath/CrabDrive.java", "license": "bsd-3-clause", "size": 14707 }
[ "edu.wpi.first.wpilibj.can.CANTimeoutException" ]
import edu.wpi.first.wpilibj.can.CANTimeoutException;
import edu.wpi.first.wpilibj.can.*;
[ "edu.wpi.first" ]
edu.wpi.first;
151,208
@Override public void run() { try { LocalDevice local = LocalDevice.getLocalDevice(); if (con != null) { InputStream is = con.openInputStream(); String messageBuffer = ""; while (!stop) { //reciever string ...
void function() { try { LocalDevice local = LocalDevice.getLocalDevice(); if (con != null) { InputStream is = con.openInputStream(); String messageBuffer = STR\\%sSTRSTRCannot sleep threadSTRCannot initialize connection.STRCannot initialize connections."), local)); } } catch (Exception e) { System.err.print(e.toString(...
/** * Run thread */
Run thread
run
{ "repo_name": "vkorecky/bluetooth-client-hc06", "path": "src/main/java/org/korecky/bluetooth/client/hc06/RFCommClientThread.java", "license": "apache-2.0", "size": 6012 }
[ "java.io.InputStream", "javax.bluetooth.LocalDevice" ]
import java.io.InputStream; import javax.bluetooth.LocalDevice;
import java.io.*; import javax.bluetooth.*;
[ "java.io", "javax.bluetooth" ]
java.io; javax.bluetooth;
471,642
public void setProjection(ProjectionJSQL projection) { ProjectionVisitor visitor = new ProjectionVisitor(); visitor.setProjection(selectQuery, projection); this.projection = projection; }
void function(ProjectionJSQL projection) { ProjectionVisitor visitor = new ProjectionVisitor(); visitor.setProjection(selectQuery, projection); this.projection = projection; }
/** * Set the object construction for the SELECT clause, modifying the current * statement * * @param projection */
Set the object construction for the SELECT clause, modifying the current statement
setProjection
{ "repo_name": "clarkparsia/ontop", "path": "obdalib-core/src/main/java/it/unibz/krdb/sql/api/ParsedSQLQuery.java", "license": "apache-2.0", "size": 8197 }
[ "it.unibz.krdb.obda.parser.ProjectionVisitor" ]
import it.unibz.krdb.obda.parser.ProjectionVisitor;
import it.unibz.krdb.obda.parser.*;
[ "it.unibz.krdb" ]
it.unibz.krdb;
906,368
protected void mouseDragged(Minecraft p_146119_1_, int p_146119_2_, int p_146119_3_) { }
void function(Minecraft p_146119_1_, int p_146119_2_, int p_146119_3_) { }
/** * Fired when the mouse button is dragged. Equivalent of * MouseListener.mouseDragged(MouseEvent e). */
Fired when the mouse button is dragged. Equivalent of MouseListener.mouseDragged(MouseEvent e)
mouseDragged
{ "repo_name": "kremnev8/AdvancedSpaceStaion-mod", "path": "src/main/java/net/glider/src/gui/GuiButtonRemover.java", "license": "mit", "size": 11901 }
[ "net.minecraft.client.Minecraft" ]
import net.minecraft.client.Minecraft;
import net.minecraft.client.*;
[ "net.minecraft.client" ]
net.minecraft.client;
793,429
public void moveEntity(long uid, int x, int y) { entities.move(uid, new Point(x, y)); }
void function(long uid, int x, int y) { entities.move(uid, new Point(x, y)); }
/** * Moves an entity to the given position. * * @param uid * @param x * @param y */
Moves an entity to the given position
moveEntity
{ "repo_name": "kosmonet/neon", "path": "src/neon/client/Map.java", "license": "gpl-3.0", "size": 6214 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
270,502
public void testEmptyUri() { assertNull(UserUriMatcher.getUser(Uri.parse(""))); }
void function() { assertNull(UserUriMatcher.getUser(Uri.parse(""))); }
/** * Verify empty URI */
Verify empty URI
testEmptyUri
{ "repo_name": "larsgrefer/pocket-hub", "path": "app/src/androidTest/java/com/github/pockethub/android/tests/user/UserUriMatcherTest.java", "license": "apache-2.0", "size": 2543 }
[ "android.net.Uri", "com.github.pockethub.android.core.user.UserUriMatcher" ]
import android.net.Uri; import com.github.pockethub.android.core.user.UserUriMatcher;
import android.net.*; import com.github.pockethub.android.core.user.*;
[ "android.net", "com.github.pockethub" ]
android.net; com.github.pockethub;
2,597,673
public boolean containsValue(Object key, Object value) { Collection coll = getCollection(key); if (coll == null) { return false; } return coll.contains(value); }
boolean function(Object key, Object value) { Collection coll = getCollection(key); if (coll == null) { return false; } return coll.contains(value); }
/** * Checks whether the collection at the specified key contains the value. * * @param value the value to search for * @return true if the map contains the value */
Checks whether the collection at the specified key contains the value
containsValue
{ "repo_name": "leodmurillo/sonar", "path": "plugins/sonar-squid-java-plugin/test-resources/commons-collections-3.2.1/src/org/apache/commons/collections/map/MultiValueMap.java", "license": "lgpl-3.0", "size": 15437 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,360,003
public ServiceFuture<CognitiveServicesAccountKeysInner> listKeysAsync(String resourceGroupName, String accountName, final ServiceCallback<CognitiveServicesAccountKeysInner> serviceCallback) { return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback)...
ServiceFuture<CognitiveServicesAccountKeysInner> function(String resourceGroupName, String accountName, final ServiceCallback<CognitiveServicesAccountKeysInner> serviceCallback) { return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); }
/** * Lists the account keys for the specified Cognitive Services account. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param accountName The name of the cognitive services account within the specified resource group. Congitive Services account names...
Lists the account keys for the specified Cognitive Services account
listKeysAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/cognitiveservices/mgmt-v2016_02_01_preview/src/main/java/com/microsoft/azure/management/cognitiveservices/v2016_02_01_preview/implementation/CognitiveServicesAccountsInner.java", "license": "mit", "size": 73522 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
61,127
EReference getFloorCast_Expr();
EReference getFloorCast_Expr();
/** * Returns the meta object for the containment reference '{@link com.rockwellcollins.atc.agree.agree.FloorCast#getExpr <em>Expr</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Expr</em>'. * @see com.rockwellcollins.atc.agree.agree.Floor...
Returns the meta object for the containment reference '<code>com.rockwellcollins.atc.agree.agree.FloorCast#getExpr Expr</code>'.
getFloorCast_Expr
{ "repo_name": "smaccm/smaccm", "path": "fm-workbench/agree/com.rockwellcollins.atc.agree/src-gen/com/rockwellcollins/atc/agree/agree/AgreePackage.java", "license": "bsd-3-clause", "size": 292940 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,185,972
protected BigInteger[] getMultipliers(Rational other) { BigInteger[] result = new BigInteger[2]; BigInteger lcm = calculateLeastCommonMultiple(reducedDenominator, other.reducedDenominator); result[0] = lcm.divide(reducedDenominator); result[1] = lcm.divide(other.reducedDenominator); return result; } //...
BigInteger[] function(Rational other) { BigInteger[] result = new BigInteger[2]; BigInteger lcm = calculateLeastCommonMultiple(reducedDenominator, other.reducedDenominator); result[0] = lcm.divide(reducedDenominator); result[1] = lcm.divide(other.reducedDenominator); return result; }
/** * Used internally to find by which factor to multiply the reduced * numerators when comparing two {@link Rational}s. * * @param other the {@link Rational} to which this {@link Rational}'s value * is to be compared. * @return An array of {@link BigInteger} multipliers. */
Used internally to find by which factor to multiply the reduced numerators when comparing two <code>Rational</code>s
getMultipliers
{ "repo_name": "Sami32/UniversalMediaServer", "path": "src/main/java/net/pms/util/Rational.java", "license": "gpl-2.0", "size": 49310 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
2,710,280
public void startPlaying() { startPlaying((TrackInfo)null); }
void function() { startPlaying((TrackInfo)null); }
/** * starts the playing command */
starts the playing command
startPlaying
{ "repo_name": "intellimate/IzouSDK", "path": "src/main/java/org/intellimate/izou/sdk/frameworks/music/player/template/PlayerController.java", "license": "apache-2.0", "size": 6088 }
[ "org.intellimate.izou.sdk.frameworks.music.player.TrackInfo" ]
import org.intellimate.izou.sdk.frameworks.music.player.TrackInfo;
import org.intellimate.izou.sdk.frameworks.music.player.*;
[ "org.intellimate.izou" ]
org.intellimate.izou;
28,963
private static boolean isHostName(String value) { return !(Inet6Util.isValidIPV4Address(value) || Inet6Util .isValidIP6Address(value)); }
static boolean function(String value) { return !(Inet6Util.isValidIPV4Address(value) Inet6Util .isValidIP6Address(value)); }
/** * Returns true if the string is a host name, false if it is an IP Address. */
Returns true if the string is a host name, false if it is an IP Address
isHostName
{ "repo_name": "freeVM/freeVM", "path": "enhanced/java/classlib/modules/luni/src/main/java/java/net/InetAddress.java", "license": "apache-2.0", "size": 50643 }
[ "org.apache.harmony.luni.util.Inet6Util" ]
import org.apache.harmony.luni.util.Inet6Util;
import org.apache.harmony.luni.util.*;
[ "org.apache.harmony" ]
org.apache.harmony;
2,518,000
private boolean isShellQuote(Object input) { if (input == null) { return false; } if (input instanceof Map<?,?>) { return CWLBeanHelper.getValue(SHELL_QUOTE_KEY, input) != null; } return false; }
boolean function(Object input) { if (input == null) { return false; } if (input instanceof Map<?,?>) { return CWLBeanHelper.getValue(SHELL_QUOTE_KEY, input) != null; } return false; }
/** * Is shellQuote enabled */
Is shellQuote enabled
isShellQuote
{ "repo_name": "markosbg/debug", "path": "rabix-bindings-cwl/src/main/java/org/rabix/bindings/cwl/CWLCommandLineBuilder.java", "license": "apache-2.0", "size": 14986 }
[ "java.util.Map", "org.rabix.bindings.cwl.helper.CWLBeanHelper" ]
import java.util.Map; import org.rabix.bindings.cwl.helper.CWLBeanHelper;
import java.util.*; import org.rabix.bindings.cwl.helper.*;
[ "java.util", "org.rabix.bindings" ]
java.util; org.rabix.bindings;
1,514,307
@SuppressWarnings({"MismatchedQueryAndUpdateOfCollection"}) private long updateLocal(int p, GridDhtPartitionState state, long updateSeq, AffinityTopologyVersion affVer) { assert lock.isWriteLockedByCurrentThread(); ClusterNode oldest = discoCache.oldestAliveServerNode(); assert oldest ...
@SuppressWarnings({STR}) long function(int p, GridDhtPartitionState state, long updateSeq, AffinityTopologyVersion affVer) { assert lock.isWriteLockedByCurrentThread(); ClusterNode oldest = discoCache.oldestAliveServerNode(); assert oldest != null ctx.kernalContext().clientNode(); if (ctx.localNode().equals(oldest) && ...
/** * Updates state of partition in local {@link #node2part} map and recalculates {@link #diffFromAffinity}. * * @param p Partition. * @param state Partition state. * @param updateSeq Update sequence. * @param affVer Affinity version. * @return Update sequence. */
Updates state of partition in local <code>#node2part</code> map and recalculates <code>#diffFromAffinity</code>
updateLocal
{ "repo_name": "sk0x50/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java", "license": "apache-2.0", "size": 105023 }
[ "java.util.Set", "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.internal.processors.affinity.AffinityAssignment", "org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion", "org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap", "org.apache....
import java.util.Set; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.processors.affinity.AffinityAssignment; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap; i...
import java.util.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.processors.affinity.*; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.*; import org.apache.ignite.internal.util.*; import org.apache.ignite.internal.util.typedef.internal.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,999,765
public Node createParametersWithVarArgs(List<JSType> parameterTypes) { return createParametersWithVarArgs( parameterTypes.toArray(new JSType[parameterTypes.size()])); }
Node function(List<JSType> parameterTypes) { return createParametersWithVarArgs( parameterTypes.toArray(new JSType[parameterTypes.size()])); }
/** * Creates a tree hierarchy representing a typed argument list. The last * parameter type is considered a variable length argument. * * @param parameterTypes the parameter types. The last element of this array * is considered a variable length argument. * @return a tree hierarchy representing a...
Creates a tree hierarchy representing a typed argument list. The last parameter type is considered a variable length argument
createParametersWithVarArgs
{ "repo_name": "olegshnitko/closure-compiler", "path": "src/com/google/javascript/rhino/jstype/JSTypeRegistry.java", "license": "apache-2.0", "size": 55737 }
[ "com.google.javascript.rhino.Node", "java.util.List" ]
import com.google.javascript.rhino.Node; import java.util.List;
import com.google.javascript.rhino.*; import java.util.*;
[ "com.google.javascript", "java.util" ]
com.google.javascript; java.util;
1,216,942
public static Collection split(Object self, Closure closure) { List accept = new ArrayList(); List reject = new ArrayList(); return split(closure, accept, reject, InvokerHelper.asIterator(self)); }
static Collection function(Object self, Closure closure) { List accept = new ArrayList(); List reject = new ArrayList(); return split(closure, accept, reject, InvokerHelper.asIterator(self)); }
/** * Splits all items into two lists based on the closure condition. * The first list contains all items matching the closure expression. * The second list all those that don't. * * @param self an Object with an Iterator returning its values * @param closure a closure condition * ...
Splits all items into two lists based on the closure condition. The first list contains all items matching the closure expression. The second list all those that don't
split
{ "repo_name": "apache/incubator-groovy", "path": "src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java", "license": "apache-2.0", "size": 703151 }
[ "groovy.lang.Closure", "java.util.ArrayList", "java.util.Collection", "java.util.List" ]
import groovy.lang.Closure; import java.util.ArrayList; import java.util.Collection; import java.util.List;
import groovy.lang.*; import java.util.*;
[ "groovy.lang", "java.util" ]
groovy.lang; java.util;
2,620,543
public void testMax4StrictBlocking() throws Exception { final String name = "testMax4StrictBlocking"; getLogger().info( "Test: " + name ); int size = 3; // Initialize the exception field. m_exception = null; final BufferedLogger logger = new BufferedLogger(); ...
void function() throws Exception { final String name = STR; getLogger().info( STR + name ); int size = 3; m_exception = null; final BufferedLogger logger = new BufferedLogger(); PoolableTestObject.setStaticLoggger( logger ); PoolableTestObject.resetInstanceCounter(); PoolableTestObjectInterface[] poolables = new Poolab...
/** * Test a non-default max value with a strict max and blocking with no timeout */
Test a non-default max value with a strict max and blocking with no timeout
testMax4StrictBlocking
{ "repo_name": "eva-xuyen/excalibur", "path": "deprecated/component-tests/src/test/org/apache/avalon/excalibur/component/test/PoolableComponentHandlerTestCase.java", "license": "apache-2.0", "size": 23461 }
[ "org.apache.avalon.excalibur.testcase.BufferedLogger", "org.apache.avalon.framework.component.Component" ]
import org.apache.avalon.excalibur.testcase.BufferedLogger; import org.apache.avalon.framework.component.Component;
import org.apache.avalon.excalibur.testcase.*; import org.apache.avalon.framework.component.*;
[ "org.apache.avalon" ]
org.apache.avalon;
335,214
public List<Statement> getRelatedTriples(IRI resource, IRI context, RMapSearchParams params, Rdf4jTriplestore ts) throws RMapDefectiveArgumentException, RMapException { if (resource==null){ throw new RMapDefectiveArgumentException ("null URI"); } List<Statement> relatedStmts = new ArrayList<Statement>()...
List<Statement> function(IRI resource, IRI context, RMapSearchParams params, Rdf4jTriplestore ts) throws RMapDefectiveArgumentException, RMapException { if (resource==null){ throw new RMapDefectiveArgumentException (STR); } List<Statement> relatedStmts = new ArrayList<Statement>(); Set<IRI> systemAgents = ORAdapter.uri...
/** * Get Statements referencing a IRI in subject or object, whose Subject, Predicate, and Object comprise an RMapStatement, * and (if statusCode is not null), whose status matches statusCode, agent, and date filters. * * @param resource a Resource IRI * @param context a context filter (e.g. when retrieving ...
Get Statements referencing a IRI in subject or object, whose Subject, Predicate, and Object comprise an RMapStatement, and (if statusCode is not null), whose status matches statusCode, agent, and date filters
getRelatedTriples
{ "repo_name": "rmap-project/rmap", "path": "core/src/main/java/info/rmapproject/core/rmapservice/impl/rdf4j/ORMapResourceMgr.java", "license": "apache-2.0", "size": 24084 }
[ "info.rmapproject.core.exception.RMapDefectiveArgumentException", "info.rmapproject.core.exception.RMapException", "info.rmapproject.core.model.impl.rdf4j.ORAdapter", "info.rmapproject.core.model.request.OrderBy", "info.rmapproject.core.model.request.RMapSearchParams", "info.rmapproject.core.rmapservice.i...
import info.rmapproject.core.exception.RMapDefectiveArgumentException; import info.rmapproject.core.exception.RMapException; import info.rmapproject.core.model.impl.rdf4j.ORAdapter; import info.rmapproject.core.model.request.OrderBy; import info.rmapproject.core.model.request.RMapSearchParams; import info.rmapproject.c...
import info.rmapproject.core.exception.*; import info.rmapproject.core.model.impl.rdf4j.*; import info.rmapproject.core.model.request.*; import info.rmapproject.core.rmapservice.impl.rdf4j.triplestore.*; import java.util.*; import org.eclipse.rdf4j.model.*; import org.eclipse.rdf4j.query.*;
[ "info.rmapproject.core", "java.util", "org.eclipse.rdf4j" ]
info.rmapproject.core; java.util; org.eclipse.rdf4j;
1,016,629
public static int readIntLittleEndian(DrillBuf in, int offset) { int ch4 = in.getByte(offset) & 0xff; int ch3 = in.getByte(offset + 1) & 0xff; int ch2 = in.getByte(offset + 2) & 0xff; int ch1 = in.getByte(offset + 3) & 0xff; return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0)); } priv...
static int function(DrillBuf in, int offset) { int ch4 = in.getByte(offset) & 0xff; int ch3 = in.getByte(offset + 1) & 0xff; int ch2 = in.getByte(offset + 2) & 0xff; int ch1 = in.getByte(offset + 3) & 0xff; return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0)); } private class ColumnReaderProcessPagesTask implem...
/** * This is copied out of Parquet library, didn't want to deal with the * unnecessary throws statement they had declared * * @param in incoming data * @param offset offset * @return little endian integer */
This is copied out of Parquet library, didn't want to deal with the unnecessary throws statement they had declared
readIntLittleEndian
{ "repo_name": "johnnywale/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/columnreaders/ColumnReader.java", "license": "apache-2.0", "size": 13053 }
[ "io.netty.buffer.DrillBuf", "java.util.concurrent.Callable" ]
import io.netty.buffer.DrillBuf; import java.util.concurrent.Callable;
import io.netty.buffer.*; import java.util.concurrent.*;
[ "io.netty.buffer", "java.util" ]
io.netty.buffer; java.util;
726,185
void processDiscoItemsGet(IQ iq, PacketCallback responseCallback) { IQ response = IQ.createResultIQ(iq); response.setChildElement("query", XmppNamespace.NAMESPACE_DISCO_ITEMS); responseCallback.run(response); }
void processDiscoItemsGet(IQ iq, PacketCallback responseCallback) { IQ response = IQ.createResultIQ(iq); response.setChildElement("query", XmppNamespace.NAMESPACE_DISCO_ITEMS); responseCallback.run(response); }
/** * Handles a disco items get from a foreign XMPP agent. No useful responses, * since we're not a domain on it's own: just the wave component. * * @param iq the IQ packet. */
Handles a disco items get from a foreign XMPP agent. No useful responses, since we're not a domain on it's own: just the wave component
processDiscoItemsGet
{ "repo_name": "scrosby/fedone", "path": "src/org/waveprotocol/wave/federation/xmpp/XmppDisco.java", "license": "apache-2.0", "size": 6949 }
[ "org.xmpp.packet.IQ" ]
import org.xmpp.packet.IQ;
import org.xmpp.packet.*;
[ "org.xmpp.packet" ]
org.xmpp.packet;
1,559,873
protected Double toObject(double value) { return DoubleUtils.toObject(value); }
Double function(double value) { return DoubleUtils.toObject(value); }
/** * Wraps an <code>double</code> with an Object wrapper. * * @param value the primitive value * @return the Object wrapper */
Wraps an <code>double</code> with an Object wrapper
toObject
{ "repo_name": "fengshao0907/joda-primitives", "path": "src/main/java/org/joda/primitives/collection/impl/AbstractDoubleCollection.java", "license": "apache-2.0", "size": 27616 }
[ "org.joda.primitives.DoubleUtils" ]
import org.joda.primitives.DoubleUtils;
import org.joda.primitives.*;
[ "org.joda.primitives" ]
org.joda.primitives;
1,016,454
@Test public void testKeyedAdvancingTimeWithoutElements() throws Exception { final Event startEvent = new Event(42, "start", 1.0); final long watermarkTimestamp1 = 5L; final long watermarkTimestamp2 = 13L; final Map<String, List<Event>> expectedSequence = new HashMap<>(2); ...
void function() throws Exception { final Event startEvent = new Event(42, "start", 1.0); final long watermarkTimestamp1 = 5L; final long watermarkTimestamp2 = 13L; final Map<String, List<Event>> expectedSequence = new HashMap<>(2); expectedSequence.put("start", Collections.<Event>singletonList(startEvent)); final Outpu...
/** * Tests that the internal time of a CEP operator advances only given watermarks. See FLINK-5033 */
Tests that the internal time of a CEP operator advances only given watermarks. See FLINK-5033
testKeyedAdvancingTimeWithoutElements
{ "repo_name": "aljoscha/flink", "path": "flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/operator/CEPOperatorTest.java", "license": "apache-2.0", "size": 65146 }
[ "java.util.Collections", "java.util.HashMap", "java.util.List", "java.util.Map", "org.apache.flink.api.java.functions.KeySelector", "org.apache.flink.api.java.tuple.Tuple2", "org.apache.flink.cep.Event", "org.apache.flink.streaming.util.KeyedOneInputStreamOperatorTestHarness", "org.apache.flink.util...
import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.flink.api.java.functions.KeySelector; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.cep.Event; import org.apache.flink.streaming.util.KeyedOneInputStreamOperatorTestHarness; im...
import java.util.*; import org.apache.flink.api.java.functions.*; import org.apache.flink.api.java.tuple.*; import org.apache.flink.cep.*; import org.apache.flink.streaming.util.*; import org.apache.flink.util.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
1,523,834
Set<AggregatedGroupMapping> getGroupMappings();
Set<AggregatedGroupMapping> getGroupMappings();
/** * Get the set of all groups that have been aggregated */
Get the set of all groups that have been aggregated
getGroupMappings
{ "repo_name": "GTCC/nc-ssp-platform-nc-ssp-platform", "path": "uportal-war/src/main/java/org/jasig/portal/events/aggr/groups/AggregatedGroupLookupDao.java", "license": "apache-2.0", "size": 1466 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
862,067
public void clone(String parentImage, String parentSnap, IoCTX childIo, String childName, long features, int order) throws RbdException { IntByReference orderRef = new IntByReference(order); int r = rbd.rbd_clone(this.io, parentImage, parentSnap, childIo.getPointer(), childName...
void function(String parentImage, String parentSnap, IoCTX childIo, String childName, long features, int order) throws RbdException { IntByReference orderRef = new IntByReference(order); int r = rbd.rbd_clone(this.io, parentImage, parentSnap, childIo.getPointer(), childName, features, orderRef); if (r < 0) { throw new ...
/** * Clone a RBD image * * @param parentImage * The name of the parent image * @param parentSnap * The snapshot of the parent image (has to be protected) * @param childIo * The IoCTX for the child image * @param childName * The name for ...
Clone a RBD image
clone
{ "repo_name": "ceph/rados-java", "path": "src/main/java/com/ceph/rbd/Rbd.java", "license": "apache-2.0", "size": 11354 }
[ "com.ceph.rados.IoCTX", "com.sun.jna.ptr.IntByReference" ]
import com.ceph.rados.IoCTX; import com.sun.jna.ptr.IntByReference;
import com.ceph.rados.*; import com.sun.jna.ptr.*;
[ "com.ceph.rados", "com.sun.jna" ]
com.ceph.rados; com.sun.jna;
1,484,283
protected static Object getConverterForFile(String filename, Hashtable<String,String> ht) { Object result; String extension; int index; result = null; index = filename.lastIndexOf('.'); if (index > -1) { extension = filename.substring(index).toLowerCase(); result = ge...
static Object function(String filename, Hashtable<String,String> ht) { Object result; String extension; int index; result = null; index = filename.lastIndexOf('.'); if (index > -1) { extension = filename.substring(index).toLowerCase(); result = getConverterForExtension(extension, ht); if (extension.equals(".gz") && res...
/** * tries to determine the converter to use for this kind of file, returns * null if none can be found in the given hashtable. * * @param filename the file to return a converter for * @param ht the hashtable with the relation extension/converter * @return the converter if one was found, null othe...
tries to determine the converter to use for this kind of file, returns null if none can be found in the given hashtable
getConverterForFile
{ "repo_name": "goddesss/DataModeling", "path": "src/weka/core/converters/ConverterUtils.java", "license": "gpl-2.0", "size": 34301 }
[ "java.util.Hashtable" ]
import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
602,674
@Test(expected = EntityNotFoundException.class) public void test_updateEmployee_accountNotExist() throws Exception { account.setId(Long.MAX_VALUE); instance.updateEmployee(account); }
@Test(expected = EntityNotFoundException.class) void function() throws Exception { account.setId(Long.MAX_VALUE); instance.updateEmployee(account); }
/** * <p> * Failure test for the method <code>updateEmployee(Account account)</code> with account doesn't exist.<br> * <code>EntityNotFoundException</code> is expected. * </p> * * @throws Exception * to JUnit. */
Failure test for the method <code>updateEmployee(Account account)</code> with account doesn't exist. <code>EntityNotFoundException</code> is expected.
test_updateEmployee_accountNotExist
{ "repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application", "path": "Code/Data_Migration/src/java/tests/gov/opm/scrd/services/impl/AccountServiceImplUnitTests.java", "license": "apache-2.0", "size": 64228 }
[ "gov.opm.scrd.services.EntityNotFoundException", "org.junit.Test" ]
import gov.opm.scrd.services.EntityNotFoundException; import org.junit.Test;
import gov.opm.scrd.services.*; import org.junit.*;
[ "gov.opm.scrd", "org.junit" ]
gov.opm.scrd; org.junit;
1,463,450
@ApiModelProperty(required = true, value = "") public String getConditionType() { return conditionType; }
@ApiModelProperty(required = true, value = "") String function() { return conditionType; }
/** * Get conditionType * @return conditionType **/
Get conditionType
getConditionType
{ "repo_name": "Minoli/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.admin/src/gen/java/org/wso2/carbon/apimgt/rest/api/admin/dto/BlockingConditionDTO.java", "license": "apache-2.0", "size": 4340 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,448,446
private static List<byte[]> parseVorbisCodecPrivate(byte[] codecPrivate) throws ParserException { try { if (codecPrivate[0] != 0x02) { throw new ParserException("Error parsing vorbis codec private"); } int offset = 1; int vorbisInfoLength = 0; while (c...
static List<byte[]> function(byte[] codecPrivate) throws ParserException { try { if (codecPrivate[0] != 0x02) { throw new ParserException(STR); } int offset = 1; int vorbisInfoLength = 0; while (codecPrivate[offset] == (byte) 0xFF) { vorbisInfoLength += 0xFF; offset++; } vorbisInfoLength += codecPrivate[offset++]; int ...
/** * Builds initialization data for a {@link Format} from Vorbis codec private data. * * @return The initialization data for the {@link Format}. * @throws ParserException If the initialization data could not be built. */
Builds initialization data for a <code>Format</code> from Vorbis codec private data
parseVorbisCodecPrivate
{ "repo_name": "tkpb/Telegram", "path": "TMessagesProj/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java", "license": "gpl-2.0", "size": 94252 }
[ "com.google.android.exoplayer2.ParserException", "java.util.ArrayList", "java.util.List" ]
import com.google.android.exoplayer2.ParserException; import java.util.ArrayList; import java.util.List;
import com.google.android.exoplayer2.*; import java.util.*;
[ "com.google.android", "java.util" ]
com.google.android; java.util;
884,859
@Nullable public <K> GridCloseableIterator<K> keysIterator(@Nullable String spaceName, @Nullable ClassLoader ldr) throws IgniteCheckedException { try { IgniteSpiCloseableIterator<K> it = getSpi().keyIterator(spaceName, context(ldr)); return it == null ? null : new GridSpiClo...
@Nullable <K> GridCloseableIterator<K> function(@Nullable String spaceName, @Nullable ClassLoader ldr) throws IgniteCheckedException { try { IgniteSpiCloseableIterator<K> it = getSpi().keyIterator(spaceName, context(ldr)); return it == null ? null : new GridSpiCloseableIteratorWrapper<>(it); } catch (IgniteSpiException...
/** * Gets iterator over space entries. * * @param spaceName Space name. * @param ldr Class loader. * @return Iterator over space entries or {@code null} if space is unknown. * @throws org.apache.ignite.spi.IgniteSpiException If failed. */
Gets iterator over space entries
keysIterator
{ "repo_name": "agura/incubator-ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/managers/swapspace/GridSwapSpaceManager.java", "license": "apache-2.0", "size": 15168 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.util.GridSpiCloseableIteratorWrapper", "org.apache.ignite.internal.util.lang.GridCloseableIterator", "org.apache.ignite.spi.IgniteSpiCloseableIterator", "org.apache.ignite.spi.IgniteSpiException", "org.jetbrains.annotations.Nullable" ...
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.util.GridSpiCloseableIteratorWrapper; import org.apache.ignite.internal.util.lang.GridCloseableIterator; import org.apache.ignite.spi.IgniteSpiCloseableIterator; import org.apache.ignite.spi.IgniteSpiException; import org.jetbrains.annot...
import org.apache.ignite.*; import org.apache.ignite.internal.util.*; import org.apache.ignite.internal.util.lang.*; import org.apache.ignite.spi.*; import org.jetbrains.annotations.*;
[ "org.apache.ignite", "org.jetbrains.annotations" ]
org.apache.ignite; org.jetbrains.annotations;
438,783
public static Generator<Vector2L> create32() { return new Vector2LGenerator(PrimitiveGenerators.longs( -2147483648L, -2147483647L )); }
static Generator<Vector2L> function() { return new Vector2LGenerator(PrimitiveGenerators.longs( -2147483648L, -2147483647L )); }
/** * Create a generator initialized with a default component generator that * produces values in the range {@code [-2147483648, 2147483647]}. * * @return A generator */
Create a generator initialized with a default component generator that produces values in the range [-2147483648, 2147483647]
create32
{ "repo_name": "io7m/jtensors", "path": "com.io7m.jtensors.generators/src/main/java/com/io7m/jtensors/generators/Vector2LGenerator.java", "license": "isc", "size": 3521 }
[ "com.io7m.jtensors.core.unparameterized.vectors.Vector2L", "net.java.quickcheck.Generator", "net.java.quickcheck.generator.PrimitiveGenerators" ]
import com.io7m.jtensors.core.unparameterized.vectors.Vector2L; import net.java.quickcheck.Generator; import net.java.quickcheck.generator.PrimitiveGenerators;
import com.io7m.jtensors.core.unparameterized.vectors.*; import net.java.quickcheck.*; import net.java.quickcheck.generator.*;
[ "com.io7m.jtensors", "net.java.quickcheck" ]
com.io7m.jtensors; net.java.quickcheck;
1,010,911
public void updateMailboxListCallback(MessagingException result, long accountId, int progress) { }
void function(MessagingException result, long accountId, int progress) { }
/** * Callback for updateMailboxList * * @param result If null, the operation completed without error * @param accountId The account being operated on * @param progress 0 for "starting", 1..99 for updates (if needed in UI), 100 for complete */
Callback for updateMailboxList
updateMailboxListCallback
{ "repo_name": "rex-xxx/mt6572_x201", "path": "packages/apps/Email/src/com/android/email/Controller.java", "license": "gpl-2.0", "size": 126082 }
[ "com.android.emailcommon.mail.MessagingException" ]
import com.android.emailcommon.mail.MessagingException;
import com.android.emailcommon.mail.*;
[ "com.android.emailcommon" ]
com.android.emailcommon;
630,983
public void setDomainValues(COSArray domainValues) { domain = domainValues; getCOSObject().setItem(COSName.DOMAIN, domainValues); } /** * @deprecated Replaced by {@link #eval(float[] input)}
void function(COSArray domainValues) { domain = domainValues; getCOSObject().setItem(COSName.DOMAIN, domainValues); } /** * @deprecated Replaced by {@link #eval(float[] input)}
/** * This will set the domain values. * * @param domainValues The new domain values. */
This will set the domain values
setDomainValues
{ "repo_name": "torakiki/sambox", "path": "src/main/java/org/sejda/sambox/pdmodel/common/function/PDFunction.java", "license": "apache-2.0", "size": 10585 }
[ "org.sejda.sambox.cos.COSArray", "org.sejda.sambox.cos.COSName" ]
import org.sejda.sambox.cos.COSArray; import org.sejda.sambox.cos.COSName;
import org.sejda.sambox.cos.*;
[ "org.sejda.sambox" ]
org.sejda.sambox;
1,335,452
public void doTestMVFailedCase(String sql, String pattern) throws Exception { Client client = getClient(); ClientResponse cr = null; client.callProcedure("@AdHoc", "drop view mv if exists"); String msg = null; boolean success; try { cr = client.callProcedu...
void function(String sql, String pattern) throws Exception { Client client = getClient(); ClientResponse cr = null; client.callProcedure(STR, STR); String msg = null; boolean success; try { cr = client.callProcedure(STR, sql); success = true; } catch (Exception ex) { success = false; msg = ex.getMessage(); } client.cal...
/** * It's not allowed to have NOW or CURRENT_TIMESTAMP in a * join condition or a where clause. * @throws Exception */
It's not allowed to have NOW or CURRENT_TIMESTAMP in a join condition or a where clause
doTestMVFailedCase
{ "repo_name": "migue/voltdb", "path": "tests/frontend/org/voltdb/regressionsuites/TestMaterializedViewSuite.java", "license": "agpl-3.0", "size": 115248 }
[ "org.voltdb.client.Client", "org.voltdb.client.ClientResponse" ]
import org.voltdb.client.Client; import org.voltdb.client.ClientResponse;
import org.voltdb.client.*;
[ "org.voltdb.client" ]
org.voltdb.client;
883,552
StrBuilder getSource();
StrBuilder getSource();
/** * Returns the original source code of the example. * @return source code */
Returns the original source code of the example
getSource
{ "repo_name": "vdmeer/skb-java-interfaces", "path": "src/main/java/de/vandermeer/skb/interfaces/StandardExample.java", "license": "apache-2.0", "size": 1344 }
[ "org.apache.commons.lang3.text.StrBuilder" ]
import org.apache.commons.lang3.text.StrBuilder;
import org.apache.commons.lang3.text.*;
[ "org.apache.commons" ]
org.apache.commons;
707,077
protected String enc(String str) { try { return URLEncoder.encode(str, "UTF-8"); } catch (UnsupportedEncodingException ex) { return str; } }
String function(String str) { try { return URLEncoder.encode(str, "UTF-8"); } catch (UnsupportedEncodingException ex) { return str; } }
/** * Encodes a string. * @param str string to encode * @return encoded string */
Encodes a string
enc
{ "repo_name": "GeoinformationSystems/GeoprocessingAppstore", "path": "src/com/esri/gpt/control/georss/GeometryService.java", "license": "apache-2.0", "size": 7409 }
[ "java.io.UnsupportedEncodingException", "java.net.URLEncoder" ]
import java.io.UnsupportedEncodingException; import java.net.URLEncoder;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
679,108
public int read(DataInputStream dis) throws IOException { numerator = (short)dis.readUnsignedByte(); int power = (short)dis.readUnsignedByte(); denominator = 1 << power; // = Math.pow( 2, power ) metronomePulse = dis.readUnsignedByte(); thirtySecondN...
int function(DataInputStream dis) throws IOException { numerator = (short)dis.readUnsignedByte(); int power = (short)dis.readUnsignedByte(); denominator = 1 << power; metronomePulse = dis.readUnsignedByte(); thirtySecondNotesPerBeat = dis.readUnsignedByte(); return 4; }
/** * Read the contends of this objec in from disk * Implemented by Sean T. Hayes * @param dis a stream of MIDI data * @return the number of bytes read * @throws java.io.IOException */
Read the contends of this objec in from disk Implemented by Sean T. Hayes
read
{ "repo_name": "Armaxis/jmg", "path": "src/main/java/jm/midi/event/TimeSig.java", "license": "gpl-2.0", "size": 5586 }
[ "java.io.DataInputStream", "java.io.IOException" ]
import java.io.DataInputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,347,501
@Test public void whenProfileNameMatchesReturnsTrue() { // configure to look for the profile fname that will be found predicate.setProfileFNameToMatch("exampleUserProfileFname"); assertTrue( predicate.apply(request) ); }
void function() { predicate.setProfileFNameToMatch(STR); assertTrue( predicate.apply(request) ); }
/** * When the profile associated with the request has the expected fname, * the predicate returns true. */
When the profile associated with the request has the expected fname, the predicate returns true
whenProfileNameMatchesReturnsTrue
{ "repo_name": "apetro/uPortal", "path": "uportal-war/src/test/java/org/apereo/portal/rendering/predicates/ProfileFNamePredicateTest.java", "license": "apache-2.0", "size": 3954 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,695,131
@Override public void setHeader(String name, String originalValue) { String value; if (name.equalsIgnoreCase("location")) { value = rewriteLocation(originalValue); } else if (name.equalsIgnoreCase("set-cookie")) { value = rewriteSetCookie(originalValue); ...
void function(String name, String originalValue) { String value; if (name.equalsIgnoreCase(STR)) { value = rewriteLocation(originalValue); } else if (name.equalsIgnoreCase(STR)) { value = rewriteSetCookie(originalValue); } else { value = originalValue; } logger.log(Level.INFO, STR, new Object[]{name, originalValue, val...
/** * Checks if we have to rewrite the header and if so will rewrite it. * * @param name * @param originalValue * @see javax.servlet.http.HttpServletResponse#setHeader(java.lang.String, * java.lang.String) */
Checks if we have to rewrite the header and if so will rewrite it
setHeader
{ "repo_name": "GEOINT/keyhole", "path": "src/main/java/net/sf/j2ep/UrlRewritingResponseWrapper.java", "license": "apache-2.0", "size": 10126 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
2,451,263
private boolean saveBitmap(String fullPath, Bitmap bitmap) { if (fullPath == null || bitmap == null) return false; boolean fileCreated = false; boolean bitmapCompressed = false; boolean streamClosed = false; File imageFile = new File(fullPath); if (imag...
boolean function(String fullPath, Bitmap bitmap) { if (fullPath == null bitmap == null) return false; boolean fileCreated = false; boolean bitmapCompressed = false; boolean streamClosed = false; File imageFile = new File(fullPath); if (imageFile.exists()) if (!imageFile.delete()) return false; try { fileCreated = image...
/** * Saves the Bitmap as a PNG file at path 'fullPath' * * @param fullPath path of the image file * @param bitmap the image as a Bitmap * @return true if it successfully saved, false otherwise */
Saves the Bitmap as a PNG file at path 'fullPath'
saveBitmap
{ "repo_name": "computationalcore/smartcoins-wallet", "path": "app/src/main/java/de/bitshares_munich/utils/TinyDB.java", "license": "mit", "size": 23158 }
[ "android.graphics.Bitmap", "java.io.File", "java.io.FileOutputStream", "java.io.IOException" ]
import android.graphics.Bitmap; import java.io.File; import java.io.FileOutputStream; import java.io.IOException;
import android.graphics.*; import java.io.*;
[ "android.graphics", "java.io" ]
android.graphics; java.io;
739,222
private static Collection<Set<Node<Target>>> orderPartition( Collection<Set<Node<Target>>> collectionOfUnorderedSets) { List<Set<Node<Target>>> result = new ArrayList<>(); for (Set<Node<Target>> part : collectionOfUnorderedSets) { List<Node<Target>> toSort = new ArrayList<>(part); Collection...
static Collection<Set<Node<Target>>> function( Collection<Set<Node<Target>>> collectionOfUnorderedSets) { List<Set<Node<Target>>> result = new ArrayList<>(); for (Set<Node<Target>> part : collectionOfUnorderedSets) { List<Node<Target>> toSort = new ArrayList<>(part); Collections.sort(toSort, NODE_COMPARATOR); result.ad...
/** * Given {@code collectionOfUnorderedSets}, a collection of sets of nodes, returns a collection * of sets with the same elements as {@code collectionOfUnorderedSets} but with a stable * iteration order within each set given by the target ordering, and the collection ordered by the * same induced order. ...
Given collectionOfUnorderedSets, a collection of sets of nodes, returns a collection of sets with the same elements as collectionOfUnorderedSets but with a stable iteration order within each set given by the target ordering, and the collection ordered by the same induced order
orderPartition
{ "repo_name": "vt09/bazel", "path": "src/main/java/com/google/devtools/build/lib/query2/output/GraphOutputFormatter.java", "license": "apache-2.0", "size": 7176 }
[ "com.google.common.collect.ImmutableSet", "com.google.devtools.build.lib.graph.Node", "com.google.devtools.build.lib.packages.Target", "java.util.ArrayList", "java.util.Collection", "java.util.Collections", "java.util.List", "java.util.Set" ]
import com.google.common.collect.ImmutableSet; import com.google.devtools.build.lib.graph.Node; import com.google.devtools.build.lib.packages.Target; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Set;
import com.google.common.collect.*; import com.google.devtools.build.lib.graph.*; import com.google.devtools.build.lib.packages.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
2,837,815
public int decode( String data, OutputStream out) throws IOException { byte b1, b2; int length = 0; int end = data.length(); while (end > 0) { if (!ignore(data.charAt(end - 1))) { break; } end--; } int i = 0; while (i < end) { ...
int function( String data, OutputStream out) throws IOException { byte b1, b2; int length = 0; int end = data.length(); while (end > 0) { if (!ignore(data.charAt(end - 1))) { break; } end--; } int i = 0; while (i < end) { while (i < end && ignore(data.charAt(i))) { i++; } b1 = decodingTable[data.charAt(i++)]; while (i ...
/** * decode the Hex encoded String data writing it to the given output stream, * whitespace characters will be ignored. * * @return the number of bytes produced. */
decode the Hex encoded String data writing it to the given output stream, whitespace characters will be ignored
decode
{ "repo_name": "intel-hadoop/diceros", "path": "src/test/java/com/intel/diceros/test/util/HexEncoder.java", "license": "apache-2.0", "size": 4405 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,799,229
public Map<String, BuilderGen> getBuilderGenerators() { return builderGenerators; }
Map<String, BuilderGen> function() { return builderGenerators; }
/** * The builder generators. * * @return the generators, not null */
The builder generators
getBuilderGenerators
{ "repo_name": "fengshao0907/joda-beans", "path": "src/main/java/org/joda/beans/gen/BeanGenConfig.java", "license": "apache-2.0", "size": 13982 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
179,371
public Long getNumberOfDownloadsForCollectionAndItsChildren(InstitutionalCollection institutionalCollection) { log.debug("No. of downloads for insitutional collection Id: " + institutionalCollection ); return institutionalCollectionDAO.getFileDownloadsWithChildren(institutionalCollection); }
Long function(InstitutionalCollection institutionalCollection) { log.debug(STR + institutionalCollection ); return institutionalCollectionDAO.getFileDownloadsWithChildren(institutionalCollection); }
/** * Get the number of file downloads in the items of the specified collection and its children * * @param institutionalCollection collection to count for file downloads * * @return Number of downloads */
Get the number of file downloads in the items of the specified collection and its children
getNumberOfDownloadsForCollectionAndItsChildren
{ "repo_name": "nate-rcl/irplus", "path": "ir_service/src/edu/ur/ir/statistics/service/DefaultDownloadStatisticsService.java", "license": "apache-2.0", "size": 18735 }
[ "edu.ur.ir.institution.InstitutionalCollection" ]
import edu.ur.ir.institution.InstitutionalCollection;
import edu.ur.ir.institution.*;
[ "edu.ur.ir" ]
edu.ur.ir;
176,413
public HTable getTable(String tableName) { if ((tableName == null) || tableName.equals(this.tableName)) { return getTable(); } try { return tableCache.get(tableName); } catch (Exception e) { throw Throwables.propagate(e); } }
HTable function(String tableName) { if ((tableName == null) tableName.equals(this.tableName)) { return getTable(); } try { return tableCache.get(tableName); } catch (Exception e) { throw Throwables.propagate(e); } }
/** * Get the HBase table for the given table name. * * @param tableName The name of the table * * @return The HBase table * @omitFromUI */
Get the HBase table for the given table name
getTable
{ "repo_name": "tweise/incubator-apex-malhar", "path": "contrib/src/main/java/org/apache/apex/malhar/contrib/hbase/HBaseStore.java", "license": "apache-2.0", "size": 10530 }
[ "com.google.common.base.Throwables", "org.apache.hadoop.hbase.client.HTable" ]
import com.google.common.base.Throwables; import org.apache.hadoop.hbase.client.HTable;
import com.google.common.base.*; import org.apache.hadoop.hbase.client.*;
[ "com.google.common", "org.apache.hadoop" ]
com.google.common; org.apache.hadoop;
1,526,292
public static File getTestDir(String subdir) { return new File(getTestDir(), subdir).getAbsoluteFile(); }
static File function(String subdir) { return new File(getTestDir(), subdir).getAbsoluteFile(); }
/** * Get an uncreated directory for tests. * @return the absolute directory for tests. Caller is expected to create it. */
Get an uncreated directory for tests
getTestDir
{ "repo_name": "jaypatil/hadoop", "path": "hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java", "license": "gpl-3.0", "size": 19629 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,152,765
public List<String> getGlobalPolicyKeyTemplates(int tenantID) throws APIManagementException { List<String> keyTemplates = new ArrayList<String>(); Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; String sqlQuery = null; try { con...
List<String> function(int tenantID) throws APIManagementException { List<String> keyTemplates = new ArrayList<String>(); Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; String sqlQuery = null; try { conn = APIMgtDBUtil.getConnection(); sqlQuery = SQLConstants.GET_GLOBAL_POLICY_KEY_TEMPLATES; p...
/** * Retrieves global policy key templates for the given tenantID * * @param tenantID tenant id * @return list of KeyTemplates * @throws APIManagementException */
Retrieves global policy key templates for the given tenantID
getGlobalPolicyKeyTemplates
{ "repo_name": "tharikaGitHub/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java", "license": "apache-2.0", "size": 805423 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "java.util.ArrayList", "java.util.List", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.impl.ThrottlePolicyConstants", "org.wso2.carbon.apimgt.impl.dao.constants.SQLConst...
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.impl.ThrottlePolicyConstants; import org.wso2.carbon.apimgt.i...
import java.sql.*; import java.util.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.impl.dao.constants.*; import org.wso2.carbon.apimgt.impl.utils.*;
[ "java.sql", "java.util", "org.wso2.carbon" ]
java.sql; java.util; org.wso2.carbon;
1,410,317
@Test(expected = NullPointerException.class) public void testBoolArrayConstructorWithNull() { new SelectiveCsvEncoder((boolean[]) null); }
@Test(expected = NullPointerException.class) void function() { new SelectiveCsvEncoder((boolean[]) null); }
/** * Tests the boolean array constructor with a null array. */
Tests the boolean array constructor with a null array
testBoolArrayConstructorWithNull
{ "repo_name": "liwei5365/super-csv", "path": "super-csv/src/test/java/org/supercsv/encoder/SelectiveCsvEncoderTest.java", "license": "apache-2.0", "size": 2991 }
[ "org.junit.Test" ]
import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,730,844
public PersistenceService createPersistenceService(URI graph) { return new PersistenceService(objectRepository, graph); }
PersistenceService function(URI graph) { return new PersistenceService(objectRepository, graph); }
/** * Create persistence object * @param graph Graph context to query * @return persistence object */
Create persistence object
createPersistenceService
{ "repo_name": "westei/anno4j", "path": "anno4j-core/src/main/java/com/github/anno4j/Anno4j.java", "license": "apache-2.0", "size": 5256 }
[ "com.github.anno4j.persistence.PersistenceService" ]
import com.github.anno4j.persistence.PersistenceService;
import com.github.anno4j.persistence.*;
[ "com.github.anno4j" ]
com.github.anno4j;
2,176,513
@NonNull File worldContainer();
@NonNull File worldContainer();
/** * Gets the folder where all world data is stored. * * @return the world folder */
Gets the folder where all world data is stored
worldContainer
{ "repo_name": "IntellectualCrafters/PlotSquared", "path": "Core/src/main/java/com/plotsquared/core/PlotPlatform.java", "license": "gpl-3.0", "size": 9993 }
[ "java.io.File", "org.checkerframework.checker.nullness.qual.NonNull" ]
import java.io.File; import org.checkerframework.checker.nullness.qual.NonNull;
import java.io.*; import org.checkerframework.checker.nullness.qual.*;
[ "java.io", "org.checkerframework.checker" ]
java.io; org.checkerframework.checker;
781,249
@Override @Transactional( propagation = Propagation.REQUIRED, isolation = Isolation.READ_UNCOMMITTED ) public DAOResponse< Tab > deleteTabByTabId( int tabId, RequestParams requestParams ) { String location = this.getClass( ).getCanonicalName( ) + "#deleteTabByTabId()"; logger.debug( "Start...
@Transactional( propagation = Propagation.REQUIRED, isolation = Isolation.READ_UNCOMMITTED ) DAOResponse< Tab > function( int tabId, RequestParams requestParams ) { String location = this.getClass( ).getCanonicalName( ) + STR; logger.debug( STR + location ); DAOResponse< Tab > tabDAOResponse = new DAOResponse<>( ); Err...
/** * Delete tab by tab id. * * @param tabId the tab id * @param requestParams the request params * @return Returns a boolean value to indicate a successful deletion */
Delete tab by tab id
deleteTabByTabId
{ "repo_name": "arkoghosh11/bloom-test", "path": "bloom-dao/src/main/java/com/mana/innovative/dao/common/impl/TabDAOImpl.java", "license": "apache-2.0", "size": 18016 }
[ "com.mana.innovative.constants.DAOConstants", "com.mana.innovative.dao.response.DAOResponse", "com.mana.innovative.domain.common.Tab", "com.mana.innovative.dto.request.RequestParams", "com.mana.innovative.exception.response.ErrorContainer", "org.hibernate.HibernateException", "org.hibernate.Query", "o...
import com.mana.innovative.constants.DAOConstants; import com.mana.innovative.dao.response.DAOResponse; import com.mana.innovative.domain.common.Tab; import com.mana.innovative.dto.request.RequestParams; import com.mana.innovative.exception.response.ErrorContainer; import org.hibernate.HibernateException; import org.hi...
import com.mana.innovative.constants.*; import com.mana.innovative.dao.response.*; import com.mana.innovative.domain.common.*; import com.mana.innovative.dto.request.*; import com.mana.innovative.exception.response.*; import org.hibernate.*; import org.springframework.transaction.annotation.*;
[ "com.mana.innovative", "org.hibernate", "org.springframework.transaction" ]
com.mana.innovative; org.hibernate; org.springframework.transaction;
1,752,992
if (getDrawable() == null) { return super.setFrame(l, t, r, b); } Matrix matrix = getImageMatrix(); float scaleFactor = getWidth() / (float) getDrawable().getIntrinsicWidth(); matrix.setScale(scaleFactor, scaleFactor, 0, 0); setImageMatrix(matrix); return supe...
if (getDrawable() == null) { return super.setFrame(l, t, r, b); } Matrix matrix = getImageMatrix(); float scaleFactor = getWidth() / (float) getDrawable().getIntrinsicWidth(); matrix.setScale(scaleFactor, scaleFactor, 0, 0); setImageMatrix(matrix); return super.setFrame(l, t, r, b); }
/** * Top crop scale type */
Top crop scale type
setFrame
{ "repo_name": "cmeon/HomeAutomation-Android-app", "path": "src/com/cmeon/nfchomeauto/TopCenterImageView.java", "license": "mit", "size": 1295 }
[ "android.graphics.Matrix" ]
import android.graphics.Matrix;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
854,081
void onConfigure(GradleInternal model);
void onConfigure(GradleInternal model);
/** * Invoked when the model has been configured successfully. This listener should not do any further configuration. */
Invoked when the model has been configured successfully. This listener should not do any further configuration
onConfigure
{ "repo_name": "gstevey/gradle", "path": "subprojects/core/src/main/java/org/gradle/initialization/ModelConfigurationListener.java", "license": "apache-2.0", "size": 927 }
[ "org.gradle.api.internal.GradleInternal" ]
import org.gradle.api.internal.GradleInternal;
import org.gradle.api.internal.*;
[ "org.gradle.api" ]
org.gradle.api;
565,941
public ConnectionConfigsPersistence getConnectionConfigsPersistence() { return connectionConfigsPersistence; }
ConnectionConfigsPersistence function() { return connectionConfigsPersistence; }
/** * Returns the connection configs persistence. * * @return the connection configs persistence */
Returns the connection configs persistence
getConnectionConfigsPersistence
{ "repo_name": "RMarinDTI/CloubityRepo", "path": "Servicio-portlet/docroot/WEB-INF/src/es/davinciti/liferay/service/base/CurrencyServiceBaseImpl.java", "license": "unlicense", "size": 52888 }
[ "es.davinciti.liferay.service.persistence.ConnectionConfigsPersistence" ]
import es.davinciti.liferay.service.persistence.ConnectionConfigsPersistence;
import es.davinciti.liferay.service.persistence.*;
[ "es.davinciti.liferay" ]
es.davinciti.liferay;
2,247,425
private void backupDirectory(File sourceDir, File tempDir, File targetDir) throws Exception { if (!sourceDir.exists()) { // there is nothing to copy return; } // delete the files from t...
void function(File sourceDir, File tempDir, File targetDir) throws Exception { if (!sourceDir.exists()) { return; } if (tempDir.exists()) { deleteDirectory(tempDir); if (tempDir.exists()) { throw new AlfrescoRuntimeException(STR + tempDir); } } copyDirectory(sourceDir, tempDir, true); if (!tempDir.exists()) { throw new...
/** * Makes a backup of the source directory via a temporary folder. */
Makes a backup of the source directory via a temporary folder
backupDirectory
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/search/impl/lucene/AbstractLuceneIndexerAndSearcherFactory.java", "license": "lgpl-3.0", "size": 66930 }
[ "java.io.File", "org.alfresco.error.AlfrescoRuntimeException" ]
import java.io.File; import org.alfresco.error.AlfrescoRuntimeException;
import java.io.*; import org.alfresco.error.*;
[ "java.io", "org.alfresco.error" ]
java.io; org.alfresco.error;
2,833,125
public static void setType(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) { Base.set(model, instanceResource, TYPE, value); }
static void function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) { Base.set(model, instanceResource, TYPE, value); }
/** * Sets a value of property Type from an RDF2Go node. First, all existing * values are removed, then this value is added. Cardinality constraints are * not checked, but this method exists only for properties with no * minCardinality or minCardinality == 1. * * @param model an RDF...
Sets a value of property Type from an RDF2Go node. First, all existing values are removed, then this value is added. Cardinality constraints are not checked, but this method exists only for properties with no minCardinality or minCardinality == 1
setType
{ "repo_name": "semweb4j/semweb4j", "path": "org.semweb4j.rdfreactor.generator/src/main/java/org/ontoware/rdfreactor/schema/bootstrap/Resource.java", "license": "bsd-2-clause", "size": 83665 }
[ "org.ontoware.rdf2go.model.Model", "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdf2go.model.Model; import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdf2go.model.*; import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdf2go", "org.ontoware.rdfreactor" ]
org.ontoware.rdf2go; org.ontoware.rdfreactor;
1,541,738
default CouchbaseEndpointConsumerBuilder runLoggingLevel( LoggingLevel runLoggingLevel) { doSetProperty("runLoggingLevel", runLoggingLevel); return this; }
default CouchbaseEndpointConsumerBuilder runLoggingLevel( LoggingLevel runLoggingLevel) { doSetProperty(STR, runLoggingLevel); return this; }
/** * The consumer logs a start/complete log line when it polls. This * option allows you to configure the logging level for that. * * The option is a: <code>org.apache.camel.LoggingLevel</code> type. * * Default: TRACE * Group: scheduler */
The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that. The option is a: <code>org.apache.camel.LoggingLevel</code> type. Default: TRACE Group: scheduler
runLoggingLevel
{ "repo_name": "nicolaferraro/camel", "path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CouchbaseEndpointBuilderFactory.java", "license": "apache-2.0", "size": 55021 }
[ "org.apache.camel.LoggingLevel" ]
import org.apache.camel.LoggingLevel;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
2,378,986
public Set<Link> getLinkBySnmpType(int linkTypologyId){ return linksBySnmpTypeMap.get(Integer.valueOf(linkTypologyId)); }
Set<Link> function(int linkTypologyId){ return linksBySnmpTypeMap.get(Integer.valueOf(linkTypologyId)); }
/** * gets the config Link by snmpType defined in the map properties config file * * @param linkTypologyId a int. * @return a {@link java.util.Set} object. */
gets the config Link by snmpType defined in the map properties config file
getLinkBySnmpType
{ "repo_name": "tdefilip/opennms", "path": "opennms-dao/src/main/java/org/opennms/web/map/config/MapPropertiesFactory.java", "license": "agpl-3.0", "size": 43417 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,050,027
protected void sequence_ConfigurationInstantiationStatement(EObject context, ConfigurationInstantiationStatement semanticObject) { genericSequencer.createSequence(context, semanticObject); }
void function(EObject context, ConfigurationInstantiationStatement semanticObject) { genericSequencer.createSequence(context, semanticObject); }
/** * Constraint: * (label=Label name=Name genericMap=GenericMaps? portMap=PortMaps?) */
Constraint: (label=Label name=Name genericMap=GenericMaps? portMap=PortMaps?)
sequence_ConfigurationInstantiationStatement
{ "repo_name": "mlanoe/x-vhdl", "path": "plugins/net.mlanoe.language.vhdl.xtext/src-gen/net/mlanoe/language/vhdl/xtext/serializer/AbstractVhdlSemanticSequencer.java", "license": "gpl-3.0", "size": 147569 }
[ "net.mlanoe.language.vhdl.statement.ConfigurationInstantiationStatement", "org.eclipse.emf.ecore.EObject" ]
import net.mlanoe.language.vhdl.statement.ConfigurationInstantiationStatement; import org.eclipse.emf.ecore.EObject;
import net.mlanoe.language.vhdl.statement.*; import org.eclipse.emf.ecore.*;
[ "net.mlanoe.language", "org.eclipse.emf" ]
net.mlanoe.language; org.eclipse.emf;
496,171
int deleteByPrimaryKey(TestChangeRevisionsKey key);
int deleteByPrimaryKey(TestChangeRevisionsKey key);
/** * This method was generated by MyBatis Generator. This method corresponds to the database table test_change_revisions * @mbggenerated Tue Dec 15 00:20:16 ICT 2015 */
This method was generated by MyBatis Generator. This method corresponds to the database table test_change_revisions
deleteByPrimaryKey
{ "repo_name": "punyararj/his-interface-core", "path": "HISIF_CORE/src/com/healthcare/db/client/TestChangeRevisionsMapper.java", "license": "gpl-3.0", "size": 3986 }
[ "com.healthcare.db.model.TestChangeRevisionsKey" ]
import com.healthcare.db.model.TestChangeRevisionsKey;
import com.healthcare.db.model.*;
[ "com.healthcare.db" ]
com.healthcare.db;
502,370
public SubscriptionPolicy[] getSubscriptionPolicies(int tenantID) throws APIManagementException { List<SubscriptionPolicy> policies = new ArrayList<SubscriptionPolicy>(); Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; String sqlQuery = SQLConstant...
SubscriptionPolicy[] function(int tenantID) throws APIManagementException { List<SubscriptionPolicy> policies = new ArrayList<SubscriptionPolicy>(); Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; String sqlQuery = SQLConstants.GET_SUBSCRIPTION_POLICIES; if (forceCaseInsensitiveComparisons) { ...
/** * Get all subscription level policeis belongs to specific tenant * * @param tenantID tenantID filters the polices belongs to specific tenant * @return subscriptionPolicy array list */
Get all subscription level policeis belongs to specific tenant
getSubscriptionPolicies
{ "repo_name": "fazlan-nazeem/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java", "license": "apache-2.0", "size": 821235 }
[ "java.io.IOException", "java.io.InputStream", "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "java.util.ArrayList", "java.util.List", "java.util.Map", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.api.model.polic...
import java.io.IOException; import java.io.InputStream; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.wso2.carbon.apimgt.api.APIManagementException; import org.ws...
import java.io.*; import java.sql.*; import java.util.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.policy.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.impl.dao.constants.*; import org.wso2.carbon.apimgt.impl.utils.*;
[ "java.io", "java.sql", "java.util", "org.wso2.carbon" ]
java.io; java.sql; java.util; org.wso2.carbon;
1,115,883
@ServiceMethod(returns = ReturnType.SINGLE) Mono<RouteFilterInner> getByResourceGroupAsync(String resourceGroupName, String routeFilterName, String expand);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<RouteFilterInner> getByResourceGroupAsync(String resourceGroupName, String routeFilterName, String expand);
/** * Gets the specified route filter. * * @param resourceGroupName The name of the resource group. * @param routeFilterName The name of the route filter. * @param expand Expands referenced express route bgp peering resources. * @throws IllegalArgumentException thrown if parameters fail th...
Gets the specified route filter
getByResourceGroupAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RouteFiltersClient.java", "license": "mit", "size": 23978 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.network.fluent.models.RouteFilterInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.network.fluent.models.RouteFilterInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,399,686
public void addMaxIndexAgeCondition(TimeValue age) { MaxAgeCondition maxAgeCondition = new MaxAgeCondition(age); if (this.conditions.containsKey(maxAgeCondition.name)) { throw new IllegalArgumentException(maxAgeCondition.name + " condition is already set"); } this.conditi...
void function(TimeValue age) { MaxAgeCondition maxAgeCondition = new MaxAgeCondition(age); if (this.conditions.containsKey(maxAgeCondition.name)) { throw new IllegalArgumentException(maxAgeCondition.name + STR); } this.conditions.put(maxAgeCondition.name, maxAgeCondition); }
/** * Adds condition to check if the index is at least <code>age</code> old */
Adds condition to check if the index is at least <code>age</code> old
addMaxIndexAgeCondition
{ "repo_name": "uschindler/elasticsearch", "path": "server/src/main/java/org/elasticsearch/action/admin/indices/rollover/RolloverRequest.java", "license": "apache-2.0", "size": 9519 }
[ "org.elasticsearch.common.unit.TimeValue" ]
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.unit.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
2,069,180
private PauseContainerCmd executePauseContainerRequest(DockerClient client, Message message) throws DockerException { LOGGER.debug("Executing Docker Pause Container Request"); String containerId = DockerHelper.getProperty(DockerConstants.DOCKER_CONTAINER_ID, configuration, mess...
PauseContainerCmd function(DockerClient client, Message message) throws DockerException { LOGGER.debug(STR); String containerId = DockerHelper.getProperty(DockerConstants.DOCKER_CONTAINER_ID, configuration, message, String.class); PauseContainerCmd pauseContainerCmd = client.pauseContainerCmd(containerId); return pause...
/** * Produces a pause container request * * @param client * @param message * @return * @throws DockerException */
Produces a pause container request
executePauseContainerRequest
{ "repo_name": "logzio/camel", "path": "components/camel-docker/src/main/java/org/apache/camel/component/docker/producer/DockerProducer.java", "license": "apache-2.0", "size": 48810 }
[ "com.github.dockerjava.api.DockerClient", "com.github.dockerjava.api.command.PauseContainerCmd", "org.apache.camel.Message", "org.apache.camel.component.docker.DockerConstants", "org.apache.camel.component.docker.DockerHelper", "org.apache.camel.component.docker.exception.DockerException" ]
import com.github.dockerjava.api.DockerClient; import com.github.dockerjava.api.command.PauseContainerCmd; import org.apache.camel.Message; import org.apache.camel.component.docker.DockerConstants; import org.apache.camel.component.docker.DockerHelper; import org.apache.camel.component.docker.exception.DockerException;
import com.github.dockerjava.api.*; import com.github.dockerjava.api.command.*; import org.apache.camel.*; import org.apache.camel.component.docker.*; import org.apache.camel.component.docker.exception.*;
[ "com.github.dockerjava", "org.apache.camel" ]
com.github.dockerjava; org.apache.camel;
2,584,784
void setShow(ShowType value);
void setShow(ShowType value);
/** * Sets the value of the '{@link net.opengis.gml.TemporalCSRefType#getShow <em>Show</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Show</em>' attribute. * @see org.w3._1999.xlink.ShowType * @see #isSetShow() * @see #unsetShow() * @see #get...
Sets the value of the '<code>net.opengis.gml.TemporalCSRefType#getShow Show</code>' attribute.
setShow
{ "repo_name": "markus1978/citygml4emf", "path": "de.hub.citygml.emf.ecore/src/net/opengis/gml/TemporalCSRefType.java", "license": "apache-2.0", "size": 13937 }
[ "org.w3._1999.xlink.ShowType" ]
import org.w3._1999.xlink.ShowType;
import org.w3.*;
[ "org.w3" ]
org.w3;
260,246
public static Artifact getWindowsDefFileForLinking( RuleContext ruleContext, Artifact customDefFile, Artifact generatedDefFile, FeatureConfiguration featureConfiguration) { // 1. If a custom DEF file is specified in win_def_file attribute, use it. // 2. If a generated DEF file is avail...
static Artifact function( RuleContext ruleContext, Artifact customDefFile, Artifact generatedDefFile, FeatureConfiguration featureConfiguration) { if (customDefFile != null) { return customDefFile; } else if (generatedDefFile != null && CppHelper.shouldUseGeneratedDefFile(ruleContext, featureConfiguration)) { return ge...
/** * Decide which DEF file should be used for the linking action. * * @return The artifact of the DEF file that should be used for the linking action. */
Decide which DEF file should be used for the linking action
getWindowsDefFileForLinking
{ "repo_name": "bazelbuild/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java", "license": "apache-2.0", "size": 42484 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.analysis.RuleContext", "com.google.devtools.build.lib.rules.cpp.CcToolchainFeatures" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.rules.cpp.CcToolchainFeatures;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.rules.cpp.*;
[ "com.google.devtools" ]
com.google.devtools;
1,614,705
private void runApplicationAndCheckReturnValue(final AccessValidatorApp accessValidatorApp, final String[] args, final ToolsCommonConstants.ReturnValue expectedReturnValue, final Object expectedException) throws Exception { try { executeWithoutLogging((Class<?>) null, () -> {...
void function(final AccessValidatorApp accessValidatorApp, final String[] args, final ToolsCommonConstants.ReturnValue expectedReturnValue, final Object expectedException) throws Exception { try { executeWithoutLogging((Class<?>) null, () -> { ToolsCommonConstants.ReturnValue returnValue = accessValidatorApp.go(args); ...
/** * Runs an application application with the specified arguments and validates the response against an expected return value. An optional "no logging class" * can also be specified. * * @param accessValidatorApp the application * @param args the application arguments * @param expectedRet...
Runs an application application with the specified arguments and validates the response against an expected return value. An optional "no logging class" can also be specified
runApplicationAndCheckReturnValue
{ "repo_name": "FINRAOS/herd", "path": "herd-code/herd-tools/herd-access-validator/src/test/java/org/finra/herd/tools/access/validator/AbstractAccessValidatorTest.java", "license": "apache-2.0", "size": 7385 }
[ "org.finra.herd.tools.common.ToolsCommonConstants", "org.finra.herd.tools.common.databridge.HttpErrorResponseException", "org.junit.Assert" ]
import org.finra.herd.tools.common.ToolsCommonConstants; import org.finra.herd.tools.common.databridge.HttpErrorResponseException; import org.junit.Assert;
import org.finra.herd.tools.common.*; import org.finra.herd.tools.common.databridge.*; import org.junit.*;
[ "org.finra.herd", "org.junit" ]
org.finra.herd; org.junit;
14,630
private Map<String, Object> buildContent(JsonObject jsonObject) { Map<String, Object> content = new HashMap<>(); content.put("msg_type", jsonObject.get("msg_type").getAsString()); if (jsonObject.get("ats") != null) { String ats = jsonObject.get("ats").getAsString(); S...
Map<String, Object> function(JsonObject jsonObject) { Map<String, Object> content = new HashMap<>(); content.put(STR, jsonObject.get(STR).getAsString()); if (jsonObject.get("ats") != null) { String ats = jsonObject.get("ats").getAsString(); String text = jsonObject.get(STR).getAsJsonObject().get("text").getAsString(); ...
/** * build content,if has ats someone set the ats */
build content,if has ats someone set the ats
buildContent
{ "repo_name": "ascrutae/sky-walking", "path": "oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/feishu/FeishuHookCallback.java", "license": "apache-2.0", "size": 7729 }
[ "com.google.gson.JsonObject", "java.util.Arrays", "java.util.HashMap", "java.util.List", "java.util.Map", "java.util.stream.Collectors" ]
import com.google.gson.JsonObject; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors;
import com.google.gson.*; import java.util.*; import java.util.stream.*;
[ "com.google.gson", "java.util" ]
com.google.gson; java.util;
396,532
public static GetTableDescriptorsRequest buildGetTableDescriptorsRequest( final List<FullyQualifiedTableName> tableNames) { GetTableDescriptorsRequest.Builder builder = GetTableDescriptorsRequest.newBuilder(); if (tableNames != null) { for (FullyQualifiedTableName fqtn : tableNames) { buil...
static GetTableDescriptorsRequest function( final List<FullyQualifiedTableName> tableNames) { GetTableDescriptorsRequest.Builder builder = GetTableDescriptorsRequest.newBuilder(); if (tableNames != null) { for (FullyQualifiedTableName fqtn : tableNames) { builder.addTableNames(fqtn.getNameAsString()); } } return builde...
/** * Creates a protocol buffer GetTableDescriptorsRequest * * @param tableNames * @return a GetTableDescriptorsRequest */
Creates a protocol buffer GetTableDescriptorsRequest
buildGetTableDescriptorsRequest
{ "repo_name": "francisliu/hbase_namespace", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/RequestConverter.java", "license": "apache-2.0", "size": 49508 }
[ "java.util.List", "org.apache.hadoop.hbase.FullyQualifiedTableName", "org.apache.hadoop.hbase.protobuf.generated.MasterMonitorProtos" ]
import java.util.List; import org.apache.hadoop.hbase.FullyQualifiedTableName; import org.apache.hadoop.hbase.protobuf.generated.MasterMonitorProtos;
import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.protobuf.generated.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
2,589,185
public Vector listWayPoints() { return listWayPoints(false); }
Vector function() { return listWayPoints(false); }
/** Returns a list of all way points, sorted by the current search criterion. * * @return Vector of waypoints */
Returns a list of all way points, sorted by the current search criterion
listWayPoints
{ "repo_name": "martints/gpsmid", "path": "src/de/ueller/gpsmid/data/Gpx.java", "license": "gpl-2.0", "size": 63591 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,031,566
public void setHtml(String html) { Objects.requireNonNull(html, "html cannot be null"); removeComponentIfPresent(); cellState.html = html; cellState.type = GridStaticCellType.HTML; row.section.markAsDirty(); }
void function(String html) { Objects.requireNonNull(html, STR); removeComponentIfPresent(); cellState.html = html; cellState.type = GridStaticCellType.HTML; row.section.markAsDirty(); }
/** * Sets the HTML content displayed in this cell. * * @param html * the html to set, not null */
Sets the HTML content displayed in this cell
setHtml
{ "repo_name": "Darsstar/framework", "path": "server/src/main/java/com/vaadin/ui/components/grid/StaticSection.java", "license": "apache-2.0", "size": 27228 }
[ "com.vaadin.shared.ui.grid.GridStaticCellType", "java.util.Objects" ]
import com.vaadin.shared.ui.grid.GridStaticCellType; import java.util.Objects;
import com.vaadin.shared.ui.grid.*; import java.util.*;
[ "com.vaadin.shared", "java.util" ]
com.vaadin.shared; java.util;
45,219
public SubResource subnet() { return this.subnet; }
SubResource function() { return this.subnet; }
/** * Get the subnet value. * * @return the subnet value */
Get the subnet value
subnet
{ "repo_name": "herveyw/azure-sdk-for-java", "path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayFrontendIPConfigurationInner.java", "license": "mit", "size": 5688 }
[ "com.microsoft.azure.SubResource" ]
import com.microsoft.azure.SubResource;
import com.microsoft.azure.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
40,486
public double getCategoryMiddle(Comparable category, List categories, Rectangle2D area, RectangleEdge edge) { if (categories == null) { throw new IllegalArgumentException("Null 'categories' argument."); } int categoryIndex = categories.indexOf(category); ...
double function(Comparable category, List categories, Rectangle2D area, RectangleEdge edge) { if (categories == null) { throw new IllegalArgumentException(STR); } int categoryIndex = categories.indexOf(category); int categoryCount = categories.size(); return getCategoryMiddle(categoryIndex, categoryCount, area, edge); ...
/** * A convenience method that returns the axis coordinate for the centre of * a category. * * @param category the category key (<code>null</code> not permitted). * @param categories the categories (<code>null</code> not permitted). * @param area the data area (<code>null</code> ...
A convenience method that returns the axis coordinate for the centre of a category
getCategoryMiddle
{ "repo_name": "SOCR/HTML5_WebSite", "path": "SOCR2.8/src/jfreechart/org/jfree/chart/axis/CategoryAxis.java", "license": "lgpl-3.0", "size": 51383 }
[ "java.awt.geom.Rectangle2D", "java.util.List", "org.jfree.ui.RectangleEdge" ]
import java.awt.geom.Rectangle2D; import java.util.List; import org.jfree.ui.RectangleEdge;
import java.awt.geom.*; import java.util.*; import org.jfree.ui.*;
[ "java.awt", "java.util", "org.jfree.ui" ]
java.awt; java.util; org.jfree.ui;
761,996
public static String getParameter(ITestNGMethod method, String parameter) { if (System.getProperties().containsKey(parameter)) { return System.getProperty(parameter); } String paramValue = null != method && null != method.getXmlTest() ? method.getXmlTest().getParameter(parameter) : ""; if (Strin...
static String function(ITestNGMethod method, String parameter) { if (System.getProperties().containsKey(parameter)) { return System.getProperty(parameter); } String paramValue = null != method && null != method.getXmlTest() ? method.getXmlTest().getParameter(parameter) : ""; if (StringUtil.isNotBlank(paramValue)) { ret...
/** * Get parameter value from the system property, context or configuration. * * @param method * @param parameter * @return parameter value, first preference is system property, second is * context and last is configuration/properties. */
Get parameter value from the system property, context or configuration
getParameter
{ "repo_name": "infoneershalin/qaf", "path": "src/com/qmetry/qaf/automation/data/MetaDataScanner.java", "license": "gpl-3.0", "size": 5146 }
[ "com.qmetry.qaf.automation.core.ConfigurationManager", "com.qmetry.qaf.automation.util.StringUtil", "org.testng.ITestNGMethod" ]
import com.qmetry.qaf.automation.core.ConfigurationManager; import com.qmetry.qaf.automation.util.StringUtil; import org.testng.ITestNGMethod;
import com.qmetry.qaf.automation.core.*; import com.qmetry.qaf.automation.util.*; import org.testng.*;
[ "com.qmetry.qaf", "org.testng" ]
com.qmetry.qaf; org.testng;
1,910,443
void bulkAbortHostRole(Stage s, Map<ExecutionCommand, String> commands);
void bulkAbortHostRole(Stage s, Map<ExecutionCommand, String> commands);
/** * Bulk abort commands */
Bulk abort commands
bulkAbortHostRole
{ "repo_name": "zouzhberk/ambaridemo", "path": "demo-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java", "license": "apache-2.0", "size": 7063 }
[ "java.util.Map", "org.apache.ambari.server.agent.ExecutionCommand" ]
import java.util.Map; import org.apache.ambari.server.agent.ExecutionCommand;
import java.util.*; import org.apache.ambari.server.agent.*;
[ "java.util", "org.apache.ambari" ]
java.util; org.apache.ambari;
2,646,304
private String taskName(GridDeployment dep, Class<?> cls, Map<GridTaskThreadContextKey, Object> map) throws IgniteCheckedException { assert dep != null; assert cls != null; assert map != null; String taskName; ComputeTaskName ann = dep.annotation(cls, ComputeTaskNam...
String function(GridDeployment dep, Class<?> cls, Map<GridTaskThreadContextKey, Object> map) throws IgniteCheckedException { assert dep != null; assert cls != null; assert map != null; String taskName; ComputeTaskName ann = dep.annotation(cls, ComputeTaskName.class); if (ann != null) { taskName = ann.value(); if (F.isE...
/** * Gets task name for a task class. It firstly checks * {@link @ComputeTaskName} annotation, then thread context * map. If both are empty, class name is returned. * * @param dep Deployment. * @param cls Class. * @param map Thread context map. * @return Task name. * @throw...
Gets task name for a task class. It firstly checks <code>@ComputeTaskName</code> annotation, then thread context map. If both are empty, class name is returned
taskName
{ "repo_name": "tkpanther/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java", "license": "apache-2.0", "size": 46727 }
[ "java.util.Map", "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.compute.ComputeTaskName", "org.apache.ignite.internal.managers.deployment.GridDeployment", "org.apache.ignite.internal.util.typedef.F" ]
import java.util.Map; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.compute.ComputeTaskName; import org.apache.ignite.internal.managers.deployment.GridDeployment; import org.apache.ignite.internal.util.typedef.F;
import java.util.*; import org.apache.ignite.*; import org.apache.ignite.compute.*; import org.apache.ignite.internal.managers.deployment.*; import org.apache.ignite.internal.util.typedef.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,753,748
public void testBlankReferenceDocumentNumberWithEncumbranceUpdateCodeOfR() throws Exception { String[] inputTransactions = {testingYear + "BA6044900-----1599---EXIN07TOPSLGBLANKRDOC 00000CONCERTO OFFICE PRODUCTS 48.53C" + testingYear + "-01-05 ---------- C...
void function() throws Exception { String[] inputTransactions = {testingYear + STR + testingYear + STR, testingYear + STR + testingYear + STR}; EntryHolder[] outputTransactions = {new EntryHolder(GeneralLedgerConstants.BatchFileSystem.SCRUBBER_INPUT_FILE, inputTransactions[0]), new EntryHolder(GeneralLedgerConstants.Ba...
/** * Tests that the scrubber considers entries with blank reference numbers but an encumbrance update code that requires a * reference document to be errors * * @throws Exception thrown if any exception is encountered for any reason */
Tests that the scrubber considers entries with blank reference numbers but an encumbrance update code that requires a reference document to be errors
testBlankReferenceDocumentNumberWithEncumbranceUpdateCodeOfR
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-core/src/test/java/org/kuali/kfs/gl/service/ScrubberServiceTest.java", "license": "agpl-3.0", "size": 285144 }
[ "org.kuali.kfs.gl.GeneralLedgerConstants" ]
import org.kuali.kfs.gl.GeneralLedgerConstants;
import org.kuali.kfs.gl.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
2,506,276
private PartitionFilterIntf createPartitionFilterTree(Expression expressionTree, PartitionInfo partitionInfo) { ExpressionType filterExpressionType = expressionTree.getFilterExpressionType(); String partitionColumnName = partitionInfo.getColumnSchemaList().get(0).getColumnName(); BinaryExpression cu...
PartitionFilterIntf function(Expression expressionTree, PartitionInfo partitionInfo) { ExpressionType filterExpressionType = expressionTree.getFilterExpressionType(); String partitionColumnName = partitionInfo.getColumnSchemaList().get(0).getColumnName(); BinaryExpression currentExpression = null; ColumnExpression left...
/** * create partition filter by basing on pushed-down filter * @param expressionTree * @param partitionInfo * @return */
create partition filter by basing on pushed-down filter
createPartitionFilterTree
{ "repo_name": "shivangi1015/incubator-carbondata", "path": "core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExpressionProcessor.java", "license": "apache-2.0", "size": 25127 }
[ "org.apache.carbondata.core.metadata.schema.PartitionInfo", "org.apache.carbondata.core.scan.expression.BinaryExpression", "org.apache.carbondata.core.scan.expression.ColumnExpression", "org.apache.carbondata.core.scan.expression.Expression", "org.apache.carbondata.core.scan.expression.LiteralExpression", ...
import org.apache.carbondata.core.metadata.schema.PartitionInfo; import org.apache.carbondata.core.scan.expression.BinaryExpression; import org.apache.carbondata.core.scan.expression.ColumnExpression; import org.apache.carbondata.core.scan.expression.Expression; import org.apache.carbondata.core.scan.expression.Literal...
import org.apache.carbondata.core.metadata.schema.*; import org.apache.carbondata.core.scan.expression.*; import org.apache.carbondata.core.scan.expression.conditional.*; import org.apache.carbondata.core.scan.filter.intf.*; import org.apache.carbondata.core.scan.filter.partition.*;
[ "org.apache.carbondata" ]
org.apache.carbondata;
2,557,919
void setEndTime(Date endTime);
void setEndTime(Date endTime);
/** * Sets the end time of the action. * @param endTime the end time */
Sets the end time of the action
setEndTime
{ "repo_name": "Ramanujakalyan/Inherit", "path": "ui/plugins/com.phonegap.plugins.facebookconnect/platforms/android/FacebookLib/src/com/facebook/model/OpenGraphAction.java", "license": "unlicense", "size": 9127 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,455,341
public static IStatus error(final String message, final Throwable thr) { return new Status(IStatus.ERROR, getPluginId(), 0, message, thr); }
static IStatus function(final String message, final Throwable thr) { return new Status(IStatus.ERROR, getPluginId(), 0, message, thr); }
/** * Utility to create an error status for this plug-in. * * @param message User comprehensible message * @param thr cause * @return an initialized error status */
Utility to create an error status for this plug-in
error
{ "repo_name": "jdcasey/EGit", "path": "org.eclipse.egit.core/src/org/eclipse/egit/core/Activator.java", "license": "epl-1.0", "size": 4122 }
[ "org.eclipse.core.runtime.IStatus", "org.eclipse.core.runtime.Status" ]
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.*;
[ "org.eclipse.core" ]
org.eclipse.core;
1,045,492
public Path createSourcepath() { if (sourcePath == null) { sourcePath = new Path(getProject()); } return sourcePath.createPath(); }
Path function() { if (sourcePath == null) { sourcePath = new Path(getProject()); } return sourcePath.createPath(); }
/** * Create a path to be configured with the locations of the source * files. * * @return a new Path instance to be configured by the Ant core. */
Create a path to be configured with the locations of the source files
createSourcepath
{ "repo_name": "Mayo-WE01051879/mayosapp", "path": "Build/src/main/org/apache/tools/ant/taskdefs/Javadoc.java", "license": "mit", "size": 84218 }
[ "org.apache.tools.ant.types.Path" ]
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.*;
[ "org.apache.tools" ]
org.apache.tools;
719,799
// BEGIN android-added private String cookieToString(Cookie cookie) { return cookie.getClass().getSimpleName() + "[version=" + cookie.getVersion() + ",name=" + cookie.getName() + ",domain=" + cookie.getDomain() + ",path=" + cookie.getPath(...
String function(Cookie cookie) { return cookie.getClass().getSimpleName() + STR + cookie.getVersion() + STR + cookie.getName() + STR + cookie.getDomain() + STR + cookie.getPath() + STR + cookie.getExpiryDate() + "]"; }
/** * Don't log the cookie's value; that's potentially sensitive information. */
Don't log the cookie's value; that's potentially sensitive information
cookieToString
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "external/apache-http/src/org/apache/http/client/protocol/ResponseProcessCookies.java", "license": "gpl-3.0", "size": 6761 }
[ "org.apache.http.cookie.Cookie" ]
import org.apache.http.cookie.Cookie;
import org.apache.http.cookie.*;
[ "org.apache.http" ]
org.apache.http;
209,869
protected Endpoint getAcsEndpoint(SAMLMessageContext<SAMLObject, SAMLObject, NameID> requestContext) { BasicEndpointSelector selector = new BasicEndpointSelector(); selector.setEndpointType(ArtifactResolutionService.DEFAULT_ELEMENT_NAME); selector.getSupportedIssuerBindings().add(SAMLConstan...
Endpoint function(SAMLMessageContext<SAMLObject, SAMLObject, NameID> requestContext) { BasicEndpointSelector selector = new BasicEndpointSelector(); selector.setEndpointType(ArtifactResolutionService.DEFAULT_ELEMENT_NAME); selector.getSupportedIssuerBindings().add(SAMLConstants.SAML2_SOAP11_BINDING_URI); selector.setMe...
/** * Gets the source location used to for the artifacts created by this encoder. * * @param requestContext current request context * * @return source location used to for the artifacts created by this encoder */
Gets the source location used to for the artifacts created by this encoder
getAcsEndpoint
{ "repo_name": "Safewhere/kombit-web-java", "path": "kombit-opensaml-2.5.1/src/org/opensaml/saml2/binding/artifact/SAML2ArtifactType0004Builder.java", "license": "mit", "size": 4410 }
[ "org.opensaml.common.SAMLObject", "org.opensaml.common.binding.BasicEndpointSelector", "org.opensaml.common.binding.SAMLMessageContext", "org.opensaml.common.xml.SAMLConstants", "org.opensaml.saml2.core.NameID", "org.opensaml.saml2.metadata.ArtifactResolutionService", "org.opensaml.saml2.metadata.Endpoi...
import org.opensaml.common.SAMLObject; import org.opensaml.common.binding.BasicEndpointSelector; import org.opensaml.common.binding.SAMLMessageContext; import org.opensaml.common.xml.SAMLConstants; import org.opensaml.saml2.core.NameID; import org.opensaml.saml2.metadata.ArtifactResolutionService; import org.opensaml.s...
import org.opensaml.common.*; import org.opensaml.common.binding.*; import org.opensaml.common.xml.*; import org.opensaml.saml2.core.*; import org.opensaml.saml2.metadata.*;
[ "org.opensaml.common", "org.opensaml.saml2" ]
org.opensaml.common; org.opensaml.saml2;
2,698,160
private void dumpPKs(Element tableElem, DatabaseMetaData metaData, String catalogName, String schemaName, String tableName) throws SQLException { ResultSet result = null; try { result = metaData.getPrimaryKeys(catalogName, schemaName, tableName); } ca...
void function(Element tableElem, DatabaseMetaData metaData, String catalogName, String schemaName, String tableName) throws SQLException { ResultSet result = null; try { result = metaData.getPrimaryKeys(catalogName, schemaName, tableName); } catch (SQLException ex) { log(STR+tableName+STR+ex.getMessage(), Project.MSG_E...
/** * Dumps the primary key columns of the indicated table. * * @param tableElem The XML element for the table * @param metaData The database metadata * @param catalogName The catalog name * @param schemaName The schema name * @param tableName The table name */
Dumps the primary key columns of the indicated table
dumpPKs
{ "repo_name": "etiago/apache-ddlutils", "path": "src/java/org/apache/ddlutils/task/DumpMetadataTask.java", "license": "apache-2.0", "size": 51605 }
[ "java.sql.DatabaseMetaData", "java.sql.ResultSet", "java.sql.SQLException", "java.util.Set", "org.apache.tools.ant.Project", "org.dom4j.Element" ]
import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Set; import org.apache.tools.ant.Project; import org.dom4j.Element;
import java.sql.*; import java.util.*; import org.apache.tools.ant.*; import org.dom4j.*;
[ "java.sql", "java.util", "org.apache.tools", "org.dom4j" ]
java.sql; java.util; org.apache.tools; org.dom4j;
1,661,830
public Method getAddTextMethod() throws BuildException { if (!supportsCharacters()) { throw new BuildException("Class " + bean.getName() + " doesn't support nested text data."); } return addText; }
Method function() throws BuildException { if (!supportsCharacters()) { throw new BuildException(STR + bean.getName() + STR); } return addText; }
/** * Returns the addText method when the introspected * class supports nested text. * * @return the method on this introspected class that adds nested text. * Cannot be <code>null</code>. * @throws BuildException if the introspected class does not * support the nested...
Returns the addText method when the introspected class supports nested text
getAddTextMethod
{ "repo_name": "codinuum/cca", "path": "samples/java/1/IntrospectionHelper.java", "license": "apache-2.0", "size": 58443 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
852,553
private static <T> List<Object> getDependencies(T extension) { List<Object> result = new ArrayList<>(); result.addAll(evaluateAnnotatedClasses(extension, DependsUpon.class)); return result; }
static <T> List<Object> function(T extension) { List<Object> result = new ArrayList<>(); result.addAll(evaluateAnnotatedClasses(extension, DependsUpon.class)); return result; }
/** * Extension dependencies */
Extension dependencies
getDependencies
{ "repo_name": "instalint-org/instalint", "path": "sonarlint-core/src/main/java/org/sonarsource/sonarlint/core/analyzer/sensor/ScannerExtensionDictionnary.java", "license": "lgpl-3.0", "size": 7261 }
[ "java.util.ArrayList", "java.util.List", "org.sonar.api.batch.DependsUpon" ]
import java.util.ArrayList; import java.util.List; import org.sonar.api.batch.DependsUpon;
import java.util.*; import org.sonar.api.batch.*;
[ "java.util", "org.sonar.api" ]
java.util; org.sonar.api;
845,458
void cleanupForClient(CacheClientNotifier clientNotifier, ClientProxyMembershipID client) { if (this.cache.isClosed() || this.isDestroyed) { return; } this.filterProfile.cleanupForClient(clientNotifier, client); for (Object regionObject : new SubregionsSet(false)) { LocalRegion region = ...
void cleanupForClient(CacheClientNotifier clientNotifier, ClientProxyMembershipID client) { if (this.cache.isClosed() this.isDestroyed) { return; } this.filterProfile.cleanupForClient(clientNotifier, client); for (Object regionObject : new SubregionsSet(false)) { LocalRegion region = (LocalRegion) regionObject; region....
/** * Called by ccn when a client goes away * * @since GemFire 5.7 */
Called by ccn when a client goes away
cleanupForClient
{ "repo_name": "charliemblack/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java", "license": "apache-2.0", "size": 428144 }
[ "org.apache.geode.internal.cache.tier.sockets.CacheClientNotifier", "org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID" ]
import org.apache.geode.internal.cache.tier.sockets.CacheClientNotifier; import org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID;
import org.apache.geode.internal.cache.tier.sockets.*;
[ "org.apache.geode" ]
org.apache.geode;
1,883,745
protected void updateFromFile() throws IOException, MarshalException, ValidationException { if (m_loadedFromFile) { File surveillanceViewsFile = ConfigFileConstants.getFile(ConfigFileConstants.WMI_COLLECTION_CONFIG_FILE_NAME); if (m_lastModified != surveillanceViewsFile.lastModif...
void function() throws IOException, MarshalException, ValidationException { if (m_loadedFromFile) { File surveillanceViewsFile = ConfigFileConstants.getFile(ConfigFileConstants.WMI_COLLECTION_CONFIG_FILE_NAME); if (m_lastModified != surveillanceViewsFile.lastModified()) { this.reload(); } } }
/** * Reload the wmi-datacollection-config.xml file if it has been changed since we last * read it. * * @throws java.io.IOException if any. * @throws org.exolab.castor.xml.MarshalException if any. * @throws org.exolab.castor.xml.ValidationException if any. */
Reload the wmi-datacollection-config.xml file if it has been changed since we last read it
updateFromFile
{ "repo_name": "RangerRick/opennms", "path": "opennms-config/src/main/java/org/opennms/netmgt/config/WmiDataCollectionConfigFactory.java", "license": "gpl-2.0", "size": 10302 }
[ "java.io.File", "java.io.IOException", "org.exolab.castor.xml.MarshalException", "org.exolab.castor.xml.ValidationException", "org.opennms.core.utils.ConfigFileConstants" ]
import java.io.File; import java.io.IOException; import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.ValidationException; import org.opennms.core.utils.ConfigFileConstants;
import java.io.*; import org.exolab.castor.xml.*; import org.opennms.core.utils.*;
[ "java.io", "org.exolab.castor", "org.opennms.core" ]
java.io; org.exolab.castor; org.opennms.core;
2,222,525
public static IFASTInstall getDefaultFASTInstall() { IFASTInstall install = getVMFromCompositeId(getDefaultVMId()); if (install != null) { File location = install.getInstallLocation(); if (location != null) { if (location.exists()) { return install; } } } // if the default JRE goes m...
static IFASTInstall function() { IFASTInstall install = getVMFromCompositeId(getDefaultVMId()); if (install != null) { File location = install.getInstallLocation(); if (location != null) { if (location.exists()) { return install; } } } if (install != null) { install.getFASTInstallType().disposeFASTInstall(install.getId...
/** * Return the default VM set with <code>setDefaultVM()</code>. * @return Returns the default VM. May return <code>null</code> when no default * VM was set or when the default VM has been disposed. */
Return the default VM set with <code>setDefaultVM()</code>
getDefaultFASTInstall
{ "repo_name": "cooked/NDT", "path": "sc.ndt.launching.fast/src/sc/nrel/nwtc/fast/launching/FASTRuntime.java", "license": "gpl-3.0", "size": 107858 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,167,617
public Iterator getGroups() { synchronized (groups) { return (groups.iterator()); } }
Iterator function() { synchronized (groups) { return (groups.iterator()); } }
/** * Return the set of {@link Group}s to which this user belongs. */
Return the set of <code>Group</code>s to which this user belongs
getGroups
{ "repo_name": "devjin24/howtomcatworks", "path": "bookrefer/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/users/MemoryUser.java", "license": "apache-2.0", "size": 9236 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,626,182
GenericValue findOne(String entityName, Map<String, ? extends Object> fields, boolean useCache) throws GenericEntityException;
GenericValue findOne(String entityName, Map<String, ? extends Object> fields, boolean useCache) throws GenericEntityException;
/** * Find a Generic Entity by its Primary Key NOTE 20080502: 6 references * * @param entityName * The Name of the Entity as defined in the entity XML file * @param fields * The fields of the named entity to query by with their * corresponding values ...
Find a Generic Entity by its Primary Key NOTE 20080502: 6 references
findOne
{ "repo_name": "ofbizfriends/vogue", "path": "framework/entity/src/org/ofbiz/entity/Delegator.java", "license": "apache-2.0", "size": 59465 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
343,369
TokenInfo tokenInfo = null; if (!TextUtils.isEmpty(jsonString)) { Log.d("TokenInfo", jsonString); try { JSONObject dataJsonObj = new JSONObject(jsonString); String accessToken = dataJsonObj.optString("access_token"); Long expiresIn = dataJ...
TokenInfo tokenInfo = null; if (!TextUtils.isEmpty(jsonString)) { Log.d(STR, jsonString); try { JSONObject dataJsonObj = new JSONObject(jsonString); String accessToken = dataJsonObj.optString(STR); Long expiresIn = dataJsonObj.optLong(STR); tokenInfo = new TokenInfo(); tokenInfo.setAccessToken(accessToken); tokenInfo.s...
/** * { * "data": { * "expires_in": "36000", * "access_token": "xxxxxxxxxxxxxxxx" * }, * "error_code": 0 * } */
{ "data": { "expires_in": "36000", "access_token": "xxxxxxxxxxxxxxxx" }, "error_code": 0 }
parseJson
{ "repo_name": "bianfeng-shenbin/plugin", "path": "plugins/360/proj.android/src/org/cocos2dx/plugin/TokenInfo.java", "license": "mit", "size": 2073 }
[ "android.text.TextUtils", "android.util.Log", "org.json.JSONException", "org.json.JSONObject" ]
import android.text.TextUtils; import android.util.Log; import org.json.JSONException; import org.json.JSONObject;
import android.text.*; import android.util.*; import org.json.*;
[ "android.text", "android.util", "org.json" ]
android.text; android.util; org.json;
2,737,635
@Message(id = 83, value = "Connection factory interface (%s) is incorrect for resource adapter '%s' while deploying %s") DeploymentUnitProcessingException invalidConnectionFactory(String cf, String ra, String jndiName);
@Message(id = 83, value = STR) DeploymentUnitProcessingException invalidConnectionFactory(String cf, String ra, String jndiName);
/** * Invalid connection factory interface defined * * @param cf The connection factory * @param ra The resource adapter * @param jndiName The JNDI name * @return a {@link DeploymentUnitProcessingException} for the error. */
Invalid connection factory interface defined
invalidConnectionFactory
{ "repo_name": "jstourac/wildfly", "path": "connector/src/main/java/org/jboss/as/connector/logging/ConnectorLogger.java", "license": "lgpl-2.1", "size": 40830 }
[ "org.jboss.as.server.deployment.DeploymentUnitProcessingException", "org.jboss.logging.annotations.Message" ]
import org.jboss.as.server.deployment.DeploymentUnitProcessingException; import org.jboss.logging.annotations.Message;
import org.jboss.as.server.deployment.*; import org.jboss.logging.annotations.*;
[ "org.jboss.as", "org.jboss.logging" ]
org.jboss.as; org.jboss.logging;
2,691,752
public static List<ColumnModel> createColumnsForChanges(List<ColumnChange> changes){ List<ColumnModel> results = new LinkedList<>(); for(ColumnChange change: changes){ if(change.getOldColumnId() != null){ results.add(createColumn(Long.parseLong(change.getOldColumnId()))); } if(change.getNewCol...
static List<ColumnModel> function(List<ColumnChange> changes){ List<ColumnModel> results = new LinkedList<>(); for(ColumnChange change: changes){ if(change.getOldColumnId() != null){ results.add(createColumn(Long.parseLong(change.getOldColumnId()))); } if(change.getNewColumnId() != null){ results.add(createColumn(Long....
/** * Create columns to match the given changes. * @param changes * @return */
Create columns to match the given changes
createColumnsForChanges
{ "repo_name": "xschildw/Synapse-Repository-Services", "path": "lib/lib-test/src/main/java/org/sagebionetworks/repo/model/dbo/dao/table/TableModelTestUtils.java", "license": "apache-2.0", "size": 21582 }
[ "java.util.LinkedList", "java.util.List", "org.sagebionetworks.repo.model.table.ColumnChange", "org.sagebionetworks.repo.model.table.ColumnModel" ]
import java.util.LinkedList; import java.util.List; import org.sagebionetworks.repo.model.table.ColumnChange; import org.sagebionetworks.repo.model.table.ColumnModel;
import java.util.*; import org.sagebionetworks.repo.model.table.*;
[ "java.util", "org.sagebionetworks.repo" ]
java.util; org.sagebionetworks.repo;
1,116,709
protected double[] apply(DoubleUnaryOperator func, double[] array) { for(int i = 0; i < array.length; i++){ array[i] = func.applyAsDouble(array[i]); } return array; } private DoubleUnaryOperator distFunc, varFunc; private Variance varImpl; privat...
double[] function(DoubleUnaryOperator func, double[] array) { for(int i = 0; i < array.length; i++){ array[i] = func.applyAsDouble(array[i]); } return array; } private DoubleUnaryOperator distFunc, varFunc; private Variance varImpl; private RowReduce.Mean meanImpl;
/** * Apply a double unary operator on every elements of an array. * @param func Double function * @param array Input array * @return Updated input array */
Apply a double unary operator on every elements of an array
apply
{ "repo_name": "ykechan/jacobi", "path": "src/main/java/jacobi/core/stats/HigherMoment.java", "license": "mit", "size": 5142 }
[ "java.util.function.DoubleUnaryOperator" ]
import java.util.function.DoubleUnaryOperator;
import java.util.function.*;
[ "java.util" ]
java.util;
2,842,315
public Set allEntries() { return new PREntriesSet(); } protected class PREntriesSet extends KeysSet { boolean allowTombstones; private class EntriesSetIterator extends KeysSetIterator { private final KeyInfo key = new KeyInfo(null, null, null); public EntriesSetIterator...
Set function() { return new PREntriesSet(); } protected class PREntriesSet extends KeysSet { boolean allowTombstones; private class EntriesSetIterator extends KeysSetIterator { private final KeyInfo key = new KeyInfo(null, null, null); public EntriesSetIterator(Set bucketSet, boolean allowTombstones) { super(bucketSet,...
/** * Currently used by SQLFabric to get a non-wrapped iterator for all entries * for index consistency check. */
Currently used by SQLFabric to get a non-wrapped iterator for all entries for index consistency check
allEntries
{ "repo_name": "ameybarve15/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java", "license": "apache-2.0", "size": 403335 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
172,124
public Set<PortReference> getOpposites() { return opposites; }
Set<PortReference> function() { return opposites; }
/** * Returns the references of the opposite ports. * @return the opposite ports */
Returns the references of the opposite ports
getOpposites
{ "repo_name": "asakusafw/asakusafw-compiler", "path": "inspection-project/core/src/main/java/com/asakusafw/lang/inspection/InspectionNode.java", "license": "apache-2.0", "size": 7266 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,182,186