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
protected boolean isSaveableMember() throws VException { final IAuthenticator lAuthenticator = getAuthenticator(); return lAuthenticator == null ? true : !lAuthenticator.isExternal(); }
boolean function() throws VException { final IAuthenticator lAuthenticator = getAuthenticator(); return lAuthenticator == null ? true : !lAuthenticator.isExternal(); }
/** Method is protected for testing purposes. * * @return boolean * @throws VException */
Method is protected for testing purposes
isSaveableMember
{ "repo_name": "aktion-hip/vif", "path": "org.hip.vif.core/src/org/hip/vif/core/bom/impl/MemberImpl.java", "license": "gpl-2.0", "size": 35361 }
[ "org.hip.kernel.exc.VException", "org.hip.vif.core.member.IAuthenticator" ]
import org.hip.kernel.exc.VException; import org.hip.vif.core.member.IAuthenticator;
import org.hip.kernel.exc.*; import org.hip.vif.core.member.*;
[ "org.hip.kernel", "org.hip.vif" ]
org.hip.kernel; org.hip.vif;
2,353,882
public void setMimetype(String mimetype) { ScriptContentData content = (ScriptContentData) this.getProperties().get(ContentModel.PROP_CONTENT); if (content != null) { content.setMimetype(mimetype); } }
void function(String mimetype) { ScriptContentData content = (ScriptContentData) this.getProperties().get(ContentModel.PROP_CONTENT); if (content != null) { content.setMimetype(mimetype); } }
/** * Set the mimetype encoding for the content attached to the node from the default content property * (@see ContentModel.PROP_CONTENT) * * @param mimetype Mimetype to set */
Set the mimetype encoding for the content attached to the node from the default content property (@see ContentModel.PROP_CONTENT)
setMimetype
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/jscript/ScriptNode.java", "license": "lgpl-3.0", "size": 153865 }
[ "org.alfresco.model.ContentModel" ]
import org.alfresco.model.ContentModel;
import org.alfresco.model.*;
[ "org.alfresco.model" ]
org.alfresco.model;
1,281,814
public OrmDescriptor removeAllNamedQuery() { model.removeChildren("named-query"); return this; } // --------------------------------------------------------------------------------------------------------|| // ClassName: OrmDescriptor ElementName: orm:named-native-query ElementType : named-...
OrmDescriptor function() { model.removeChildren(STR); return this; }
/** * Removes all <code>named-query</code> elements * @return the current instance of <code>NamedQuery<OrmDescriptor></code> */
Removes all <code>named-query</code> elements
removeAllNamedQuery
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/orm20/OrmDescriptorImpl.java", "license": "epl-1.0", "size": 31598 }
[ "org.jboss.shrinkwrap.descriptor.api.orm20.OrmDescriptor" ]
import org.jboss.shrinkwrap.descriptor.api.orm20.OrmDescriptor;
import org.jboss.shrinkwrap.descriptor.api.orm20.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
2,028,106
public boolean keepSpawnLoaded() { return config.getBoolean(Key.PERSIST_SPAWN); }
boolean function() { return config.getBoolean(Key.PERSIST_SPAWN); }
/** * Get whether worlds should keep their spawns loaded by default. * * @return Whether to keep spawns loaded by default. */
Get whether worlds should keep their spawns loaded by default
keepSpawnLoaded
{ "repo_name": "GlowstoneMC/GlowstonePlusPlus", "path": "src/main/java/net/glowstone/GlowServer.java", "license": "mit", "size": 97817 }
[ "net.glowstone.util.config.ServerConfig" ]
import net.glowstone.util.config.ServerConfig;
import net.glowstone.util.config.*;
[ "net.glowstone.util" ]
net.glowstone.util;
1,587,441
public void testTermPositive02() throws Exception { final Element ele = BasicParser.createElement( "<FUNVAR id=\"f\">" + " <VAR id=\"x\" />" + " <VAR id=\"y\" />" + " <VAR id=\"x\" />" + "</FUNVAR>"); // System.out.println(ele.toString()...
void function() throws Exception { final Element ele = BasicParser.createElement( STRf\">" + STRx\STR + STRy\STR + STRx\STR + STR); assertFalse(checker.checkTerm(ele, context).hasErrors()); assertFalse(checker.checkTerm(ele, context, getChecker()).hasErrors()); }
/** * Function: checkTerm(Element) * Type: positive * Data: f(x, y, x) * * @throws Exception Test failed. */
Function: checkTerm(Element) Type: positive Data: f(x, y, x)
testTermPositive02
{ "repo_name": "m-31/qedeq", "path": "QedeqKernelBoTest/src/org/qedeq/kernel/bo/logic/wf/FormulaCheckerTermTest.java", "license": "gpl-2.0", "size": 10330 }
[ "org.qedeq.kernel.se.base.list.Element", "org.qedeq.kernel.xml.parser.BasicParser" ]
import org.qedeq.kernel.se.base.list.Element; import org.qedeq.kernel.xml.parser.BasicParser;
import org.qedeq.kernel.se.base.list.*; import org.qedeq.kernel.xml.parser.*;
[ "org.qedeq.kernel" ]
org.qedeq.kernel;
201,700
public void clear() { full = false; start = 0; end = 0; Arrays.fill(elements, null); }
void function() { full = false; start = 0; end = 0; Arrays.fill(elements, null); }
/** * Clears this buffer. */
Clears this buffer
clear
{ "repo_name": "citlab/vs.msc.ws14", "path": "flink-0-7-custom/flink-addons/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/state/NullableCircularBuffer.java", "license": "apache-2.0", "size": 8573 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,473,365
protected void doLayoutInflation() { try (TraceEvent te = TraceEvent.scoped("ChromeActivity.doLayoutInflation")) { // Allow disk access for the content view and toolbar container setup. // On certain android devices this setup sequence results in disk writes outside // of...
void function() { try (TraceEvent te = TraceEvent.scoped(STR)) { try (StrictModeContext ignored = StrictModeContext.allowDiskWrites()) { TraceEvent.begin(STR); setContentView(R.layout.main); TraceEvent.end(STR); if (getControlContainerLayoutId() != ActivityUtils.NO_RESOURCE_ID) { ViewStub toolbarContainerStub = ((ViewS...
/** * This function implements the actual layout inflation, Subclassing Activities that override * this method without calling super need to call {@link #onInitialLayoutInflationComplete()}. */
This function implements the actual layout inflation, Subclassing Activities that override this method without calling super need to call <code>#onInitialLayoutInflationComplete()</code>
doLayoutInflation
{ "repo_name": "nwjs/chromium.src", "path": "chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java", "license": "bsd-3-clause", "size": 127899 }
[ "android.view.ViewStub", "org.chromium.base.StrictModeContext", "org.chromium.base.TraceEvent", "org.chromium.chrome.browser.ActivityUtils", "org.chromium.chrome.browser.toolbar.ControlContainer", "org.chromium.ui.UiUtils" ]
import android.view.ViewStub; import org.chromium.base.StrictModeContext; import org.chromium.base.TraceEvent; import org.chromium.chrome.browser.ActivityUtils; import org.chromium.chrome.browser.toolbar.ControlContainer; import org.chromium.ui.UiUtils;
import android.view.*; import org.chromium.base.*; import org.chromium.chrome.browser.*; import org.chromium.chrome.browser.toolbar.*; import org.chromium.ui.*;
[ "android.view", "org.chromium.base", "org.chromium.chrome", "org.chromium.ui" ]
android.view; org.chromium.base; org.chromium.chrome; org.chromium.ui;
1,111,617
@Override public void enterBlockStatement(@NotNull JavaParser.BlockStatementContext ctx) { }
@Override public void enterBlockStatement(@NotNull JavaParser.BlockStatementContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitLocalVariableDeclarationStatement
{ "repo_name": "martinaguero/deep", "path": "src/org/trimatek/deep/lexer/JavaBaseListener.java", "license": "apache-2.0", "size": 39286 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
1,030,664
@Override public EntityIdentifier[] searchForGroups( String query, IGroupConstants.SearchMethod method, Class leaftype, IEntityGroup ancestor) throws GroupsException { Set allIds = new HashSet(); for (Iterator services = getComponentSe...
EntityIdentifier[] function( String query, IGroupConstants.SearchMethod method, Class leaftype, IEntityGroup ancestor) throws GroupsException { Set allIds = new HashSet(); for (Iterator services = getComponentServices().values().iterator(); services.hasNext(); ) { IIndividualGroupService service = (IIndividualGroupServ...
/** * Find EntityIdentifiers for groups whose name matches the query string according to the * specified method, has the provided leaf type and descends from the specified group */
Find EntityIdentifiers for groups whose name matches the query string according to the specified method, has the provided leaf type and descends from the specified group
searchForGroups
{ "repo_name": "ChristianMurphy/uPortal", "path": "uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceCompositeGroupService.java", "license": "apache-2.0", "size": 15233 }
[ "java.util.HashSet", "java.util.Iterator", "java.util.Set", "javax.naming.InvalidNameException", "org.apereo.portal.EntityIdentifier" ]
import java.util.HashSet; import java.util.Iterator; import java.util.Set; import javax.naming.InvalidNameException; import org.apereo.portal.EntityIdentifier;
import java.util.*; import javax.naming.*; import org.apereo.portal.*;
[ "java.util", "javax.naming", "org.apereo.portal" ]
java.util; javax.naming; org.apereo.portal;
45,694
private void loadFSImage(File imageFile, FSNamesystem target, MetaRecoveryContext recovery, boolean requireSameLayoutVersion) throws IOException { MD5Hash expectedMD5 = MD5FileUtils.readStoredMd5ForFile(imageFile); if (expectedMD5 == null) { throw new IOException("No MD5 file found correspon...
void function(File imageFile, FSNamesystem target, MetaRecoveryContext recovery, boolean requireSameLayoutVersion) throws IOException { MD5Hash expectedMD5 = MD5FileUtils.readStoredMd5ForFile(imageFile); if (expectedMD5 == null) { throw new IOException(STR + imageFile); } loadFSImage(imageFile, expectedMD5, target, rec...
/** * Load the image namespace from the given image file, verifying * it against the MD5 sum stored in its associated .md5 file. */
Load the image namespace from the given image file, verifying it against the MD5 sum stored in its associated .md5 file
loadFSImage
{ "repo_name": "Reidddddd/mo-hadoop2.6.0", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java", "license": "apache-2.0", "size": 60060 }
[ "java.io.File", "java.io.IOException", "org.apache.hadoop.hdfs.util.MD5FileUtils", "org.apache.hadoop.io.MD5Hash" ]
import java.io.File; import java.io.IOException; import org.apache.hadoop.hdfs.util.MD5FileUtils; import org.apache.hadoop.io.MD5Hash;
import java.io.*; import org.apache.hadoop.hdfs.util.*; import org.apache.hadoop.io.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,292,635
private boolean checkNumberOfValuesOrder(List<Integer> numberOfValues) { for (Integer i : numberOfValues) { Integer value = i; if (value <= 0) { return false; } } return true; }
boolean function(List<Integer> numberOfValues) { for (Integer i : numberOfValues) { Integer value = i; if (value <= 0) { return false; } } return true; }
/** * Checks the order of the condition numbers in the second column of the * table. If a 0 is present, the function will return false. * * @param numberOfValues * The numbers to check. * @return True if the order is correct, false otherwise. */
Checks the order of the condition numbers in the second column of the table. If a 0 is present, the function will return false
checkNumberOfValuesOrder
{ "repo_name": "sing-group/BEW", "path": "plugins_src/bew/es/uvigo/ei/sing/bew/tables/ConditionTable.java", "license": "gpl-3.0", "size": 9752 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,829,598
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (EsbPackage.Literals.FAILOVER_END_POINT__INPUT_CONNECTOR, EsbFactory.eINSTANCE.cr...
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (EsbPackage.Literals.FAILOVER_END_POINT__INPUT_CONNECTOR, EsbFactory.eINSTANCE.createFailoverEndPointInputConnector())); newChildDescriptors...
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "sohaniwso2/devstudio-tooling-esb", "path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/FailoverEndPointItemProvider.java", "license": "apache-2.0", "size": 5893 }
[ "java.util.Collection", "org.wso2.developerstudio.eclipse.gmf.esb.EsbFactory", "org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage" ]
import java.util.Collection; import org.wso2.developerstudio.eclipse.gmf.esb.EsbFactory; import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage;
import java.util.*; import org.wso2.developerstudio.eclipse.gmf.esb.*;
[ "java.util", "org.wso2.developerstudio" ]
java.util; org.wso2.developerstudio;
1,437,915
private void drawCenterRect(Canvas canvas) { int center = getHeight() / 2; int offset = (int) (getItemHeight() / 2 * 1.2); centerDrawable.setBounds(0, center - offset, getWidth(), center + offset); centerDrawable.draw(canvas); }
void function(Canvas canvas) { int center = getHeight() / 2; int offset = (int) (getItemHeight() / 2 * 1.2); centerDrawable.setBounds(0, center - offset, getWidth(), center + offset); centerDrawable.draw(canvas); }
/** * Draws rect for current value * @param canvas the canvas for drawing */
Draws rect for current value
drawCenterRect
{ "repo_name": "NhamPhanDinh/smmatest", "path": "SMMA/src/jp/ne/smma/wheel/WheelView.java", "license": "apache-2.0", "size": 29336 }
[ "android.graphics.Canvas" ]
import android.graphics.Canvas;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
1,689,886
public static boolean hasHttpConnectionBug() { return Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO; }
static boolean function() { return Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO; }
/** * Check if OS version has a http URLConnection bug. See here for more information: * http://android-developers.blogspot.com/2011/09/androids-http-clients.html * * @return */
Check if OS version has a http URLConnection bug. See here for more information: HREF
hasHttpConnectionBug
{ "repo_name": "arvin015/cookbooksa", "path": "src/com/sky/cookbooksa/imghelper/Utils.java", "license": "gpl-2.0", "size": 4003 }
[ "android.os.Build" ]
import android.os.Build;
import android.os.*;
[ "android.os" ]
android.os;
1,824,797
private static void s_uarimxx( SparseRow[] a, double[] c, int m, int n, double init, Builtin builtin, int rl, int ru ) { for( int i=rl, cix=rl*2; i<ru; i++, cix+=2 ) { SparseRow arow = a[i]; if( arow!=null && !arow.isEmpty() ) { int alen = arow.size(); double[] avals = arow.getValueContainer()...
static void function( SparseRow[] a, double[] c, int m, int n, double init, Builtin builtin, int rl, int ru ) { for( int i=rl, cix=rl*2; i<ru; i++, cix+=2 ) { SparseRow arow = a[i]; if( arow!=null && !arow.isEmpty() ) { int alen = arow.size(); double[] avals = arow.getValueContainer(); int[] aix = arow.getIndexContaine...
/** * ROWINDEXMAX, opcode: uarimax, sparse input. * * @param a * @param c * @param m * @param n * @param init * @param builtin */
ROWINDEXMAX, opcode: uarimax, sparse input
s_uarimxx
{ "repo_name": "Myasuka/systemml", "path": "system-ml/src/main/java/com/ibm/bi/dml/runtime/matrix/data/LibMatrixAgg.java", "license": "apache-2.0", "size": 77315 }
[ "com.ibm.bi.dml.runtime.functionobjects.Builtin" ]
import com.ibm.bi.dml.runtime.functionobjects.Builtin;
import com.ibm.bi.dml.runtime.functionobjects.*;
[ "com.ibm.bi" ]
com.ibm.bi;
947,177
public PointF mapImageToView(PointF imagePoint) { float[] points = mTempValues; points[0] = imagePoint.x; points[1] = imagePoint.y; mapRelativeToAbsolute(points, points, 1); mActiveTransform.mapPoints(points, 0, points, 0, 1); return new PointF(points[0], points[1]); ...
PointF function(PointF imagePoint) { float[] points = mTempValues; points[0] = imagePoint.x; points[1] = imagePoint.y; mapRelativeToAbsolute(points, points, 1); mActiveTransform.mapPoints(points, 0, points, 0, 1); return new PointF(points[0], points[1]); }
/** * Maps point from the image's relative to the view's coordinate system. * This takes into account the zoomable transformation. */
Maps point from the image's relative to the view's coordinate system. This takes into account the zoomable transformation
mapImageToView
{ "repo_name": "biezhihua/FrescoStudy", "path": "samples/zoomable/src/main/java/com/facebook/samples/zoomable/DefaultZoomableController.java", "license": "bsd-3-clause", "size": 12882 }
[ "android.graphics.PointF" ]
import android.graphics.PointF;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
1,260,421
void updateUserStoreByDomainName(String previousDomainName, UserStoreDTO userStoreDTO) throws IdentityUserStoreMgtException;
void updateUserStoreByDomainName(String previousDomainName, UserStoreDTO userStoreDTO) throws IdentityUserStoreMgtException;
/** * Update the name of the userStore domain. * * @param previousDomainName the domain name to be replaced * @param userStoreDTO {@link UserStoreDTO} to update * @throws IdentityUserStoreMgtException throws if an error occurred while updating the domain name. */
Update the name of the userStore domain
updateUserStoreByDomainName
{ "repo_name": "wso2/carbon-identity-framework", "path": "components/user-store/org.wso2.carbon.identity.user.store.configuration/src/main/java/org/wso2/carbon/identity/user/store/configuration/UserStoreConfigService.java", "license": "apache-2.0", "size": 5034 }
[ "org.wso2.carbon.identity.user.store.configuration.dto.UserStoreDTO", "org.wso2.carbon.identity.user.store.configuration.utils.IdentityUserStoreMgtException" ]
import org.wso2.carbon.identity.user.store.configuration.dto.UserStoreDTO; import org.wso2.carbon.identity.user.store.configuration.utils.IdentityUserStoreMgtException;
import org.wso2.carbon.identity.user.store.configuration.dto.*; import org.wso2.carbon.identity.user.store.configuration.utils.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
204,447
public List<Community> getCommunitiesCreated() { return communitiesCreated; }
List<Community> function() { return communitiesCreated; }
/** * Gets the communities created. * * @return the communities created */
Gets the communities created
getCommunitiesCreated
{ "repo_name": "hibernate/hibernate-demos", "path": "hibernate-orm/core/Basic/src/main/java/org/hibernate/brmeyer/demo/entity/User.java", "license": "apache-2.0", "size": 7776 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,504,033
IDataNode getDataNode(String nodeName);
IDataNode getDataNode(String nodeName);
/** * Get a data storage node from the arena. */
Get a data storage node from the arena
getDataNode
{ "repo_name": "JCThePants/PV-StarAPI", "path": "src/com/jcwhatever/pvs/api/arena/IArena.java", "license": "mit", "size": 4622 }
[ "com.jcwhatever.nucleus.storage.IDataNode" ]
import com.jcwhatever.nucleus.storage.IDataNode;
import com.jcwhatever.nucleus.storage.*;
[ "com.jcwhatever.nucleus" ]
com.jcwhatever.nucleus;
2,495,894
public void looseMarshal(OpenWireFormat wireFormat, Object o, DataByteArrayOutputStream dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); }
void function(OpenWireFormat wireFormat, Object o, DataByteArrayOutputStream dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); }
/** * Write the booleans that this object uses to a BooleanStream */
Write the booleans that this object uses to a BooleanStream
looseMarshal
{ "repo_name": "chirino/fabric8", "path": "gateway/gateway-core/src/main/java/io/fabric8/gateway/handlers/detecting/protocol/openwire/codec/v1/ActiveMQTempTopicMarshaller.java", "license": "apache-2.0", "size": 3677 }
[ "io.fabric8.gateway.handlers.detecting.protocol.openwire.codec.OpenWireFormat", "java.io.IOException", "org.fusesource.hawtbuf.DataByteArrayOutputStream" ]
import io.fabric8.gateway.handlers.detecting.protocol.openwire.codec.OpenWireFormat; import java.io.IOException; import org.fusesource.hawtbuf.DataByteArrayOutputStream;
import io.fabric8.gateway.handlers.detecting.protocol.openwire.codec.*; import java.io.*; import org.fusesource.hawtbuf.*;
[ "io.fabric8.gateway", "java.io", "org.fusesource.hawtbuf" ]
io.fabric8.gateway; java.io; org.fusesource.hawtbuf;
165,299
public void testNoMoreArgs() { CommandTestTools.initFileType(); final CommandLineFile file = CommandTestTools.createFileByText(myFixture, "command foo bar spam eggs"); final ValidationResult validationResult = file.getValidationResult(); assert validationResult != null : "validation failed"; Asser...
void function() { CommandTestTools.initFileType(); final CommandLineFile file = CommandTestTools.createFileByText(myFixture, STR); final ValidationResult validationResult = file.getValidationResult(); assert validationResult != null : STR; Assert.assertNull(STR, validationResult.getNextArg()); }
/** * Ensures argument is not returned if not required */
Ensures argument is not returned if not required
testNoMoreArgs
{ "repo_name": "goodwinnk/intellij-community", "path": "python/testSrc/com/jetbrains/commandInterface/commandLine/CommandLineArgsTest.java", "license": "apache-2.0", "size": 2864 }
[ "com.jetbrains.commandInterface.commandLine.psi.CommandLineFile", "org.junit.Assert" ]
import com.jetbrains.commandInterface.commandLine.psi.CommandLineFile; import org.junit.Assert;
import com.jetbrains.*; import org.junit.*;
[ "com.jetbrains", "org.junit" ]
com.jetbrains; org.junit;
2,087,650
private void startAlert(String message, GregorianCalendar alarmDate, long id) { Intent intent = new Intent(this, AlarmReceiver.class); intent.putExtra(AlarmReceiver.ALARM_MESSAGE, message); intent.putExtra("toDoId", id); PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, intent, ...
void function(String message, GregorianCalendar alarmDate, long id) { Intent intent = new Intent(this, AlarmReceiver.class); intent.putExtra(AlarmReceiver.ALARM_MESSAGE, message); intent.putExtra(STR, id); PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); Alar...
/** * Start a new alert in case the alarm is activated for a note * @param message * @param alarmDate */
Start a new alert in case the alarm is activated for a note
startAlert
{ "repo_name": "iliocatallo/takenotes", "path": "TakeNotesV5/src/it/polimi/mad/takenotesv5/activities/ToDoListActivity.java", "license": "gpl-2.0", "size": 5107 }
[ "android.app.AlarmManager", "android.app.PendingIntent", "android.content.Intent", "it.polimi.mad.takenotesv5.receivers.AlarmReceiver", "java.util.GregorianCalendar" ]
import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Intent; import it.polimi.mad.takenotesv5.receivers.AlarmReceiver; import java.util.GregorianCalendar;
import android.app.*; import android.content.*; import it.polimi.mad.takenotesv5.receivers.*; import java.util.*;
[ "android.app", "android.content", "it.polimi.mad", "java.util" ]
android.app; android.content; it.polimi.mad; java.util;
1,228,140
@Override public List<String> getTabCompletions(MinecraftServer server, ICommandSender sender, String[] args, @Nullable BlockPos targetPos) { return Arrays.asList("te", "entity"); }
List<String> function(MinecraftServer server, ICommandSender sender, String[] args, @Nullable BlockPos targetPos) { return Arrays.asList("te", STR); }
/** * Get a list of options for when the user presses the TAB key */
Get a list of options for when the user presses the TAB key
getTabCompletions
{ "repo_name": "Severed-Infinity/technium", "path": "build/tmp/recompileMc/sources/net/minecraftforge/server/command/CommandTrack.java", "license": "gpl-3.0", "size": 12900 }
[ "java.util.Arrays", "java.util.List", "javax.annotation.Nullable", "net.minecraft.command.ICommandSender", "net.minecraft.server.MinecraftServer", "net.minecraft.util.math.BlockPos" ]
import java.util.Arrays; import java.util.List; import javax.annotation.Nullable; import net.minecraft.command.ICommandSender; import net.minecraft.server.MinecraftServer; import net.minecraft.util.math.BlockPos;
import java.util.*; import javax.annotation.*; import net.minecraft.command.*; import net.minecraft.server.*; import net.minecraft.util.math.*;
[ "java.util", "javax.annotation", "net.minecraft.command", "net.minecraft.server", "net.minecraft.util" ]
java.util; javax.annotation; net.minecraft.command; net.minecraft.server; net.minecraft.util;
1,882,814
public void attachFile(View view) { Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("*/*"); try { startActivityForResult(intent, ATTACH_FILE); } catch (Exception notFound) { intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("file/*"); startActivityForResult(inte...
void function(View view) { Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("*/*"); try { startActivityForResult(intent, ATTACH_FILE); } catch (Exception notFound) { intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType(STR); startActivityForResult(intent, ATTACH_FILE); } }
/** * Upload, and append a file to the details. */
Upload, and append a file to the details
attachFile
{ "repo_name": "BOTlibre/BOTlibre", "path": "sdk/android/BotLibre/app/src/main/java/org/botlibre/sdk/activity/issuetracker/IssueEditorActivity.java", "license": "epl-1.0", "size": 8065 }
[ "android.content.Intent", "android.view.View" ]
import android.content.Intent; import android.view.View;
import android.content.*; import android.view.*;
[ "android.content", "android.view" ]
android.content; android.view;
2,083,358
protected void captureConnectTiming() { HttpConnectTiming httpConnectTiming = HttpConnectHarCaptureFilter.consumeConnectTimingForConnection(clientAddress); if (httpConnectTiming != null) { harEntry.getTimings().setSsl(httpConnectTiming.getSslHandshakeTimeNanos(), TimeUnit.NANOSECONDS); ...
void function() { HttpConnectTiming httpConnectTiming = HttpConnectHarCaptureFilter.consumeConnectTimingForConnection(clientAddress); if (httpConnectTiming != null) { harEntry.getTimings().setSsl(httpConnectTiming.getSslHandshakeTimeNanos(), TimeUnit.NANOSECONDS); harEntry.getTimings().setConnect(httpConnectTiming.getC...
/** * Populates ssl and connect timing info in the HAR if an entry for this client and server exist in the cache. */
Populates ssl and connect timing info in the HAR if an entry for this client and server exist in the cache
captureConnectTiming
{ "repo_name": "jekh/browsermob-proxy", "path": "browsermob-core/src/main/java/net/lightbody/bmp/filters/HarCaptureFilter.java", "license": "apache-2.0", "size": 35205 }
[ "java.util.concurrent.TimeUnit", "net.lightbody.bmp.filters.support.HttpConnectTiming" ]
import java.util.concurrent.TimeUnit; import net.lightbody.bmp.filters.support.HttpConnectTiming;
import java.util.concurrent.*; import net.lightbody.bmp.filters.support.*;
[ "java.util", "net.lightbody.bmp" ]
java.util; net.lightbody.bmp;
2,531,024
public PrintStream getErr() { return ioStack.peek().err; }
PrintStream function() { return ioStack.peek().err; }
/** * Returns the current error stream. * * @return The current error stream. */
Returns the current error stream
getErr
{ "repo_name": "scgray/jsqsh", "path": "jsqsh-core/src/main/java/org/sqsh/InputOutputManager.java", "license": "apache-2.0", "size": 9062 }
[ "java.io.PrintStream" ]
import java.io.PrintStream;
import java.io.*;
[ "java.io" ]
java.io;
713,983
ActionFuture<GetStoredScriptResponse> getStoredScript(GetStoredScriptRequest request);
ActionFuture<GetStoredScriptResponse> getStoredScript(GetStoredScriptRequest request);
/** * Get a script from the cluster state */
Get a script from the cluster state
getStoredScript
{ "repo_name": "coding0011/elasticsearch", "path": "server/src/main/java/org/elasticsearch/client/ClusterAdminClient.java", "license": "apache-2.0", "size": 26995 }
[ "org.elasticsearch.action.ActionFuture", "org.elasticsearch.action.admin.cluster.storedscripts.GetStoredScriptRequest", "org.elasticsearch.action.admin.cluster.storedscripts.GetStoredScriptResponse" ]
import org.elasticsearch.action.ActionFuture; import org.elasticsearch.action.admin.cluster.storedscripts.GetStoredScriptRequest; import org.elasticsearch.action.admin.cluster.storedscripts.GetStoredScriptResponse;
import org.elasticsearch.action.*; import org.elasticsearch.action.admin.cluster.storedscripts.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
2,036,671
Observable<T> listByRegionAsync(Region region);
Observable<T> listByRegionAsync(Region region);
/** * Lists all the resources of the specified type in the specified region. * * @param region the selected Azure region * @return list of resources */
Lists all the resources of the specified type in the specified region
listByRegionAsync
{ "repo_name": "anudeepsharma/azure-sdk-for-java", "path": "azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsListingByRegion.java", "license": "mit", "size": 1832 }
[ "com.microsoft.azure.management.resources.fluentcore.arm.Region" ]
import com.microsoft.azure.management.resources.fluentcore.arm.Region;
import com.microsoft.azure.management.resources.fluentcore.arm.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
679,551
protected void defaultDisplay(Graphics2D g2, Shape shape) { if (this.fillPaint != null) { g2.setPaint(this.fillPaint); g2.fill(shape); } if (this.outlinePaint != null) { g2.setStroke(this.outlineStroke); g2.setPaint(this.outlinePaint...
void function(Graphics2D g2, Shape shape) { if (this.fillPaint != null) { g2.setPaint(this.fillPaint); g2.fill(shape); } if (this.outlinePaint != null) { g2.setStroke(this.outlineStroke); g2.setPaint(this.outlinePaint); g2.draw(shape); } }
/** * Displays a shape. * * @param g2 the graphics device. * @param shape the shape. */
Displays a shape
defaultDisplay
{ "repo_name": "sebkur/JFreeChart", "path": "src/main/java/org/jfree/chart/needle/MeterNeedle.java", "license": "lgpl-3.0", "size": 12284 }
[ "java.awt.Graphics2D", "java.awt.Shape" ]
import java.awt.Graphics2D; import java.awt.Shape;
import java.awt.*;
[ "java.awt" ]
java.awt;
948,215
BarrierForest construct(List<Model> minima, Connector connector);
BarrierForest construct(List<Model> minima, Connector connector);
/** * Constructs a barrier forest using {@link #DEFAULT_THRESHOLD} as the * threshold. * * @param minima the minimized models to use. * @param connector the connector to use. * @return the barrier forest. * @throws NullPointerException if <code>minima == null</code> or if * <code>connec...
Constructs a barrier forest using <code>#DEFAULT_THRESHOLD</code> as the threshold
construct
{ "repo_name": "mkjensen/barriers", "path": "src/com/martinkampjensen/thesis/barriers/Constructor.java", "license": "apache-2.0", "size": 4412 }
[ "com.martinkampjensen.thesis.connection.Connector", "com.martinkampjensen.thesis.model.BarrierForest", "com.martinkampjensen.thesis.model.Model", "java.util.List" ]
import com.martinkampjensen.thesis.connection.Connector; import com.martinkampjensen.thesis.model.BarrierForest; import com.martinkampjensen.thesis.model.Model; import java.util.List;
import com.martinkampjensen.thesis.connection.*; import com.martinkampjensen.thesis.model.*; import java.util.*;
[ "com.martinkampjensen.thesis", "java.util" ]
com.martinkampjensen.thesis; java.util;
166,717
private void findTop() { // check if aggregation is needed if (super.hasTop()) { workKey.set(super.getTopKey()); if (workKey.isDeleted()) { return; } if (null != aggregatedGroups && !aggregatedGroups.contains(workKey)) { ...
void function() { if (super.hasTop()) { workKey.set(super.getTopKey()); if (workKey.isDeleted()) { return; } if (null != aggregatedGroups && !aggregatedGroups.contains(workKey)) { return; } final byte[] columnFamily = workKey.getColumnFamilyData().getBackingArray(); final String group; try { group = elementConverter.ge...
/** * Sets the topKey and topValue based on the top key of the source. */
Sets the topKey and topValue based on the top key of the source
findTop
{ "repo_name": "GovernmentCommunicationsHeadquarters/Gaffer", "path": "store-implementation/accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/key/core/impl/CoreKeyGroupByCombiner.java", "license": "apache-2.0", "size": 17478 }
[ "java.util.Iterator", "java.util.Set", "org.apache.accumulo.core.data.Key", "uk.gov.gchq.gaffer.accumulostore.key.exception.AccumuloElementConversionException", "uk.gov.gchq.gaffer.data.element.Properties", "uk.gov.gchq.gaffer.data.elementdefinition.view.ViewElementDefinition" ]
import java.util.Iterator; import java.util.Set; import org.apache.accumulo.core.data.Key; import uk.gov.gchq.gaffer.accumulostore.key.exception.AccumuloElementConversionException; import uk.gov.gchq.gaffer.data.element.Properties; import uk.gov.gchq.gaffer.data.elementdefinition.view.ViewElementDefinition;
import java.util.*; import org.apache.accumulo.core.data.*; import uk.gov.gchq.gaffer.accumulostore.key.exception.*; import uk.gov.gchq.gaffer.data.element.*; import uk.gov.gchq.gaffer.data.elementdefinition.view.*;
[ "java.util", "org.apache.accumulo", "uk.gov.gchq" ]
java.util; org.apache.accumulo; uk.gov.gchq;
1,577,385
protected Size2D arrangeNN(BlockContainer container, Graphics2D g2) { double maxW = 0.0; double maxH = 0.0; List blocks = container.getBlocks(); Iterator iterator = blocks.iterator(); while (iterator.hasNext()) { Block b = (Block) iterator.next(); ...
Size2D function(BlockContainer container, Graphics2D g2) { double maxW = 0.0; double maxH = 0.0; List blocks = container.getBlocks(); Iterator iterator = blocks.iterator(); while (iterator.hasNext()) { Block b = (Block) iterator.next(); if (b != null) { Size2D s = b.arrange(g2, RectangleConstraint.NONE); maxW = Math.ma...
/** * Arranges the container with no constraint on the width or height. * * @param container the container (<code>null</code> not permitted). * @param g2 the graphics device. * * @return The size. */
Arranges the container with no constraint on the width or height
arrangeNN
{ "repo_name": "sebkur/JFreeChart", "path": "src/main/java/org/jfree/chart/block/GridArrangement.java", "license": "lgpl-3.0", "size": 16289 }
[ "java.awt.Graphics2D", "java.util.Iterator", "java.util.List", "org.jfree.ui.Size2D" ]
import java.awt.Graphics2D; import java.util.Iterator; import java.util.List; import org.jfree.ui.Size2D;
import java.awt.*; import java.util.*; import org.jfree.ui.*;
[ "java.awt", "java.util", "org.jfree.ui" ]
java.awt; java.util; org.jfree.ui;
2,105,473
public SubjectFactory getSubjectFactory();
SubjectFactory function();
/** * Get the subject factory * @return The value */
Get the subject factory
getSubjectFactory
{ "repo_name": "ironjacamar/ironjacamar", "path": "core/impl/src/main/java/org/jboss/jca/core/connectionmanager/ConnectionManager.java", "license": "lgpl-2.1", "size": 4395 }
[ "org.jboss.jca.core.spi.security.SubjectFactory" ]
import org.jboss.jca.core.spi.security.SubjectFactory;
import org.jboss.jca.core.spi.security.*;
[ "org.jboss.jca" ]
org.jboss.jca;
2,626,061
@NotNull private RecipeWidget addRecipe(@NotNull RecipeDescriptor recipeDescriptor) { RecipeWidget recipe = new RecipeWidget(recipeDescriptor, resources); recipe.setDelegate(this); view.addRecipe(recipe); recipesContainerPresenter.addRecipePanel(recipe); recipes.put(recip...
RecipeWidget function(@NotNull RecipeDescriptor recipeDescriptor) { RecipeWidget recipe = new RecipeWidget(recipeDescriptor, resources); recipe.setDelegate(this); view.addRecipe(recipe); recipesContainerPresenter.addRecipePanel(recipe); recipes.put(recipe, recipeDescriptor); return recipe; }
/** * Adds new recipe to list. * * @param recipeDescriptor * a descriptor of new recipe */
Adds new recipe to list
addRecipe
{ "repo_name": "kaloyan-raev/che", "path": "plugins/plugin-machine/che-plugin-machine-ext-client/src/main/java/org/eclipse/che/ide/extension/machine/client/perspective/widgets/recipe/RecipePartPresenter.java", "license": "epl-1.0", "size": 14113 }
[ "javax.validation.constraints.NotNull", "org.eclipse.che.api.machine.shared.dto.recipe.RecipeDescriptor", "org.eclipse.che.ide.extension.machine.client.perspective.widgets.recipe.entry.RecipeWidget" ]
import javax.validation.constraints.NotNull; import org.eclipse.che.api.machine.shared.dto.recipe.RecipeDescriptor; import org.eclipse.che.ide.extension.machine.client.perspective.widgets.recipe.entry.RecipeWidget;
import javax.validation.constraints.*; import org.eclipse.che.api.machine.shared.dto.recipe.*; import org.eclipse.che.ide.extension.machine.client.perspective.widgets.recipe.entry.*;
[ "javax.validation", "org.eclipse.che" ]
javax.validation; org.eclipse.che;
1,693,095
public String getModifiedDate() { return getDictionary().getString(COSName.M); }
String function() { return getDictionary().getString(COSName.M); }
/** * This will retrieve the date and time the annotation was modified. * * @return the modified date/time (often in date format, but can be an arbitary string). */
This will retrieve the date and time the annotation was modified
getModifiedDate
{ "repo_name": "mdamt/PdfBox-Android", "path": "library/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotation.java", "license": "apache-2.0", "size": 16669 }
[ "org.apache.pdfbox.cos.COSName" ]
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
1,617,059
public boolean stopServer() { if (running) { running = false; try { if (serverSocket != null && !serverSocket.isClosed()) { serverSocket.close(); } } catch (IOException e) { e.printStackTrace(); } return true; } else { return false; } }
boolean function() { if (running) { running = false; try { if (serverSocket != null && !serverSocket.isClosed()) { serverSocket.close(); } } catch (IOException e) { e.printStackTrace(); } return true; } else { return false; } }
/** * Stops the web socket server if it's running. * * @return True if stopped successfully, false if it was not running * @exception IOException * can occur for several reasons related to I/O operations. */
Stops the web socket server if it's running
stopServer
{ "repo_name": "ArildWollan/WebSocket", "path": "src/nettverksprosjekt/servers/WebServer.java", "license": "mit", "size": 3218 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
279,295
public static File getBestJre() { Jvm jvm = Jvm.current(); Jre jre = jvm.getStandaloneJre(); if (jre != null) { return jre.getHomeDir(); } jre = jvm.getJre(); if (jre != null) { return jre.getHomeDir(); } return null; }
static File function() { Jvm jvm = Jvm.current(); Jre jre = jvm.getStandaloneJre(); if (jre != null) { return jre.getHomeDir(); } jre = jvm.getJre(); if (jre != null) { return jre.getHomeDir(); } return null; }
/** * Locates a JRE installation for the current JVM. Prefers a stand-alone JRE installation over one that is part of a JDK install. * * @return The JRE home directory, or null if not found */
Locates a JRE installation for the current JVM. Prefers a stand-alone JRE installation over one that is part of a JDK install
getBestJre
{ "repo_name": "robinverduijn/gradle", "path": "subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/AvailableJavaHomes.java", "license": "apache-2.0", "size": 13440 }
[ "java.io.File", "org.gradle.internal.jvm.Jre", "org.gradle.internal.jvm.Jvm" ]
import java.io.File; import org.gradle.internal.jvm.Jre; import org.gradle.internal.jvm.Jvm;
import java.io.*; import org.gradle.internal.jvm.*;
[ "java.io", "org.gradle.internal" ]
java.io; org.gradle.internal;
195,819
protected void updateObjectIdentity(MutableAcl acl) { Long parentId = null; if (acl.getParentAcl() != null) { Assert.isInstanceOf(ObjectIdentityImpl.class, acl.getParentAcl().getObjectIdentity(), "Implementation only supports ObjectIdentityImpl"); ObjectIden...
void function(MutableAcl acl) { Long parentId = null; if (acl.getParentAcl() != null) { Assert.isInstanceOf(ObjectIdentityImpl.class, acl.getParentAcl().getObjectIdentity(), STR); ObjectIdentityImpl oii = (ObjectIdentityImpl) acl.getParentAcl().getObjectIdentity(); parentId = retrieveObjectIdentityPrimaryKey(oii); } As...
/** * Updates an existing acl_object_identity row, with new information presented in the passed MutableAcl * object. Also will create an acl_sid entry if needed for the Sid that owns the MutableAcl. * * @param acl to modify (a row must already exist in acl_object_identity) * * @throws NotF...
Updates an existing acl_object_identity row, with new information presented in the passed MutableAcl object. Also will create an acl_sid entry if needed for the Sid that owns the MutableAcl
updateObjectIdentity
{ "repo_name": "justinedelson/spring-security", "path": "acl/src/main/java/org/springframework/security/acls/jdbc/JdbcMutableAclService.java", "license": "apache-2.0", "size": 19474 }
[ "org.springframework.security.acls.domain.ObjectIdentityImpl", "org.springframework.security.acls.model.MutableAcl", "org.springframework.security.acls.model.NotFoundException", "org.springframework.util.Assert" ]
import org.springframework.security.acls.domain.ObjectIdentityImpl; import org.springframework.security.acls.model.MutableAcl; import org.springframework.security.acls.model.NotFoundException; import org.springframework.util.Assert;
import org.springframework.security.acls.domain.*; import org.springframework.security.acls.model.*; import org.springframework.util.*;
[ "org.springframework.security", "org.springframework.util" ]
org.springframework.security; org.springframework.util;
843,566
interface DatabusAuthorizerByOwner { boolean canAccessSubscription(OwnedSubscription subscription);
interface DatabusAuthorizerByOwner { boolean canAccessSubscription(OwnedSubscription subscription);
/** * Checks whether an owner has permission to resubscribe to or poll the provided subscription. Typically used * in response to API subscribe and poll requests, respectively. */
Checks whether an owner has permission to resubscribe to or poll the provided subscription. Typically used in response to API subscribe and poll requests, respectively
canAccessSubscription
{ "repo_name": "billkalter/emodb", "path": "databus/src/main/java/com/bazaarvoice/emodb/databus/auth/DatabusAuthorizer.java", "license": "apache-2.0", "size": 1062 }
[ "com.bazaarvoice.emodb.databus.model.OwnedSubscription" ]
import com.bazaarvoice.emodb.databus.model.OwnedSubscription;
import com.bazaarvoice.emodb.databus.model.*;
[ "com.bazaarvoice.emodb" ]
com.bazaarvoice.emodb;
1,856,814
@RequiresApi(api = Build.VERSION_CODES.M) public boolean isGrantedDrawOverlays() { return Settings.canDrawOverlays(context); }
@RequiresApi(api = Build.VERSION_CODES.M) boolean function() { return Settings.canDrawOverlays(context); }
/** * Return whether the app can draw on top of other apps. * * @return {@code true}: yes<br>{@code false}: no */
Return whether the app can draw on top of other apps
isGrantedDrawOverlays
{ "repo_name": "lanhuaguizha/Christian", "path": "xpopup/src/main/java/com/lxj/xpopup/util/XPermission.java", "license": "gpl-3.0", "size": 16148 }
[ "android.os.Build", "android.provider.Settings", "androidx.annotation.RequiresApi" ]
import android.os.Build; import android.provider.Settings; import androidx.annotation.RequiresApi;
import android.os.*; import android.provider.*; import androidx.annotation.*;
[ "android.os", "android.provider", "androidx.annotation" ]
android.os; android.provider; androidx.annotation;
845,290
public Set<NodeKey> addedStrongReferrers();
Set<NodeKey> function();
/** * Returns a set of node keys with the strong referrers that have been added. * * @return a {@code non-null} Set */
Returns a set of node keys with the strong referrers that have been added
addedStrongReferrers
{ "repo_name": "flownclouds/modeshape", "path": "modeshape-jcr/src/main/java/org/modeshape/jcr/cache/MutableCachedNode.java", "license": "apache-2.0", "size": 22992 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,219,857
@Test public void compareToDense() { // more stressful if not 0 int minDisparity = 3; int maxDisparity = 12; ImageFloat32 left = new ImageFloat32(w,h); ImageFloat32 right = new ImageFloat32(w,h); StereoDisparity<ImageFloat32,ImageUInt8> validator = FactoryStereoDisparity.regionWta(DisparityAlgorit...
void function() { int minDisparity = 3; int maxDisparity = 12; ImageFloat32 left = new ImageFloat32(w,h); ImageFloat32 right = new ImageFloat32(w,h); StereoDisparity<ImageFloat32,ImageUInt8> validator = FactoryStereoDisparity.regionWta(DisparityAlgorithms.RECT, minDisparity,maxDisparity,r,r,-1,-1,-1,ImageFloat32.class)...
/** * Compare to the equivalent dense algorithm */
Compare to the equivalent dense algorithm
compareToDense
{ "repo_name": "pacozaa/BoofCV", "path": "main/feature/test/boofcv/abst/feature/disparity/TestWrapDisparitySparseSadRect.java", "license": "apache-2.0", "size": 2453 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,835,010
public void setInformationDate(final LocalDateTime informationDate) { this.informationDate = informationDate; }
void function(final LocalDateTime informationDate) { this.informationDate = informationDate; }
/** * Set the value related to the column: informationDate. * @param informationDate the informationDate value you wish to set */
Set the value related to the column: informationDate
setInformationDate
{ "repo_name": "servinglynk/servinglynk-hmis", "path": "hmis-model-v2014/src/main/java/com/servinglynk/hmis/warehouse/model/v2014/Referralsource.java", "license": "mpl-2.0", "size": 10220 }
[ "java.time.LocalDateTime" ]
import java.time.LocalDateTime;
import java.time.*;
[ "java.time" ]
java.time;
2,752,699
@IconType public int getType() { if (mType == TYPE_UNKNOWN && Build.VERSION.SDK_INT >= 23) { return Api23Impl.getType(mObj1); } return mType; }
int function() { if (mType == TYPE_UNKNOWN && Build.VERSION.SDK_INT >= 23) { return Api23Impl.getType(mObj1); } return mType; }
/** * Gets the type of the icon provided. * <p> * Note that new types may be added later, so callers should guard against other * types being returned. */
Gets the type of the icon provided. Note that new types may be added later, so callers should guard against other types being returned
getType
{ "repo_name": "AndroidX/androidx", "path": "core/core/src/main/java/androidx/core/graphics/drawable/IconCompat.java", "license": "apache-2.0", "size": 49825 }
[ "android.os.Build" ]
import android.os.Build;
import android.os.*;
[ "android.os" ]
android.os;
160,831
Vector3D intersectionBasepoint( CWFacet t ) { Vector3D ret = new Vector3D(); Vector3D n = un.crossProduct( t.un ); double vn1 = v1.dotProduct(un); double vn2 = t.v1.dotProduct(t.un); if ( Math.abs(n.x) > Math.abs(n.y) ) { if ( Math.abs(n.x) > Math.abs(n.z) ) { // solve Y-Z for X=0 ret.y = ( t.un.z * vn1...
Vector3D intersectionBasepoint( CWFacet t ) { Vector3D ret = new Vector3D(); Vector3D n = un.crossProduct( t.un ); double vn1 = v1.dotProduct(un); double vn2 = t.v1.dotProduct(t.un); if ( Math.abs(n.x) > Math.abs(n.y) ) { if ( Math.abs(n.x) > Math.abs(n.z) ) { ret.y = ( t.un.z * vn1 - un.z * vn2 ) / n.x; ret.z = ( - t....
/** get an intersection point with another facet * the intersection line is P + alpha (N1 ^ N2) * @param t the other triangle * @return an intersection point */
get an intersection point with another facet the intersection line is P + alpha (N1 ^ N2)
intersectionBasepoint
{ "repo_name": "marcocorvi/topodroid", "path": "src/com/topodroid/c3walls/cw/CWFacet.java", "license": "gpl-3.0", "size": 9301 }
[ "com.topodroid.DistoX" ]
import com.topodroid.DistoX;
import com.topodroid.*;
[ "com.topodroid" ]
com.topodroid;
1,301,827
@Before public void before() throws InterruptedException, InvocationTargetException { createTempDirs(); configureJemmy(); cleaningRobot = BasicRobot.robotWithNewAwtHierarchy(); sec = NoExitSecurityManagerInstaller.installNoExitSecurityManager(); BluejExtensionEdtOfficer.i...
void function() throws InterruptedException, InvocationTargetException { createTempDirs(); configureJemmy(); cleaningRobot = BasicRobot.robotWithNewAwtHierarchy(); sec = NoExitSecurityManagerInstaller.installNoExitSecurityManager(); BluejExtensionEdtOfficer.install();
/** * Starts BlueJ in a new thread. */
Starts BlueJ in a new thread
before
{ "repo_name": "olerass/bluej-extender", "path": "subprojects/acceptance-test/src/test/java/Init.java", "license": "mit", "size": 3862 }
[ "java.lang.reflect.InvocationTargetException", "org.fest.swing.core.BasicRobot", "org.fest.swing.security.NoExitSecurityManagerInstaller" ]
import java.lang.reflect.InvocationTargetException; import org.fest.swing.core.BasicRobot; import org.fest.swing.security.NoExitSecurityManagerInstaller;
import java.lang.reflect.*; import org.fest.swing.core.*; import org.fest.swing.security.*;
[ "java.lang", "org.fest.swing" ]
java.lang; org.fest.swing;
1,081,704
public boolean hasRoleForResource(CmsRequestContext context, CmsUser user, CmsRole role, CmsResource resource) { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); boolean result; try { result = hasRoleForResource(dbc, user, role, resource); } finally { ...
boolean function(CmsRequestContext context, CmsUser user, CmsRole role, CmsResource resource) { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); boolean result; try { result = hasRoleForResource(dbc, user, role, resource); } finally { dbc.clear(); } return result; }
/** * Checks if the given user has the given role for the given resource.<p> * * @param context the current request context * @param user the user to check * @param role the role to check * @param resource the resource to check the role for * * @return <code>true</code...
Checks if the given user has the given role for the given resource
hasRoleForResource
{ "repo_name": "comundus/opencms-comundus", "path": "src/main/java/org/opencms/db/CmsSecurityManager.java", "license": "lgpl-2.1", "size": 242914 }
[ "org.opencms.file.CmsRequestContext", "org.opencms.file.CmsResource", "org.opencms.file.CmsUser", "org.opencms.security.CmsRole" ]
import org.opencms.file.CmsRequestContext; import org.opencms.file.CmsResource; import org.opencms.file.CmsUser; import org.opencms.security.CmsRole;
import org.opencms.file.*; import org.opencms.security.*;
[ "org.opencms.file", "org.opencms.security" ]
org.opencms.file; org.opencms.security;
1,940,067
private static String[] mergePackages(List<String> packageList, Class... basePackageClasses) { final Set<String> baseClassesList = new HashSet<>(); // add all additional packages from list baseClassesList.addAll(packageList); // add all packages from classes baseClassesList.a...
static String[] function(List<String> packageList, Class... basePackageClasses) { final Set<String> baseClassesList = new HashSet<>(); baseClassesList.addAll(packageList); baseClassesList.addAll(Arrays.stream(basePackageClasses) .map(ClassUtils::getPackageName) .collect(Collectors.toSet())); return baseClassesList.toAr...
/** * Util method to merge packages from list of packages & some provided classes. * Should remove all duplicites along the way. * * @param packageList list of packages. * @param basePackageClasses the classes, whose package should be included as wel.. * @return array with string represent...
Util method to merge packages from list of packages & some provided classes. Should remove all duplicites along the way
mergePackages
{ "repo_name": "OpenWiseSolutions/openhub-framework", "path": "core/src/main/java/org/openhubframework/openhub/core/config/JpaConfig.java", "license": "apache-2.0", "size": 4738 }
[ "java.util.Arrays", "java.util.HashSet", "java.util.List", "java.util.Set", "java.util.stream.Collectors", "org.springframework.util.ClassUtils" ]
import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.stream.Collectors; import org.springframework.util.ClassUtils;
import java.util.*; import java.util.stream.*; import org.springframework.util.*;
[ "java.util", "org.springframework.util" ]
java.util; org.springframework.util;
474,205
public ByteSizeValue getTotalMemory() { long size = 0; if (this.getFieldData() != null) { size += this.getFieldData().getMemorySizeInBytes(); } if (this.getQueryCache() != null) { size += this.getQueryCache().getMemorySizeInBytes(); } if (this....
ByteSizeValue function() { long size = 0; if (this.getFieldData() != null) { size += this.getFieldData().getMemorySizeInBytes(); } if (this.getQueryCache() != null) { size += this.getQueryCache().getMemorySizeInBytes(); } if (this.getSegments() != null) { size += this.getSegments().getMemoryInBytes() + this.getSegments...
/** * Utility method which computes total memory by adding * FieldData, PercolatorCache, Segments (memory, index writer, version map) */
Utility method which computes total memory by adding FieldData, PercolatorCache, Segments (memory, index writer, version map)
getTotalMemory
{ "repo_name": "camilojd/elasticsearch", "path": "core/src/main/java/org/elasticsearch/action/admin/indices/stats/CommonStats.java", "license": "apache-2.0", "size": 19830 }
[ "org.elasticsearch.common.unit.ByteSizeValue" ]
import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.unit.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
2,356,001
protected native void setSelection(JavaScriptObject range, String text) ;
native void function(JavaScriptObject range, String text) ;
/** * Includes the new text into the text block.<p> * @param range the range where the text should be included * @param text the text that should be included */
Includes the new text into the text block
setSelection
{ "repo_name": "mediaworx/opencms-core", "path": "src-gwt/org/opencms/acacia/client/widgets/CmsStringWidget.java", "license": "lgpl-2.1", "size": 9321 }
[ "com.google.gwt.core.client.JavaScriptObject" ]
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.*;
[ "com.google.gwt" ]
com.google.gwt;
2,789,699
@Deprecated public static void setScaleY(View view, float value) { view.setScaleY(value); }
static void function(View view, float value) { view.setScaleY(value); }
/** * Sets the amount that the view is scaled in Y around the pivot point, as a proportion of * the view's unscaled width. A value of 1 means that no scaling is applied. * * @param value The scaling factor. * * @deprecated Use {@link View#setScaleY(float)} directly. */
Sets the amount that the view is scaled in Y around the pivot point, as a proportion of the view's unscaled width. A value of 1 means that no scaling is applied
setScaleY
{ "repo_name": "AndroidX/androidx", "path": "core/core/src/main/java/androidx/core/view/ViewCompat.java", "license": "apache-2.0", "size": 224652 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
605,240
void build(OFPort outPort);
void build(OFPort outPort);
/** * Build the packet out in response to this packet in event. * * @param outPort the out port to send to packet out of. */
Build the packet out in response to this packet in event
build
{ "repo_name": "Shashikanth-Huawei/bmp", "path": "protocols/openflow/api/src/main/java/org/onosproject/openflow/controller/OpenFlowPacketContext.java", "license": "apache-2.0", "size": 2792 }
[ "org.projectfloodlight.openflow.types.OFPort" ]
import org.projectfloodlight.openflow.types.OFPort;
import org.projectfloodlight.openflow.types.*;
[ "org.projectfloodlight.openflow" ]
org.projectfloodlight.openflow;
950,498
private Drawable getHowToDrawable() { Drawable drawable; Resources resources = TetravexApp.getApplication(this).getResources(); switch (mPageNumber) { case 1: drawable = resources.getDrawable(R.drawable.solved3x3); break; case 2: ...
Drawable function() { Drawable drawable; Resources resources = TetravexApp.getApplication(this).getResources(); switch (mPageNumber) { case 1: drawable = resources.getDrawable(R.drawable.solved3x3); break; case 2: drawable = resources.getDrawable(R.drawable.drag_highlighted); break; case 3: drawable = resources.getDraw...
/** * Retrieves the drawable image to be used for this HowToFragment * * @return the appropriate drawable for the page to display */
Retrieves the drawable image to be used for this HowToFragment
getHowToDrawable
{ "repo_name": "jahunt1/tetravex-android", "path": "src/main/java/com/github/tetravex_android/fragment/HowToFragment.java", "license": "gpl-3.0", "size": 3469 }
[ "android.content.res.Resources", "android.graphics.drawable.Drawable", "android.util.Log", "com.github.tetravex_android.TetravexApp" ]
import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.util.Log; import com.github.tetravex_android.TetravexApp;
import android.content.res.*; import android.graphics.drawable.*; import android.util.*; import com.github.tetravex_android.*;
[ "android.content", "android.graphics", "android.util", "com.github.tetravex_android" ]
android.content; android.graphics; android.util; com.github.tetravex_android;
439,346
protected void compareResults(double epsilon) { for (int i = 0; i < comparisonFiles.length; i++) { if (outputDirectories[i].endsWith(".scalar")) { String javaFile = comparisonFiles[i].replace(".scalar", ""); String dmlFile = outputDirectories[i].replace(".scalar", ""); TestUtils.compareDML...
void function(double epsilon) { for (int i = 0; i < comparisonFiles.length; i++) { if (outputDirectories[i].endsWith(STR)) { String javaFile = comparisonFiles[i].replace(STR, ""); String dmlFile = outputDirectories[i].replace(STR, ""); TestUtils.compareDMLScalarWithJavaScalar(javaFile, dmlFile, epsilon); } else { TestU...
/** * <p> * Compares the results of the computation with the expected ones with a * specified tolerance. * </p> * * @param epsilon * tolerance */
Compares the results of the computation with the expected ones with a specified tolerance.
compareResults
{ "repo_name": "aloknsingh/systemml", "path": "system-ml/src/test/java/com/ibm/bi/dml/test/integration/AutomatedTestBase.java", "license": "apache-2.0", "size": 47876 }
[ "com.ibm.bi.dml.test.utils.TestUtils" ]
import com.ibm.bi.dml.test.utils.TestUtils;
import com.ibm.bi.dml.test.utils.*;
[ "com.ibm.bi" ]
com.ibm.bi;
260,132
public static String readAsciiLine(InputStream in) throws IOException { StringBuilder result = new StringBuilder(80); while (true) { int c = in.read(); if (c == -1) { throw new EOFException(); } else if (c == '\n') { break; ...
static String function(InputStream in) throws IOException { StringBuilder result = new StringBuilder(80); while (true) { int c = in.read(); if (c == -1) { throw new EOFException(); } else if (c == '\n') { break; } result.append((char) c); } int length = result.length(); if (length > 0 && result.charAt(length - 1) == '\...
/** * Returns the ASCII characters up to but not including the next "\r\n", or * "\n". * * @throws EOFException if the stream is exhausted before the next newline * character. */
Returns the ASCII characters up to but not including the next "\r\n", or "\n"
readAsciiLine
{ "repo_name": "minggo620/Pluto-Android", "path": "PlutoAndroidExample/Pluto/src/main/java/com/minggo/pluto/bitmap/DiskLruCache.java", "license": "mit", "size": 33780 }
[ "java.io.EOFException", "java.io.IOException", "java.io.InputStream" ]
import java.io.EOFException; import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,838,030
private boolean isSupported(RexNode node) { if (node.getType().getSqlTypeName().equals(SqlTypeName.BOOLEAN)) { if (node instanceof RexCall) { RexCall compositeNode = (RexCall) node; // Only support comparisons in a predicate if (!node.getKind().belongsTo(COMPARISON)) { ret...
boolean function(RexNode node) { if (node.getType().getSqlTypeName().equals(SqlTypeName.BOOLEAN)) { if (node instanceof RexCall) { RexCall compositeNode = (RexCall) node; if (!node.getKind().belongsTo(COMPARISON)) { return false; } if (node.getKind().equals(IN)) { return false; } for (RexNode operand : compositeNode.ge...
/** * Check whether a {@code RexNode} is supported. For testing purposes only simple nodes are * supported. Ex: comparison between 2 input fields, input field to a literal, literal to a * literal. * * @param node A node to check for predicate push-down support. * @return True when a node is supported,...
Check whether a RexNode is supported. For testing purposes only simple nodes are supported. Ex: comparison between 2 input fields, input field to a literal, literal to a literal
isSupported
{ "repo_name": "RyanSkraba/beam", "path": "sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/test/TestTableFilter.java", "license": "apache-2.0", "size": 4218 }
[ "org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rex.RexCall", "org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rex.RexInputRef", "org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rex.RexLiteral", "org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rex.RexNode", "org.apac...
import org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rex.RexCall; import org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rex.RexInputRef; import org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rex.RexLiteral; import org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rex.RexNode; i...
import org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rex.*; import org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.sql.type.*;
[ "org.apache.beam" ]
org.apache.beam;
953,959
protected static SqlParts sqlToSortIds(Set<String> docIdSet, List<FieldSort> sortDocument, List<Index> indexes) throws QueryException { String chosenIndex = chooseIndexForSort(sortDocument, indexes); if (chosenIndex == null) { ...
static SqlParts function(Set<String> docIdSet, List<FieldSort> sortDocument, List<Index> indexes) throws QueryException { String chosenIndex = chooseIndexForSort(sortDocument, indexes); if (chosenIndex == null) { String msg = String.format(Locale.ENGLISH, STR, sortDocument); logger.log(Level.SEVERE, msg); throw new Que...
/** * Return SQL to get ordered list of docIds. * * Method assumes `sortDocument` is valid. * * @param docIdSet The original set of document IDs * @param sortDocument Array of ordering definitions * [ { "fieldName" : "asc" }, { "fieldName2", "desc" } ] * ...
Return SQL to get ordered list of docIds. Method assumes `sortDocument` is valid
sqlToSortIds
{ "repo_name": "cloudant/sync-android", "path": "cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryExecutor.java", "license": "apache-2.0", "size": 16642 }
[ "com.cloudant.sync.query.FieldSort", "com.cloudant.sync.query.Index", "com.cloudant.sync.query.QueryException", "java.util.ArrayList", "java.util.List", "java.util.Locale", "java.util.Set", "java.util.logging.Level" ]
import com.cloudant.sync.query.FieldSort; import com.cloudant.sync.query.Index; import com.cloudant.sync.query.QueryException; import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Set; import java.util.logging.Level;
import com.cloudant.sync.query.*; import java.util.*; import java.util.logging.*;
[ "com.cloudant.sync", "java.util" ]
com.cloudant.sync; java.util;
1,835,166
protected Local generateClassConstructor(SootClass createdClass, Body body, Set<SootClass> constructionStack, Set<SootClass> parentClasses) { if (createdClass == null || this.failedClasses.contains(createdClass)) return null; // We cannot create instances of phantom classes as we do not have any // co...
Local function(SootClass createdClass, Body body, Set<SootClass> constructionStack, Set<SootClass> parentClasses) { if (createdClass == null this.failedClasses.contains(createdClass)) return null; if (createdClass.isPhantom() createdClass.isPhantomClass()) { logger.warn(STR, createdClass.getName()); return null; } Loca...
/** * Generates code which creates a new instance of the given class. * @param createdClass The class of which to create an instance * @param body The body to which to add the new statements ("new" statement, * constructor call, etc.) * @param constructionStack The stack of classes currently under constructio...
Generates code which creates a new instance of the given class
generateClassConstructor
{ "repo_name": "JulianSchuette/ConDroid", "path": "src/main/java/soot/jimple/infoflow/entryPointCreators/CBaseEntryPointCreator.java", "license": "bsd-3-clause", "size": 34115 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
335,052
public void setOpenAmt (BigDecimal OpenAmt) { set_ValueNoCheck (COLUMNNAME_OpenAmt, OpenAmt); }
void function (BigDecimal OpenAmt) { set_ValueNoCheck (COLUMNNAME_OpenAmt, OpenAmt); }
/** Set Open Amount. @param OpenAmt Open item amount */
Set Open Amount
setOpenAmt
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/X_C_PaySelectionLine.java", "license": "gpl-2.0", "size": 11152 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
2,714,101
public void testToString() throws Exception { SSLServerSocket ssocket = createSSLServerSocket(); assertNotNull("String representation is null", ssocket.toString()); } private static class Client extends Thread { private boolean closed; private boolean handshake_started = fa...
void function() throws Exception { SSLServerSocket ssocket = createSSLServerSocket(); assertNotNull(STR, ssocket.toString()); } private static class Client extends Thread { private boolean closed; private boolean handshake_started = false; private Socket client = null; private int port; public Client(int port) throws I...
/** * toString() method testing. */
toString() method testing
testToString
{ "repo_name": "freeVM/freeVM", "path": "enhanced/archive/classlib/java6/modules/x-net/src/test/impl/java.injected/org/apache/harmony/xnet/provider/jsse/SSLServerSocketImplTest.java", "license": "apache-2.0", "size": 23012 }
[ "java.io.IOException", "java.net.Socket", "javax.net.ssl.SSLServerSocket" ]
import java.io.IOException; import java.net.Socket; import javax.net.ssl.SSLServerSocket;
import java.io.*; import java.net.*; import javax.net.ssl.*;
[ "java.io", "java.net", "javax.net" ]
java.io; java.net; javax.net;
724,707
public static CipherParameters makePBEMacParameters( BCPBEKey pbeKey, AlgorithmParameterSpec spec) { if ((spec == null) || !(spec instanceof PBEParameterSpec)) { throw new IllegalArgumentException("Need a PBEParameter spec with a PBE key.")...
static CipherParameters function( BCPBEKey pbeKey, AlgorithmParameterSpec spec) { if ((spec == null) !(spec instanceof PBEParameterSpec)) { throw new IllegalArgumentException(STR); } PBEParameterSpec pbeParam = (PBEParameterSpec)spec; PBEParametersGenerator generator = makePBEGenerator(pbeKey.getType(), pbeKey.getDiges...
/** * generate a PBE based key suitable for a MAC algorithm, the * key size is chosen according the MAC size, or the hashing algorithm, * whichever is greater. */
generate a PBE based key suitable for a MAC algorithm, the key size is chosen according the MAC size, or the hashing algorithm, whichever is greater
makePBEMacParameters
{ "repo_name": "thedrummeraki/Aki-SSL", "path": "src/org/bouncycastle/jcajce/provider/symmetric/util/PBE.java", "license": "apache-2.0", "size": 14137 }
[ "java.security.spec.AlgorithmParameterSpec", "javax.crypto.spec.PBEParameterSpec", "org.bouncycastle.crypto.CipherParameters", "org.bouncycastle.crypto.PBEParametersGenerator" ]
import java.security.spec.AlgorithmParameterSpec; import javax.crypto.spec.PBEParameterSpec; import org.bouncycastle.crypto.CipherParameters; import org.bouncycastle.crypto.PBEParametersGenerator;
import java.security.spec.*; import javax.crypto.spec.*; import org.bouncycastle.crypto.*;
[ "java.security", "javax.crypto", "org.bouncycastle.crypto" ]
java.security; javax.crypto; org.bouncycastle.crypto;
2,166,693
public void setContext( final HttpContext context ) { this.context = context; }
void function( final HttpContext context ) { this.context = context; }
/** * Sets the context. * * @param context the new context */
Sets the context
setContext
{ "repo_name": "RampantLions/CodeTools", "path": "CodeToolsModules/CodeToolsSwagger/CodeToolsSwaggerGenerators/src/main/java/io/github/rampantlions/codetools/http/AbstractHttpClient.java", "license": "apache-2.0", "size": 19276 }
[ "org.apache.http.protocol.HttpContext" ]
import org.apache.http.protocol.HttpContext;
import org.apache.http.protocol.*;
[ "org.apache.http" ]
org.apache.http;
1,825,330
List<NIBRSError> errorList = new ArrayList<NIBRSError>(); List<AbstractReport> reportList = nibrsSubmission.getReports(); for (AbstractReport report : reportList) { List<NIBRSError> singleReportErrorsList = validateReport(report); errorList.addAll(singleReportErrorsList); } return errorList; }
List<NIBRSError> errorList = new ArrayList<NIBRSError>(); List<AbstractReport> reportList = nibrsSubmission.getReports(); for (AbstractReport report : reportList) { List<NIBRSError> singleReportErrorsList = validateReport(report); errorList.addAll(singleReportErrorsList); } return errorList; }
/** * Apply edits to validate all Reports within the specified submission. * * @param nibrsSubmission submission containing all the reports to be validated * @return A List of all errors encountered in validating the submission */
Apply edits to validate all Reports within the specified submission
validate
{ "repo_name": "SEARCH-NCJIS/nibrs", "path": "tools/nibrs-validation/src/main/java/org/search/nibrs/validation/SubmissionValidator.java", "license": "apache-2.0", "size": 3525 }
[ "java.util.ArrayList", "java.util.List", "org.search.nibrs.common.NIBRSError", "org.search.nibrs.model.AbstractReport" ]
import java.util.ArrayList; import java.util.List; import org.search.nibrs.common.NIBRSError; import org.search.nibrs.model.AbstractReport;
import java.util.*; import org.search.nibrs.common.*; import org.search.nibrs.model.*;
[ "java.util", "org.search.nibrs" ]
java.util; org.search.nibrs;
1,602,380
private void cleanUp() { List<String> dagIdstoClean = new ArrayList<>(); //Clean up failed dags for (String dagId : this.failedDagIdsFinishRunning) { //Skip monitoring of any other jobs of the failed dag. LinkedList<DagNode<JobExecutionPlan>> dagNodeList = this.dagToJobs.get(dagId)...
void function() { List<String> dagIdstoClean = new ArrayList<>(); for (String dagId : this.failedDagIdsFinishRunning) { LinkedList<DagNode<JobExecutionPlan>> dagNodeList = this.dagToJobs.get(dagId); while (!dagNodeList.isEmpty()) { DagNode<JobExecutionPlan> dagNode = dagNodeList.poll(); deleteJobState(dagId, dagNode); ...
/** * Perform clean up. Remove a dag from the dagstore if the dag is complete and update internal state. */
Perform clean up. Remove a dag from the dagstore if the dag is complete and update internal state
cleanUp
{ "repo_name": "ibuenros/gobblin", "path": "gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java", "license": "apache-2.0", "size": 25853 }
[ "java.util.ArrayList", "java.util.LinkedList", "java.util.List", "org.apache.gobblin.service.modules.flowgraph.Dag", "org.apache.gobblin.service.modules.spec.JobExecutionPlan" ]
import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import org.apache.gobblin.service.modules.flowgraph.Dag; import org.apache.gobblin.service.modules.spec.JobExecutionPlan;
import java.util.*; import org.apache.gobblin.service.modules.flowgraph.*; import org.apache.gobblin.service.modules.spec.*;
[ "java.util", "org.apache.gobblin" ]
java.util; org.apache.gobblin;
2,072,346
@Nullable public AccessibilityNodeInfoCompat popCachedNodeToRestoreFocus() { AccessibilityNodeInfoCompat nodeToReturn = cachedNodeToRestoreFocus; cachedNodeToRestoreFocus = null; return nodeToReturn; }
AccessibilityNodeInfoCompat function() { AccessibilityNodeInfoCompat nodeToReturn = cachedNodeToRestoreFocus; cachedNodeToRestoreFocus = null; return nodeToReturn; }
/** * Returns the cached node for context menu/dialog closes and clears it. * * <p><strong>Note:</strong> Caller is responsible to recycle returned node. */
Returns the cached node for context menu/dialog closes and clears it. Note: Caller is responsible to recycle returned node
popCachedNodeToRestoreFocus
{ "repo_name": "google/talkback", "path": "talkback/src/main/java/com/google/android/accessibility/talkback/focusmanagement/record/AccessibilityFocusActionHistory.java", "license": "apache-2.0", "size": 15282 }
[ "androidx.core.view.accessibility.AccessibilityNodeInfoCompat" ]
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
import androidx.core.view.accessibility.*;
[ "androidx.core" ]
androidx.core;
2,697,358
@XWalkAPI public void startActivityForResult(Intent intent, int requestCode, Bundle options) { getActivity().startActivityForResult(intent, requestCode, options); }
void function(Intent intent, int requestCode, Bundle options) { getActivity().startActivityForResult(intent, requestCode, options); }
/** * Start another activity to get some data back. * Here will start from the current XWalkView Activity, * but XWalkView embedder can override this API to do their additional job. */
Start another activity to get some data back. Here will start from the current XWalkView Activity, but XWalkView embedder can override this API to do their additional job
startActivityForResult
{ "repo_name": "marcuspridham/crosswalk", "path": "runtime/android/core_internal/src/org/xwalk/core/internal/XWalkViewInternal.java", "license": "bsd-3-clause", "size": 52802 }
[ "android.content.Intent", "android.os.Bundle" ]
import android.content.Intent; import android.os.Bundle;
import android.content.*; import android.os.*;
[ "android.content", "android.os" ]
android.content; android.os;
751,766
private void refreshItemsFromTable() { // Get the items that weren't marked as completed and add them in the // adapter new AsyncTask<Void, Void, Void>() {
void function() { new AsyncTask<Void, Void, Void>() {
/** * Refresh the list with the items in the Mobile Service Table */
Refresh the list with the items in the Mobile Service Table
refreshItemsFromTable
{ "repo_name": "cesine/mobile-services-samples", "path": "GettingStarted/Android/ZUMOAPPNAME/src/com/example/zumoappname/ToDoActivity.java", "license": "apache-2.0", "size": 8081 }
[ "android.os.AsyncTask" ]
import android.os.AsyncTask;
import android.os.*;
[ "android.os" ]
android.os;
196,899
protected void validateSearchParameterConstraint(LookupForm form, String propertyName, Map<String, Object> lookupCriteriaAttributes, String searchPropertyValue, ValidCharactersConstraint validCharactersConstraint) { if (StringUtils.isBlank(searchPropertyValue)) { retu...
void function(LookupForm form, String propertyName, Map<String, Object> lookupCriteriaAttributes, String searchPropertyValue, ValidCharactersConstraint validCharactersConstraint) { if (StringUtils.isBlank(searchPropertyValue)) { return; } Matcher matcher = Pattern.compile(validCharactersConstraint.getValue()).matcher(s...
/** * Validates that the searchPropertyValue is a valid value based on any constraint that may exist for the property * * @param form lookup form instance containing the lookup data * @param propertyName property name of the search criteria field to be validated * @param lookupCriteriaAttr...
Validates that the searchPropertyValue is a valid value based on any constraint that may exist for the property
validateSearchParameterConstraint
{ "repo_name": "mztaylor/rice-git", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/lookup/LookupableImpl.java", "license": "apache-2.0", "size": 54828 }
[ "java.util.Map", "java.util.regex.Matcher", "java.util.regex.Pattern", "org.apache.commons.lang.StringUtils", "org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint", "org.kuali.rice.krad.uif.UifConstants", "org.kuali.rice.krad.util.ErrorMessage", "org.kuali.rice.krad.util...
import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.lang.StringUtils; import org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint; import org.kuali.rice.krad.uif.UifConstants; import org.kuali.rice.krad.util.ErrorMessage; import o...
import java.util.*; import java.util.regex.*; import org.apache.commons.lang.*; import org.kuali.rice.krad.datadictionary.validation.constraint.*; import org.kuali.rice.krad.uif.*; import org.kuali.rice.krad.util.*;
[ "java.util", "org.apache.commons", "org.kuali.rice" ]
java.util; org.apache.commons; org.kuali.rice;
1,964,059
public void setAmount (BigDecimal Amount);
void function (BigDecimal Amount);
/** Set Amount. * Amount in a defined currency */
Set Amount. Amount in a defined currency
setAmount
{ "repo_name": "erpcya/adempierePOS", "path": "base/src/org/compiere/model/I_M_PromotionReward.java", "license": "gpl-2.0", "size": 8107 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
1,768,738
return HttpClientMetricNameStrategies.HOST_AND_METHOD; }
return HttpClientMetricNameStrategies.HOST_AND_METHOD; }
/** * Strategy for naming the http requests made for the metrics tracking. Host and method will be tracked. */
Strategy for naming the http requests made for the metrics tracking. Host and method will be tracked
hostAndMethod
{ "repo_name": "marcjansen/mapfish-print", "path": "core/src/main/java/org/mapfish/print/metrics/MetricsNameStrategyFactory.java", "license": "bsd-2-clause", "size": 1270 }
[ "com.codahale.metrics.httpclient.HttpClientMetricNameStrategies" ]
import com.codahale.metrics.httpclient.HttpClientMetricNameStrategies;
import com.codahale.metrics.httpclient.*;
[ "com.codahale.metrics" ]
com.codahale.metrics;
410,731
protected static Properties stripStart(String prefix, Properties props) { if (prefix == null) { throw new NullPointerException("prefix cannot be null"); } if (props == null) { throw new NullPointerException("props cannot be null"); } Properties ret = n...
static Properties function(String prefix, Properties props) { if (prefix == null) { throw new NullPointerException(STR); } if (props == null) { throw new NullPointerException(STR); } Properties ret = new Properties(); Enumeration<Object> propertyEnum = props.keys(); while (propertyEnum.hasMoreElements()) { String prope...
/** * <p>Strips the given string off the keys of the given * Properties, and returns a new set of properties. The * original properties are not altered.<br/> * For example, given the property:<br/> * <ul><li><code>database.name=production</code></li></ul> * a call to <code>stripStart("data...
Strips the given string off the keys of the given Properties, and returns a new set of properties. The original properties are not altered. For example, given the property: <code>database.name=production</code> a call to <code>stripStart("database", props)</code> will produce: <code>name=production</code> Note that a d...
stripStart
{ "repo_name": "julie-sullivan/phytomine", "path": "intermine/model/main/src/org/intermine/metadata/Util.java", "license": "lgpl-2.1", "size": 23995 }
[ "java.util.Enumeration", "java.util.Properties" ]
import java.util.Enumeration; import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
659,055
public void encodeBoolean(boolean b) throws IOException;
void function(boolean b) throws IOException;
/** * Encode a single boolean value. A false value is encoded as bit (byte) 0 * and true value is encode as bit (byte) 1. * * @param b * boolean * @throws IOException * IO exception */
Encode a single boolean value. A false value is encoded as bit (byte) 0 and true value is encode as bit (byte) 1
encodeBoolean
{ "repo_name": "EXIficient/exificient-core", "path": "src/main/java/com/siemens/ct/exi/core/io/channel/EncoderChannel.java", "license": "mit", "size": 6134 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,731,066
public AccountHolderResponse showDetailsByGetRest(final String name) throws RestClientException{ LOG.debug("showDetailsGetRest - getAccountDetails of: "+name); return restTemplate.getForObject(showDetailsGetRestUrl, AccountHolderResponse.class, name); }
AccountHolderResponse function(final String name) throws RestClientException{ LOG.debug(STR+name); return restTemplate.getForObject(showDetailsGetRestUrl, AccountHolderResponse.class, name); }
/** * Retrieves the account details of the account holder through a Get method of @RestController. * * @param name * @return AccountHolderResponse */
Retrieves the account details of the account holder through a Get method of @RestController
showDetailsByGetRest
{ "repo_name": "parthiban-samykutti/soapRestWebService", "path": "restClient/src/main/java/com/parthi/spring/ws/rest/AccountService.java", "license": "gpl-3.0", "size": 5944 }
[ "com.parthi.spring.ws.rest.vo.AccountHolderResponse", "org.springframework.web.client.RestClientException" ]
import com.parthi.spring.ws.rest.vo.AccountHolderResponse; import org.springframework.web.client.RestClientException;
import com.parthi.spring.ws.rest.vo.*; import org.springframework.web.client.*;
[ "com.parthi.spring", "org.springframework.web" ]
com.parthi.spring; org.springframework.web;
1,126,194
public void setInterceptSendToEndpoints(List<InterceptSendToEndpointDefinition> interceptSendToEndpoints) { this.interceptSendToEndpoints = interceptSendToEndpoints; }
void function(List<InterceptSendToEndpointDefinition> interceptSendToEndpoints) { this.interceptSendToEndpoints = interceptSendToEndpoints; }
/** * Configuration of interceptors that triggers sending messages to endpoints. */
Configuration of interceptors that triggers sending messages to endpoints
setInterceptSendToEndpoints
{ "repo_name": "jonmcewen/camel", "path": "components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java", "license": "apache-2.0", "size": 42985 }
[ "java.util.List", "org.apache.camel.model.InterceptSendToEndpointDefinition" ]
import java.util.List; import org.apache.camel.model.InterceptSendToEndpointDefinition;
import java.util.*; import org.apache.camel.model.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
2,353,049
Snapshot requestRestoreSnapshot(String snapshotId, DuracloudEndPointConfig destination, String userEmail) throws SnapshotException;
Snapshot requestRestoreSnapshot(String snapshotId, DuracloudEndPointConfig destination, String userEmail) throws SnapshotException;
/** * Sends an email request to duracloud admin to restore a space. * * @param snapshotId * @param destination The destination where the restore should occur. * @param userEmail email to notify when restore starts and ends. * @return snapshot to be restored * @throws SnapshotNotFoun...
Sends an email request to duracloud admin to restore a space
requestRestoreSnapshot
{ "repo_name": "duracloud/snapshot", "path": "snapshot-service/src/main/java/org/duracloud/snapshot/service/RestoreManager.java", "license": "apache-2.0", "size": 3973 }
[ "org.duracloud.snapshot.SnapshotException", "org.duracloud.snapshot.db.model.DuracloudEndPointConfig", "org.duracloud.snapshot.db.model.Snapshot" ]
import org.duracloud.snapshot.SnapshotException; import org.duracloud.snapshot.db.model.DuracloudEndPointConfig; import org.duracloud.snapshot.db.model.Snapshot;
import org.duracloud.snapshot.*; import org.duracloud.snapshot.db.model.*;
[ "org.duracloud.snapshot" ]
org.duracloud.snapshot;
2,684,495
public static DataRecordMetadata dbMetadata2jetel(ResultSetMetaData dbMetadata, JdbcSpecific jdbcSpecific, boolean failIfUknownType) throws SQLException { DataFieldMetadata fieldMetadata; DataRecordMetadata jetelMetadata = new DataRecordMetadata(DataRecordMetadata.EMPTY_NAME, DataRecordMetadata.DELIMITED_RECORD)...
static DataRecordMetadata function(ResultSetMetaData dbMetadata, JdbcSpecific jdbcSpecific, boolean failIfUknownType) throws SQLException { DataFieldMetadata fieldMetadata; DataRecordMetadata jetelMetadata = new DataRecordMetadata(DataRecordMetadata.EMPTY_NAME, DataRecordMetadata.DELIMITED_RECORD); jetelMetadata.setLab...
/** * Converts SQL metadata into Clover's DataRecordMetadata * * @param dbMetadata SQL ResultSet metadata describing which columns are * returned by query * @param failIfUknownType indicates whether to throw exception if there is unknown column type in DB metadata. * @return ...
Converts SQL metadata into Clover's DataRecordMetadata
dbMetadata2jetel
{ "repo_name": "CloverETL/CloverETL-Engine", "path": "cloveretl.connection/src/org/jetel/connection/jdbc/SQLUtil.java", "license": "lgpl-2.1", "size": 35457 }
[ "java.sql.ResultSetMetaData", "java.sql.SQLException", "org.jetel.database.sql.JdbcSpecific", "org.jetel.metadata.DataFieldMetadata", "org.jetel.metadata.DataRecordMetadata" ]
import java.sql.ResultSetMetaData; import java.sql.SQLException; import org.jetel.database.sql.JdbcSpecific; import org.jetel.metadata.DataFieldMetadata; import org.jetel.metadata.DataRecordMetadata;
import java.sql.*; import org.jetel.database.sql.*; import org.jetel.metadata.*;
[ "java.sql", "org.jetel.database", "org.jetel.metadata" ]
java.sql; org.jetel.database; org.jetel.metadata;
1,686,789
public long skip(long ln) throws IOException { return in.skip(ln); }
long function(long ln) throws IOException { return in.skip(ln); }
/** * Invokes the delegate's <code>skip(long)</code> method. * @param ln the number of bytes to skip * @return the number of bytes to skipped or -1 if the end of stream * @throws IOException if an I/O error occurs */
Invokes the delegate's <code>skip(long)</code> method
skip
{ "repo_name": "wiyarmir/GPT-Organize", "path": "src/org/apache/commons/io/input/ProxyInputStream.java", "license": "gpl-3.0", "size": 4213 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
308,263
private Map getTargets(LinkerConfiguration linkerConfig, Vector objectFiles, VersionInfo versionInfo, File outputFile) { // FREEHEP final List order = new ArrayList();
Map function(LinkerConfiguration linkerConfig, Vector objectFiles, VersionInfo versionInfo, File outputFile) { final List order = new ArrayList();
/** * This method collects a Hashtable, keyed by output file name, of * TargetInfo's for every source file that is specified in the filesets of * the <cc>and nested <compiler>elements. The TargetInfo's contain the * appropriate compiler configurations for their possible compilation * */
This method collects a Hashtable, keyed by output file name, of TargetInfo's for every source file that is specified in the filesets of the and nested elements. The TargetInfo's contain the appropriate compiler configurations for their possible compilation
getTargets
{ "repo_name": "flax3lbs/cpptasks-parallel", "path": "src/main/java/net/sf/antcontrib/cpptasks/CCTask.java", "license": "apache-2.0", "size": 52971 }
[ "java.io.File", "java.util.ArrayList", "java.util.List", "java.util.Map", "java.util.Vector", "net.sf.antcontrib.cpptasks.compiler.LinkerConfiguration" ]
import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Vector; import net.sf.antcontrib.cpptasks.compiler.LinkerConfiguration;
import java.io.*; import java.util.*; import net.sf.antcontrib.cpptasks.compiler.*;
[ "java.io", "java.util", "net.sf.antcontrib" ]
java.io; java.util; net.sf.antcontrib;
1,447,398
public TrimResult trimFields( LogicalTableModify modifier, ImmutableBitSet fieldsUsed, Set<RelDataTypeField> extraFields) { // Ignore what consumer wants. We always project all columns. Util.discard(fieldsUsed); final RelDataType rowType = modifier.getRowType(); final int fieldCount...
TrimResult function( LogicalTableModify modifier, ImmutableBitSet fieldsUsed, Set<RelDataTypeField> extraFields) { Util.discard(fieldsUsed); final RelDataType rowType = modifier.getRowType(); final int fieldCount = rowType.getFieldCount(); RelNode input = modifier.getInput(); final int inputFieldCount = input.getRowTyp...
/** * Variant of {@link #trimFields(RelNode, ImmutableBitSet, Set)} for * {@link org.apache.calcite.rel.logical.LogicalTableModify}. */
Variant of <code>#trimFields(RelNode, ImmutableBitSet, Set)</code> for <code>org.apache.calcite.rel.logical.LogicalTableModify</code>
trimFields
{ "repo_name": "dindin5258/calcite", "path": "core/src/main/java/org/apache/calcite/sql2rel/RelFieldTrimmer.java", "license": "apache-2.0", "size": 42757 }
[ "java.util.Collections", "java.util.Set", "org.apache.calcite.rel.RelNode", "org.apache.calcite.rel.logical.LogicalTableModify", "org.apache.calcite.rel.type.RelDataType", "org.apache.calcite.rel.type.RelDataTypeField", "org.apache.calcite.util.ImmutableBitSet", "org.apache.calcite.util.Util", "org....
import java.util.Collections; import java.util.Set; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.logical.LogicalTableModify; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rel.type.RelDataTypeField; import org.apache.calcite.util.ImmutableBitSet; import org.apache.calc...
import java.util.*; import org.apache.calcite.rel.*; import org.apache.calcite.rel.logical.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.util.*; import org.apache.calcite.util.mapping.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
2,501,964
public Instant getInputWatermark() { return checkNotNull(inputWatermark.get()); }
Instant function() { return checkNotNull(inputWatermark.get()); }
/** * Returns the input watermark of the {@link AppliedPTransform}. */
Returns the input watermark of the <code>AppliedPTransform</code>
getInputWatermark
{ "repo_name": "sammcveety/DataflowJavaSDK", "path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/runners/inprocess/InMemoryWatermarkManager.java", "license": "apache-2.0", "size": 54845 }
[ "com.google.common.base.Preconditions", "org.joda.time.Instant" ]
import com.google.common.base.Preconditions; import org.joda.time.Instant;
import com.google.common.base.*; import org.joda.time.*;
[ "com.google.common", "org.joda.time" ]
com.google.common; org.joda.time;
2,442,437
public void postCreate(Session session, Ref<Node> parentNode, Ref<Node> fldNode) throws AccessDeniedException, RepositoryException, PathNotFoundException, ItemExistsException, DatabaseException, ExtensionException { log.debug("postCreate({}, {}, {})", new Object[] { session, parentNode, fldNode ...
void function(Session session, Ref<Node> parentNode, Ref<Node> fldNode) throws AccessDeniedException, RepositoryException, PathNotFoundException, ItemExistsException, DatabaseException, ExtensionException { log.debug(STR, new Object[] { session, parentNode, fldNode }); try { ExtensionManager em = ExtensionManager.getIn...
/** * Handle POST create extensions */
Handle POST create extensions
postCreate
{ "repo_name": "codelibs/n2dms", "path": "src/main/java/com/openkm/extension/core/FolderExtensionManager.java", "license": "gpl-2.0", "size": 12597 }
[ "com.openkm.core.AccessDeniedException", "com.openkm.core.DatabaseException", "com.openkm.core.ItemExistsException", "com.openkm.core.PathNotFoundException", "com.openkm.core.Ref", "com.openkm.core.RepositoryException", "java.util.Collections", "java.util.List", "java.util.ServiceConfigurationError"...
import com.openkm.core.AccessDeniedException; import com.openkm.core.DatabaseException; import com.openkm.core.ItemExistsException; import com.openkm.core.PathNotFoundException; import com.openkm.core.Ref; import com.openkm.core.RepositoryException; import java.util.Collections; import java.util.List; import java.util....
import com.openkm.core.*; import java.util.*; import javax.jcr.*;
[ "com.openkm.core", "java.util", "javax.jcr" ]
com.openkm.core; java.util; javax.jcr;
2,666,104
@DoesServiceRequest public final long breakLease(final Integer breakPeriodInSeconds, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) throws StorageException { if (opContext == null) { opContext = new OperationContext(); } ...
final long function(final Integer breakPeriodInSeconds, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) throws StorageException { if (opContext == null) { opContext = new OperationContext(); } if (breakPeriodInSeconds != null) { Utility.assertGreaterThanOrEqual(STR, breakP...
/** * Breaks the existing lease, using the specified request options and operation context, and ensures that * another client cannot acquire a new lease until the current lease period has expired. * * @param breakPeriodInSeconds * An <code>Integer</code> which specifies the time to ...
Breaks the existing lease, using the specified request options and operation context, and ensures that another client cannot acquire a new lease until the current lease period has expired
breakLease
{ "repo_name": "emgerner-msft/azure-storage-android", "path": "microsoft-azure-storage/src/com/microsoft/azure/storage/blob/CloudBlobContainer.java", "license": "apache-2.0", "size": 103657 }
[ "com.microsoft.azure.storage.AccessCondition", "com.microsoft.azure.storage.OperationContext", "com.microsoft.azure.storage.StorageException", "com.microsoft.azure.storage.core.ExecutionEngine", "com.microsoft.azure.storage.core.Utility" ]
import com.microsoft.azure.storage.AccessCondition; import com.microsoft.azure.storage.OperationContext; import com.microsoft.azure.storage.StorageException; import com.microsoft.azure.storage.core.ExecutionEngine; import com.microsoft.azure.storage.core.Utility;
import com.microsoft.azure.storage.*; import com.microsoft.azure.storage.core.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,661,788
private InputStream openContentStream() { String contents = ""; return new ByteArrayInputStream(contents.getBytes()); }
InputStream function() { String contents = ""; return new ByteArrayInputStream(contents.getBytes()); }
/** * We will initialize file contents with a sample text. */
We will initialize file contents with a sample text
openContentStream
{ "repo_name": "gomezabajo/Wodel", "path": "wodel.project.examples/src/wizards/BPELWizard.java", "license": "epl-1.0", "size": 15205 }
[ "java.io.ByteArrayInputStream", "java.io.InputStream" ]
import java.io.ByteArrayInputStream; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,184,631
public void DrawToBmp(int bmp, int dib, int x, int y) { Global.drawToBmp(bmp, dib, x, y); }
void function(int bmp, int dib, int x, int y) { Global.drawToBmp(bmp, dib, x, y); }
/** * draw dib to bmp. * * @param bmp * handle value, that returned by lockBitmap. * @param dib * @param x * origin position in bmp. * @param y * origin position in bmp. */
draw dib to bmp
DrawToBmp
{ "repo_name": "gearit/RadaeePDF-B4A", "path": "Source/Wrapper/RSPDFViewer/src/com/rootsoft/rspdfviewer/pdf/RSPDFGlobal.java", "license": "apache-2.0", "size": 9086 }
[ "com.radaee.pdf.Global" ]
import com.radaee.pdf.Global;
import com.radaee.pdf.*;
[ "com.radaee.pdf" ]
com.radaee.pdf;
2,002,180
public void setProject(Project newProj) { project = newProj; ps = project.getProjectSettings(); }
void function(Project newProj) { project = newProj; ps = project.getProjectSettings(); }
/** * Set the project to which the URI is to be parsed. * @param newProj the project */
Set the project to which the URI is to be parsed
setProject
{ "repo_name": "ckaestne/LEADT", "path": "workspace/argouml_critics/argouml-app/src/org/argouml/persistence/ArgoParser.java", "license": "gpl-3.0", "size": 17416 }
[ "org.argouml.kernel.Project" ]
import org.argouml.kernel.Project;
import org.argouml.kernel.*;
[ "org.argouml.kernel" ]
org.argouml.kernel;
291,914
public static Vim getVimById(String vimId) { Map<String, String> paramsMap = new HashMap<>(); paramsMap.put("url", String.format(UrlConstant.ESR_GET_VIM_URL, vimId)); paramsMap.put("methodType", Constant.GET); RestfulResponse rsp = VimRestfulUtil.getRemoteResponse(paramsMap, null); ...
static Vim function(String vimId) { Map<String, String> paramsMap = new HashMap<>(); paramsMap.put("url", String.format(UrlConstant.ESR_GET_VIM_URL, vimId)); paramsMap.put(STR, Constant.GET); RestfulResponse rsp = VimRestfulUtil.getRemoteResponse(paramsMap, null); if(rsp == null rsp.getStatus() != Constant.HTTP_OK_STAT...
/** * Get VIM. * * @param vimId * @return */
Get VIM
getVimById
{ "repo_name": "open-o/nfvo", "path": "drivers/vim/vimadapter/VimDriverService/service/src/main/java/org/openo/nfvo/vimadapter/common/VimUtil.java", "license": "apache-2.0", "size": 4250 }
[ "java.util.HashMap", "java.util.Map", "net.sf.json.JSONObject", "org.openo.baseservice.roa.util.restclient.RestfulResponse", "org.openo.nfvo.vimadapter.common.servicetoken.VimRestfulUtil", "org.openo.nfvo.vimadapter.service.constant.Constant", "org.openo.nfvo.vimadapter.service.constant.UrlConstant", ...
import java.util.HashMap; import java.util.Map; import net.sf.json.JSONObject; import org.openo.baseservice.roa.util.restclient.RestfulResponse; import org.openo.nfvo.vimadapter.common.servicetoken.VimRestfulUtil; import org.openo.nfvo.vimadapter.service.constant.Constant; import org.openo.nfvo.vimadapter.service.const...
import java.util.*; import net.sf.json.*; import org.openo.baseservice.roa.util.restclient.*; import org.openo.nfvo.vimadapter.common.servicetoken.*; import org.openo.nfvo.vimadapter.service.constant.*; import org.openo.nfvo.vimadapter.service.entity.*;
[ "java.util", "net.sf.json", "org.openo.baseservice", "org.openo.nfvo" ]
java.util; net.sf.json; org.openo.baseservice; org.openo.nfvo;
2,086,574
tester(false, new JdbcTest.HrSchema()) .query( "select e.empid, e.name, d.name as dept from emps e left outer join depts d on e.deptno=d.deptno") .withHook(Hook.PLANNER, (Consumer<RelOptPlanner>) planner -> { // force the left outer join to run via EnumerableCorrelate // ...
tester(false, new JdbcTest.HrSchema()) .query( STR) .withHook(Hook.PLANNER, (Consumer<RelOptPlanner>) planner -> { planner.addRule(CoreRules.JOIN_TO_CORRELATE); planner.removeRule(EnumerableRules.ENUMERABLE_JOIN_RULE); }) .explainContains(STREnumerableCalc(expr#0..4=[{inputs}], empid=[$t0], name=[$t2], dept=[$t4])\nSTR...
/** Test case for * <a href="https://issues.apache.org/jira/browse/CALCITE-2605">[CALCITE-2605] * NullPointerException when left outer join implemented with * EnumerableCorrelate</a>. */
Test case for [CALCITE-2605] NullPointerException when left outer join implemented with
leftOuterJoinCorrelate
{ "repo_name": "vlsi/calcite", "path": "core/src/test/java/org/apache/calcite/test/enumerable/EnumerableCorrelateTest.java", "license": "apache-2.0", "size": 13839 }
[ "java.util.function.Consumer", "org.apache.calcite.adapter.enumerable.EnumerableCorrelate", "org.apache.calcite.adapter.enumerable.EnumerableRules", "org.apache.calcite.plan.RelOptPlanner", "org.apache.calcite.rel.rules.CoreRules", "org.apache.calcite.runtime.Hook", "org.apache.calcite.test.JdbcTest" ]
import java.util.function.Consumer; import org.apache.calcite.adapter.enumerable.EnumerableCorrelate; import org.apache.calcite.adapter.enumerable.EnumerableRules; import org.apache.calcite.plan.RelOptPlanner; import org.apache.calcite.rel.rules.CoreRules; import org.apache.calcite.runtime.Hook; import org.apache.calci...
import java.util.function.*; import org.apache.calcite.adapter.enumerable.*; import org.apache.calcite.plan.*; import org.apache.calcite.rel.rules.*; import org.apache.calcite.runtime.*; import org.apache.calcite.test.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
1,936,379
public void backoffActualHighWatermark() { JsonElement lowWatermark = this.workUnit.getLowWatermark(); if (lowWatermark == null) { return; } setProp(ConfigurationKeys.WORK_UNIT_STATE_ACTUAL_HIGH_WATER_MARK_KEY, lowWatermark.toString()); }
void function() { JsonElement lowWatermark = this.workUnit.getLowWatermark(); if (lowWatermark == null) { return; } setProp(ConfigurationKeys.WORK_UNIT_STATE_ACTUAL_HIGH_WATER_MARK_KEY, lowWatermark.toString()); }
/** * Backoff the actual high watermark to the low watermark returned by {@link WorkUnit#getLowWatermark()}. */
Backoff the actual high watermark to the low watermark returned by <code>WorkUnit#getLowWatermark()</code>
backoffActualHighWatermark
{ "repo_name": "jenniferzheng/gobblin", "path": "gobblin-api/src/main/java/org/apache/gobblin/configuration/WorkUnitState.java", "license": "apache-2.0", "size": 17153 }
[ "com.google.gson.JsonElement" ]
import com.google.gson.JsonElement;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
910,520
public void createDirectory(SrvSession sess, final TreeConnection tree, final FileOpenParams params) throws IOException { final ContentContext ctx = (ContentContext) tree.getContext(); if (logger.isDebugEnabled()) { logger.debug("createDirectory :" + params); ...
void function(SrvSession sess, final TreeConnection tree, final FileOpenParams params) throws IOException { final ContentContext ctx = (ContentContext) tree.getContext(); if (logger.isDebugEnabled()) { logger.debug(STR + params); } try { NodeRef dirNodeRef; String folderName; String path = params.getPath(); String[] pa...
/** * Create a new directory on this file system. * * * @param sess Server session * @param tree Tree connection. * @param params Directory create parameters * @exception java.io.IOException If an error occurs. */
Create a new directory on this file system
createDirectory
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/repository/source/java/org/alfresco/filesys/repo/ContentDiskDriver2.java", "license": "lgpl-3.0", "size": 117511 }
[ "java.io.IOException", "org.alfresco.error.AlfrescoRuntimeException", "org.alfresco.jlan.server.SrvSession", "org.alfresco.jlan.server.filesys.AccessDeniedException", "org.alfresco.jlan.server.filesys.FileName", "org.alfresco.jlan.server.filesys.FileOpenParams", "org.alfresco.jlan.server.filesys.TreeCon...
import java.io.IOException; import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.jlan.server.SrvSession; import org.alfresco.jlan.server.filesys.AccessDeniedException; import org.alfresco.jlan.server.filesys.FileName; import org.alfresco.jlan.server.filesys.FileOpenParams; import org.alfresco.jlan.se...
import java.io.*; import org.alfresco.error.*; import org.alfresco.jlan.server.*; import org.alfresco.jlan.server.filesys.*; import org.alfresco.model.*; import org.alfresco.service.cmr.repository.*;
[ "java.io", "org.alfresco.error", "org.alfresco.jlan", "org.alfresco.model", "org.alfresco.service" ]
java.io; org.alfresco.error; org.alfresco.jlan; org.alfresco.model; org.alfresco.service;
1,371,019
@Nonnull public WorkbookFunctionsExactRequest select(@Nonnull final String value) { addSelectOption(value); return this; }
WorkbookFunctionsExactRequest function(@Nonnull final String value) { addSelectOption(value); return this; }
/** * Sets the select clause for the request * * @param value the select clause * @return the updated request */
Sets the select clause for the request
select
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/WorkbookFunctionsExactRequest.java", "license": "mit", "size": 2965 }
[ "com.microsoft.graph.requests.WorkbookFunctionsExactRequest", "javax.annotation.Nonnull" ]
import com.microsoft.graph.requests.WorkbookFunctionsExactRequest; import javax.annotation.Nonnull;
import com.microsoft.graph.requests.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
397,722
void registerLsn(long lsn) throws DatabaseException { readLatch.acquire(); try { if (lastLsn != DbLsn.NULL_LSN) { assert (DbLsn.compareTo(lsn, lastLsn) > 0): "lsn=" + lsn + " lastlsn=" + lastLsn; } lastLsn = lsn; ...
void registerLsn(long lsn) throws DatabaseException { readLatch.acquire(); try { if (lastLsn != DbLsn.NULL_LSN) { assert (DbLsn.compareTo(lsn, lastLsn) > 0): "lsn=" + lsn + STR + lastLsn; } lastLsn = lsn; if (firstLsn == DbLsn.NULL_LSN) { firstLsn = lsn; } } finally { readLatch.release(); } }
/** * This LSN has been written to the log. */
This LSN has been written to the log
registerLsn
{ "repo_name": "prat0318/dbms", "path": "mini_dbms/je-5.0.103/src/com/sleepycat/je/log/LogBuffer.java", "license": "mit", "size": 9966 }
[ "com.sleepycat.je.DatabaseException", "com.sleepycat.je.utilint.DbLsn" ]
import com.sleepycat.je.DatabaseException; import com.sleepycat.je.utilint.DbLsn;
import com.sleepycat.je.*; import com.sleepycat.je.utilint.*;
[ "com.sleepycat.je" ]
com.sleepycat.je;
1,305,947
public void stop() throws RemoteException;
void function() throws RemoteException;
/** * Stop the group. */
Stop the group
stop
{ "repo_name": "cdegroot/river", "path": "qa/src/com/sun/jini/qa/harness/NonActivatableGroup.java", "license": "apache-2.0", "size": 1917 }
[ "java.rmi.RemoteException" ]
import java.rmi.RemoteException;
import java.rmi.*;
[ "java.rmi" ]
java.rmi;
1,751,296
public void prepareForNextCycle() { ordinalMap.compact(currentCyclePopulated, numShards, stateEngine.isFocusHoleFillInFewestShards()); ThreadSafeBitSet temp = previousCyclePopulated; previousCyclePopulated = currentCyclePopulated; currentCyclePopulated = temp; currentCycleP...
void function() { ordinalMap.compact(currentCyclePopulated, numShards, stateEngine.isFocusHoleFillInFewestShards()); ThreadSafeBitSet temp = previousCyclePopulated; previousCyclePopulated = currentCyclePopulated; currentCyclePopulated = temp; currentCyclePopulated.clearAll(); restoredMap = null; restoredSchema = null; ...
/** * Called to perform a state transition.<p> * * Precondition: We are writing the previously added objects to a FastBlob.<br> * Postcondition: We are ready to add objects to this state engine for the next server cycle. */
Called to perform a state transition. Precondition: We are writing the previously added objects to a FastBlob. Postcondition: We are ready to add objects to this state engine for the next server cycle
prepareForNextCycle
{ "repo_name": "Netflix/hollow", "path": "hollow/src/main/java/com/netflix/hollow/core/write/HollowTypeWriteState.java", "license": "apache-2.0", "size": 14896 }
[ "com.netflix.hollow.core.memory.ThreadSafeBitSet" ]
import com.netflix.hollow.core.memory.ThreadSafeBitSet;
import com.netflix.hollow.core.memory.*;
[ "com.netflix.hollow" ]
com.netflix.hollow;
2,558,038
default Result postAppend(final ObserverContext<RegionCoprocessorEnvironment> c, final Append append, final Result result) throws IOException { return result; }
default Result postAppend(final ObserverContext<RegionCoprocessorEnvironment> c, final Append append, final Result result) throws IOException { return result; }
/** * Called after Append * <p> * Call CoprocessorEnvironment#complete to skip any subsequent chained * coprocessors * <p> * Note: Do not retain references to any Cells in 'append' beyond the life of this invocation. * If need a Cell reference for later use, copy the cell and use that. * @param ...
Called after Append Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors Note: Do not retain references to any Cells in 'append' beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that
postAppend
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java", "license": "apache-2.0", "size": 67737 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.Append", "org.apache.hadoop.hbase.client.Result" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.Append; import org.apache.hadoop.hbase.client.Result;
import java.io.*; import org.apache.hadoop.hbase.client.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,521,563
public void validate() throws IllegalArgumentException { Preconditions.checkArgument(this.username != null, "authentication: missing username"); Preconditions.checkArgument(this.password != null, "authentication: missing password"); }
void function() throws IllegalArgumentException { Preconditions.checkArgument(this.username != null, STR); Preconditions.checkArgument(this.password != null, STR); }
/** * Performs basic validation of this object. If the object is valid, the * method returns. If the object is incorrectly set up an * {@link IllegalArgumentException} is thrown. * * @throws IllegalArgumentException */
Performs basic validation of this object. If the object is valid, the method returns. If the object is incorrectly set up an <code>IllegalArgumentException</code> is thrown
validate
{ "repo_name": "elastisys/scale.commons", "path": "net/src/main/java/com/elastisys/scale/commons/net/smtp/SmtpClientAuthentication.java", "license": "apache-2.0", "size": 1897 }
[ "com.elastisys.scale.commons.util.precond.Preconditions" ]
import com.elastisys.scale.commons.util.precond.Preconditions;
import com.elastisys.scale.commons.util.precond.*;
[ "com.elastisys.scale" ]
com.elastisys.scale;
2,362,030
public IpAddress broadcastAddress() { return broadcastAddress; }
IpAddress function() { return broadcastAddress; }
/** * Gets the subnet IP broadcast address. * * @return the subnet IP broadcast address */
Gets the subnet IP broadcast address
broadcastAddress
{ "repo_name": "maxkondr/onos-porta", "path": "core/api/src/main/java/org/onosproject/net/host/InterfaceIpAddress.java", "license": "apache-2.0", "size": 5661 }
[ "org.onlab.packet.IpAddress" ]
import org.onlab.packet.IpAddress;
import org.onlab.packet.*;
[ "org.onlab.packet" ]
org.onlab.packet;
2,604,143
private List<RecipientEntry> constructEntryList( LinkedHashMap<Long, List<RecipientEntry>> entryMap, List<RecipientEntry> nonAggregatedEntries) { final List<RecipientEntry> entries = new ArrayList<RecipientEntry>(); int validEntryCount = 0; for (Map.Entry<Long, List<R...
List<RecipientEntry> function( LinkedHashMap<Long, List<RecipientEntry>> entryMap, List<RecipientEntry> nonAggregatedEntries) { final List<RecipientEntry> entries = new ArrayList<RecipientEntry>(); int validEntryCount = 0; for (Map.Entry<Long, List<RecipientEntry>> mapEntry : entryMap.entrySet()) { final List<Recipient...
/** * Constructs an actual list for this Adapter using {@link #mEntryMap}. Also tries to * fetch a cached photo for each contact entry (other than separators), or request another * thread to get one from directories. */
Constructs an actual list for this Adapter using <code>#mEntryMap</code>. Also tries to fetch a cached photo for each contact entry (other than separators), or request another thread to get one from directories
constructEntryList
{ "repo_name": "indashnet/InDashNet.Open.UN2000", "path": "android/frameworks/ex/chips/src/com/android/ex/chips/BaseRecipientAdapter.java", "license": "apache-2.0", "size": 42665 }
[ "java.util.ArrayList", "java.util.LinkedHashMap", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
904,051
@SideOnly(Side.CLIENT) public int getStatusIconIndex() { return this.statusIconIndex; }
@SideOnly(Side.CLIENT) int function() { return this.statusIconIndex; }
/** * Returns the index for the icon to display when the potion is active. */
Returns the index for the icon to display when the potion is active
getStatusIconIndex
{ "repo_name": "trixmot/mod1", "path": "build/tmp/recompileMc/sources/net/minecraft/potion/Potion.java", "license": "lgpl-2.1", "size": 17052 }
[ "net.minecraftforge.fml.relauncher.Side", "net.minecraftforge.fml.relauncher.SideOnly" ]
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.fml.relauncher.*;
[ "net.minecraftforge.fml" ]
net.minecraftforge.fml;
435,689
public static boolean isDistributedCacheUsed(String str) { String[] parts = str.split(Instruction.INSTRUCTION_DELIM); for(String inst : parts) { String opcode = getOpCode(inst); if( opcode.equalsIgnoreCase(AppendM.OPCODE) || opcode.equalsIgnoreCase(MapMult.OPCODE) || opcode.equalsIgnor...
static boolean function(String str) { String[] parts = str.split(Instruction.INSTRUCTION_DELIM); for(String inst : parts) { String opcode = getOpCode(inst); if( opcode.equalsIgnoreCase(AppendM.OPCODE) opcode.equalsIgnoreCase(MapMult.OPCODE) opcode.equalsIgnoreCase(MapMultChain.OPCODE) opcode.equalsIgnoreCase(PMMJ.OPCOD...
/** * Evaluates if at least one instruction of the given instruction set * used the distributed cache; this call can also be used for individual * instructions. * * @param str instruction set * @return true if at least one instruction uses distributed cache */
Evaluates if at least one instruction of the given instruction set used the distributed cache; this call can also be used for individual instructions
isDistributedCacheUsed
{ "repo_name": "nakul02/systemml", "path": "src/main/java/org/apache/sysml/runtime/instructions/InstructionUtils.java", "license": "apache-2.0", "size": 42346 }
[ "org.apache.sysml.lops.AppendM", "org.apache.sysml.lops.BinaryM", "org.apache.sysml.lops.GroupedAggregateM", "org.apache.sysml.lops.MapMult", "org.apache.sysml.lops.MapMultChain", "org.apache.sysml.lops.UAggOuterChain" ]
import org.apache.sysml.lops.AppendM; import org.apache.sysml.lops.BinaryM; import org.apache.sysml.lops.GroupedAggregateM; import org.apache.sysml.lops.MapMult; import org.apache.sysml.lops.MapMultChain; import org.apache.sysml.lops.UAggOuterChain;
import org.apache.sysml.lops.*;
[ "org.apache.sysml" ]
org.apache.sysml;
2,031,726
@Test public final void fetchesContentType() throws Exception { final ReleaseAsset releaseAsset = Mockito.mock(ReleaseAsset.class); final String prop = "application/zip"; Mockito.doReturn( Json.createObjectBuilder() .add("content_type", prop) ....
final void function() throws Exception { final ReleaseAsset releaseAsset = Mockito.mock(ReleaseAsset.class); final String prop = STR; Mockito.doReturn( Json.createObjectBuilder() .add(STR, prop) .build() ).when(releaseAsset).json(); MatcherAssert.assertThat( new ReleaseAsset.Smart(releaseAsset).contentType(), Matchers....
/** * ReleaseAsset.Smart can fetch content_type property from ReleaseAsset. * @throws Exception If some problem inside */
ReleaseAsset.Smart can fetch content_type property from ReleaseAsset
fetchesContentType
{ "repo_name": "cvrebert/typed-github", "path": "src/test/java/com/jcabi/github/ReleaseAssetTest.java", "license": "bsd-3-clause", "size": 8836 }
[ "javax.json.Json", "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.mockito.Mockito" ]
import javax.json.Json; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.mockito.Mockito;
import javax.json.*; import org.hamcrest.*; import org.mockito.*;
[ "javax.json", "org.hamcrest", "org.mockito" ]
javax.json; org.hamcrest; org.mockito;
1,010,713