method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public boolean disconnectHeadset(BluetoothDevice device) { if (DBG) log("disconnectHeadset()"); if (mService != null) { try { mService.disconnectHeadset(device); return true; } catch (RemoteException e) {Log.e(TAG, e.toString());} } els...
boolean function(BluetoothDevice device) { if (DBG) log(STR); if (mService != null) { try { mService.disconnectHeadset(device); return true; } catch (RemoteException e) {Log.e(TAG, e.toString());} } else { Log.w(TAG, STR); if (DBG) Log.d(TAG, Log.getStackTraceString(new Throwable())); } return false; }
/** * Disconnects the current headset. Currently this call blocks, it may soon * be made asynchronous. Returns false if this proxy object is * not currently connected to the Headset service. */
Disconnects the current headset. Currently this call blocks, it may soon be made asynchronous. Returns false if this proxy object is not currently connected to the Headset service
disconnectHeadset
{ "repo_name": "mateor/PDroidHistory", "path": "frameworks/base/core/java/android/bluetooth/BluetoothHeadset.java", "license": "gpl-3.0", "size": 19690 }
[ "android.os.RemoteException", "android.util.Log" ]
import android.os.RemoteException; import android.util.Log;
import android.os.*; import android.util.*;
[ "android.os", "android.util" ]
android.os; android.util;
2,107,443
@Override public void processPage(PDPage page) throws IOException { this.pageRotation = page.getRotation(); this.pageSize = page.getCropBox(); if (pageSize.getLowerLeftX() == 0 && pageSize.getLowerLeftY() == 0) { translateMatrix = null; } ...
void function(PDPage page) throws IOException { this.pageRotation = page.getRotation(); this.pageSize = page.getCropBox(); if (pageSize.getLowerLeftX() == 0 && pageSize.getLowerLeftY() == 0) { translateMatrix = null; } else { translateMatrix = Matrix.getTranslateInstance(-pageSize.getLowerLeftX(), -pageSize.getLowerLef...
/** * This will initialise and process the contents of the stream. * * @param page the page to process * @throws java.io.IOException if there is an error accessing the stream. */
This will initialise and process the contents of the stream
processPage
{ "repo_name": "mathieufortin01/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStreamEngine.java", "license": "apache-2.0", "size": 11726 }
[ "java.io.IOException", "org.apache.pdfbox.pdmodel.PDPage", "org.apache.pdfbox.util.Matrix" ]
import java.io.IOException; import org.apache.pdfbox.pdmodel.PDPage; import org.apache.pdfbox.util.Matrix;
import java.io.*; import org.apache.pdfbox.pdmodel.*; import org.apache.pdfbox.util.*;
[ "java.io", "org.apache.pdfbox" ]
java.io; org.apache.pdfbox;
583,688
protected static String stripr(String str, Vector trimstrings) { String ts; boolean modified = true; while (modified) { modified = false; for (Enumeration e = trimstrings.elements(); e.hasMoreElements();) { ts = ((Thing)e.nextElement()).toString(); if (str.endsWith(ts)) { str = str.substring(...
static String function(String str, Vector trimstrings) { String ts; boolean modified = true; while (modified) { modified = false; for (Enumeration e = trimstrings.elements(); e.hasMoreElements();) { ts = ((Thing)e.nextElement()).toString(); if (str.endsWith(ts)) { str = str.substring(0, str.length() - ts.length()); mod...
/** * The <code>stripr</code> method takes a string, and a Vector of * Hecl Things, and strips them off the right side of the string. * * @param str a <code>String</code> value * @param trimstrings a <code>Vector</code> value * @return a <code>String</code> value */
The <code>stripr</code> method takes a string, and a Vector of Hecl Things, and strips them off the right side of the string
stripr
{ "repo_name": "davidw/hecl", "path": "core/org/hecl/StringCmds.java", "license": "apache-2.0", "size": 10414 }
[ "java.util.Enumeration", "java.util.Vector" ]
import java.util.Enumeration; import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
807,936
@ThreadConfined(type = ThreadConfined.ThreadType.JFX) private void rebuildTagsTable(AbstractFile file, BlackboardArtifact artifact) { rebuildRepoHelper(eventsRepository::rebuildTags, false, file, artifact); }
@ThreadConfined(type = ThreadConfined.ThreadType.JFX) void function(AbstractFile file, BlackboardArtifact artifact) { rebuildRepoHelper(eventsRepository::rebuildTags, false, file, artifact); }
/** * Drop the tags table and rebuild it in the background, and show the * timeline when done. * * @param file The AbstractFile from which to choose an event to show in * the List View. * @param artifact The BlackboardArtifact to show in the List View. */
Drop the tags table and rebuild it in the background, and show the timeline when done
rebuildTagsTable
{ "repo_name": "millmanorama/autopsy", "path": "Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java", "license": "apache-2.0", "size": 43142 }
[ "org.sleuthkit.autopsy.coreutils.ThreadConfined", "org.sleuthkit.datamodel.AbstractFile", "org.sleuthkit.datamodel.BlackboardArtifact" ]
import org.sleuthkit.autopsy.coreutils.ThreadConfined; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.BlackboardArtifact;
import org.sleuthkit.autopsy.coreutils.*; import org.sleuthkit.datamodel.*;
[ "org.sleuthkit.autopsy", "org.sleuthkit.datamodel" ]
org.sleuthkit.autopsy; org.sleuthkit.datamodel;
562,630
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws javax.servlet.ServletException * @throws java.io.IOException */
Handles the HTTP <code>POST</code> method
doPost
{ "repo_name": "xroca/planFormacionJava", "path": "servletsjsp/ServletCicloVidaMaven/src/main/java/servlets/EjemploCookiesHeaders.java", "license": "apache-2.0", "size": 3362 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
2,825,722
public List<ConfigChannel> listChannels(String sessionKey, Integer sid) { User loggedInUser = getLoggedInUser(sessionKey); XmlRpcSystemHelper helper = XmlRpcSystemHelper.getInstance(); Server server = helper.lookupServer(loggedInUser, sid); return server.getConfigChannels(); }
List<ConfigChannel> function(String sessionKey, Integer sid) { User loggedInUser = getLoggedInUser(sessionKey); XmlRpcSystemHelper helper = XmlRpcSystemHelper.getInstance(); Server server = helper.lookupServer(loggedInUser, sid); return server.getConfigChannels(); }
/** * List all the global channels associated to a system * in the order of their ranking. * @param sessionKey User's session key. * @param sid a system id * @return a list of global config channels associated to the given * system in the order of their ranking.. * * @xm...
List all the global channels associated to a system in the order of their ranking
listChannels
{ "repo_name": "colloquium/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/system/config/ServerConfigHandler.java", "license": "gpl-2.0", "size": 26608 }
[ "com.redhat.rhn.domain.config.ConfigChannel", "com.redhat.rhn.domain.server.Server", "com.redhat.rhn.domain.user.User", "com.redhat.rhn.frontend.xmlrpc.system.XmlRpcSystemHelper", "java.util.List" ]
import com.redhat.rhn.domain.config.ConfigChannel; import com.redhat.rhn.domain.server.Server; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.frontend.xmlrpc.system.XmlRpcSystemHelper; import java.util.List;
import com.redhat.rhn.domain.config.*; import com.redhat.rhn.domain.server.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.xmlrpc.system.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
2,826,737
public void terminate() { if (isTerminated) { return; } quit(); uploadManager.close(); downloadManager.close(); if (_inputThread != null) _inputThread.stop(); dispatchThread.stopIt(); if (!isInMultiHubsMode() && _udp_inputThread != null) _udp_inputThread.stop(); if (shareManager != null...
void function() { if (isTerminated) { return; } quit(); uploadManager.close(); downloadManager.close(); if (_inputThread != null) _inputThread.stop(); dispatchThread.stopIt(); if (!isInMultiHubsMode() && _udp_inputThread != null) _udp_inputThread.stop(); if (shareManager != null && !isInMultiHubsMode()) shareManager.cl...
/** * Call this when you want to shut down framework completely. Unlike {@link #quit() quit}, * {@link #connect(String, int) connect} is not supposed to be called after calling this method. */
Call this when you want to shut down framework completely. Unlike <code>#quit() quit</code>, <code>#connect(String, int) connect</code> is not supposed to be called after calling this method
terminate
{ "repo_name": "applegrew/jdcbot", "path": "src/org/elite/jdcbot/framework/jDCBot.java", "license": "gpl-3.0", "size": 68686 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,708,451
public Observable<ServiceResponse<Page<NatGatewayInner>>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); }
Observable<ServiceResponse<Page<NatGatewayInner>>> function() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); }
/** * Gets all the Nat Gateways in a subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;NatGatewayInner&gt; object wrapped in {@link ServiceResponse} if successful. */
Gets all the Nat Gateways in a subscription
listSinglePageAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NatGatewaysInner.java", "license": "mit", "size": 67484 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
899,054
public void testAUIDGenerator() throws Exception { try { HashSet idSet = new HashSet(); Class idClass = null; PersistenceManager pm=pmf.getPersistenceManager(); Transaction tx=pm.currentTransaction(); try ...
void function() throws Exception { try { HashSet idSet = new HashSet(); Class idClass = null; PersistenceManager pm=pmf.getPersistenceManager(); Transaction tx=pm.currentTransaction(); try { tx.begin(); AUIDGeneratorItem item=null; item = new AUIDGeneratorItem(STR); pm.makePersistent(item); idSet.add(item.getIdentifier...
/** * Test the use of "auid" generator. This is for all datastores. */
Test the use of "auid" generator. This is for all datastores
testAUIDGenerator
{ "repo_name": "datanucleus/tests", "path": "jdo/mongodb/src/test/org/datanucleus/tests/ValueGeneratorTest.java", "license": "apache-2.0", "size": 27834 }
[ "java.util.Collection", "java.util.HashSet", "java.util.Iterator", "javax.jdo.JDOHelper", "javax.jdo.JDOUserException", "javax.jdo.PersistenceManager", "javax.jdo.Query", "javax.jdo.Transaction", "org.datanucleus.samples.valuegeneration.AUIDGeneratorItem" ]
import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import javax.jdo.JDOHelper; import javax.jdo.JDOUserException; import javax.jdo.PersistenceManager; import javax.jdo.Query; import javax.jdo.Transaction; import org.datanucleus.samples.valuegeneration.AUIDGeneratorItem;
import java.util.*; import javax.jdo.*; import org.datanucleus.samples.valuegeneration.*;
[ "java.util", "javax.jdo", "org.datanucleus.samples" ]
java.util; javax.jdo; org.datanucleus.samples;
1,170,324
public static DrillClient createClient(final DrillConfig drillConfig, final RemoteServiceSet remoteServiceSet, final int maxWidth, final Properties props) throws RpcException, OutOfMemoryException { final DrillClient drillClient = new DrillClient(drillConfig, remoteServiceSet.getCoordinator()); drillCli...
static DrillClient function(final DrillConfig drillConfig, final RemoteServiceSet remoteServiceSet, final int maxWidth, final Properties props) throws RpcException, OutOfMemoryException { final DrillClient drillClient = new DrillClient(drillConfig, remoteServiceSet.getCoordinator()); drillClient.connect(props); final L...
/** * Create a DrillClient that can be used to query a drill cluster. * * @param drillConfig * @param remoteServiceSet remote service set * @param maxWidth maximum width per node * @param props Connection properties contains properties such as "user", "password", "schema" etc * @return the newly cr...
Create a DrillClient that can be used to query a drill cluster
createClient
{ "repo_name": "akumarb2010/incubator-drill", "path": "exec/java-exec/src/test/java/org/apache/drill/test/QueryTestUtil.java", "license": "apache-2.0", "size": 8900 }
[ "java.util.List", "java.util.Properties", "org.apache.drill.common.config.DrillConfig", "org.apache.drill.exec.ExecConstants", "org.apache.drill.exec.client.DrillClient", "org.apache.drill.exec.exception.OutOfMemoryException", "org.apache.drill.exec.proto.UserBitShared", "org.apache.drill.exec.rpc.Rpc...
import java.util.List; import java.util.Properties; import org.apache.drill.common.config.DrillConfig; import org.apache.drill.exec.ExecConstants; import org.apache.drill.exec.client.DrillClient; import org.apache.drill.exec.exception.OutOfMemoryException; import org.apache.drill.exec.proto.UserBitShared; import org.ap...
import java.util.*; import org.apache.drill.common.config.*; import org.apache.drill.exec.*; import org.apache.drill.exec.client.*; import org.apache.drill.exec.exception.*; import org.apache.drill.exec.proto.*; import org.apache.drill.exec.rpc.*; import org.apache.drill.exec.rpc.user.*; import org.apache.drill.exec.se...
[ "java.util", "org.apache.drill" ]
java.util; org.apache.drill;
1,243,918
public static XYSeriesCollection createTestXYSeriesCollection() { XYSeriesCollection result = new XYSeriesCollection(); XYSeries series1 = new XYSeries("Series 1", false, false); series1.add(1.0, 2.0); series1.add(2.0, 5.0); XYSeries series2 = new XYSeries("Series 2", fa...
static XYSeriesCollection function() { XYSeriesCollection result = new XYSeriesCollection(); XYSeries series1 = new XYSeries(STR, false, false); series1.add(1.0, 2.0); series1.add(2.0, 5.0); XYSeries series2 = new XYSeries(STR, false, false); series2.add(1.0, 4.0); series2.add(2.0, 3.0); result.addSeries(series1); resu...
/** * Creates and returns a sample dataset for testing purposes. * * @return A sample dataset. */
Creates and returns a sample dataset for testing purposes
createTestXYSeriesCollection
{ "repo_name": "oskopek/jfreechart-fse", "path": "src/test/java/org/jfree/chart/renderer/xy/RendererXYPackageTests.java", "license": "lgpl-2.1", "size": 3814 }
[ "org.jfree.data.xy.XYSeries", "org.jfree.data.xy.XYSeriesCollection" ]
import org.jfree.data.xy.XYSeries; import org.jfree.data.xy.XYSeriesCollection;
import org.jfree.data.xy.*;
[ "org.jfree.data" ]
org.jfree.data;
38,796
public void setShapeRegion ( byte shapeKind, Region r ) { switch (shapeKind) { case XShape.KindBounding: _boundingShapeRegion = r; break; case XShape.KindClip: _clipShapeRegion = r; break; case XShape.KindInput: _inputShapeRegion = r; break; } }
void function ( byte shapeKind, Region r ) { switch (shapeKind) { case XShape.KindBounding: _boundingShapeRegion = r; break; case XShape.KindClip: _clipShapeRegion = r; break; case XShape.KindInput: _inputShapeRegion = r; break; } }
/** * Set a shape region. * * @param shapeKind The kind of shape to set. * @param sr The shape region. */
Set a shape region
setShapeRegion
{ "repo_name": "SumiTomohiko/android-nexec-client", "path": "app/src/main/java/au/com/darkside/XServer/Window.java", "license": "mit", "size": 78410 }
[ "android.graphics.Region", "au.com.darkside.XServer" ]
import android.graphics.Region; import au.com.darkside.XServer;
import android.graphics.*; import au.com.darkside.*;
[ "android.graphics", "au.com.darkside" ]
android.graphics; au.com.darkside;
2,911,656
@Override public PerformanceVector getEstimatedPerformance() throws OperatorException { if (!pattern) { throw new UserError(this, 912, this, "Cannot calculate leave one out estimation of error for regression tasks!"); } double[] estVector = ((SVMpattern) getSVM()).getXiAlphaEstimation(getKernel()); ...
PerformanceVector function() throws OperatorException { if (!pattern) { throw new UserError(this, 912, this, STR); } double[] estVector = ((SVMpattern) getSVM()).getXiAlphaEstimation(getKernel()); PerformanceVector pv = new PerformanceVector(); pv.addCriterion(new EstimatedPerformance(STR, estVector[0], 1, true)); pv.a...
/** * Returns the estimated performances of this SVM. Does only work for classification tasks. */
Returns the estimated performances of this SVM. Does only work for classification tasks
getEstimatedPerformance
{ "repo_name": "rapidminer/rapidminer-studio", "path": "src/main/java/com/rapidminer/operator/learner/functions/kernel/JMySVMLearner.java", "license": "agpl-3.0", "size": 7850 }
[ "com.rapidminer.operator.OperatorException", "com.rapidminer.operator.UserError", "com.rapidminer.operator.learner.functions.kernel.jmysvm.svm.SVMpattern", "com.rapidminer.operator.performance.EstimatedPerformance", "com.rapidminer.operator.performance.PerformanceVector" ]
import com.rapidminer.operator.OperatorException; import com.rapidminer.operator.UserError; import com.rapidminer.operator.learner.functions.kernel.jmysvm.svm.SVMpattern; import com.rapidminer.operator.performance.EstimatedPerformance; import com.rapidminer.operator.performance.PerformanceVector;
import com.rapidminer.operator.*; import com.rapidminer.operator.learner.functions.kernel.jmysvm.svm.*; import com.rapidminer.operator.performance.*;
[ "com.rapidminer.operator" ]
com.rapidminer.operator;
610,782
@Override public void placeInWorld(IBuilderContext context, int x, int y, int z, LinkedList<ItemStack> stacks) { super.placeInWorld(context, x, y, z, stacks); if (block.hasTileEntity(meta)) { TileEntity tile = context.world().getTileEntity(x, y, z); tileNBT.setInteger("x", x); tileNBT.setInteger("y",...
void function(IBuilderContext context, int x, int y, int z, LinkedList<ItemStack> stacks) { super.placeInWorld(context, x, y, z, stacks); if (block.hasTileEntity(meta)) { TileEntity tile = context.world().getTileEntity(x, y, z); tileNBT.setInteger("x", x); tileNBT.setInteger("y", y); tileNBT.setInteger("z", z); if (til...
/** * Places the block in the world, at the location specified in the slot. */
Places the block in the world, at the location specified in the slot
placeInWorld
{ "repo_name": "AEnterprise/Buildcraft-Additions", "path": "src/main/java/buildcraft/api/blueprints/SchematicTile.java", "license": "gpl-3.0", "size": 3235 }
[ "java.util.LinkedList", "net.minecraft.item.ItemStack", "net.minecraft.tileentity.TileEntity" ]
import java.util.LinkedList; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity;
import java.util.*; import net.minecraft.item.*; import net.minecraft.tileentity.*;
[ "java.util", "net.minecraft.item", "net.minecraft.tileentity" ]
java.util; net.minecraft.item; net.minecraft.tileentity;
746,805
@Test @Ignore public void testPollMonitoredService() { final PollerService api = createMock(PollerService.class); ((DefaultDemandPollService)m_demandPollService).setPollerAPI(api); final DemandPoll poll = m_demandPollService.pollMonitoredService(1, addr("192.168.2.100"), 1, 1); ...
void function() { final PollerService api = createMock(PollerService.class); ((DefaultDemandPollService)m_demandPollService).setPollerAPI(api); final DemandPoll poll = m_demandPollService.pollMonitoredService(1, addr(STR), 1, 1); assertNotNull(STR, poll); assertTrue(STR, poll.getId() >= 1); }
/** * this is a feature that has not been written yet */
this is a feature that has not been written yet
testPollMonitoredService
{ "repo_name": "tharindum/opennms_dashboard", "path": "opennms-webapp/src/test/java/org/opennms/web/svclayer/DefaultPollServiceIntegrationTest.java", "license": "gpl-2.0", "size": 3487 }
[ "org.easymock.EasyMock", "org.junit.Assert", "org.opennms.core.utils.InetAddressUtils", "org.opennms.netmgt.model.DemandPoll", "org.opennms.web.services.PollerService", "org.opennms.web.svclayer.support.DefaultDemandPollService" ]
import org.easymock.EasyMock; import org.junit.Assert; import org.opennms.core.utils.InetAddressUtils; import org.opennms.netmgt.model.DemandPoll; import org.opennms.web.services.PollerService; import org.opennms.web.svclayer.support.DefaultDemandPollService;
import org.easymock.*; import org.junit.*; import org.opennms.core.utils.*; import org.opennms.netmgt.model.*; import org.opennms.web.services.*; import org.opennms.web.svclayer.support.*;
[ "org.easymock", "org.junit", "org.opennms.core", "org.opennms.netmgt", "org.opennms.web" ]
org.easymock; org.junit; org.opennms.core; org.opennms.netmgt; org.opennms.web;
2,388,313
public String toString() { return "null"; } } private Map map; public static final Object NULL = new Null(); public JSONObject() { this.map = new HashMap(); } public JSONObject(JSONObject jo, String[] names) { this(); for (int i = 0; i < names.length; i += 1) { ...
String function() { return "null"; } } private Map map; public static final Object NULL = new Null(); public JSONObject() { this.map = new HashMap(); } public JSONObject(JSONObject jo, String[] names) { this(); for (int i = 0; i < names.length; i += 1) { try { putOnce(names[i], jo.opt(names[i])); } catch (Exception ign...
/** * Get the "null" string value. * * @return The string "null". */
Get the "null" string value
toString
{ "repo_name": "motorina0/flowable-engine", "path": "modules/flowable-engine/src/main/java/org/flowable/engine/impl/util/json/JSONObject.java", "license": "apache-2.0", "size": 48014 }
[ "java.util.HashMap", "java.util.Iterator", "java.util.Map" ]
import java.util.HashMap; import java.util.Iterator; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,664,065
@NotNull public BinaryClassDescriptor registerDescriptor( BinaryClassDescriptor desc, boolean registerMeta, boolean onlyLocReg ) { if (desc.userType()) return registerUserClassDescriptor(desc, registerMeta, onlyLocReg); else { BinaryClassDescriptor...
@NotNull BinaryClassDescriptor function( BinaryClassDescriptor desc, boolean registerMeta, boolean onlyLocReg ) { if (desc.userType()) return registerUserClassDescriptor(desc, registerMeta, onlyLocReg); else { BinaryClassDescriptor regDesc = desc.makeRegistered(); if (GridBinaryMarshaller.USE_CACHE.get()) { BinaryClass...
/** * Attempts registration of the provided {@link BinaryClassDescriptor} in the cluster. * * @param desc Class descriptor to register. * @param registerMeta If {@code true}, then metadata will be registered along with the class descriptor. * @param onlyLocReg {@code true} if descriptor need to...
Attempts registration of the provided <code>BinaryClassDescriptor</code> in the cluster
registerDescriptor
{ "repo_name": "samaitra/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java", "license": "apache-2.0", "size": 54646 }
[ "org.jetbrains.annotations.NotNull" ]
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
2,407,397
protected void timeOffset() throws Exception { setDataPointStorage(); HashMap<String, String> tags = new HashMap<String, String>(2); tags.put("D", "D"); tags.put("E", "E"); tsdb.addPoint("A", 1431561600, 1, tags).joinUninterruptibly(); tsdb.addPoint("A", 1431561660, 2, tags).joinUninterru...
void function() throws Exception { setDataPointStorage(); HashMap<String, String> tags = new HashMap<String, String>(2); tags.put("D", "D"); tags.put("E", "E"); tsdb.addPoint("A", 1431561600, 1, tags).joinUninterruptibly(); tsdb.addPoint("A", 1431561660, 2, tags).joinUninterruptibly(); tags = new HashMap<String, String...
/** * A and B with two series each. Different D values, common E. * A has values at T0 and T1, but then B has values at T2 and T3. Should * throw NaNs after the intersection. */
A and B with two series each. Different D values, common E. A has values at T0 and T1, but then B has values at T2 and T3. Should throw NaNs after the intersection
timeOffset
{ "repo_name": "johann8384/opentsdb", "path": "test/query/expression/BaseTimeSyncedIteratorTest.java", "license": "lgpl-2.1", "size": 25035 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,556,561
protected void parseURI(URI xmldbURI, boolean hadXmldbPrefix) throws URISyntaxException { splitPath(xmldbURI.getRawPath()); }
void function(URI xmldbURI, boolean hadXmldbPrefix) throws URISyntaxException { splitPath(xmldbURI.getRawPath()); }
/** Feeds private members. Receives a URI with the xmldb: scheme already stripped * @throws URISyntaxException */
Feeds private members. Receives a URI with the xmldb: scheme already stripped
parseURI
{ "repo_name": "NCIP/cadsr-cgmdr-nci-uk", "path": "src/org/exist/xmldb/XmldbURI.java", "license": "bsd-3-clause", "size": 31020 }
[ "java.net.URISyntaxException" ]
import java.net.URISyntaxException;
import java.net.*;
[ "java.net" ]
java.net;
1,250,860
public JSNumber indexOf(JSString searchString, JSNumber startPosition);
JSNumber function(JSString searchString, JSNumber startPosition);
/** * <b>function indexOf(searchString, startPosition)</b> search a string. * * @memberOf String * @param searchString The substring to be search within <b><i>string</i></b>. * @param startPosition Optional start index. * @returns The position of the first occurrence of <b><i>search...
function indexOf(searchString, startPosition) search a string
indexOf
{ "repo_name": "ZenHarbinger/RSTALanguageSupport", "path": "src/main/java/org/fife/rsta/ac/js/ecma/api/ecma3/functions/JSStringFunctions.java", "license": "bsd-3-clause", "size": 10085 }
[ "org.fife.rsta.ac.js.ecma.api.ecma3.JSNumber", "org.fife.rsta.ac.js.ecma.api.ecma3.JSString" ]
import org.fife.rsta.ac.js.ecma.api.ecma3.JSNumber; import org.fife.rsta.ac.js.ecma.api.ecma3.JSString;
import org.fife.rsta.ac.js.ecma.api.ecma3.*;
[ "org.fife.rsta" ]
org.fife.rsta;
2,227,038
public ServiceFuture<AppServiceEnvironmentResourceInner> beginCreateOrUpdateAsync(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, final ServiceCallback<AppServiceEnvironmentResourceInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateOr...
ServiceFuture<AppServiceEnvironmentResourceInner> function(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, final ServiceCallback<AppServiceEnvironmentResourceInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(reso...
/** * Create or update an App Service Environment. * Create or update an App Service Environment. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of the App Service Environment. * @param hostingEnvironmentEnvelope Configuration deta...
Create or update an App Service Environment. Create or update an App Service Environment
beginCreateOrUpdateAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/appservice/mgmt-v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceEnvironmentsInner.java", "license": "mit", "size": 664956 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,440,023
public void incrementStatistic(Statistic statistic, Material material) throws IllegalArgumentException;
void function(Statistic statistic, Material material) throws IllegalArgumentException;
/** * Increments the given statistic for this player for the given material. * <p> * This is equivalent to the following code: * <code>incrementStatistic(Statistic, Material, 1)</code> * * @param statistic Statistic to increment * @param material Material to offset the statistic with ...
Increments the given statistic for this player for the given material. This is equivalent to the following code: <code>incrementStatistic(Statistic, Material, 1)</code>
incrementStatistic
{ "repo_name": "Wolvereness/Bukkit-Bleeding", "path": "src/main/java/org/bukkit/entity/Player.java", "license": "gpl-3.0", "size": 36907 }
[ "org.bukkit.Material", "org.bukkit.Statistic" ]
import org.bukkit.Material; import org.bukkit.Statistic;
import org.bukkit.*;
[ "org.bukkit" ]
org.bukkit;
2,246,745
private Node cacheLookup(NodeId id) { if ( id2node_Cache == null ) return null; return id2node_Cache.getIfPresent(id); }
Node function(NodeId id) { if ( id2node_Cache == null ) return null; return id2node_Cache.getIfPresent(id); }
/** * Check caches to see if we can map a NodeId to a Node. Returns null on no * cache entry. */
Check caches to see if we can map a NodeId to a Node. Returns null on no cache entry
cacheLookup
{ "repo_name": "apache/jena", "path": "jena-db/jena-tdb2/src/main/java/org/apache/jena/tdb2/store/nodetable/NodeTableCache.java", "license": "apache-2.0", "size": 15225 }
[ "org.apache.jena.atlas.lib.Cache", "org.apache.jena.graph.Node", "org.apache.jena.tdb2.store.NodeId" ]
import org.apache.jena.atlas.lib.Cache; import org.apache.jena.graph.Node; import org.apache.jena.tdb2.store.NodeId;
import org.apache.jena.atlas.lib.*; import org.apache.jena.graph.*; import org.apache.jena.tdb2.store.*;
[ "org.apache.jena" ]
org.apache.jena;
2,089,210
public void writeTo(final ChannelBuffer data) { data.writeInt(this.wildcards); data.writeShort(this.inputPort); data.writeBytes(this.dataLayerSource); data.writeBytes(this.dataLayerDestination); data.writeShort(this.dataLayerVirtualLan); data.writeByte(this.dataLayerVirtualLanPriorityCodePoint); data.w...
void function(final ChannelBuffer data) { data.writeInt(this.wildcards); data.writeShort(this.inputPort); data.writeBytes(this.dataLayerSource); data.writeBytes(this.dataLayerDestination); data.writeShort(this.dataLayerVirtualLan); data.writeByte(this.dataLayerVirtualLanPriorityCodePoint); data.writeByte((byte) 0x0); d...
/** * Write this message's binary format to the specified ByteBuffer * * @param data */
Write this message's binary format to the specified ByteBuffer
writeTo
{ "repo_name": "fnkhan/second", "path": "src/main/java/org/openflow/protocol/OFMatch.java", "license": "apache-2.0", "size": 32565 }
[ "org.jboss.netty.buffer.ChannelBuffer" ]
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.*;
[ "org.jboss.netty" ]
org.jboss.netty;
2,148,357
@Deprecated public void setDefaultArtwork(@Nullable Bitmap defaultArtwork) { setDefaultArtwork( defaultArtwork == null ? null : new BitmapDrawable(getResources(), defaultArtwork)); }
void function(@Nullable Bitmap defaultArtwork) { setDefaultArtwork( defaultArtwork == null ? null : new BitmapDrawable(getResources(), defaultArtwork)); }
/** * Sets the default artwork to display if {@code useArtwork} is {@code true} and no artwork is * present in the media. * * @param defaultArtwork the default artwork to display. * @deprecated use (@link {@link #setDefaultArtwork(Drawable)} instead. */
Sets the default artwork to display if useArtwork is true and no artwork is present in the media
setDefaultArtwork
{ "repo_name": "yangchaojiang/yjPlay", "path": "VideoPlayModule-Lite/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java", "license": "apache-2.0", "size": 65662 }
[ "android.graphics.Bitmap", "android.graphics.drawable.BitmapDrawable", "android.support.annotation.Nullable" ]
import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.support.annotation.Nullable;
import android.graphics.*; import android.graphics.drawable.*; import android.support.annotation.*;
[ "android.graphics", "android.support" ]
android.graphics; android.support;
871,259
public RecorderDevice lockTuner(int recorderId) throws IOException, CommandException;
RecorderDevice function(int recorderId) throws IOException, CommandException;
/** * Request that the given recorder be locked for exclusive use. When the * recorder is no longer needed, {@link #freeTuner(int)} should be called to * release it. * * @param recorderId * the ID of desired recorder, a value less than zero indicates * no prefer...
Request that the given recorder be locked for exclusive use. When the recorder is no longer needed, <code>#freeTuner(int)</code> should be called to release it
lockTuner
{ "repo_name": "syphr42/libmythtv-java", "path": "protocol/src/main/java/org/syphr/mythtv/protocol/Protocol.java", "license": "apache-2.0", "size": 50355 }
[ "java.io.IOException", "org.syphr.mythtv.commons.exception.CommandException", "org.syphr.mythtv.data.RecorderDevice" ]
import java.io.IOException; import org.syphr.mythtv.commons.exception.CommandException; import org.syphr.mythtv.data.RecorderDevice;
import java.io.*; import org.syphr.mythtv.commons.exception.*; import org.syphr.mythtv.data.*;
[ "java.io", "org.syphr.mythtv" ]
java.io; org.syphr.mythtv;
112,676
public final native JsArrayMixed attr( JsArrayMixed attributeNames ) ;
final native JsArrayMixed function( JsArrayMixed attributeNames ) ;
/** * gets an array of values for given attribute names * * @return the current value for the given attribute name */
gets an array of values for given attribute names
attr
{ "repo_name": "ltearno/hexa.tools", "path": "hexa.core/src/main/java/fr/lteconsulting/hexa/client/ui/chart/raphael/RaphaelJS.java", "license": "mit", "size": 23827 }
[ "com.google.gwt.core.client.JsArrayMixed" ]
import com.google.gwt.core.client.JsArrayMixed;
import com.google.gwt.core.client.*;
[ "com.google.gwt" ]
com.google.gwt;
2,614,179
@Override public void releaseConnection() throws JDBCException { LOG.debug( "Releasing JDBC connection" ); if ( physicalConnection == null ) { return; } try { if ( !physicalConnection.isClosed() ) { getJdbcServices().getSqlExceptionHelper().logAndClearWarnings( physicalConnection ); } if ( !...
void function() throws JDBCException { LOG.debug( STR ); if ( physicalConnection == null ) { return; } try { if ( !physicalConnection.isClosed() ) { getJdbcServices().getSqlExceptionHelper().logAndClearWarnings( physicalConnection ); } if ( !isUserSuppliedConnection ) { jdbcConnectionAccess.releaseConnection( physicalC...
/** * Physically closes the JDBC Connection. * * @throws JDBCException Indicates problem closing a connection */
Physically closes the JDBC Connection
releaseConnection
{ "repo_name": "kevin-chen-hw/LDAE", "path": "com.huawei.soa.ldae/src/main/java/org/hibernate/engine/jdbc/internal/LogicalConnectionImpl.java", "license": "lgpl-2.1", "size": 12138 }
[ "java.sql.SQLException", "org.hibernate.JDBCException", "org.hibernate.engine.jdbc.spi.ConnectionObserver" ]
import java.sql.SQLException; import org.hibernate.JDBCException; import org.hibernate.engine.jdbc.spi.ConnectionObserver;
import java.sql.*; import org.hibernate.*; import org.hibernate.engine.jdbc.spi.*;
[ "java.sql", "org.hibernate", "org.hibernate.engine" ]
java.sql; org.hibernate; org.hibernate.engine;
2,699,523
public void put(double inValue) throws xBaseJException { StringBuffer sb = new StringBuffer(getLength() + 1); sb.append("#"); for (int i = 0; i < getLength(); i++) sb.append("#"); if (decPosition > 0) { int pos = getLength() - getDecimalPositionCount(); sb.setCharAt(pos, decimalSeparator); for ...
void function(double inValue) throws xBaseJException { StringBuffer sb = new StringBuffer(getLength() + 1); sb.append("#"); for (int i = 0; i < getLength(); i++) sb.append("#"); if (decPosition > 0) { int pos = getLength() - getDecimalPositionCount(); sb.setCharAt(pos, decimalSeparator); for (pos++; pos < getLength() +...
/** * sets the field contents. * * @param inValue * double * @throws xBaseJException * most likely a format exception */
sets the field contents
put
{ "repo_name": "datacleaner/metamodel_extras", "path": "dbase/src/main/java/org/xBaseJ/fields/NumField.java", "license": "lgpl-3.0", "size": 7682 }
[ "java.text.DecimalFormat" ]
import java.text.DecimalFormat;
import java.text.*;
[ "java.text" ]
java.text;
1,794,461
@Override public TTableDescriptor toThriftDescriptor(Set<Long> referencedPartitions) { // An inline view never generates Thrift representation. throw new UnsupportedOperationException( "Inline View should not generate Thrift representation"); }
TTableDescriptor function(Set<Long> referencedPartitions) { throw new UnsupportedOperationException( STR); }
/** * This should never be called. */
This should never be called
toThriftDescriptor
{ "repo_name": "ImpalaToGo/ImpalaToGo", "path": "fe/src/main/java/com/cloudera/impala/catalog/InlineView.java", "license": "apache-2.0", "size": 2795 }
[ "com.cloudera.impala.thrift.TTableDescriptor", "java.util.Set" ]
import com.cloudera.impala.thrift.TTableDescriptor; import java.util.Set;
import com.cloudera.impala.thrift.*; import java.util.*;
[ "com.cloudera.impala", "java.util" ]
com.cloudera.impala; java.util;
2,483,845
public static void deleteInstance(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) { Base.deleteInstance(model, RDFS_CLASS, instanceResource); }
static void function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) { Base.deleteInstance(model, RDFS_CLASS, instanceResource); }
/** * Remove rdf:type Index from this instance. Other triples are not affected. * To delete more, use deleteAllProperties * @param model an RDF2Go model * @param instanceResource an RDF2Go resource * * [Generated from RDFReactor template rule #class4] */
Remove rdf:type Index from this instance. Other triples are not affected. To delete more, use deleteAllProperties
deleteInstance
{ "repo_name": "alexgarciac/biotea", "path": "src/ws/biotea/ld2rdf/rdf/model/doco/Index.java", "license": "apache-2.0", "size": 7205 }
[ "org.ontoware.rdf2go.model.Model", "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdf2go.model.Model; import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdf2go.model.*; import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdf2go", "org.ontoware.rdfreactor" ]
org.ontoware.rdf2go; org.ontoware.rdfreactor;
955,059
public void setEnableAccessSpecID(final Bit enableAccessSpecID) { this.enableAccessSpecID = enableAccessSpecID; }
void function(final Bit enableAccessSpecID) { this.enableAccessSpecID = enableAccessSpecID; }
/** * set enableAccessSpecID of type Bit . * @param enableAccessSpecID to be set */
set enableAccessSpecID of type Bit
setEnableAccessSpecID
{ "repo_name": "yalewkidane/Oliot-FC", "path": "fc-server/src/main/java/kr/ac/kaist/resl/ltk/generated/parameters/TagReportContentSelector.java", "license": "lgpl-2.1", "size": 26411 }
[ "org.llrp.ltk.types.Bit" ]
import org.llrp.ltk.types.Bit;
import org.llrp.ltk.types.*;
[ "org.llrp.ltk" ]
org.llrp.ltk;
117,623
private static Pair<Long, ChunkIndex> parseSidx(ParsableByteArray atom, long inputPosition) throws ParserException { atom.setPosition(Atom.HEADER_SIZE); int fullAtom = atom.readInt(); int version = Atom.parseFullAtomVersion(fullAtom); atom.skipBytes(4); long timescale = atom.readUnsignedInt...
static Pair<Long, ChunkIndex> function(ParsableByteArray atom, long inputPosition) throws ParserException { atom.setPosition(Atom.HEADER_SIZE); int fullAtom = atom.readInt(); int version = Atom.parseFullAtomVersion(fullAtom); atom.skipBytes(4); long timescale = atom.readUnsignedInt(); long earliestPresentationTime; lon...
/** * Parses a sidx atom (defined in 14496-12). * * @param atom The atom data. * @param inputPosition The input position of the first byte after the atom. * @return A pair consisting of the earliest presentation time in microseconds, and the parsed * {@link ChunkIndex}. */
Parses a sidx atom (defined in 14496-12)
parseSidx
{ "repo_name": "androidx/media", "path": "libraries/extractor/src/main/java/androidx/media3/extractor/mp4/FragmentedMp4Extractor.java", "license": "apache-2.0", "size": 74597 }
[ "android.util.Pair", "androidx.media3.common.ParserException", "androidx.media3.common.util.ParsableByteArray", "androidx.media3.common.util.Util", "androidx.media3.extractor.ChunkIndex" ]
import android.util.Pair; import androidx.media3.common.ParserException; import androidx.media3.common.util.ParsableByteArray; import androidx.media3.common.util.Util; import androidx.media3.extractor.ChunkIndex;
import android.util.*; import androidx.media3.common.*; import androidx.media3.common.util.*; import androidx.media3.extractor.*;
[ "android.util", "androidx.media3" ]
android.util; androidx.media3;
732,115
public void loadTiles(Rectangle region) { if (model.getState() == DISCARDED) return; if (region == null) region = model.getBrowser().getVisibleRectangle(); Map<Integer, Tile> tiles = getTiles(); if (tiles == null) return; //invalidate images. Dimension d = model.getTileSize(); int widt...
void function(Rectangle region) { if (model.getState() == DISCARDED) return; if (region == null) region = model.getBrowser().getVisibleRectangle(); Map<Integer, Tile> tiles = getTiles(); if (tiles == null) return; Dimension d = model.getTileSize(); int width = d.width; int height = d.height; int cs = region.x/width; in...
/** * Implemented as specified by the {@link ImViewer} interface. * @see ImViewer#loadTiles(Rectangle) */
Implemented as specified by the <code>ImViewer</code> interface
loadTiles
{ "repo_name": "emilroz/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerComponent.java", "license": "gpl-2.0", "size": 99557 }
[ "java.awt.Dimension", "java.awt.Rectangle", "java.util.ArrayList", "java.util.Iterator", "java.util.List", "java.util.Map", "org.openmicroscopy.shoola.env.rnd.data.Tile" ]
import java.awt.Dimension; import java.awt.Rectangle; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; import org.openmicroscopy.shoola.env.rnd.data.Tile;
import java.awt.*; import java.util.*; import org.openmicroscopy.shoola.env.rnd.data.*;
[ "java.awt", "java.util", "org.openmicroscopy.shoola" ]
java.awt; java.util; org.openmicroscopy.shoola;
1,472,604
public void testSiteConfiguration() throws Throwable { echo("Testing the basic site configuration"); CmsSiteManagerImpl siteManager = OpenCms.getSiteManager(); Map<CmsSiteMatcher, CmsSite> mapOfSites = siteManager.getSites(); assertNotNull("Configured map of sites must not be null...
void function() throws Throwable { echo(STR); CmsSiteManagerImpl siteManager = OpenCms.getSiteManager(); Map<CmsSiteMatcher, CmsSite> mapOfSites = siteManager.getSites(); assertNotNull(STR, mapOfSites); List<CmsSite> sites = new ArrayList<CmsSite>(mapOfSites.values()); assertTrue(STR + sites.size(), sites.size() == 6);...
/** * Tests the basic site configuration.<p> * * @throws Throwable if something goes wrong */
Tests the basic site configuration
testSiteConfiguration
{ "repo_name": "mediaworx/opencms-core", "path": "test/org/opencms/site/TestCmsSiteConfiguration.java", "license": "lgpl-2.1", "size": 3809 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map", "org.opencms.main.OpenCms" ]
import java.util.ArrayList; import java.util.List; import java.util.Map; import org.opencms.main.OpenCms;
import java.util.*; import org.opencms.main.*;
[ "java.util", "org.opencms.main" ]
java.util; org.opencms.main;
565,400
@SuppressWarnings("unchecked") public static void verifyProperties(Map<?, ?> configurationValues) { final Map propertiesToAdd = new HashMap(); for (Map.Entry entry : configurationValues.entrySet()) { final Object replacementKey = OBSOLETE_PROPERTIES.get(entry.getKey()); i...
@SuppressWarnings(STR) static void function(Map<?, ?> configurationValues) { final Map propertiesToAdd = new HashMap(); for (Map.Entry entry : configurationValues.entrySet()) { final Object replacementKey = OBSOLETE_PROPERTIES.get(entry.getKey()); if (replacementKey != null) { logUnsupportedProperty(entry.getKey(), rep...
/** * Issues warnings to the user when any obsolete or renamed property names * are used. * * @param configurationValues * The specified properties. */
Issues warnings to the user when any obsolete or renamed property names are used
verifyProperties
{ "repo_name": "f1194361820/helper", "path": "commons/src/main/java/com/fjn/helper/common/sql/dialect/conf/Environment.java", "license": "gpl-2.0", "size": 10020 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
416,540
@Test public void exDualGammaTest() { int nStrikes = STRIKES_INPUT.length; int nVols = VOLS.length; int nInt = INTEREST_RATES.length; double inf = Double.POSITIVE_INFINITY; for (int i = 0; i < nStrikes; ++i) { for (int j = 0; j < nVols; ++j) { for (int l = 0; l < nInt; ++l) { ...
void function() { int nStrikes = STRIKES_INPUT.length; int nVols = VOLS.length; int nInt = INTEREST_RATES.length; double inf = Double.POSITIVE_INFINITY; for (int i = 0; i < nStrikes; ++i) { for (int j = 0; j < nVols; ++j) { for (int l = 0; l < nInt; ++l) { double rate = INTEREST_RATES[l]; double strike = STRIKES_INPUT[...
/** * Large/small values for DualGamma */
Large/small values for DualGamma
exDualGammaTest
{ "repo_name": "OpenGamma/Strata", "path": "modules/pricer/src/test/java/com/opengamma/strata/pricer/impl/option/BlackScholesFormulaRepositoryTest.java", "license": "apache-2.0", "size": 255826 }
[ "org.assertj.core.api.Assertions", "org.assertj.core.data.Offset" ]
import org.assertj.core.api.Assertions; import org.assertj.core.data.Offset;
import org.assertj.core.api.*; import org.assertj.core.data.*;
[ "org.assertj.core" ]
org.assertj.core;
2,081,650
EOperation getType__GetTypeAccessModifier();
EOperation getType__GetTypeAccessModifier();
/** * Returns the meta object for the '{@link org.eclipse.n4js.ts.types.Type#getTypeAccessModifier() <em>Get Type Access Modifier</em>}' operation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the '<em>Get Type Access Modifier</em>' operation. * @see org.eclipse.n4js.ts.type...
Returns the meta object for the '<code>org.eclipse.n4js.ts.types.Type#getTypeAccessModifier() Get Type Access Modifier</code>' operation.
getType__GetTypeAccessModifier
{ "repo_name": "lbeurerkellner/n4js", "path": "plugins/org.eclipse.n4js.ts.model/emf-gen/org/eclipse/n4js/ts/types/TypesPackage.java", "license": "epl-1.0", "size": 538237 }
[ "org.eclipse.emf.ecore.EOperation" ]
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,864,255
public static Model getNamedModel(String graphURI) { return ARQFactory.get().getDataset(null).getNamedModel(graphURI); }
static Model function(String graphURI) { return ARQFactory.get().getDataset(null).getNamedModel(graphURI); }
/** * Convenience method to get a named graph from the current ARQFactory's Dataset. * @param graphURI the URI of the graph to get * @return the named graph or null */
Convenience method to get a named graph from the current ARQFactory's Dataset
getNamedModel
{ "repo_name": "TopQuadrant/shacl", "path": "src/main/java/org/topbraid/jenax/util/ARQFactory.java", "license": "apache-2.0", "size": 13117 }
[ "org.apache.jena.rdf.model.Model" ]
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.*;
[ "org.apache.jena" ]
org.apache.jena;
401,210
protected void handleLookupDefinition(final String name, final String lookupKey) throws ObjectDescriptionException { final PropertyInfo propertyInfo = ModelBuilder.getInstance().createSimplePropertyInfo (getPropertyDescriptor(name)); if (propertyInfo == null) { ...
void function(final String name, final String lookupKey) throws ObjectDescriptionException { final PropertyInfo propertyInfo = ModelBuilder.getInstance().createSimplePropertyInfo (getPropertyDescriptor(name)); if (propertyInfo == null) { throw new ObjectDescriptionException(STR + name); } propertyInfo.setComments(new C...
/** * Handles a lookup definition. * * @param name the name. * @param lookupKey the lookup key. * * @throws ObjectDescriptionException if there is a problem with the object description. */
Handles a lookup definition
handleLookupDefinition
{ "repo_name": "jfree/jcommon", "path": "src/main/java/org/jfree/xml/generator/DefaultModelReader.java", "license": "lgpl-2.1", "size": 15628 }
[ "org.jfree.xml.generator.model.Comments", "org.jfree.xml.generator.model.PropertyInfo", "org.jfree.xml.generator.model.PropertyType", "org.jfree.xml.util.ObjectDescriptionException" ]
import org.jfree.xml.generator.model.Comments; import org.jfree.xml.generator.model.PropertyInfo; import org.jfree.xml.generator.model.PropertyType; import org.jfree.xml.util.ObjectDescriptionException;
import org.jfree.xml.generator.model.*; import org.jfree.xml.util.*;
[ "org.jfree.xml" ]
org.jfree.xml;
1,967,130
public void removeVariable(String name) { Map<String, Iterable<? extends WindupVertexFrame>> frame = peek(); frame.remove(name); }
void function(String name) { Map<String, Iterable<? extends WindupVertexFrame>> frame = peek(); frame.remove(name); }
/** * Remove a variable in the top variables layer. */
Remove a variable in the top variables layer
removeVariable
{ "repo_name": "bradsdavis/windup", "path": "config/api/src/main/java/org/jboss/windup/config/Variables.java", "license": "epl-1.0", "size": 6486 }
[ "java.util.Map", "org.jboss.windup.graph.model.WindupVertexFrame" ]
import java.util.Map; import org.jboss.windup.graph.model.WindupVertexFrame;
import java.util.*; import org.jboss.windup.graph.model.*;
[ "java.util", "org.jboss.windup" ]
java.util; org.jboss.windup;
768,285
private Delegate delegate() throws HadoopIgfsCommunicationException { // These fields will contain possible exceptions from shmem and TCP endpoints. Exception errShmem = null; Exception errTcp = null; Exception errClient = null; // 1. If delegate is set, return it immediatel...
Delegate function() throws HadoopIgfsCommunicationException { Exception errShmem = null; Exception errTcp = null; Exception errClient = null; Delegate curDelegate = delegateRef.get(); if (curDelegate != null) return curDelegate; boolean skipInProc = parameter(conf, PARAM_IGFS_ENDPOINT_NO_EMBED, authority, false); if (!...
/** * Get delegate creating it if needed. * * @return Delegate. * @throws HadoopIgfsCommunicationException On error. */
Get delegate creating it if needed
delegate
{ "repo_name": "shroman/ignite", "path": "modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsWrapper.java", "license": "apache-2.0", "size": 21712 }
[ "java.io.IOException", "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsUtils", "org.apache.ignite.internal.util.typedef.F", "org.apache.ignite.internal.util.typedef.internal.U" ]
import java.io.IOException; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsUtils; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U;
import java.io.*; import org.apache.ignite.*; import org.apache.ignite.internal.processors.hadoop.impl.igfs.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*;
[ "java.io", "org.apache.ignite" ]
java.io; org.apache.ignite;
508,393
protected Item getNextItemToUse(Node node) { ArrayList<Item> possibleItems = new ArrayList<>(); possibleItems.addAll(mItems); possibleItems.removeAll(node.getItemsUsed()); possibleItems.removeAll(node.getItemsNotAvailableForUse()); if (possibleItems.size() == 0) { ...
Item function(Node node) { ArrayList<Item> possibleItems = new ArrayList<>(); possibleItems.addAll(mItems); possibleItems.removeAll(node.getItemsUsed()); possibleItems.removeAll(node.getItemsNotAvailableForUse()); if (possibleItems.size() == 0) { return null; } return possibleItems.get(0); }
/** * Getting the next item available base off the Node's item's it's used, and is barred from using * * @param node - Node to look at * @return - the next item to use for the node */
Getting the next item available base off the Node's item's it's used, and is barred from using
getNextItemToUse
{ "repo_name": "RyanNewsom/BranchAndBoundKnapsack", "path": "src/ex17/RyanNewsomKyleFrisbie/Knapsack.java", "license": "apache-2.0", "size": 7514 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
864,254
private String inferMimeType(ServletRequest request) { String path = ((HttpServletRequest)request).getRequestURI(); ContextHandler.SContext sContext = (ContextHandler.SContext)config.getServletContext(); MimeTypes mimes = sContext.getContextHandler().getMimeTypes(); Buffer mimeBuffer = mimes...
String function(ServletRequest request) { String path = ((HttpServletRequest)request).getRequestURI(); ContextHandler.SContext sContext = (ContextHandler.SContext)config.getServletContext(); MimeTypes mimes = sContext.getContextHandler().getMimeTypes(); Buffer mimeBuffer = mimes.getMimeByExtension(path); return (mimeBu...
/** * Infer the mime type for the response based on the extension of the request * URI. Returns null if unknown. */
Infer the mime type for the response based on the extension of the request URI. Returns null if unknown
inferMimeType
{ "repo_name": "vesense/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java", "license": "apache-2.0", "size": 40301 }
[ "javax.servlet.ServletRequest", "javax.servlet.http.HttpServletRequest", "org.mortbay.io.Buffer", "org.mortbay.jetty.MimeTypes", "org.mortbay.jetty.handler.ContextHandler" ]
import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; import org.mortbay.io.Buffer; import org.mortbay.jetty.MimeTypes; import org.mortbay.jetty.handler.ContextHandler;
import javax.servlet.*; import javax.servlet.http.*; import org.mortbay.io.*; import org.mortbay.jetty.*; import org.mortbay.jetty.handler.*;
[ "javax.servlet", "org.mortbay.io", "org.mortbay.jetty" ]
javax.servlet; org.mortbay.io; org.mortbay.jetty;
1,742,636
public void getComponentSize(String instanceId, String ref, String callback) { if (!isDomThread()) { throw new WXRuntimeException("getComponentSize operation must be done in dom thread"); } WXDomStatement statement = mDomRegistries.get(instanceId); if (statement == null) { Map<String, Obje...
void function(String instanceId, String ref, String callback) { if (!isDomThread()) { throw new WXRuntimeException(STR); } WXDomStatement statement = mDomRegistries.get(instanceId); if (statement == null) { Map<String, Object> options = new HashMap<>(); options.put(STR, false); options.put(STR, STR); WXSDKManager.getIn...
/** * Gets the coordinate information of the control * @param instanceId wxsdkinstance id * @param ref ref * @param callback callback */
Gets the coordinate information of the control
getComponentSize
{ "repo_name": "zhangquan/weex", "path": "android/sdk/src/main/java/com/taobao/weex/dom/WXDomManager.java", "license": "apache-2.0", "size": 25084 }
[ "com.taobao.weex.WXSDKManager", "com.taobao.weex.common.WXRuntimeException", "java.util.HashMap", "java.util.Map" ]
import com.taobao.weex.WXSDKManager; import com.taobao.weex.common.WXRuntimeException; import java.util.HashMap; import java.util.Map;
import com.taobao.weex.*; import com.taobao.weex.common.*; import java.util.*;
[ "com.taobao.weex", "java.util" ]
com.taobao.weex; java.util;
2,704,835
public void testAddObject() { buildWidgetTree(); ArrayList<ADLWidget> rootList = root.getObjects(); assertEquals("Test level 1 has only 2 widgets", rootList.size(), 2); // Inspect the first widget at level 1 ADLWidget level1_1 = rootList.get(0); assertTrue("Test type...
void function() { buildWidgetTree(); ArrayList<ADLWidget> rootList = root.getObjects(); assertEquals(STR, rootList.size(), 2); ADLWidget level1_1 = rootList.get(0); assertTrue(STR, level1_1.isType(STR)); assertEquals(STR + level1_1.getType(), level1_1.getObjectNr(), 1); ArrayList<ADLWidget> level1_1_List = level1_1.get...
/** * Test method for {@link org.csstudio.utility.adlparser.fileParser.ADLWidget#addObject(org.csstudio.utility.adlparser.fileParser.ADLWidget)}. */
Test method for <code>org.csstudio.utility.adlparser.fileParser.ADLWidget#addObject(org.csstudio.utility.adlparser.fileParser.ADLWidget)</code>
testAddObject
{ "repo_name": "ControlSystemStudio/cs-studio", "path": "applications/apputil/apputil-plugins/org.csstudio.utility.adlParser/test/org/csstudio/utility/adlparser/fileParser/ADLWidgetTest.java", "license": "epl-1.0", "size": 10462 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
739,475
@Nonnull public static String toSnakeCase(@Nonnull final String camelCase) { final StringBuilder res = new StringBuilder( camelCase.length() ); //skip leading and trailing whitespaces for ( final char c : camelCase.trim().toCharArray() ) { if( Character.isWhitespace( c)) { //whitespaces in the at...
static String function(@Nonnull final String camelCase) { final StringBuilder res = new StringBuilder( camelCase.length() ); for ( final char c : camelCase.trim().toCharArray() ) { if( Character.isWhitespace( c)) { throw new IllegalArgumentException(STR); } if ( Character.isUpperCase( c) ) { res.append( '_'); } res.app...
/** * Converts the String to snake_case to be used for column names * * @param camelCase * @return the String in snake_case * @since 0.8 */
Converts the String to snake_case to be used for column names
toSnakeCase
{ "repo_name": "doe300/jactiverecord", "path": "src/de/doe300/activerecord/record/attributes/Attributes.java", "license": "mit", "size": 9803 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,807,952
// **************** WAY OR POI IN TILE ***************** public static Set<TileCoordinate> mapWayToTiles(final TDWay way, final byte baseZoomLevel, final int enlargementInMeter) { if (way == null) { LOGGER.fine("way is null in mapping to tiles"); return Collections.emptySet(); } HashSet<TileCoordina...
static Set<TileCoordinate> function(final TDWay way, final byte baseZoomLevel, final int enlargementInMeter) { if (way == null) { LOGGER.fine(STR); return Collections.emptySet(); } HashSet<TileCoordinate> matchedTiles = new HashSet<TileCoordinate>(); Geometry wayGeometry = toJTSGeometry(way, !way.isForcePolygonLine());...
/** * Computes which tiles on the given base zoom level need to include the given way (which may be a polygon). * * @param way * the way that is mapped to tiles * @param baseZoomLevel * the base zoom level which is used in the mapping * @param enlargementInMeter * amoun...
Computes which tiles on the given base zoom level need to include the given way (which may be a polygon)
mapWayToTiles
{ "repo_name": "opensciencemap/VectorTileMap", "path": "map-writer-osmosis/src/main/java/org/mapsforge/map/writer/util/GeoUtils.java", "license": "gpl-3.0", "size": 19648 }
[ "com.vividsolutions.jts.geom.Geometry", "com.vividsolutions.jts.geom.TopologyException", "java.util.Collections", "java.util.HashSet", "java.util.Set", "java.util.logging.Level", "org.mapsforge.map.writer.model.TDWay", "org.mapsforge.map.writer.model.TileCoordinate" ]
import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.TopologyException; import java.util.Collections; import java.util.HashSet; import java.util.Set; import java.util.logging.Level; import org.mapsforge.map.writer.model.TDWay; import org.mapsforge.map.writer.model.TileCoordinate;
import com.vividsolutions.jts.geom.*; import java.util.*; import java.util.logging.*; import org.mapsforge.map.writer.model.*;
[ "com.vividsolutions.jts", "java.util", "org.mapsforge.map" ]
com.vividsolutions.jts; java.util; org.mapsforge.map;
2,464,117
private ICPageHome getICPageHome() { try { return (ICPageHome)IDOLookup.getHome(ICPage.class); } catch (IDOLookupException e) { throw new RuntimeException(e); } }
ICPageHome function() { try { return (ICPageHome)IDOLookup.getHome(ICPage.class); } catch (IDOLookupException e) { throw new RuntimeException(e); } }
/** * <p> * TODO tryggvil describe method getICPageHome * </p> * @return */
TODO tryggvil describe method getICPageHome
getICPageHome
{ "repo_name": "idega/com.idega.builder", "path": "src/java/com/idega/builder/business/BuilderLogic.java", "license": "gpl-3.0", "size": 145872 }
[ "com.idega.core.builder.data.ICPage", "com.idega.core.builder.data.ICPageHome", "com.idega.data.IDOLookup", "com.idega.data.IDOLookupException" ]
import com.idega.core.builder.data.ICPage; import com.idega.core.builder.data.ICPageHome; import com.idega.data.IDOLookup; import com.idega.data.IDOLookupException;
import com.idega.core.builder.data.*; import com.idega.data.*;
[ "com.idega.core", "com.idega.data" ]
com.idega.core; com.idega.data;
703,975
@MediumTest public void testWindowOpen() throws Exception { Intent lastIntent = performNewWindowTest(ONCLICK_LINK, "window.open page", true); assertEquals("URL is not in the Intent", URL_4, IntentHandler.getUrlFromIntent(lastIntent)); }
void function() throws Exception { Intent lastIntent = performNewWindowTest(ONCLICK_LINK, STR, true); assertEquals(STR, URL_4, IntentHandler.getUrlFromIntent(lastIntent)); }
/** * Tests that tabs opened via window.open() load properly and with the URL in the Intent. * Tabs opened this way have their WebContents paused while the new Activity that will host * the WebContents starts asynchronously. */
Tests that tabs opened via window.open() load properly and with the URL in the Intent. Tabs opened this way have their WebContents paused while the new Activity that will host the WebContents starts asynchronously
testWindowOpen
{ "repo_name": "vadimtk/chrome4sdp", "path": "chrome/android/javatests/src/org/chromium/chrome/browser/document/DocumentModeTest.java", "license": "bsd-3-clause", "size": 29082 }
[ "android.content.Intent", "org.chromium.chrome.browser.IntentHandler" ]
import android.content.Intent; import org.chromium.chrome.browser.IntentHandler;
import android.content.*; import org.chromium.chrome.browser.*;
[ "android.content", "org.chromium.chrome" ]
android.content; org.chromium.chrome;
1,895,588
public DMLProgram doParse(String fileName, String dmlScript, String sourceNamespace, Map<String,String> argVals) { DMLProgram dmlPgm = null; ANTLRInputStream in; try { if(dmlScript == null) { dmlScript = readDMLScript(fileName, LOG); } InputStream stream = new ByteArrayInputStream(dmlScript...
DMLProgram function(String fileName, String dmlScript, String sourceNamespace, Map<String,String> argVals) { DMLProgram dmlPgm = null; ANTLRInputStream in; try { if(dmlScript == null) { dmlScript = readDMLScript(fileName, LOG); } InputStream stream = new ByteArrayInputStream(dmlScript.getBytes()); in = new org.antlr.v4...
/** * This function is supposed to be called directly only from PydmlSyntacticValidator when it encounters 'import' * @param fileName script file name * @param dmlScript script file contents * @param sourceNamespace namespace from source statement * @param argVals script arguments * @return dml program, or ...
This function is supposed to be called directly only from PydmlSyntacticValidator when it encounters 'import'
doParse
{ "repo_name": "deroneriksson/systemml", "path": "src/main/java/org/apache/sysml/parser/pydml/PyDMLParserWrapper.java", "license": "apache-2.0", "size": 9542 }
[ "java.io.ByteArrayInputStream", "java.io.FileNotFoundException", "java.io.IOException", "java.io.InputStream", "java.util.Map", "org.antlr.v4.runtime.ANTLRInputStream", "org.antlr.v4.runtime.BailErrorStrategy", "org.antlr.v4.runtime.CommonTokenStream", "org.antlr.v4.runtime.DefaultErrorStrategy", ...
import java.io.ByteArrayInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.util.Map; import org.antlr.v4.runtime.ANTLRInputStream; import org.antlr.v4.runtime.BailErrorStrategy; import org.antlr.v4.runtime.CommonTokenStream; import org.antlr.v4.runtime...
import java.io.*; import java.util.*; import org.antlr.v4.runtime.*; import org.antlr.v4.runtime.atn.*; import org.antlr.v4.runtime.misc.*; import org.antlr.v4.runtime.tree.*; import org.apache.sysml.parser.*; import org.apache.sysml.parser.common.*; import org.apache.sysml.parser.pydml.*;
[ "java.io", "java.util", "org.antlr.v4", "org.apache.sysml" ]
java.io; java.util; org.antlr.v4; org.apache.sysml;
534,370
private Patch filter(final Patch diff) { final Patch patch = new Patch(); for (final Delta delta : diff.getDeltas()) { final List<?> prev = delta.getOriginal().getLines(); if ( prev.size() != 1 || delta.getRevised().getLines().size() != 1 |...
Patch function(final Patch diff) { final Patch patch = new Patch(); for (final Delta delta : diff.getDeltas()) { final List<?> prev = delta.getOriginal().getLines(); if ( prev.size() != 1 delta.getRevised().getLines().size() != 1 !XmlValidator.ATTRS_PATTERN .matcher(prev.get(0).toString()).matches() ) { patch.addDelta(...
/** * Remove unwanted deltas. * @param diff Patch to filter. * @return Patch with unwanted deltas removed. * @todo #469:30min Remove the method below and find a way to format tags * correctly in XML. Attributes should be indented by 4 spaces, just like * XML tags, but in IT xml-violation...
Remove unwanted deltas
filter
{ "repo_name": "carlosmiranda/qulice", "path": "qulice-xml/src/main/java/com/qulice/xml/XmlValidator.java", "license": "bsd-3-clause", "size": 7353 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,591,669
static public OutputStream createInputFile(MiniCluster cluster, String fileName) throws IOException { FileSystem fs = cluster.getFileSystem(); if (fs.exists(new Path(fileName))) { throw new IOException("File " + fileName + " already exists on the miniclust...
static OutputStream function(MiniCluster cluster, String fileName) throws IOException { FileSystem fs = cluster.getFileSystem(); if (fs.exists(new Path(fileName))) { throw new IOException(STR + fileName + STR); } return fs.create(new Path(fileName)); }
/** * Helper to create a dfs file on the MiniCluster dfs. This returns an * outputstream that can be used in test cases to write data. * * @param cluster * reference to the MiniCluster where the file should be created * @param fileName * pathname of the file to ...
Helper to create a dfs file on the MiniCluster dfs. This returns an outputstream that can be used in test cases to write data
createInputFile
{ "repo_name": "simplegeo/hadoop-pig", "path": "test/org/apache/pig/test/Util.java", "license": "apache-2.0", "size": 30207 }
[ "java.io.IOException", "java.io.OutputStream", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import java.io.OutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,206,221
public static MetadataRepo create(@NonNull final Typeface typeface, @NonNull final ByteBuffer byteBuffer) throws IOException { return new MetadataRepo(typeface, MetadataListReader.read(byteBuffer)); }
static MetadataRepo function(@NonNull final Typeface typeface, @NonNull final ByteBuffer byteBuffer) throws IOException { return new MetadataRepo(typeface, MetadataListReader.read(byteBuffer)); }
/** * Construct MetadataRepo from a byte buffer. The position of the ByteBuffer will change, it is * caller's responsibility to reposition the buffer if required. * * @param typeface Typeface to be used to render emojis * @param byteBuffer ByteBuffer to read emoji metadata from */
Construct MetadataRepo from a byte buffer. The position of the ByteBuffer will change, it is caller's responsibility to reposition the buffer if required
create
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "emoji/core/src/main/java/androidx/emoji/text/MetadataRepo.java", "license": "apache-2.0", "size": 7427 }
[ "android.graphics.Typeface", "androidx.annotation.NonNull", "java.io.IOException", "java.nio.ByteBuffer" ]
import android.graphics.Typeface; import androidx.annotation.NonNull; import java.io.IOException; import java.nio.ByteBuffer;
import android.graphics.*; import androidx.annotation.*; import java.io.*; import java.nio.*;
[ "android.graphics", "androidx.annotation", "java.io", "java.nio" ]
android.graphics; androidx.annotation; java.io; java.nio;
512,325
private String readLine() throws IOException { StringBuilder sb = new StringBuilder(); int c; while ((c = ctrlInput.read()) != '\n') { sb.append((char) c); } return sb.toString(); }
String function() throws IOException { StringBuilder sb = new StringBuilder(); int c; while ((c = ctrlInput.read()) != '\n') { sb.append((char) c); } return sb.toString(); }
/** * Read a line of text and return it for possible parsing */
Read a line of text and return it for possible parsing
readLine
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "libcore/luni/src/main/java/libcore/net/url/FtpURLConnection.java", "license": "gpl-3.0", "size": 15458 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,422,065
Client getLockedBy(); // ---------------------------------------------------------------------// // SET //----------------------------------------------------------------------//
Client getLockedBy();
/** * Returns the client who has locked the node. * * @return the client who has locked the node, or {@code null} if the node is not locked. */
Returns the client who has locked the node
getLockedBy
{ "repo_name": "ShatalovYaroslav/scheduling", "path": "rm/rm-server/src/main/java/org/ow2/proactive/resourcemanager/rmnode/RMNode.java", "license": "agpl-3.0", "size": 10529 }
[ "org.ow2.proactive.resourcemanager.authentication.Client" ]
import org.ow2.proactive.resourcemanager.authentication.Client;
import org.ow2.proactive.resourcemanager.authentication.*;
[ "org.ow2.proactive" ]
org.ow2.proactive;
2,523,394
ServiceFuture<List<StorageAccountInfo>> listByAccountNextAsync(final String nextPageLink, final ServiceFuture<List<StorageAccountInfo>> serviceFuture, final ListOperationCallback<StorageAccountInfo> serviceCallback);
ServiceFuture<List<StorageAccountInfo>> listByAccountNextAsync(final String nextPageLink, final ServiceFuture<List<StorageAccountInfo>> serviceFuture, final ListOperationCallback<StorageAccountInfo> serviceCallback);
/** * Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture ...
Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any
listByAccountNextAsync
{ "repo_name": "martinsawicki/azure-sdk-for-java", "path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/StorageAccounts.java", "license": "mit", "size": 47488 }
[ "com.microsoft.azure.ListOperationCallback", "com.microsoft.azure.management.datalake.analytics.models.StorageAccountInfo", "com.microsoft.rest.ServiceFuture", "java.util.List" ]
import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.datalake.analytics.models.StorageAccountInfo; import com.microsoft.rest.ServiceFuture; import java.util.List;
import com.microsoft.azure.*; import com.microsoft.azure.management.datalake.analytics.models.*; import com.microsoft.rest.*; import java.util.*;
[ "com.microsoft.azure", "com.microsoft.rest", "java.util" ]
com.microsoft.azure; com.microsoft.rest; java.util;
2,006,636
public void moveEntry(String newDN) throws LDAPException { this.moveEntry(this.baseDN, newDN); }
void function(String newDN) throws LDAPException { this.moveEntry(this.baseDN, newDN); }
/** * Moves the current entry to a new location in the tree. Does only work on * leaf entries and the parent DN (container) of the destination has to * exist. * * @param newDN * Distinctive Name (DN) of the destination * @throws LDAPException */
Moves the current entry to a new location in the tree. Does only work on leaf entries and the parent DN (container) of the destination has to exist
moveEntry
{ "repo_name": "ebner/collaborilla", "path": "src/se/kth/nada/kmr/collaborilla/ldap/LDAPObject.java", "license": "lgpl-2.1", "size": 26630 }
[ "com.novell.ldap.LDAPException" ]
import com.novell.ldap.LDAPException;
import com.novell.ldap.*;
[ "com.novell.ldap" ]
com.novell.ldap;
2,210,178
public static <E> void saveCounter(Counter<E> c, String filename) throws IOException { FileOutputStream fos = new FileOutputStream(filename); saveCounter(c, fos); fos.close(); }
static <E> void function(Counter<E> c, String filename) throws IOException { FileOutputStream fos = new FileOutputStream(filename); saveCounter(c, fos); fos.close(); }
/** * Saves a Counter to a text file. Counter written as one key/count pair per * line, separated by whitespace. */
Saves a Counter to a text file. Counter written as one key/count pair per line, separated by whitespace
saveCounter
{ "repo_name": "codev777/CoreNLP", "path": "src/edu/stanford/nlp/stats/Counters.java", "license": "gpl-2.0", "size": 100293 }
[ "java.io.FileOutputStream", "java.io.IOException" ]
import java.io.FileOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
549,046
@Override public void delete(Serializable id) { this.delete(this.get(id)); }
void function(Serializable id) { this.delete(this.get(id)); }
/** * Deletes the request capabilities identified by its primary key, including * all matches with rig capabilities. * * @param id primary key of request capabilities to delete */
Deletes the request capabilities identified by its primary key, including all matches with rig capabilities
delete
{ "repo_name": "sahara-labs/scheduling-server", "path": "DataAccess/src/au/edu/uts/eng/remotelabs/schedserver/dataaccess/dao/RequestCapabilitiesDao.java", "license": "bsd-3-clause", "size": 6711 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
1,212,950
private boolean isEquivalentTo_recursive( TypeDefinition other, Set< String > recursiveTypeChecked ) { return cardinality.equals( other.cardinality ) && checkTypeEqualness( this, other, recursiveTypeChecked ); }
boolean function( TypeDefinition other, Set< String > recursiveTypeChecked ) { return cardinality.equals( other.cardinality ) && checkTypeEqualness( this, other, recursiveTypeChecked ); }
/** * introduced for checking also recursive type equalness * @author Claudio Guidi */
introduced for checking also recursive type equalness
isEquivalentTo_recursive
{ "repo_name": "agwe/jolie", "path": "libjolie/src/jolie/lang/parse/ast/types/TypeDefinition.java", "license": "lgpl-2.1", "size": 9492 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
958,229
public Optional<String> getJr() { return Optional.ofNullable(jrPart); }
Optional<String> function() { return Optional.ofNullable(jrPart); }
/** * Returns the junior part of the author's name stored in this object * ("Jr"). * * @return junior part of the author's name (may consist of several * tokens) or null if the author does not have a Jr. Part */
Returns the junior part of the author's name stored in this object ("Jr")
getJr
{ "repo_name": "Mr-DLib/jabref", "path": "src/main/java/net/sf/jabref/model/entry/Author.java", "license": "mit", "size": 13431 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
899,760
private static boolean hasSkipAnnotation(Class<?> clazz){ return clazz != null && clazz.getAnnotation(SkipParsing.class) != null; }
static boolean function(Class<?> clazz){ return clazz != null && clazz.getAnnotation(SkipParsing.class) != null; }
/** * Returns true if the Annotation for skipping is present. * @param clazz to check * @return true if is present. */
Returns true if the Annotation for skipping is present
hasSkipAnnotation
{ "repo_name": "SmaSTra/SmaSTra", "path": "AndroidCodeSnippets/SmaSTraGenerator/src/main/java/de/tu_darmstadt/smastra/generator/datatype/EnumDataTypeParser.java", "license": "apache-2.0", "size": 1902 }
[ "de.tu_darmstadt.smastra.markers.SkipParsing" ]
import de.tu_darmstadt.smastra.markers.SkipParsing;
import de.tu_darmstadt.smastra.markers.*;
[ "de.tu_darmstadt.smastra" ]
de.tu_darmstadt.smastra;
83,593
public String getString(int id) { if(config.commandLogging){ Log.d(config.commandLoggingTag, "getString("+id+")"); } return getter.getString(id); }
String function(int id) { if(config.commandLogging){ Log.d(config.commandLoggingTag, STR+id+")"); } return getter.getString(id); }
/** * Returns a localized String matching the specified resource id. * * @param id the R.id of the String * @return the localized String */
Returns a localized String matching the specified resource id
getString
{ "repo_name": "darker50/robotium", "path": "robotium-solo/src/main/java/com/robotium/solo/Solo.java", "license": "apache-2.0", "size": 124742 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,972,561
public static int getJoinStatus(String computerName) { PointerByReference lpNameBuffer = new PointerByReference(); IntByReference bufferType = new IntByReference(); try { int rc = Netapi32.INSTANCE.NetGetJoinInformation(computerName, lpNameBuffer, bufferType); if (...
static int function(String computerName) { PointerByReference lpNameBuffer = new PointerByReference(); IntByReference bufferType = new IntByReference(); try { int rc = Netapi32.INSTANCE.NetGetJoinInformation(computerName, lpNameBuffer, bufferType); if (LMErr.NERR_Success != rc) { throw new Win32Exception(rc); } return ...
/** * Return the domain/workgroup join status for a computer. * @param computerName Computer name. * @return Join status. */
Return the domain/workgroup join status for a computer
getJoinStatus
{ "repo_name": "pombredanne/jna", "path": "contrib/platform/src/com/sun/jna/platform/win32/Netapi32Util.java", "license": "lgpl-2.1", "size": 25190 }
[ "com.sun.jna.ptr.IntByReference", "com.sun.jna.ptr.PointerByReference" ]
import com.sun.jna.ptr.IntByReference; import com.sun.jna.ptr.PointerByReference;
import com.sun.jna.ptr.*;
[ "com.sun.jna" ]
com.sun.jna;
363,067
protected void _drawResources(Graphics2D gphx, Game game, Rectangle r) { int numResources = resources.size(); double barheight = r.getHeight() / 3.5f / numResources; double offset = r.getMinY() + 2*r.height / 3.0f; Set<Map.Entry<Integer, Integer>> entries = resources.entrySet();...
void function(Graphics2D gphx, Game game, Rectangle r) { int numResources = resources.size(); double barheight = r.getHeight() / 3.5f / numResources; double offset = r.getMinY() + 2*r.height / 3.0f; Set<Map.Entry<Integer, Integer>> entries = resources.entrySet(); for(Map.Entry<Integer, Integer> entry : entries) { int r...
/** * Draws the resources hold by this sprite, as an horizontal bar on top of the sprite. * @param gphx graphics to draw in. * @param game game being played at the moment. */
Draws the resources hold by this sprite, as an horizontal bar on top of the sprite
_drawResources
{ "repo_name": "tohahn/UE_ML", "path": "UE06/gvgai/src/core/VGDLSprite.java", "license": "gpl-3.0", "size": 32756 }
[ "java.awt.Graphics2D", "java.awt.Rectangle", "java.util.Map", "java.util.Set" ]
import java.awt.Graphics2D; import java.awt.Rectangle; import java.util.Map; import java.util.Set;
import java.awt.*; import java.util.*;
[ "java.awt", "java.util" ]
java.awt; java.util;
870,540
@Test public void checkFeaturesSearchByParentId() throws InvalidProtocolBufferException, UnirestException, GAWrapperException { final long start = 0; final long end = 100000000; final int expectedNumberOfFeatures = 50; final String id = Utils.getFeatureSetId(client); //...
void function() throws InvalidProtocolBufferException, UnirestException, GAWrapperException { final long start = 0; final long end = 100000000; final int expectedNumberOfFeatures = 50; final String id = Utils.getFeatureSetId(client); final String parentId1 = STRtranscript"; final SearchFeaturesRequest fReq1 = SearchFea...
/** * Check that the features returned from a search by parentId return as expected. * * @throws GAWrapperException if the server finds the request invalid in some way * @throws UnirestException if there's a problem speaking HTTP to the server * @throws InvalidProtocolBufferException if there's...
Check that the features returned from a search by parentId return as expected
checkFeaturesSearchByParentId
{ "repo_name": "macieksmuga/compliance", "path": "cts-java/src/test/java/org/ga4gh/cts/api/sequenceAnnotations/FeaturesSearchIT.java", "license": "apache-2.0", "size": 6763 }
[ "com.google.protobuf.InvalidProtocolBufferException", "com.mashape.unirest.http.exceptions.UnirestException", "java.util.List", "org.assertj.core.api.Assertions", "org.ga4gh.ctk.transport.GAWrapperException", "org.ga4gh.cts.api.TestData", "org.ga4gh.cts.api.Utils" ]
import com.google.protobuf.InvalidProtocolBufferException; import com.mashape.unirest.http.exceptions.UnirestException; import java.util.List; import org.assertj.core.api.Assertions; import org.ga4gh.ctk.transport.GAWrapperException; import org.ga4gh.cts.api.TestData; import org.ga4gh.cts.api.Utils;
import com.google.protobuf.*; import com.mashape.unirest.http.exceptions.*; import java.util.*; import org.assertj.core.api.*; import org.ga4gh.ctk.transport.*; import org.ga4gh.cts.api.*;
[ "com.google.protobuf", "com.mashape.unirest", "java.util", "org.assertj.core", "org.ga4gh.ctk", "org.ga4gh.cts" ]
com.google.protobuf; com.mashape.unirest; java.util; org.assertj.core; org.ga4gh.ctk; org.ga4gh.cts;
27,297
public static void validateCnn3DKernelStridePadding(int[] kernelSize, int[] stride, int[] padding) { if (kernelSize == null || kernelSize.length != 3) { throw new IllegalStateException("Invalid kernel size: expected int[] of length 3, got " + (kernelSize == null ? null : Arra...
static void function(int[] kernelSize, int[] stride, int[] padding) { if (kernelSize == null kernelSize.length != 3) { throw new IllegalStateException(STR + (kernelSize == null ? null : Arrays.toString(kernelSize))); } if (stride == null stride.length != 3) { throw new IllegalStateException(STR + (stride == null ? null...
/** * Perform validation on the CNN3D layer kernel/stride/padding. Expect 3d int[], with values > 0 for kernel size and * stride, and values >= 0 for padding. * * @param kernelSize Kernel size array to check * @param stride Stride array to check * @param padding Padding array to che...
Perform validation on the CNN3D layer kernel/stride/padding. Expect 3d int[], with values > 0 for kernel size and stride, and values >= 0 for padding
validateCnn3DKernelStridePadding
{ "repo_name": "deeplearning4j/deeplearning4j", "path": "deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/util/Convolution3DUtils.java", "license": "apache-2.0", "size": 10743 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,634,141
public void createEntry(String key, Serializable value, boolean override) { shouldBeInit(); try { writeLock.lock(); if (!override) { shouldBeUnique(key); } beginTransaction(); executionData.put(key, value); commi...
void function(String key, Serializable value, boolean override) { shouldBeInit(); try { writeLock.lock(); if (!override) { shouldBeUnique(key); } beginTransaction(); executionData.put(key, value); commitTransaction(); } catch (Exception ex) { throw new ExecutionManagerException(ex); } finally { writeLock.unlock(); } }
/** * Create an entry. * * @param key The key. * @param value The value associated with a key. * @param override Whether the value should be override. */
Create an entry
createEntry
{ "repo_name": "ccaballe/crossdata", "path": "crossdata-core/src/main/java/com/stratio/crossdata/core/execution/ExecutionManager.java", "license": "apache-2.0", "size": 7566 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
420,215
@Override protected boolean useTeleportScroll(final Player player) { // init as home_scroll StendhalRPZone zone = SingletonRepository.getRPWorld().getZone("0_semos_city"); int x = 30; int y = 40; final String infostring = getInfoString(); if (infostring != null) { final StringTokenizer st = new ...
boolean function(final Player player) { StendhalRPZone zone = SingletonRepository.getRPWorld().getZone(STR); int x = 30; int y = 40; final String infostring = getInfoString(); if (infostring != null) { final StringTokenizer st = new StringTokenizer(infostring); if (st.countTokens() == 3) { final String zoneName = st.ne...
/** * Is invoked when a teleporting scroll is used. Tries to put the player on * the scroll's destination, or near it. * * @param player * The player who used the scroll and who will be teleported * @return true iff teleport was successful */
Is invoked when a teleporting scroll is used. Tries to put the player on the scroll's destination, or near it
useTeleportScroll
{ "repo_name": "acsid/stendhal", "path": "src/games/stendhal/server/entity/item/scroll/MarkedScroll.java", "license": "gpl-2.0", "size": 4231 }
[ "games.stendhal.server.core.engine.SingletonRepository", "games.stendhal.server.core.engine.StendhalRPZone", "games.stendhal.server.core.events.TeleportNotifier", "games.stendhal.server.entity.player.Player", "java.util.StringTokenizer" ]
import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.core.engine.StendhalRPZone; import games.stendhal.server.core.events.TeleportNotifier; import games.stendhal.server.entity.player.Player; import java.util.StringTokenizer;
import games.stendhal.server.core.engine.*; import games.stendhal.server.core.events.*; import games.stendhal.server.entity.player.*; import java.util.*;
[ "games.stendhal.server", "java.util" ]
games.stendhal.server; java.util;
1,064,299
public GHCommitStatus getLastStatus() throws IOException { return owner.getLastCommitStatus(sha); }
GHCommitStatus function() throws IOException { return owner.getLastCommitStatus(sha); }
/** * Gets the last status of this commit, which is what gets shown in the UI. */
Gets the last status of this commit, which is what gets shown in the UI
getLastStatus
{ "repo_name": "pomes/github-api", "path": "src/main/java/org/kohsuke/github/GHCommit.java", "license": "mit", "size": 9623 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,267,030
private List<CmsResource> getDetailContainerResources(CmsObject cms, CmsResource res) throws CmsException { CmsRelationFilter filter = CmsRelationFilter.relationsFromStructureId(res.getStructureId()).filterType( CmsRelationType.DETAIL_ONLY); List<CmsResource> result = Lists.newArrayList...
List<CmsResource> function(CmsObject cms, CmsResource res) throws CmsException { CmsRelationFilter filter = CmsRelationFilter.relationsFromStructureId(res.getStructureId()).filterType( CmsRelationType.DETAIL_ONLY); List<CmsResource> result = Lists.newArrayList(); List<CmsRelation> relations = cms.readRelations(filter);...
/** * Reads the detail container resources which are connected by relations to the given resource. * * @param cms the current CMS context * @param res the detail content * * @return the list of detail only container resources * * @throws CmsException if something goes wrong ...
Reads the detail container resources which are connected by relations to the given resource
getDetailContainerResources
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/file/types/CmsResourceTypeXmlContent.java", "license": "lgpl-2.1", "size": 32155 }
[ "com.google.common.collect.Lists", "java.util.List", "org.opencms.file.CmsObject", "org.opencms.file.CmsResource", "org.opencms.file.CmsResourceFilter", "org.opencms.main.CmsException", "org.opencms.relations.CmsRelation", "org.opencms.relations.CmsRelationFilter", "org.opencms.relations.CmsRelation...
import com.google.common.collect.Lists; import java.util.List; import org.opencms.file.CmsObject; import org.opencms.file.CmsResource; import org.opencms.file.CmsResourceFilter; import org.opencms.main.CmsException; import org.opencms.relations.CmsRelation; import org.opencms.relations.CmsRelationFilter; import org.ope...
import com.google.common.collect.*; import java.util.*; import org.opencms.file.*; import org.opencms.main.*; import org.opencms.relations.*;
[ "com.google.common", "java.util", "org.opencms.file", "org.opencms.main", "org.opencms.relations" ]
com.google.common; java.util; org.opencms.file; org.opencms.main; org.opencms.relations;
390,674
private void processCombinationBomb(Entity b){ combination_button_state_t state; CollisionDetectionComponent collision; MarkerCodeComponent marker; BombGameEntityTypeComponent buttonType; // Get this wire's parameters. collision = collisionMapper.getSafe(b); marker = markerMapper.getSafe...
void function(Entity b){ combination_button_state_t state; CollisionDetectionComponent collision; MarkerCodeComponent marker; BombGameEntityTypeComponent buttonType; collision = collisionMapper.getSafe(b); marker = markerMapper.getSafe(b); buttonType = typeMapper.getSafe(b); if(marker == null collision == null buttonTy...
/** * <p>Checks if the current player interaction disables a combination bomb.</p> * * @param b An Artemis {@link Entity} that possibly represents any of a Combination Bomb's buttons. */
Checks if the current player interaction disables a combination bomb
processCombinationBomb
{ "repo_name": "sagge-miky/NxtAR-core", "path": "src/ve/ucv/ciens/ccg/nxtar/scenarios/bombgame/BombGameLogicSystem.java", "license": "apache-2.0", "size": 18891 }
[ "com.artemis.Entity", "com.badlogic.gdx.Gdx" ]
import com.artemis.Entity; import com.badlogic.gdx.Gdx;
import com.artemis.*; import com.badlogic.gdx.*;
[ "com.artemis", "com.badlogic.gdx" ]
com.artemis; com.badlogic.gdx;
2,700,521
private BufferedImage drawSymbolsToBI( HashMap<String, Object> map, BufferedImage bi, Color color ) { Graphics g = bi.getGraphics(); g.setColor( color ); g.fillRect( 0, 0, bi.getWidth(), bi.getHeight() ); String[] layers = (String[]) map.get( "NAMES" ); String[] titles = (S...
BufferedImage function( HashMap<String, Object> map, BufferedImage bi, Color color ) { Graphics g = bi.getGraphics(); g.setColor( color ); g.fillRect( 0, 0, bi.getWidth(), bi.getHeight() ); String[] layers = (String[]) map.get( "NAMES" ); String[] titles = (String[]) map.get( STR ); BufferedImage[] legs = (BufferedImag...
/** * Draws the given symbol to the given image * * @param map * Hashmap holding the properties of the legend * @param bi * image of the legend * @param color * color to fill the graphic * @return The drawn BufferedImage */
Draws the given symbol to the given image
drawSymbolsToBI
{ "repo_name": "lat-lon/deegree2-base", "path": "deegree2-core/src/main/java/org/deegree/portal/standard/wms/control/DynLegendListener.java", "license": "lgpl-2.1", "size": 33078 }
[ "java.awt.Color", "java.awt.Graphics", "java.awt.image.BufferedImage", "java.util.HashMap" ]
import java.awt.Color; import java.awt.Graphics; import java.awt.image.BufferedImage; import java.util.HashMap;
import java.awt.*; import java.awt.image.*; import java.util.*;
[ "java.awt", "java.util" ]
java.awt; java.util;
55,803
public void propagateActions( InternalWorkingMemory workingMemory ) { final PropagationQueueingNodeMemory memory = (PropagationQueueingNodeMemory) workingMemory.getNodeMemory( this ); // first we clear up the action queued flag memory.isQueued().compareAndSet( true, ...
void function( InternalWorkingMemory workingMemory ) { final PropagationQueueingNodeMemory memory = (PropagationQueueingNodeMemory) workingMemory.getNodeMemory( this ); memory.isQueued().compareAndSet( true, false ); Action next = memory.getNext(); for ( int counter = 0; next != null && counter < PROPAGATION_SLICE_LIMI...
/** * Propagate all queued actions (asserts and retracts). * <p/> * This method implementation is based on optimistic behavior to avoid the * use of locks. There may eventually be a minimum wasted effort, but overall * it will be better than paying for the lock's cost. * * @param work...
Propagate all queued actions (asserts and retracts). This method implementation is based on optimistic behavior to avoid the use of locks. There may eventually be a minimum wasted effort, but overall it will be better than paying for the lock's cost
propagateActions
{ "repo_name": "psiroky/drools", "path": "drools-core/src/main/java/org/drools/reteoo/PropagationQueuingNode.java", "license": "apache-2.0", "size": 23420 }
[ "org.drools.common.InternalWorkingMemory" ]
import org.drools.common.InternalWorkingMemory;
import org.drools.common.*;
[ "org.drools.common" ]
org.drools.common;
2,360,029
private void setAgeAndPhaseName(Calendar calendar, MoonPhase phase) { double julianDateEndOfDay = DateTimeUtils.endOfDayDateToJulianDate(calendar); double parentNewMoon = getPreviousPhase(calendar, julianDateEndOfDay, NEW_MOON); double age = Math.abs(parentNewMoon - julianDateEndOfDay); ...
void function(Calendar calendar, MoonPhase phase) { double julianDateEndOfDay = DateTimeUtils.endOfDayDateToJulianDate(calendar); double parentNewMoon = getPreviousPhase(calendar, julianDateEndOfDay, NEW_MOON); double age = Math.abs(parentNewMoon - julianDateEndOfDay); phase.setAge((int) age); int illumination = (int) ...
/** * Calculates the age and the current phase. */
Calculates the age and the current phase
setAgeAndPhaseName
{ "repo_name": "idserda/openhab", "path": "bundles/binding/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/calc/MoonCalc.java", "license": "epl-1.0", "size": 38104 }
[ "java.util.Calendar", "org.openhab.binding.astro.internal.model.MoonPhase", "org.openhab.binding.astro.internal.model.MoonPhaseName", "org.openhab.binding.astro.internal.util.DateTimeUtils" ]
import java.util.Calendar; import org.openhab.binding.astro.internal.model.MoonPhase; import org.openhab.binding.astro.internal.model.MoonPhaseName; import org.openhab.binding.astro.internal.util.DateTimeUtils;
import java.util.*; import org.openhab.binding.astro.internal.model.*; import org.openhab.binding.astro.internal.util.*;
[ "java.util", "org.openhab.binding" ]
java.util; org.openhab.binding;
2,105,263
public void offer(float value) { // update min/max if (value < min) { min = value; } if (value > max) { max = value; } // initial value if (binCount == 0) { positions[0] = value; bins[0] = 1; count++; binCount++; return; } final int in...
void function(float value) { if (value < min) { min = value; } if (value > max) { max = value; } if (binCount == 0) { positions[0] = value; bins[0] = 1; count++; binCount++; return; } final int index = Arrays.binarySearch(positions, 0, binCount, value); if (index >= 0) { bins[index] = (bins[index] & APPROX_FLAG_BIT) ((...
/** * Adds the given value to the histogram * * @param value the value to be added */
Adds the given value to the histogram
offer
{ "repo_name": "solimant/druid", "path": "extensions-core/histogram/src/main/java/io/druid/query/aggregation/histogram/ApproximateHistogram.java", "license": "apache-2.0", "size": 50055 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,040,479
public void startDocument() throws SAXException { if (delayedPrefixes != null) { delayedPrefixes.clear(); } state = STATE_OUTSIDE; curIndent = 0; if (isDeclarating() && w != null) { try { w.write("<?xml version=\"1.0\""); String enc = getEncoding(); if (enc != null) { w.write(" enc...
void function() throws SAXException { if (delayedPrefixes != null) { delayedPrefixes.clear(); } state = STATE_OUTSIDE; curIndent = 0; if (isDeclarating() && w != null) { try { w.write(STR1.0\STR encoding=\STR\STR?>STRFailed to write XML declaration: " + e.getMessage(), e); } } }
/** <p>Starts a document.</p> * @throws SAXException Not actually thrown, just for compliance to the interface specification. */
Starts a document
startDocument
{ "repo_name": "Overruler/retired-apache-sources", "path": "ws-commons-util-1.0.1/src/main/java/org/apache/ws/commons/serialize/XMLWriterImpl.java", "license": "apache-2.0", "size": 10730 }
[ "org.xml.sax.SAXException" ]
import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
1,689,771
public @AAFString String getNameFromValue( PropertyValue enumerationProperty) throws NullPointerException, IllegalPropertyValueException;
@AAFString String function( PropertyValue enumerationProperty) throws NullPointerException, IllegalPropertyValueException;
/** * <p>Returns the name associated with the given * property value, as defined by this * extendible enumeration type definition.</p> * * @param enumerationProperty Property value to lookup the name of. * @return Name of the enumeration element of the given extendible * enumeration property valu...
Returns the name associated with the given property value, as defined by this extendible enumeration type definition
getNameFromValue
{ "repo_name": "AMWA-TV/maj", "path": "src/main/java/tv/amwa/maj/meta/TypeDefinitionExtendibleEnumeration.java", "license": "apache-2.0", "size": 10831 }
[ "tv.amwa.maj.exception.IllegalPropertyValueException", "tv.amwa.maj.industry.PropertyValue", "tv.amwa.maj.misctype.AAFString" ]
import tv.amwa.maj.exception.IllegalPropertyValueException; import tv.amwa.maj.industry.PropertyValue; import tv.amwa.maj.misctype.AAFString;
import tv.amwa.maj.exception.*; import tv.amwa.maj.industry.*; import tv.amwa.maj.misctype.*;
[ "tv.amwa.maj" ]
tv.amwa.maj;
654,667
void writeManifestData(Document manifestDoc) throws DOMException { Node root = manifestDoc.getDocumentElement(); if (contentDOM != null) { Element contentNode = manifestDoc.createElement(OfficeConstants.TAG_MANIFEST_FILE); contentNode.setAttribute(OfficeConstants.ATTRIBUTE_...
void writeManifestData(Document manifestDoc) throws DOMException { Node root = manifestDoc.getDocumentElement(); if (contentDOM != null) { Element contentNode = manifestDoc.createElement(OfficeConstants.TAG_MANIFEST_FILE); contentNode.setAttribute(OfficeConstants.ATTRIBUTE_MANIFEST_FILE_TYPE, STR); contentNode.setAttri...
/** * Package private method that constructs the manifest.xml entries for this * embedded object. * * @param manifestDoc <code>Document</code> containing the manifest entries. */
Package private method that constructs the manifest.xml entries for this embedded object
writeManifestData
{ "repo_name": "qt-haiku/LibreOffice", "path": "xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedXMLObject.java", "license": "gpl-3.0", "size": 9601 }
[ "org.w3c.dom.DOMException", "org.w3c.dom.Document", "org.w3c.dom.Element", "org.w3c.dom.Node" ]
import org.w3c.dom.DOMException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,017,252
@Override public final void setReuseAddress(boolean on) throws SocketException { if (self == this) { super.setReuseAddress(on); } else { self.setReuseAddress(on); } }
final void function(boolean on) throws SocketException { if (self == this) { super.setReuseAddress(on); } else { self.setReuseAddress(on); } }
/** * Enable/disable SO_REUSEADDR. * @see java.net.Socket#setReuseAddress */
Enable/disable SO_REUSEADDR
setReuseAddress
{ "repo_name": "steffenmueller4/wolfssl-jsse-integration", "path": "src/main/java/edu/kit/aifb/eorg/wolfssl/BaseSSLSocketImpl.java", "license": "gpl-2.0", "size": 18408 }
[ "java.net.SocketException" ]
import java.net.SocketException;
import java.net.*;
[ "java.net" ]
java.net;
2,521,042
private void maybeUpdate(long now, Node node) { if (node == null) { log.debug("Give up sending metadata request since no node is available"); // mark the timestamp for no node available to connect this.lastNoNodeAvailableMs = now; retur...
void function(long now, Node node) { if (node == null) { log.debug(STR); this.lastNoNodeAvailableMs = now; return; } String nodeConnectionId = node.idString(); if (canSendRequest(nodeConnectionId)) { Set<String> topics = metadata.topics(); this.metadataFetchInProgress = true; ClientRequest metadataRequest = request(now...
/** * Add a metadata request to the list of sends if we can make one */
Add a metadata request to the list of sends if we can make one
maybeUpdate
{ "repo_name": "tattsun/kafka", "path": "clients/src/main/java/org/apache/kafka/clients/NetworkClient.java", "license": "apache-2.0", "size": 25225 }
[ "java.util.Set", "org.apache.kafka.common.Node" ]
import java.util.Set; import org.apache.kafka.common.Node;
import java.util.*; import org.apache.kafka.common.*;
[ "java.util", "org.apache.kafka" ]
java.util; org.apache.kafka;
161,018
private void observeActivityFinish(final Activity activity, @NonNull final String hostId) { final ActivityInstanceObserver observer = registerActivityObserver(activity); observer.startTracking(activity, hostId); }
void function(final Activity activity, @NonNull final String hostId) { final ActivityInstanceObserver observer = registerActivityObserver(activity); observer.startTracking(activity, hostId); }
/** * registers the {@link ActivityInstanceObserver.ActivityFinishListener} for the activity * * @param activity to listen for the finish event * @param hostId id to track the Activity across orientation changes */
registers the <code>ActivityInstanceObserver.ActivityFinishListener</code> for the activity
observeActivityFinish
{ "repo_name": "weiwenqiang/GitHub", "path": "MVP/RxJava2ToMVP/ThirtyInch-master/thirtyinch/src/main/java/net/grandcentrix/thirtyinch/internal/PresenterSavior.java", "license": "apache-2.0", "size": 10142 }
[ "android.app.Activity", "android.support.annotation.NonNull" ]
import android.app.Activity; import android.support.annotation.NonNull;
import android.app.*; import android.support.annotation.*;
[ "android.app", "android.support" ]
android.app; android.support;
331,744
private static void cacheBlocks(Configuration conf, CacheConfig cacheConfig, FileSystem fs, Path path, HFileContext cxt) throws IOException { FSDataInputStreamWrapper fsdis = new FSDataInputStreamWrapper(fs, path); long fileSize = fs.getFileStatus(path).getLen(); FixedFileTrailer trailer = Fix...
static void function(Configuration conf, CacheConfig cacheConfig, FileSystem fs, Path path, HFileContext cxt) throws IOException { FSDataInputStreamWrapper fsdis = new FSDataInputStreamWrapper(fs, path); long fileSize = fs.getFileStatus(path).getLen(); FixedFileTrailer trailer = FixedFileTrailer.readFromStream(fsdis.ge...
/** * Read all blocks from {@code path} to populate {@code blockCache}. */
Read all blocks from path to populate blockCache
cacheBlocks
{ "repo_name": "HubSpot/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestLazyDataBlockDecompression.java", "license": "apache-2.0", "size": 10927 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hbase.io.FSDataInputStreamWrapper", "org.apache.hbase.thirdparty.com.google.common.collect.Iterables" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.io.FSDataInputStreamWrapper; import org.apache.hbase.thirdparty.com.google.common.collect.I...
import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.io.*; import org.apache.hbase.thirdparty.com.google.common.collect.*;
[ "java.io", "java.util", "org.apache.hadoop", "org.apache.hbase" ]
java.io; java.util; org.apache.hadoop; org.apache.hbase;
433,956
public final Future<InetAddress> resolve(String inetHost, Iterable<DnsRecord> additionals) { return resolve(inetHost, additionals, executor().<InetAddress>newPromise()); }
final Future<InetAddress> function(String inetHost, Iterable<DnsRecord> additionals) { return resolve(inetHost, additionals, executor().<InetAddress>newPromise()); }
/** * Resolves the specified name into an address. * * @param inetHost the name to resolve * @param additionals additional records ({@code OPT}) * * @return the address as the result of the resolution */
Resolves the specified name into an address
resolve
{ "repo_name": "Spikhalskiy/netty", "path": "resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolver.java", "license": "apache-2.0", "size": 67724 }
[ "io.netty.handler.codec.dns.DnsRecord", "io.netty.util.concurrent.Future", "java.net.InetAddress" ]
import io.netty.handler.codec.dns.DnsRecord; import io.netty.util.concurrent.Future; import java.net.InetAddress;
import io.netty.handler.codec.dns.*; import io.netty.util.concurrent.*; import java.net.*;
[ "io.netty.handler", "io.netty.util", "java.net" ]
io.netty.handler; io.netty.util; java.net;
904,379
public List<TestCaseDO> getTestCases() { EntityManager manager = EntityManagerFactoryInstance.getInstance() .createEntityManager(); manager.getTransaction().begin(); List<TestCaseDO> testCases = manager.createQuery("from TestCaseDO", TestCaseDO.class).getResultList(); manager.getTransaction().commi...
List<TestCaseDO> function() { EntityManager manager = EntityManagerFactoryInstance.getInstance() .createEntityManager(); manager.getTransaction().begin(); List<TestCaseDO> testCases = manager.createQuery(STR, TestCaseDO.class).getResultList(); manager.getTransaction().commit(); manager.close(); return testCases; }
/** * Get all test cases. * * @return */
Get all test cases
getTestCases
{ "repo_name": "epri-dev/PT2", "path": "src/main/java/org/epri/pt2/controller/TestCaseController.java", "license": "bsd-3-clause", "size": 7845 }
[ "java.util.List", "javax.persistence.EntityManager", "org.epri.pt2.DO" ]
import java.util.List; import javax.persistence.EntityManager; import org.epri.pt2.DO;
import java.util.*; import javax.persistence.*; import org.epri.pt2.*;
[ "java.util", "javax.persistence", "org.epri.pt2" ]
java.util; javax.persistence; org.epri.pt2;
1,662,017
@Override public Object invoke( final Object proxy, Method method, Object[] args ) throws Throwable { try { Object o = method.invoke( driver, args ); if ( o instanceof Connection ) { // Intercept the Connection object so we can proxy that too return Proxy.newP...
Object function( final Object proxy, Method method, Object[] args ) throws Throwable { try { Object o = method.invoke( driver, args ); if ( o instanceof Connection ) { return Proxy.newProxyInstance( o.getClass().getClassLoader(), new Class[]{Connection.class}, new ConnectionInvocationHandler( (Connection) o ) ); } else...
/** * Intercepts methods called on the Driver to possibly perform alternate processing. * * @param proxy the proxy object * @param method the method being invoked * @param args the arguments to the method * @return the object returned by whatever processing takes place * @th...
Intercepts methods called on the Driver to possibly perform alternate processing
invoke
{ "repo_name": "mattyb149/pdi-drill-jdbc", "path": "src/main/java/org/pentaho/di/plugins/database/drill/DriverProxyInvocationChain.java", "license": "apache-2.0", "size": 27115 }
[ "java.lang.reflect.InvocationHandler", "java.lang.reflect.InvocationTargetException", "java.lang.reflect.Method", "java.lang.reflect.Proxy", "java.sql.Connection" ]
import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.sql.Connection;
import java.lang.reflect.*; import java.sql.*;
[ "java.lang", "java.sql" ]
java.lang; java.sql;
512,128
private void showWhatsNew() { if(! this.update.isHasNewVersion()) { System.out.println("You are already using the newest Version!"); System.out.println(CMD.LINE_CMD); } else if(Desktop.isDesktopSupported()) { Desktop desktop = Desktop.getDesktop(); if(desktop.isSupported(Desktop.Action.BROWSE)) { ...
void function() { if(! this.update.isHasNewVersion()) { System.out.println(STR); System.out.println(CMD.LINE_CMD); } else if(Desktop.isDesktopSupported()) { Desktop desktop = Desktop.getDesktop(); if(desktop.isSupported(Desktop.Action.BROWSE)) { try { URI uri = new URI(this.update.getWhatsNewUrl().toString()); desktop....
/** * Opens the Link in whats new */
Opens the Link in whats new
showWhatsNew
{ "repo_name": "Petschko/Java-RPG-Maker-MV-Decrypter", "path": "src/main/java/org/petschko/rpgmakermv/decrypt/cmd/Update.java", "license": "mit", "size": 4565 }
[ "java.awt.Desktop", "java.io.IOException", "java.net.URISyntaxException", "org.petschko.rpgmakermv.decrypt.App" ]
import java.awt.Desktop; import java.io.IOException; import java.net.URISyntaxException; import org.petschko.rpgmakermv.decrypt.App;
import java.awt.*; import java.io.*; import java.net.*; import org.petschko.rpgmakermv.decrypt.*;
[ "java.awt", "java.io", "java.net", "org.petschko.rpgmakermv" ]
java.awt; java.io; java.net; org.petschko.rpgmakermv;
797,616
public List<IControllerListener> getListenerClasses() { return listenerClasses; }
List<IControllerListener> function() { return listenerClasses; }
/** * Return a list containing the listeners associated to controller. * * @return List<IControllerListener> */
Return a list containing the listeners associated to controller
getListenerClasses
{ "repo_name": "Esleelkartea/aon-employee", "path": "aonemployee_v2.3.0_src/paquetes descomprimidos/aon.ui.form-2.0.4-sources/com/code/aon/ui/form/BasicController.java", "license": "gpl-2.0", "size": 30641 }
[ "com.code.aon.ui.form.event.IControllerListener", "java.util.List" ]
import com.code.aon.ui.form.event.IControllerListener; import java.util.List;
import com.code.aon.ui.form.event.*; import java.util.*;
[ "com.code.aon", "java.util" ]
com.code.aon; java.util;
2,670,557
logger.debug("Creating command message APPLICATION_BUSY version 1"); ByteArrayOutputStream outputData = new ByteArrayOutputStream(); outputData.write(COMMAND_CLASS_KEY); outputData.write(APPLICATION_BUSY); // Process 'Status' boolean foundStatus = false; for (Integer en...
logger.debug(STR); ByteArrayOutputStream outputData = new ByteArrayOutputStream(); outputData.write(COMMAND_CLASS_KEY); outputData.write(APPLICATION_BUSY); boolean foundStatus = false; for (Integer entry : constantApplicationBusyStatus.keySet()) { if (constantApplicationBusyStatus.get(entry).equals(status)) { outputDat...
/** * Creates a new message with the APPLICATION_BUSY command. * <p> * Application Busy * * @param status {@link String} * Can be one of the following -: * <p> * <ul> * <li>TRY_AGAIN_LATER * <li>TRY_AGAIN_IN_WAIT_TI...
Creates a new message with the APPLICATION_BUSY command. Application Busy
getApplicationBusy
{ "repo_name": "zsmartsystems/com.zsmartsystems.zwave", "path": "com.zsmartsystems.zwave/src/main/java/com/zsmartsystems/zwave/commandclass/impl/CommandClassApplicationStatusV1.java", "license": "epl-1.0", "size": 6052 }
[ "java.io.ByteArrayOutputStream", "java.util.Map" ]
import java.io.ByteArrayOutputStream; import java.util.Map;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
290,328
// /wow/v2/?a=get_difficulty public String getDifficulty() { String result = this.doRequest("&a=get_difficulty"); if(result == null) return null; try { JSONParser parser = new JSONParser(); JSONObject object = (JSONObject) parser.parse(result); JSONObject data = (JSONObject) object.get("data");...
String function() { String result = this.doRequest(STR); if(result == null) return null; try { JSONParser parser = new JSONParser(); JSONObject object = (JSONObject) parser.parse(result); JSONObject data = (JSONObject) object.get("data"); return String.valueOf(data.get(STR)); } catch(ParseException e) { e.printStackTra...
/** * Gets the current difficulty * * @return */
Gets the current difficulty
getDifficulty
{ "repo_name": "skyefm/Java-DogeAPI-Client", "path": "src/main/java/com/sci/jda/DogeAPI.java", "license": "gpl-3.0", "size": 8003 }
[ "org.json.simple.JSONObject", "org.json.simple.parser.JSONParser", "org.json.simple.parser.ParseException" ]
import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException;
import org.json.simple.*; import org.json.simple.parser.*;
[ "org.json.simple" ]
org.json.simple;
213,392
void writeRoot(DataOutput out) throws IOException { for (int i = 0; i < blockKeys.size(); ++i) { out.writeLong(blockOffsets.get(i)); out.writeInt(onDiskDataSizes.get(i)); Bytes.writeByteArray(out, blockKeys.get(i)); } }
void writeRoot(DataOutput out) throws IOException { for (int i = 0; i < blockKeys.size(); ++i) { out.writeLong(blockOffsets.get(i)); out.writeInt(onDiskDataSizes.get(i)); Bytes.writeByteArray(out, blockKeys.get(i)); } }
/** * Writes this chunk into the given output stream in the root block index * format. This format is similar to the {@link HFile} version 1 block * index format, except that we store on-disk size of the block instead of * its uncompressed size. * * @param out the data output stream to wri...
Writes this chunk into the given output stream in the root block index format. This format is similar to the <code>HFile</code> version 1 block index format, except that we store on-disk size of the block instead of its uncompressed size
writeRoot
{ "repo_name": "indi60/hbase-pmc", "path": "target/hbase-0.94.1/hbase-0.94.1/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.java", "license": "apache-2.0", "size": 50241 }
[ "java.io.DataOutput", "java.io.IOException", "org.apache.hadoop.hbase.util.Bytes" ]
import java.io.DataOutput; import java.io.IOException; import org.apache.hadoop.hbase.util.Bytes;
import java.io.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,171,463
public static ims.coe.assessment.domain.objects.ActivityLevelComponent extractActivityLevelComponent(ims.domain.ILightweightDomainFactory domainFactory, ims.coe.vo.AssessmentActivityLevel valueObject) { return extractActivityLevelComponent(domainFactory, valueObject, new HashMap()); }
static ims.coe.assessment.domain.objects.ActivityLevelComponent function(ims.domain.ILightweightDomainFactory domainFactory, ims.coe.vo.AssessmentActivityLevel valueObject) { return extractActivityLevelComponent(domainFactory, valueObject, new HashMap()); }
/** * Create the domain object from the value object. * @param domainFactory - used to create existing (persistent) domain objects. * @param valueObject - extract the domain object fields from this. */
Create the domain object from the value object
extractActivityLevelComponent
{ "repo_name": "open-health-hub/openmaxims-linux", "path": "openmaxims_workspace/ValueObjects/src/ims/coe/vo/domain/AssessmentActivityLevelAssembler.java", "license": "agpl-3.0", "size": 20361 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,096,883
public Forum getForum(int forumId) { return this.getForum(SessionFacade.getUserSession().getUserId(), forumId); }
Forum function(int forumId) { return this.getForum(SessionFacade.getUserSession().getUserId(), forumId); }
/** * Gets a forum. * * @param forumId The forum's id * @return The requested forum, if found, or <code>null</code> if * the forum does not exists or access to it is denied. * @see #getForum(int, int) */
Gets a forum
getForum
{ "repo_name": "3mtee/jforum", "path": "target/jforum/src/main/java/net/jforum/entities/Category.java", "license": "bsd-3-clause", "size": 9391 }
[ "net.jforum.SessionFacade" ]
import net.jforum.SessionFacade;
import net.jforum.*;
[ "net.jforum" ]
net.jforum;
1,719,055
public boolean isCaseInsensitive() { if (caseInsensitive != null) { return caseInsensitive; } ValueBinding vb = getValueBinding("caseInsensitive"); // $NON-NLS-1$ if (vb != null) { Boolean b = (Boolean) vb.getValue(getFacesContext()); if (b != null) { return b; } } return false; }
boolean function() { if (caseInsensitive != null) { return caseInsensitive; } ValueBinding vb = getValueBinding(STR); if (vb != null) { Boolean b = (Boolean) vb.getValue(getFacesContext()); if (b != null) { return b; } } return false; }
/** * Whether the options should be searched case insensitive or not * * @return boolean whether case insensitive * @since org.openntf.domino.xsp 5.0.0 */
Whether the options should be searched case insensitive or not
isCaseInsensitive
{ "repo_name": "rPraml/org.openntf.domino", "path": "domino/xsp/src/main/java/org/openntf/domino/xsp/helpers/MapValuePickerData.java", "license": "apache-2.0", "size": 11306 }
[ "javax.faces.el.ValueBinding" ]
import javax.faces.el.ValueBinding;
import javax.faces.el.*;
[ "javax.faces" ]
javax.faces;
604,548
public void addOverride( SettingDescriptor theSetting ) { Preconditions.checkArgument( theSetting != null, "Attempting to place an override on setting '%s' without a setting descriptor.", this.name ); // given this is an override it means that the setting descriptor passed in must indicate it is an override ...
void function( SettingDescriptor theSetting ) { Preconditions.checkArgument( theSetting != null, STR, this.name ); String blockHistory = getBlockHistory( ); Conditions.checkConfiguration( theSetting.isOverride( ), STR, theSetting.getName( ), theSetting.getDeclaringBlock( ).getDeclaringProfile( ).getName( ), theSetting....
/** * Adds a setting descriptor as an override for any current setting descriptor in the history. * This occurs when a block finds a declared setting BUT one of the included blocks also * had this setting. * @param theSetting the overriding setting descriptor to add to the history */
Adds a setting descriptor as an override for any current setting descriptor in the history. This occurs when a block finds a declared setting BUT one of the included blocks also had this setting
addOverride
{ "repo_name": "Talvish/Tales", "path": "product/common/src/com/talvish/tales/system/configuration/hierarchical/Setting.java", "license": "apache-2.0", "size": 14483 }
[ "com.google.common.base.Preconditions", "com.google.common.base.Strings", "com.talvish.tales.validation.Conditions" ]
import com.google.common.base.Preconditions; import com.google.common.base.Strings; import com.talvish.tales.validation.Conditions;
import com.google.common.base.*; import com.talvish.tales.validation.*;
[ "com.google.common", "com.talvish.tales" ]
com.google.common; com.talvish.tales;
1,300,147
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ExpressRoutePortInner>> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } return Fl...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<ExpressRoutePortInner>> function(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } return FluxUtil .withContext(context -> service.listNext(nextLink, context)) .<PagedResponse<ExpressRoutePortInner>>map( res ...
/** * Get the next page of items. * * @param nextLink The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked excepti...
Get the next page of items
listNextSinglePageAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRoutePortsClientImpl.java", "license": "mit", "size": 68799 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.network.fluent.models.ExpressRoutePortInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.network.fluent.models.ExpressRoutePortInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,344,740
public void testEquals() { XYErrorRenderer r1 = new XYErrorRenderer(); XYErrorRenderer r2 = new XYErrorRenderer(); assertEquals(r1, r2); // drawXError r1.setDrawXError(false); assertFalse(r1.equals(r2)); r2.setDrawXError(false); assertTrue(r1.equals(r...
void function() { XYErrorRenderer r1 = new XYErrorRenderer(); XYErrorRenderer r2 = new XYErrorRenderer(); assertEquals(r1, r2); r1.setDrawXError(false); assertFalse(r1.equals(r2)); r2.setDrawXError(false); assertTrue(r1.equals(r2)); r1.setDrawYError(false); assertFalse(r1.equals(r2)); r2.setDrawYError(false); assertTru...
/** * Check that the equals() method distinguishes all fields. */
Check that the equals() method distinguishes all fields
testEquals
{ "repo_name": "integrated/jfreechart", "path": "tests/org/jfree/chart/renderer/xy/junit/XYErrorRendererTests.java", "license": "lgpl-2.1", "size": 5586 }
[ "java.awt.Color", "java.awt.GradientPaint", "org.jfree.chart.renderer.xy.XYErrorRenderer" ]
import java.awt.Color; import java.awt.GradientPaint; import org.jfree.chart.renderer.xy.XYErrorRenderer;
import java.awt.*; import org.jfree.chart.renderer.xy.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
1,752,449
void init(boolean newInstall) throws IOException, InterruptedException { Jenkins jenkins = Jenkins.getInstance(); if(newInstall) { // this was determined to be a new install, don't run the update wizard here setCurrentLevel(Jenkins.getVersion()); ...
void init(boolean newInstall) throws IOException, InterruptedException { Jenkins jenkins = Jenkins.getInstance(); if(newInstall) { setCurrentLevel(Jenkins.getVersion()); FilePath iapf = getInitialAdminPasswordFile(); if(jenkins.getSecurityRealm() == null jenkins.getSecurityRealm() == SecurityRealm.NO_AUTHENTICATION) { ...
/** * Initialize the setup wizard, this will process any current state initializations */
Initialize the setup wizard, this will process any current state initializations
init
{ "repo_name": "samatdav/jenkins", "path": "core/src/main/java/jenkins/install/SetupWizard.java", "license": "mit", "size": 20317 }
[ "hudson.model.UpdateCenter", "hudson.security.HudsonPrivateSecurityRealm", "hudson.security.SecurityRealm", "hudson.util.PluginServletFilter", "java.io.IOException", "java.util.UUID", "java.util.logging.Level" ]
import hudson.model.UpdateCenter; import hudson.security.HudsonPrivateSecurityRealm; import hudson.security.SecurityRealm; import hudson.util.PluginServletFilter; import java.io.IOException; import java.util.UUID; import java.util.logging.Level;
import hudson.model.*; import hudson.security.*; import hudson.util.*; import java.io.*; import java.util.*; import java.util.logging.*;
[ "hudson.model", "hudson.security", "hudson.util", "java.io", "java.util" ]
hudson.model; hudson.security; hudson.util; java.io; java.util;
1,658,698
@SuppressWarnings("unchecked") // the MembersInjector type always agrees with the passed type public <T> MembersInjectorImpl<T> get(TypeLiteral<T> key, Errors errors) throws ErrorsException { return (MembersInjectorImpl<T>) cache.get(key, errors); }
@SuppressWarnings(STR) <T> MembersInjectorImpl<T> function(TypeLiteral<T> key, Errors errors) throws ErrorsException { return (MembersInjectorImpl<T>) cache.get(key, errors); }
/** * Returns a new complete members injector with injection listeners registered. */
Returns a new complete members injector with injection listeners registered
get
{ "repo_name": "pascallouisperez/guice-jit-providers", "path": "src/com/google/inject/internal/MembersInjectorStore.java", "license": "apache-2.0", "size": 4898 }
[ "com.google.inject.TypeLiteral" ]
import com.google.inject.TypeLiteral;
import com.google.inject.*;
[ "com.google.inject" ]
com.google.inject;
1,952,303