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 SwitchNode setCases(final LexicalContext lc, final List<CaseNode> cases) { return setCases(lc, cases, defaultCaseIndex); }
SwitchNode function(final LexicalContext lc, final List<CaseNode> cases) { return setCases(lc, cases, defaultCaseIndex); }
/** * Replace case nodes with new list. the cases have to be the same * and the default case index the same. This is typically used * by NodeVisitors who perform operations on every case node * @param lc lexical context * @param cases list of cases * @return new switch node or same if n...
Replace case nodes with new list. the cases have to be the same and the default case index the same. This is typically used by NodeVisitors who perform operations on every case node
setCases
{ "repo_name": "koutheir/incinerator-hotspot", "path": "nashorn/src/jdk/nashorn/internal/ir/SwitchNode.java", "license": "gpl-2.0", "size": 8358 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
649,299
public boolean isBlackListed(Block block) { return config.getBroadcastBlacklist().contains(new SafeBlock(block)); }
boolean function(Block block) { return config.getBroadcastBlacklist().contains(new SafeBlock(block)); }
/** * Checks wether a block is blacklisted or not. * * @param block the block to check * @return true if the block is blacklisted */
Checks wether a block is blacklisted or not
isBlackListed
{ "repo_name": "bendem/OreBroadcast", "path": "src/main/java/be/bendem/bukkit/orebroadcast/OreBroadcast.java", "license": "lgpl-3.0", "size": 7018 }
[ "org.bukkit.block.Block" ]
import org.bukkit.block.Block;
import org.bukkit.block.*;
[ "org.bukkit.block" ]
org.bukkit.block;
288,553
public Entry<TKey, TValue> getMinimum() throws NoSuchElementException;
Entry<TKey, TValue> function() throws NoSuchElementException;
/** * Get the entry with the minimum key. * <p> * This method does <u>not</u> remove the returned entry. * * @return the entry. * @throws NoSuchElementException If this heap is empty. * @see #extractMinimum() */
Get the entry with the minimum key. This method does not remove the returned entry
getMinimum
{ "repo_name": "gabormakrai/dijkstra-performance", "path": "DijkstraPerformance/src/org/teneighty/heap/Heap.java", "license": "gpl-3.0", "size": 16652 }
[ "java.util.NoSuchElementException" ]
import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
247,953
public List<OsAccountInstance> getOsAccountInstances() { return getNewValue(); }
List<OsAccountInstance> function() { return getNewValue(); }
/** * Gets the OS account instances that have been added. * * @return The OS account instances. */
Gets the OS account instances that have been added
getOsAccountInstances
{ "repo_name": "sleuthkit/autopsy", "path": "Core/src/org/sleuthkit/autopsy/casemodule/events/OsAcctInstancesAddedEvent.java", "license": "apache-2.0", "size": 2146 }
[ "java.util.List", "org.sleuthkit.datamodel.OsAccountInstance" ]
import java.util.List; import org.sleuthkit.datamodel.OsAccountInstance;
import java.util.*; import org.sleuthkit.datamodel.*;
[ "java.util", "org.sleuthkit.datamodel" ]
java.util; org.sleuthkit.datamodel;
280,786
protected void onAnimationFinished() { if (mIsAnimatingPromoAcceptance) { mIsAnimatingPromoAcceptance = false; setPreferenceState(true); } // If animating to a particular PanelState, and after completing // resizing the Panel to its desired state, then the Pa...
void function() { if (mIsAnimatingPromoAcceptance) { mIsAnimatingPromoAcceptance = false; setPreferenceState(true); } if (mAnimatingState != PanelState.UNDEFINED && getHeight() == getPanelHeightFromState(mAnimatingState)) { setPanelState(mAnimatingState, mAnimatingStateReason); } mAnimatingState = PanelState.UNDEFINED;...
/** * Called when layout-specific actions are needed after the animation finishes. */
Called when layout-specific actions are needed after the animation finishes
onAnimationFinished
{ "repo_name": "SaschaMester/delicium", "path": "chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelAnimation.java", "license": "bsd-3-clause", "size": 18881 }
[ "org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPanel", "org.chromium.chrome.browser.compositor.layouts.ChromeAnimation" ]
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPanel; import org.chromium.chrome.browser.compositor.layouts.ChromeAnimation;
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.*; import org.chromium.chrome.browser.compositor.layouts.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
1,420,733
public static WCell getCell(WSheet wSheet, String label, WCell after, XLSBeansConfig config) throws XLSBeansException { return getCell(wSheet, label, after, false, config); }
static WCell function(WSheet wSheet, String label, WCell after, XLSBeansConfig config) throws XLSBeansException { return getCell(wSheet, label, after, false, config); }
/** * Return cell object by using first argument sheet. * This cell will be found by label name in Excel sheet. * <p> * NOTICE: When the cell object is specified for the third argument, * a lower right cell is scanned from the cell. * * @param wSheet the sheet object. * @param label the...
Return cell object by using first argument sheet. This cell will be found by label name in Excel sheet. a lower right cell is scanned from the cell
getCell
{ "repo_name": "takezoe/xlsbeans", "path": "src/main/java/com/github/takezoe/xlsbeans/Utils.java", "license": "apache-2.0", "size": 15053 }
[ "com.github.takezoe.xlsbeans.xssfconverter.WCell", "com.github.takezoe.xlsbeans.xssfconverter.WSheet" ]
import com.github.takezoe.xlsbeans.xssfconverter.WCell; import com.github.takezoe.xlsbeans.xssfconverter.WSheet;
import com.github.takezoe.xlsbeans.xssfconverter.*;
[ "com.github.takezoe" ]
com.github.takezoe;
1,367
private void generateUnits() throws IOException, OmniNotConnectedException, OmniInvalidResponseException, OmniUnknownMessageTypeException{ //Group Lights_GreatRoom "Great Room" (Lights) String groupString = "Group\t%s\t\"%s\"\t(%s)\n"; //Dimmer Lights_GreatRoom_MainLights_Switch "Main Lights [%d%%]" (Lights_...
void function() throws IOException, OmniNotConnectedException, OmniInvalidResponseException, OmniUnknownMessageTypeException{ String groupString = STR%s\STR; String itemString = STR%s\STRunit:%d\"}\n"; String groupName = STR; groups.append(String.format(groupString,groupName,STR,"All")); int objnum = 0; Message m; int ...
/** * This is by far the most complex method as units have the ability to be * sub-grouped into rooms. If units are in a room then they will be added to * their own group which is a member of the Lights group. * @throws IOException * @throws OmniNotConnectedException * @throws OmniInvalidResponseExceptio...
This is by far the most complex method as units have the ability to be sub-grouped into rooms. If units are in a room then they will be added to their own group which is a member of the Lights group
generateUnits
{ "repo_name": "gregfinley/openhab", "path": "bundles/binding/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/ui/OmnilinkItemGenerator.java", "license": "epl-1.0", "size": 28633 }
[ "com.digitaldan.jomnilinkII.Message", "com.digitaldan.jomnilinkII.MessageTypes", "com.digitaldan.jomnilinkII.OmniInvalidResponseException", "com.digitaldan.jomnilinkII.OmniNotConnectedException", "com.digitaldan.jomnilinkII.OmniUnknownMessageTypeException", "java.io.IOException", "java.util.LinkedList" ...
import com.digitaldan.jomnilinkII.Message; import com.digitaldan.jomnilinkII.MessageTypes; import com.digitaldan.jomnilinkII.OmniInvalidResponseException; import com.digitaldan.jomnilinkII.OmniNotConnectedException; import com.digitaldan.jomnilinkII.OmniUnknownMessageTypeException; import java.io.IOException; import ja...
import com.digitaldan.*; import java.io.*; import java.util.*;
[ "com.digitaldan", "java.io", "java.util" ]
com.digitaldan; java.io; java.util;
1,120,705
@Test public void testFindNoMinTime() { final Specification<ClusterEntity> spec = JpaClusterSpecs .find( NAME, STATUSES, TAGS, null, MAX_UPDATE_TIME ); spec.toPredicate(this.root, this.cq, th...
void function() { final Specification<ClusterEntity> spec = JpaClusterSpecs .find( NAME, STATUSES, TAGS, null, MAX_UPDATE_TIME ); spec.toPredicate(this.root, this.cq, this.cb); Mockito.verify(this.cb, Mockito.times(1)) .equal(this.root.get(ClusterEntity_.name), NAME); Mockito.verify(this.cb, Mockito.never()) .greaterTh...
/** * Test the find specification. */
Test the find specification
testFindNoMinTime
{ "repo_name": "irontable/genie", "path": "genie-core/src/test/java/com/netflix/genie/core/jpa/specifications/JpaClusterSpecsUnitTests.java", "license": "apache-2.0", "size": 18690 }
[ "com.netflix.genie.common.dto.ClusterStatus", "com.netflix.genie.core.jpa.entities.ClusterEntity", "org.mockito.Mockito", "org.springframework.data.jpa.domain.Specification" ]
import com.netflix.genie.common.dto.ClusterStatus; import com.netflix.genie.core.jpa.entities.ClusterEntity; import org.mockito.Mockito; import org.springframework.data.jpa.domain.Specification;
import com.netflix.genie.common.dto.*; import com.netflix.genie.core.jpa.entities.*; import org.mockito.*; import org.springframework.data.jpa.domain.*;
[ "com.netflix.genie", "org.mockito", "org.springframework.data" ]
com.netflix.genie; org.mockito; org.springframework.data;
1,851,471
public final JSOG putAll(final Map<String, Object> values) { for (Entry<String, Object> entry : values.entrySet()) { put(entry.getKey(), entry.getValue()); } return this; }
final JSOG function(final Map<String, Object> values) { for (Entry<String, Object> entry : values.entrySet()) { put(entry.getKey(), entry.getValue()); } return this; }
/** * Adds the values of a map value to a JSOG object. * * Implicitly converts this JSOG to an object. * * This operation is not atomic, if one entry causes an exception, some of * the values will have been put. * @param values A map of keys and primitives to store. * @return thi...
Adds the values of a map value to a JSOG object. Implicitly converts this JSOG to an object. This operation is not atomic, if one entry causes an exception, some of the values will have been put
putAll
{ "repo_name": "JeffreyRodriguez/JSOG", "path": "src/main/java/net/sf/jsog/JSOG.java", "license": "unlicense", "size": 56094 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,874,388
@PUT @Path("{dm_id}/clear-history") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response clearDmHistory(@PathParam("md_name") String mdName, @PathParam("ma_name") String maName, @PathParam("mep_id") short ...
@Path(STR) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response function(@PathParam(STR) String mdName, @PathParam(STR) String maName, @PathParam(STR) short mepId, @PathParam("dm_id") int dmId) { log.debug(STR, mdName + "/STR/STR/" + dmId); try { MdId mdId = MdIdCharStr.asMdId(mdName); M...
/** * Clear DM history stats by MD name, MA name, Mep Id and DM Id. * * @param mdName The name of a Maintenance Domain * @param maName The name of a Maintenance Association belonging to the MD * @param mepId The Id of the MEP * @param dmId The Id of the DM * @return 200 OK or 304 if n...
Clear DM history stats by MD name, MA name, Mep Id and DM Id
clearDmHistory
{ "repo_name": "opennetworkinglab/onos", "path": "apps/cfm/nbi/src/main/java/org/onosproject/soam/rest/DmWebResource.java", "license": "apache-2.0", "size": 11916 }
[ "javax.ws.rs.Consumes", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.onosproject.incubator.net.l2monitoring.cfm.identifier.MaIdCharStr", "org.onosproject.incubator.net.l2monitoring.cfm.identifier.MaIdShort", "org...
import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.onosproject.incubator.net.l2monitoring.cfm.identifier.MaIdCharStr; import org.onosproject.incubator.net.l2monitoring.cfm.identi...
import javax.ws.rs.*; import javax.ws.rs.core.*; import org.onosproject.incubator.net.l2monitoring.cfm.identifier.*; import org.onosproject.incubator.net.l2monitoring.cfm.service.*; import org.onosproject.incubator.net.l2monitoring.soam.*;
[ "javax.ws", "org.onosproject.incubator" ]
javax.ws; org.onosproject.incubator;
1,889,094
public int readByte() throws IOException { // Are we byte aligned? if (currentBitPosition % 8 == 0) { // Do we need to read in a byte? if (currentBitPosition == 8) { // Yes, read one and return it return byteSource.readByte(); } els...
int function() throws IOException { if (currentBitPosition % 8 == 0) { if (currentBitPosition == 8) { return byteSource.readByte(); } else { currentBitPosition = 8; return currentByte; } } else { final int bitsInCurrentByte = 8 - currentBitPosition; final int bitsInNextByte = currentBitPosition; int value = (currentByt...
/** * Reads an entire byte from the underlying input stream. * * @return The byte read from the underlying input stream. * @throws IOException If reading the byte caused an IOException */
Reads an entire byte from the underlying input stream
readByte
{ "repo_name": "jfim/bitio", "path": "src/main/java/im/jeanfrancois/bitio/BitSource.java", "license": "lgpl-3.0", "size": 7751 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,412,271
int next() throws IOException, UnterminatedCommentException { int c = get(); if (c == '/') { switch (peek()) { case '/': for (;;) { c = get(); if (c <= '\n') { return c; } } case '*': get(); for (;;) { switch (get()) { case '*': if (peek() == '/') { ...
int next() throws IOException, UnterminatedCommentException { int c = get(); if (c == '/') { switch (peek()) { case '/': for (;;) { c = get(); if (c <= '\n') { return c; } } case '*': get(); for (;;) { switch (get()) { case '*': if (peek() == '/') { get(); return ' '; } break; case EOF: throw new UnterminatedCommentExc...
/** * next -- get the next character, excluding comments. peek() is used to see * if a '/' is followed by a '/' or '*'. */
next -- get the next character, excluding comments. peek() is used to see if a '/' is followed by a '/' or '*'
next
{ "repo_name": "kyungw00k/jsoj", "path": "src/main/java/net/jsoj/util/JSMin.java", "license": "gpl-3.0", "size": 7281 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,797,803
@Generated @IsOptional @Deprecated @Selector("splitViewController:popoverController:willPresentViewController:") default void splitViewControllerPopoverControllerWillPresentViewController(UISplitViewController svc, UIPopoverController pc, UIViewController aViewController) { throw...
@Selector(STR) default void splitViewControllerPopoverControllerWillPresentViewController(UISplitViewController svc, UIPopoverController pc, UIViewController aViewController) { throw new java.lang.UnsupportedOperationException(); }
/** * Called when the view controller is shown in a popover so the delegate can take action like hiding other popovers. */
Called when the view controller is shown in a popover so the delegate can take action like hiding other popovers
splitViewControllerPopoverControllerWillPresentViewController
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/protocol/UISplitViewControllerDelegate.java", "license": "apache-2.0", "size": 12030 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
1,567,553
public SharedPreferences.Editor putStringNoEncrypted(String key, String value) { mEditor.putString(SecurePreferences.encrypt(key), value); return this; }
SharedPreferences.Editor function(String key, String value) { mEditor.putString(SecurePreferences.encrypt(key), value); return this; }
/** * This is useful for storing values that have be encrypted by something * else * * @param key * - encrypted as usual * @param value * will not be encrypted * @return */
This is useful for storing values that have be encrypted by something else
putStringNoEncrypted
{ "repo_name": "leasual/Amphitheatre", "path": "tv/src/main/java/com/jerrellmardis/amphitheatre/util/SecurePreferences.java", "license": "apache-2.0", "size": 16164 }
[ "android.content.SharedPreferences" ]
import android.content.SharedPreferences;
import android.content.*;
[ "android.content" ]
android.content;
1,391,829
public static StAXBuilder getSOAPBuilder(InputStream inStream) throws XMLStreamException { XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(inStream); try { return new StAXSOAPModelBuilder(xmlReader); } catch (OMException e) { log.info("OMException in getSO...
static StAXBuilder function(InputStream inStream) throws XMLStreamException { XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(inStream); try { return new StAXSOAPModelBuilder(xmlReader); } catch (OMException e) { log.info(STR, e); try { log.info(STR + new String(IOUtils.getStreamAsByteArray(inStream)) + "]"...
/** * Creates an OMBuilder for a SOAP message. Default character set encording is used. * * @param inStream InputStream for a SOAP message * @return Handler to a OMBuilder implementation instance * @throws XMLStreamException */
Creates an OMBuilder for a SOAP message. Default character set encording is used
getSOAPBuilder
{ "repo_name": "wso2/wso2-axis2", "path": "modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java", "license": "apache-2.0", "size": 39428 }
[ "java.io.IOException", "java.io.InputStream", "javax.xml.stream.XMLStreamException", "javax.xml.stream.XMLStreamReader", "org.apache.axiom.attachments.utils.IOUtils", "org.apache.axiom.om.OMException", "org.apache.axiom.om.impl.builder.StAXBuilder", "org.apache.axiom.om.util.StAXUtils", "org.apache....
import java.io.IOException; import java.io.InputStream; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import org.apache.axiom.attachments.utils.IOUtils; import org.apache.axiom.om.OMException; import org.apache.axiom.om.impl.builder.StAXBuilder; import org.apache.axiom.om.util.StA...
import java.io.*; import javax.xml.stream.*; import org.apache.axiom.attachments.utils.*; import org.apache.axiom.om.*; import org.apache.axiom.om.impl.builder.*; import org.apache.axiom.om.util.*; import org.apache.axiom.soap.impl.builder.*;
[ "java.io", "javax.xml", "org.apache.axiom" ]
java.io; javax.xml; org.apache.axiom;
2,674,038
public S parse(String input) { return parse(new StringReader(input)); }
S function(String input) { return parse(new StringReader(input)); }
/** * Parse the input concrete syntax into an abstract syntax tree. * * @param input * a string representation of the concrete syntax to be parsed. * @return the root node of an abstract syntax tree representation of the * the concrete input syntax that was parsed. */
Parse the input concrete syntax into an abstract syntax tree
parse
{ "repo_name": "automenta/java_dann", "path": "src/syncleus/dann/logic/io/aima/Parser.java", "license": "agpl-3.0", "size": 4082 }
[ "java.io.StringReader" ]
import java.io.StringReader;
import java.io.*;
[ "java.io" ]
java.io;
268,373
@SuppressWarnings({ "rawtypes", "unchecked" }) private Element marshalObject(Object obj) throws JAXBException, ParserConfigurationException { QName rootElement = new QName(obj.getClass().getName()); Class<?> type = obj.getClass(); JAXBElement jaxbElement = new JAXBElement(rootElement, type, obj); // 2. M...
@SuppressWarnings({ STR, STR }) Element function(Object obj) throws JAXBException, ParserConfigurationException { QName rootElement = new QName(obj.getClass().getName()); Class<?> type = obj.getClass(); JAXBElement jaxbElement = new JAXBElement(rootElement, type, obj); Document document = getDocumentBuilder().newDocume...
/** * Marshals a given object * * @param obj * The object * @return The marshalled object * @throws JAXBException * @throws ParserConfigurationException */
Marshals a given object
marshalObject
{ "repo_name": "juanalvarez123/payu-latam-java-payments-sdk", "path": "src/main/java/com/payu/sdk/utils/xml/MapDetailsAdapter.java", "license": "mit", "size": 4682 }
[ "javax.xml.bind.JAXBElement", "javax.xml.bind.JAXBException", "javax.xml.bind.Marshaller", "javax.xml.namespace.QName", "javax.xml.parsers.ParserConfigurationException", "org.w3c.dom.Document", "org.w3c.dom.Element" ]
import javax.xml.bind.JAXBElement; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; import javax.xml.namespace.QName; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; import org.w3c.dom.Element;
import javax.xml.bind.*; import javax.xml.namespace.*; import javax.xml.parsers.*; import org.w3c.dom.*;
[ "javax.xml", "org.w3c.dom" ]
javax.xml; org.w3c.dom;
389,300
void writeTo(StreamWriter sw);
void writeTo(StreamWriter sw);
/** * Write to the specified StreamWriter */
Write to the specified StreamWriter
writeTo
{ "repo_name": "mfranklin/abdera", "path": "core/src/main/java/org/apache/abdera/protocol/EntityProvider.java", "license": "apache-2.0", "size": 1738 }
[ "org.apache.abdera.writer.StreamWriter" ]
import org.apache.abdera.writer.StreamWriter;
import org.apache.abdera.writer.*;
[ "org.apache.abdera" ]
org.apache.abdera;
548,512
public void log(LogLevel logLevel, String message){ if(message == null) message = "[null]"; String testStep = "Framework actions"; String testStepClassName = "Framework actions"; StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace(); for(int i= 0; i ...
void function(LogLevel logLevel, String message){ if(message == null) message = STR; String testStep = STR; String testStepClassName = STR; StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace(); for(int i= 0; i < stackTraceElements.length; i++){ if(isAnnotadedAsJUnitTest(stackTraceElements[i])...
/** * Writes a testCaseLog post to the test case testCaseLog * * @param logLevel The {@link LogLevel} of this testCaseLog entry * @param message The string message of the testCaseLog */
Writes a testCaseLog post to the test case testCaseLog
log
{ "repo_name": "claremontqualitymanagement/TestAutomationFramework", "path": "Core/src/main/java/se/claremont/taf/core/testcase/TestCaseLog.java", "license": "apache-2.0", "size": 13734 }
[ "se.claremont.taf.core.logging.LogLevel", "se.claremont.taf.core.logging.LogPost" ]
import se.claremont.taf.core.logging.LogLevel; import se.claremont.taf.core.logging.LogPost;
import se.claremont.taf.core.logging.*;
[ "se.claremont.taf" ]
se.claremont.taf;
810,586
protected void versionAddedEdges(V version, Iterable<Edge> edges) { Range<V> range = Range.range(version, identifierBehavior.getMaxPossibleGraphVersion()); for (Edge e : edges) { utils.ensureActiveType(e); ActiveVersionedEdge<V> ae = (ActiveVersionedEdge<V>) e; ...
void function(V version, Iterable<Edge> edges) { Range<V> range = Range.range(version, identifierBehavior.getMaxPossibleGraphVersion()); for (Edge e : edges) { utils.ensureActiveType(e); ActiveVersionedEdge<V> ae = (ActiveVersionedEdge<V>) e; HistoricVersionedEdge ve = addHistoricEdge((ActiveVersionedEdge<V>) e, versio...
/** * Version added edges in the graph. * * Per created active edge, create a corresponding historical one. * * @param version The graph version that created the specified edges * @param edges The edges to be versioned. */
Version added edges in the graph. Per created active edge, create a corresponding historical one
versionAddedEdges
{ "repo_name": "indexiatech/antiquity", "path": "src/main/java/co/indexia/antiquity/graph/ActiveVersionedGraph.java", "license": "gpl-3.0", "size": 35867 }
[ "co.indexia.antiquity.range.Range", "com.tinkerpop.blueprints.Edge" ]
import co.indexia.antiquity.range.Range; import com.tinkerpop.blueprints.Edge;
import co.indexia.antiquity.range.*; import com.tinkerpop.blueprints.*;
[ "co.indexia.antiquity", "com.tinkerpop.blueprints" ]
co.indexia.antiquity; com.tinkerpop.blueprints;
2,617,080
protected static String format(int value) { return PDFNumber.doubleOut(value / 1000f); }
static String function(int value) { return PDFNumber.doubleOut(value / 1000f); }
/** * Formats a integer value (normally coordinates in millipoints) to a String. * @param value the value (in millipoints) * @return the formatted value */
Formats a integer value (normally coordinates in millipoints) to a String
format
{ "repo_name": "spepping/fop-cs", "path": "src/java/org/apache/fop/render/pdf/PDFPainter.java", "license": "apache-2.0", "size": 17528 }
[ "org.apache.fop.pdf.PDFNumber" ]
import org.apache.fop.pdf.PDFNumber;
import org.apache.fop.pdf.*;
[ "org.apache.fop" ]
org.apache.fop;
2,686,405
private void prepForRegistration() { IntentFilter filter = new IntentFilter(); filter.addAction(CbService.ACTION_REGISTER); registerReceiver(receiver, filter); }
void function() { IntentFilter filter = new IntentFilter(); filter.addAction(CbService.ACTION_REGISTER); registerReceiver(receiver, filter); }
/** * SDK registration */
SDK registration
prepForRegistration
{ "repo_name": "Cbsoftware/PressureNet-SDK", "path": "src/ca/cumulonimbus/pressurenetsdk/CbService.java", "license": "mit", "size": 67493 }
[ "android.content.IntentFilter" ]
import android.content.IntentFilter;
import android.content.*;
[ "android.content" ]
android.content;
1,655,209
public Property getProperty(); } public interface ReadOnlyStatusChangeListener extends Serializable {
Property function(); } public interface ReadOnlyStatusChangeListener extends Serializable {
/** * Property whose read-only state has changed. * * @return source Property of the event. */
Property whose read-only state has changed
getProperty
{ "repo_name": "jdahlstrom/vaadin.react", "path": "server/src/main/java/com/vaadin/data/Property.java", "license": "apache-2.0", "size": 13023 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
2,843,149
public void storeVersions(Map<String, Map<Integer, Map<?, ?>>> map) { for (String mapLink : map.keySet()) { for (Entry<Integer, Map<?, ?>> entry : map.get(mapLink).entrySet()) { try { updateVersion(mapLink, (Integer) entry.getValue().get("version")); } catch (ClassCastException e) { Lo...
void function(Map<String, Map<Integer, Map<?, ?>>> map) { for (String mapLink : map.keySet()) { for (Entry<Integer, Map<?, ?>> entry : map.get(mapLink).entrySet()) { try { updateVersion(mapLink, (Integer) entry.getValue().get(STR)); } catch (ClassCastException e) { Log.exception(e, mapLink + StringUtils.SPACE + entry.g...
/** * Store the version of data in the DataMonitor. * @param map The data of which the version must be updated. */
Store the version of data in the DataMonitor
storeVersions
{ "repo_name": "Tygron/SDK", "path": "java/core/src/com/tygron/pub/api/data/DataMonitor.java", "license": "apache-2.0", "size": 5383 }
[ "com.tygron.pub.logger.Log", "com.tygron.pub.utils.StringUtils", "java.util.Map" ]
import com.tygron.pub.logger.Log; import com.tygron.pub.utils.StringUtils; import java.util.Map;
import com.tygron.pub.logger.*; import com.tygron.pub.utils.*; import java.util.*;
[ "com.tygron.pub", "java.util" ]
com.tygron.pub; java.util;
291,157
public static long toMillisFromJdbcTimestamp(String jdbcEscapeString){ return toMillis(new LocalDateTime(Timestamp.valueOf(jdbcEscapeString).getTime())); }
static long function(String jdbcEscapeString){ return toMillis(new LocalDateTime(Timestamp.valueOf(jdbcEscapeString).getTime())); }
/** * Convert from JDBC timestamp escape string format to utc millis, ignoring local * timezone. * * Note, the current implementation is ridiculous as it goes through two * conversions. Should be updated to no conversion. * * @param jdbcEscapeString * @return Milliseconds since epoch. */
Convert from JDBC timestamp escape string format to utc millis, ignoring local timezone. Note, the current implementation is ridiculous as it goes through two conversions. Should be updated to no conversion
toMillisFromJdbcTimestamp
{ "repo_name": "dremio/dremio-oss", "path": "common/src/main/java/com/dremio/common/util/DateTimes.java", "license": "apache-2.0", "size": 5773 }
[ "java.sql.Timestamp", "org.joda.time.LocalDateTime" ]
import java.sql.Timestamp; import org.joda.time.LocalDateTime;
import java.sql.*; import org.joda.time.*;
[ "java.sql", "org.joda.time" ]
java.sql; org.joda.time;
1,915,239
public static void notifyOnAllConnections(String method, Object[] params) { IConnection conn = Red5.getConnectionLocal(); if (conn != null) { log.debug("Connection for notify on all: {}", conn); IScope scope = conn.getScope(); log.debug("Scope for notify on all: {}", scope); notifyOnAllScopeCon...
static void function(String method, Object[] params) { IConnection conn = Red5.getConnectionLocal(); if (conn != null) { log.debug(STR, conn); IScope scope = conn.getScope(); log.debug(STR, scope); notifyOnAllScopeConnections(scope, method, params); } else { log.warn(STR); } }
/** * Notify a method on all connections to the current scope. * * @param method name of the method to notify * @param params parameters to pass to the method */
Notify a method on all connections to the current scope
notifyOnAllConnections
{ "repo_name": "cantren/red5-server", "path": "src/main/java/org/red5/server/api/service/ServiceUtils.java", "license": "apache-2.0", "size": 11610 }
[ "org.red5.server.api.IConnection", "org.red5.server.api.Red5", "org.red5.server.api.scope.IScope" ]
import org.red5.server.api.IConnection; import org.red5.server.api.Red5; import org.red5.server.api.scope.IScope;
import org.red5.server.api.*; import org.red5.server.api.scope.*;
[ "org.red5.server" ]
org.red5.server;
68,710
@WorkerThread public static synchronized void updateMessageVibrate(@NonNull Context context, @NonNull Recipient recipient, VibrateState vibrateState) { if (!supported() || recipient.getNotificationChannel() == null) { return ; } Log.i(TAG, "Updating recipient vibrate with value: " + vibrateState);...
static synchronized void function(@NonNull Context context, @NonNull Recipient recipient, VibrateState vibrateState) { if (!supported() recipient.getNotificationChannel() == null) { return ; } Log.i(TAG, STR + vibrateState); boolean enabled = vibrateState == VibrateState.DEFAULT ? getMessageVibrate(context) : vibrateSt...
/** * Updates the message ringtone for a specific recipient. If that recipient has no channel, this * does nothing. * * This has to update the database and should therefore be run on a background thread. */
Updates the message ringtone for a specific recipient. If that recipient has no channel, this does nothing. This has to update the database and should therefore be run on a background thread
updateMessageVibrate
{ "repo_name": "cascheberg/Signal-Android", "path": "app/src/main/java/org/thoughtcrime/securesms/notifications/NotificationChannels.java", "license": "gpl-3.0", "size": 33274 }
[ "android.content.Context", "androidx.annotation.NonNull", "org.signal.core.util.logging.Log", "org.thoughtcrime.securesms.database.DatabaseFactory", "org.thoughtcrime.securesms.database.RecipientDatabase", "org.thoughtcrime.securesms.recipients.Recipient", "org.thoughtcrime.securesms.util.ServiceUtil" ]
import android.content.Context; import androidx.annotation.NonNull; import org.signal.core.util.logging.Log; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.RecipientDatabase; import org.thoughtcrime.securesms.recipients.Recipient; import org.thoughtcrime.securesms...
import android.content.*; import androidx.annotation.*; import org.signal.core.util.logging.*; import org.thoughtcrime.securesms.database.*; import org.thoughtcrime.securesms.recipients.*; import org.thoughtcrime.securesms.util.*;
[ "android.content", "androidx.annotation", "org.signal.core", "org.thoughtcrime.securesms" ]
android.content; androidx.annotation; org.signal.core; org.thoughtcrime.securesms;
2,205,482
private List<ComponentConnector> collectPotentialMatches( ComponentConnector parent, String pathFragment, boolean collectRecursively) { ArrayList<ComponentConnector> potentialMatches = new ArrayList<>(); String widgetName = getWidgetName(pathFragment); // Special case...
List<ComponentConnector> function( ComponentConnector parent, String pathFragment, boolean collectRecursively) { ArrayList<ComponentConnector> potentialMatches = new ArrayList<>(); String widgetName = getWidgetName(pathFragment); if (LocatorUtil.isUIElement(pathFragment)) { if (connectorMatchesPathFragment(parent, widg...
/** * Collects all connectors that match the widget class name of the path * fragment. If the {@code collectRecursively} parameter is true, a * depth-first search of the connector hierarchy is performed. * * Searching depth-first ensure that we can return the matches in correct * order for...
Collects all connectors that match the widget class name of the path fragment. If the collectRecursively parameter is true, a depth-first search of the connector hierarchy is performed. Searching depth-first ensure that we can return the matches in correct order for selecting based on index predicates
collectPotentialMatches
{ "repo_name": "Legioth/vaadin", "path": "client/src/main/java/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java", "license": "apache-2.0", "size": 28106 }
[ "com.vaadin.client.ComponentConnector", "com.vaadin.client.HasComponentsConnector", "java.util.ArrayList", "java.util.List" ]
import com.vaadin.client.ComponentConnector; import com.vaadin.client.HasComponentsConnector; import java.util.ArrayList; import java.util.List;
import com.vaadin.client.*; import java.util.*;
[ "com.vaadin.client", "java.util" ]
com.vaadin.client; java.util;
2,143,152
public String getHiddenInput(String prompt) throws EOFException, IOException { return Sigar.getPassword(prompt); }
String function(String prompt) throws EOFException, IOException { return Sigar.getPassword(prompt); }
/** * If a command needs additional input via the console, they * can get it this way. The characters that the user types * are not echoed. * @param prompt The prompt to display. * @return The data that the user typed in. */
If a command needs additional input via the console, they can get it this way. The characters that the user types are not echoed
getHiddenInput
{ "repo_name": "fredix/geekast", "path": "src/externals/hyperic-sigar-1.6.4-src/bindings/java/src/org/hyperic/sigar/shell/ShellBase.java", "license": "gpl-3.0", "size": 22331 }
[ "java.io.EOFException", "java.io.IOException", "org.hyperic.sigar.Sigar" ]
import java.io.EOFException; import java.io.IOException; import org.hyperic.sigar.Sigar;
import java.io.*; import org.hyperic.sigar.*;
[ "java.io", "org.hyperic.sigar" ]
java.io; org.hyperic.sigar;
665,343
public void setChildren(List<CmsVfsEntryBean> children) { m_preloadedChildren = children; }
void function(List<CmsVfsEntryBean> children) { m_preloadedChildren = children; }
/** * Sets the list of children.<p> * * @param children the list of children */
Sets the list of children
setChildren
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/ade/galleries/shared/CmsVfsEntryBean.java", "license": "lgpl-2.1", "size": 6366 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,347,580
private void validateProjects() { try { for (IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) { if (project.isOpen()) { int sev = project.findMaxProblemSeverity(null, true, IResource.DEPTH_INFIN...
void function() { try { for (IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) { if (project.isOpen()) { int sev = project.findMaxProblemSeverity(null, true, IResource.DEPTH_INFINITE); int projectSev; switch (sev) { case IMarker.SEVERITY_ERROR: projectSev = IMessageProvider.ERROR; break; case I...
/** * Get all projects severities to avoid user selects erroneous projects */
Get all projects severities to avoid user selects erroneous projects
validateProjects
{ "repo_name": "rex-xxx/mt6572_x201", "path": "tools/motodev/src/plugins/packaging.ui/src/com/motorola/studio/android/packaging/ui/export/PackageExportWizardArea.java", "license": "gpl-2.0", "size": 67009 }
[ "com.motorola.studio.android.common.log.StudioLogger", "org.eclipse.core.resources.IMarker", "org.eclipse.core.resources.IProject", "org.eclipse.core.resources.IResource", "org.eclipse.core.resources.ResourcesPlugin", "org.eclipse.core.runtime.CoreException", "org.eclipse.jface.dialogs.IMessageProvider"...
import com.motorola.studio.android.common.log.StudioLogger; import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.dialo...
import com.motorola.studio.android.common.log.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.jface.dialogs.*;
[ "com.motorola.studio", "org.eclipse.core", "org.eclipse.jface" ]
com.motorola.studio; org.eclipse.core; org.eclipse.jface;
2,571,854
private void validateNewPlatform(PlatformValue pv) throws ValidationException { String msg = null; // first check if its new if (pv.idHasBeenSet()) { msg = "This platform is not new. It has id: " + pv.getId(); } // else if(someotherthing) ... // Now check...
void function(PlatformValue pv) throws ValidationException { String msg = null; if (pv.idHasBeenSet()) { msg = STR + pv.getId(); } if (msg != null) { throw new ValidationException(msg); } }
/** * Private method to validate a new PlatformValue object * * @throws ValidationException */
Private method to validate a new PlatformValue object
validateNewPlatform
{ "repo_name": "cc14514/hq6", "path": "hq-server/src/main/java/org/hyperic/hq/appdef/server/session/PlatformManagerImpl.java", "license": "unlicense", "size": 81973 }
[ "org.hyperic.hq.appdef.shared.PlatformValue", "org.hyperic.hq.appdef.shared.ValidationException" ]
import org.hyperic.hq.appdef.shared.PlatformValue; import org.hyperic.hq.appdef.shared.ValidationException;
import org.hyperic.hq.appdef.shared.*;
[ "org.hyperic.hq" ]
org.hyperic.hq;
1,155,736
@SuppressLint("InlinedApi") private void createCameraSource (boolean autoFocus, boolean useFlash) { Context context = getApplicationContext(); // A barcode detector is created to track barcodes. An associated multi-processor instance // is set to receive the barcode detection results, ...
@SuppressLint(STR) void function (boolean autoFocus, boolean useFlash) { Context context = getApplicationContext(); BarcodeDetector barcodeDetector = new BarcodeDetector.Builder(context).build(); BarcodeTrackerFactory barcodeFactory = new BarcodeTrackerFactory(mGraphicOverlay); barcodeDetector.setProcessor( new MultiPr...
/** * Creates and starts the camera. Note that this uses a higher resolution in comparison * to other detection examples to enable the barcode detector to detect small barcodes * at long distances. * <p> * Suppressing InlinedApi since there is a check that the minimum version is met before usi...
Creates and starts the camera. Note that this uses a higher resolution in comparison to other detection examples to enable the barcode detector to detect small barcodes at long distances. Suppressing InlinedApi since there is a check that the minimum version is met before using the constant
createCameraSource
{ "repo_name": "ooxxmix/HLibrary", "path": "app/src/main/java/com/ooxxmix/hlibrary/ScanActivity.java", "license": "apache-2.0", "size": 13549 }
[ "android.annotation.SuppressLint", "android.content.Context", "android.content.Intent", "android.content.IntentFilter", "android.os.Build", "android.util.Log", "android.widget.Toast", "com.google.android.gms.vision.CameraSource", "com.google.android.gms.vision.MultiProcessor", "com.google.android....
import android.annotation.SuppressLint; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.Build; import android.util.Log; import android.widget.Toast; import com.google.android.gms.vision.CameraSource; import com.google.android.gms.vision.MultiProcesso...
import android.annotation.*; import android.content.*; import android.os.*; import android.util.*; import android.widget.*; import com.google.android.gms.vision.*; import com.google.android.gms.vision.barcode.*;
[ "android.annotation", "android.content", "android.os", "android.util", "android.widget", "com.google.android" ]
android.annotation; android.content; android.os; android.util; android.widget; com.google.android;
1,447,405
@Test(expected = IllegalArgumentException.class) public void testConstructionWithEmptyList() { new ForbidSubStr(new ArrayList<String>(), new IdentityTransform()); }
@Test(expected = IllegalArgumentException.class) void function() { new ForbidSubStr(new ArrayList<String>(), new IdentityTransform()); }
/** * Tests construction with an empty List (should throw an Exception). */
Tests construction with an empty List (should throw an Exception)
testConstructionWithEmptyList
{ "repo_name": "liwei5365/super-csv", "path": "super-csv/src/test/java/org/supercsv/cellprocessor/constraint/ForbidSubStrTest.java", "license": "apache-2.0", "size": 4633 }
[ "java.util.ArrayList", "org.junit.Test", "org.supercsv.mock.IdentityTransform" ]
import java.util.ArrayList; import org.junit.Test; import org.supercsv.mock.IdentityTransform;
import java.util.*; import org.junit.*; import org.supercsv.mock.*;
[ "java.util", "org.junit", "org.supercsv.mock" ]
java.util; org.junit; org.supercsv.mock;
1,592,043
SuitabilityScenario suitabilityScenario = suitabilityScenarioDao .findSuitabilityScenarioById(WifKeys.TEST_SUITABILITY_SCENARIO_ID); WifProject project = wifProjectDao.findProjectById(suitabilityScenario .getProjectId()); project = projectParser.parse(project); suitabilityScenario = suit...
SuitabilityScenario suitabilityScenario = suitabilityScenarioDao .findSuitabilityScenarioById(WifKeys.TEST_SUITABILITY_SCENARIO_ID); WifProject project = wifProjectDao.findProjectById(suitabilityScenario .getProjectId()); project = projectParser.parse(project); suitabilityScenario = suitabilityParser.parseSuitabilitySc...
/** * Parses the suitability test. * * @throws Exception * the exception */
Parses the suitability test
parseSuitabilityTest
{ "repo_name": "tosseto/online-whatif", "path": "src/test/java/au/org/aurin/wif/io/suitability/CouchDB2ModelSuitabilityIT.java", "license": "mit", "size": 2596 }
[ "au.org.aurin.wif.model.WifProject", "au.org.aurin.wif.model.suitability.SuitabilityScenario", "au.org.aurin.wif.svc.WifKeys", "org.testng.Assert" ]
import au.org.aurin.wif.model.WifProject; import au.org.aurin.wif.model.suitability.SuitabilityScenario; import au.org.aurin.wif.svc.WifKeys; import org.testng.Assert;
import au.org.aurin.wif.model.*; import au.org.aurin.wif.model.suitability.*; import au.org.aurin.wif.svc.*; import org.testng.*;
[ "au.org.aurin", "org.testng" ]
au.org.aurin; org.testng;
2,760,460
static void increaseResourceUtilization( ContainersMonitor containersMonitor, ResourceUtilization resourceUtil, Resource resource) { float vCores = (float) resource.getVirtualCores(); int vmem = (int) (resource.getMemorySize() * containersMonitor.getVmemRatio()); resourceUtil.addTo((in...
static void increaseResourceUtilization( ContainersMonitor containersMonitor, ResourceUtilization resourceUtil, Resource resource) { float vCores = (float) resource.getVirtualCores(); int vmem = (int) (resource.getMemorySize() * containersMonitor.getVmemRatio()); resourceUtil.addTo((int)resource.getMemorySize(), vmem, ...
/** * Utility method to add a {@link Resource} to the * {@link ResourceUtilization}. * @param containersMonitor Containers Monitor. * @param resourceUtil Resource Utilization. * @param resource Resource. */
Utility method to add a <code>Resource</code> to the <code>ResourceUtilization</code>
increaseResourceUtilization
{ "repo_name": "xiao-chen/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitor.java", "license": "apache-2.0", "size": 2625 }
[ "org.apache.hadoop.yarn.api.records.Resource", "org.apache.hadoop.yarn.api.records.ResourceUtilization" ]
import org.apache.hadoop.yarn.api.records.Resource; import org.apache.hadoop.yarn.api.records.ResourceUtilization;
import org.apache.hadoop.yarn.api.records.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,058,428
return toImmutableMultiset(Function.identity(), e -> 1); }
return toImmutableMultiset(Function.identity(), e -> 1); }
/** * Returns a {@code Collector} that accumulates the input elements into a new {@code * ImmutableMultiset}. Elements iterate in order by the <i>first</i> appearance of that element in * encounter order. * * @since 21.0 */
Returns a Collector that accumulates the input elements into a new ImmutableMultiset. Elements iterate in order by the first appearance of that element in encounter order
toImmutableMultiset
{ "repo_name": "rgoldberg/guava", "path": "guava/src/com/google/common/collect/ImmutableMultiset.java", "license": "apache-2.0", "size": 20003 }
[ "java.util.function.Function" ]
import java.util.function.Function;
import java.util.function.*;
[ "java.util" ]
java.util;
273,339
@Override public ActionForward execute(ComponentContext context, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { HttpSession session = request.getSession(); String type = request.getParameter("type"); ...
ActionForward function(ComponentContext context, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { HttpSession session = request.getSession(); String type = request.getParameter("type"); String table = request.getParameter("table"); PagedTable pt = SessionMethods.getRes...
/** * Set up the exportOptions tile. * * @param context The Tiles ComponentContext * @param mapping The ActionMapping used to select this instance * @param form The optional ActionForm bean for this request (if any) * @param request The HTTP request we are processing * @param response...
Set up the exportOptions tile
execute
{ "repo_name": "drhee/toxoMine", "path": "intermine/web/main/src/org/intermine/web/struts/ExportOptionsController.java", "license": "lgpl-2.1", "size": 3808 }
[ "java.util.LinkedHashMap", "java.util.List", "java.util.Map", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "javax.servlet.http.HttpSession", "org.apache.struts.action.ActionForm", "org.apache.struts.action.ActionForward", "org.apache.struts.action.ActionMapping"...
import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.st...
import java.util.*; import javax.servlet.http.*; import org.apache.struts.action.*; import org.apache.struts.tiles.*; import org.intermine.pathquery.*; import org.intermine.util.*; import org.intermine.web.logic.*; import org.intermine.web.logic.config.*; import org.intermine.web.logic.export.http.*; import org.intermi...
[ "java.util", "javax.servlet", "org.apache.struts", "org.intermine.pathquery", "org.intermine.util", "org.intermine.web" ]
java.util; javax.servlet; org.apache.struts; org.intermine.pathquery; org.intermine.util; org.intermine.web;
2,180,553
public Matrix4d set(DoubleBuffer buffer) { int pos = buffer.position(); m00 = buffer.get(pos); m01 = buffer.get(pos+1); m02 = buffer.get(pos+2); m03 = buffer.get(pos+3); m10 = buffer.get(pos+4); m11 = buffer.get(pos+5); m12 = buffer.get(pos+6); ...
Matrix4d function(DoubleBuffer buffer) { int pos = buffer.position(); m00 = buffer.get(pos); m01 = buffer.get(pos+1); m02 = buffer.get(pos+2); m03 = buffer.get(pos+3); m10 = buffer.get(pos+4); m11 = buffer.get(pos+5); m12 = buffer.get(pos+6); m13 = buffer.get(pos+7); m20 = buffer.get(pos+8); m21 = buffer.get(pos+9); m2...
/** * Set the values of this matrix by reading 16 double values from the given {@link DoubleBuffer} in column-major order, * starting at its current position. * <p> * The DoubleBuffer is expected to contain the values in column-major order. * <p> * The position of the DoubleBuffer will not...
Set the values of this matrix by reading 16 double values from the given <code>DoubleBuffer</code> in column-major order, starting at its current position. The DoubleBuffer is expected to contain the values in column-major order. The position of the DoubleBuffer will not be changed by this method
set
{ "repo_name": "Tek256/beyond-the-void", "path": "src/org/joml/Matrix4d.java", "license": "apache-2.0", "size": 329189 }
[ "java.nio.DoubleBuffer" ]
import java.nio.DoubleBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,725,453
public EGLContext getContext() { return mEGLContext; }
EGLContext function() { return mEGLContext; }
/** * Gets the underlying {@link EGLContext}. * * @return the underlying {@link EGLContext}. */
Gets the underlying <code>EGLContext</code>
getContext
{ "repo_name": "LAGonauta/dolphin", "path": "Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/EGLHelper.java", "license": "gpl-2.0", "size": 10463 }
[ "javax.microedition.khronos.egl.EGLContext" ]
import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.egl.*;
[ "javax.microedition" ]
javax.microedition;
1,399,167
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<AppServiceEnvironmentResourceInner>> getByResourceGroupWithResponseAsync( String resourceGroupName, String name, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<AppServiceEnvironmentResourceInner>> function( String resourceGroupName, String name, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new I...
/** * Get the properties of 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 context The context to associate with this operation. * @throws IllegalArgumentExceptio...
Get the properties of an App Service Environment
getByResourceGroupWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/AppServiceEnvironmentsClientImpl.java", "license": "mit", "size": 563770 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.appservice.fluent.models.AppServiceEnvironmentResourceInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.appservice.fluent.models.AppServiceEnvironmentResourceInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appservice.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,642,822
private void showOrHideTags() { Platform.runLater(() -> { if (DisplayOptions.HIDE_TAGS.getName().equals(hideTagsMenuItem.getText())) { //Temporarily remove the tags group and update buttons masterGroup.getChildren().remove(tagsGroup); hideTagsMenuI...
void function() { Platform.runLater(() -> { if (DisplayOptions.HIDE_TAGS.getName().equals(hideTagsMenuItem.getText())) { masterGroup.getChildren().remove(tagsGroup); hideTagsMenuItem.setText(DisplayOptions.SHOW_TAGS.getName()); tagsGroup.clearFocus(); pcs.firePropertyChange(new PropertyChangeEvent(this, "state", null, ...
/** * Hides or show tags when the Hide or Show button is pressed in the Tags * Menu. */
Hides or show tags when the Hide or Show button is pressed in the Tags Menu
showOrHideTags
{ "repo_name": "eugene7646/autopsy", "path": "Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.java", "license": "apache-2.0", "size": 62304 }
[ "java.beans.PropertyChangeEvent" ]
import java.beans.PropertyChangeEvent;
import java.beans.*;
[ "java.beans" ]
java.beans;
2,546,045
public boolean totalScores( PublishedAssessmentFacade pubAssessment, TotalScoresBean bean, boolean isValueChange) { log.debug("TotalScoreListener: totalScores() starts"); if (ContextUtil.lookupParam("sortBy") != null && !ContextUtil.lookupParam("sortBy").trim().equals("")){ bean.setSortType(ContextU...
boolean function( PublishedAssessmentFacade pubAssessment, TotalScoresBean bean, boolean isValueChange) { log.debug(STR); if (ContextUtil.lookupParam(STR) != null && !ContextUtil.lookupParam(STR).trim().equals("")){ bean.setSortType(ContextUtil.lookupParam(STR)); log.debug("TotalScoreListener: totalScores() :: sortBy =...
/** * This will populate the TotalScoresBean with the data associated with the * particular versioned assessment based on the publishedId. * * @todo Some of this code will change when we move this to Hibernate persistence. * @param publishedId String * @param bean TotalScoresBean * @return boolean ...
This will populate the TotalScoresBean with the data associated with the particular versioned assessment based on the publishedId
totalScores
{ "repo_name": "eemirtekin/Sakai-10.6-TR", "path": "samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/evaluation/TotalScoreListener.java", "license": "apache-2.0", "size": 38181 }
[ "java.util.ArrayList", "java.util.Map", "org.sakaiproject.tool.assessment.facade.PublishedAssessmentFacade", "org.sakaiproject.tool.assessment.integration.context.IntegrationContextFactory", "org.sakaiproject.tool.assessment.integration.helper.ifc.AgentHelper", "org.sakaiproject.tool.assessment.ui.bean.ev...
import java.util.ArrayList; import java.util.Map; import org.sakaiproject.tool.assessment.facade.PublishedAssessmentFacade; import org.sakaiproject.tool.assessment.integration.context.IntegrationContextFactory; import org.sakaiproject.tool.assessment.integration.helper.ifc.AgentHelper; import org.sakaiproject.tool.asse...
import java.util.*; import org.sakaiproject.tool.assessment.facade.*; import org.sakaiproject.tool.assessment.integration.context.*; import org.sakaiproject.tool.assessment.integration.helper.ifc.*; import org.sakaiproject.tool.assessment.ui.bean.evaluation.*; import org.sakaiproject.tool.assessment.ui.listener.util.*;
[ "java.util", "org.sakaiproject.tool" ]
java.util; org.sakaiproject.tool;
2,692,858
public void accept(EventVisitor eventVisitor) { eventVisitor.visitSendEvent(this); }
void function(EventVisitor eventVisitor) { eventVisitor.visitSendEvent(this); }
/** Accepts the EventVisitor. * @param eventVisitor The EventVisitor to accept. **/
Accepts the EventVisitor
accept
{ "repo_name": "NCIP/calims", "path": "calims2-model/src/java/gov/nih/nci/calims2/domain/inventory/event/SendEvent.java", "license": "bsd-3-clause", "size": 2426 }
[ "gov.nih.nci.calims2.domain.inventory.visitor.EventVisitor" ]
import gov.nih.nci.calims2.domain.inventory.visitor.EventVisitor;
import gov.nih.nci.calims2.domain.inventory.visitor.*;
[ "gov.nih.nci" ]
gov.nih.nci;
1,790,818
synchronized Connection getConnection(Configuration configuration) throws IOException { if (connection != null) { return connection; } config = new PhoenixPigConfiguration(configuration); try { LOG.info("Initializing new Phoenix connection..."); connection = config.getConnec...
synchronized Connection getConnection(Configuration configuration) throws IOException { if (connection != null) { return connection; } config = new PhoenixPigConfiguration(configuration); try { LOG.info(STR); connection = config.getConnection(); LOG.info(STR+ connection.getAutoCommit()); return connection; } catch (SQL...
/** * This method creates a database connection. A single instance is created * and passed around for re-use. * * @param configuration * @return * @throws IOException */
This method creates a database connection. A single instance is created and passed around for re-use
getConnection
{ "repo_name": "jffnothing/phoenix-4.0.0-incubating", "path": "phoenix-pig/src/main/java/org/apache/phoenix/pig/hadoop/PhoenixOutputFormat.java", "license": "apache-2.0", "size": 3094 }
[ "java.io.IOException", "java.sql.Connection", "java.sql.SQLException", "org.apache.hadoop.conf.Configuration", "org.apache.phoenix.pig.PhoenixPigConfiguration" ]
import java.io.IOException; import java.sql.Connection; import java.sql.SQLException; import org.apache.hadoop.conf.Configuration; import org.apache.phoenix.pig.PhoenixPigConfiguration;
import java.io.*; import java.sql.*; import org.apache.hadoop.conf.*; import org.apache.phoenix.pig.*;
[ "java.io", "java.sql", "org.apache.hadoop", "org.apache.phoenix" ]
java.io; java.sql; org.apache.hadoop; org.apache.phoenix;
2,520,297
public static boolean verify(PublicKey publicKey, String signedData, String signature) { Signature sig; try { sig = Signature.getInstance(SIGNATURE_ALGORITHM); sig.initVerify(publicKey); sig.update(signedData.getBytes()); if (!sig.verify(Base64.decode(...
static boolean function(PublicKey publicKey, String signedData, String signature) { Signature sig; try { sig = Signature.getInstance(SIGNATURE_ALGORITHM); sig.initVerify(publicKey); sig.update(signedData.getBytes()); if (!sig.verify(Base64.decode(signature))) { Log.e(TAG, STR); return false; } return true; } catch (NoS...
/** * Verifies that the signature from the server matches the computed * signature on the data. Returns true if the data is correctly signed. * * @param publicKey public key associated with the developer account * @param signedData signed data from server * @param signature server signatu...
Verifies that the signature from the server matches the computed signature on the data. Returns true if the data is correctly signed
verify
{ "repo_name": "zyjiang08/servestream", "path": "src/net/sourceforge/servestream/billing/Security.java", "license": "apache-2.0", "size": 5025 }
[ "android.util.Log", "java.security.InvalidKeyException", "java.security.NoSuchAlgorithmException", "java.security.PublicKey", "java.security.Signature", "java.security.SignatureException" ]
import android.util.Log; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.PublicKey; import java.security.Signature; import java.security.SignatureException;
import android.util.*; import java.security.*;
[ "android.util", "java.security" ]
android.util; java.security;
2,222,838
//CHANGED: protected boolean scanCDATASection(XMLStringBuffer contentBuffer, boolean complete) throws IOException, XNIException { // call handler if (fDocumentHandler != null) { //fDocumentHandler.startCDATA(null); } while (true) { //scanData will fi...
boolean function(XMLStringBuffer contentBuffer, boolean complete) throws IOException, XNIException { if (fDocumentHandler != null) { } while (true) { if (!fEntityScanner.scanData("]]>", contentBuffer)) { break ; } else { int c = fEntityScanner.peekChar(); if (c != -1 && isInvalidLiteral(c)) { if (XMLChar.isHighSurrogat...
/** * Scans a CDATA section. * <p> * <strong>Note:</strong> This method uses the fTempString and * fStringBuffer variables. * * @param complete True if the CDATA section is to be scanned * completely. * * @return True if CDATA is completely scanned. */
Scans a CDATA section. Note: This method uses the fTempString and fStringBuffer variables
scanCDATASection
{ "repo_name": "alexkasko/openjdk-icedtea7", "path": "jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java", "license": "gpl-2.0", "size": 133831 }
[ "com.sun.org.apache.xerces.internal.util.XMLChar", "com.sun.org.apache.xerces.internal.util.XMLStringBuffer", "com.sun.org.apache.xerces.internal.xni.XNIException", "java.io.IOException" ]
import com.sun.org.apache.xerces.internal.util.XMLChar; import com.sun.org.apache.xerces.internal.util.XMLStringBuffer; import com.sun.org.apache.xerces.internal.xni.XNIException; import java.io.IOException;
import com.sun.org.apache.xerces.internal.util.*; import com.sun.org.apache.xerces.internal.xni.*; import java.io.*;
[ "com.sun.org", "java.io" ]
com.sun.org; java.io;
489,323
Instance getInstance() { return instance; }
Instance getInstance() { return instance; }
/** * Gets the instance used by this GC. * * @return instance */
Gets the instance used by this GC
getInstance
{ "repo_name": "joshelser/accumulo", "path": "server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java", "license": "apache-2.0", "size": 26747 }
[ "org.apache.accumulo.core.client.Instance" ]
import org.apache.accumulo.core.client.Instance;
import org.apache.accumulo.core.client.*;
[ "org.apache.accumulo" ]
org.apache.accumulo;
2,451,482
public final Type visitLogicalOrExpression(final GNode n) { final Type xLvalue = (Type) dispatch(n.getGeneric(0)); final Type x = getRValue(xLvalue, n.getGeneric(0)); final Type y = dispatchRValue(n.getGeneric(1)); if (x.isError() || y.isError()) return setType(n, ErrorT.TYPE); final T...
final Type function(final GNode n) { final Type xLvalue = (Type) dispatch(n.getGeneric(0)); final Type x = getRValue(xLvalue, n.getGeneric(0)); final Type y = dispatchRValue(n.getGeneric(1)); if (x.isError() y.isError()) return setType(n, ErrorT.TYPE); final Type result; final Type tBool = JavaEntities.nameToBaseType(S...
/** * Visit a LogicalOrExpression = Expression Expression * (gosling_et_al_2000 <a href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5228">&sect;15.22</a>, * <a href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5313">&sect;15.28</a>). */
Visit a LogicalOrExpression = Expression Expression (gosling_et_al_2000 &sect;15.22, &sect;15.28)
visitLogicalOrExpression
{ "repo_name": "wandoulabs/xtc-rats", "path": "xtc-core/src/main/java/xtc/lang/JavaAnalyzer.java", "license": "lgpl-2.1", "size": 108783 }
[ "xtc.tree.GNode", "xtc.type.ErrorT", "xtc.type.Type" ]
import xtc.tree.GNode; import xtc.type.ErrorT; import xtc.type.Type;
import xtc.tree.*; import xtc.type.*;
[ "xtc.tree", "xtc.type" ]
xtc.tree; xtc.type;
786,488
protected void writeRead () { stream.println (" public void _read (org.omg.CORBA.portable.InputStream i)"); stream.println (" {"); if (entry instanceof ValueBoxEntry) { TypedefEntry member = ((InterfaceState) ((ValueBoxEntry) entry).state ().elementAt (0)).entry; SymtabEntry mType = me...
void function () { stream.println (STR); stream.println (STR); if (entry instanceof ValueBoxEntry) { TypedefEntry member = ((InterfaceState) ((ValueBoxEntry) entry).state ().elementAt (0)).entry; SymtabEntry mType = member.type (); if (mType instanceof StringEntry) stream.println (STR); else if (mType instanceof Primit...
/** * Generate the _read method. **/
Generate the _read method
writeRead
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Holder.java", "license": "mit", "size": 7577 }
[ "com.sun.tools.corba.se.idl.InterfaceState", "com.sun.tools.corba.se.idl.PrimitiveEntry", "com.sun.tools.corba.se.idl.StringEntry", "com.sun.tools.corba.se.idl.SymtabEntry", "com.sun.tools.corba.se.idl.TypedefEntry", "com.sun.tools.corba.se.idl.ValueBoxEntry" ]
import com.sun.tools.corba.se.idl.InterfaceState; import com.sun.tools.corba.se.idl.PrimitiveEntry; import com.sun.tools.corba.se.idl.StringEntry; import com.sun.tools.corba.se.idl.SymtabEntry; import com.sun.tools.corba.se.idl.TypedefEntry; import com.sun.tools.corba.se.idl.ValueBoxEntry;
import com.sun.tools.corba.se.idl.*;
[ "com.sun.tools" ]
com.sun.tools;
2,016,709
void leavePlace (ClientObject caller);
void leavePlace (ClientObject caller);
/** * Handles a {@link LocationService#leavePlace} request. */
Handles a <code>LocationService#leavePlace</code> request
leavePlace
{ "repo_name": "threerings/narya", "path": "core/src/main/java/com/threerings/crowd/server/LocationProvider.java", "license": "lgpl-2.1", "size": 1781 }
[ "com.threerings.presents.data.ClientObject" ]
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.data.*;
[ "com.threerings.presents" ]
com.threerings.presents;
384,002
public void testSubmitWithoutUploadFile() { tester.startPage(MockFormFileUploadPage.class); MockFormFileUploadPage page = (MockFormFileUploadPage)tester.getLastRenderedPage(); Session.get().setLocale(Locale.US); FormTester formTester = tester.newFormTester("form"); // without file upload formTester.su...
void function() { tester.startPage(MockFormFileUploadPage.class); MockFormFileUploadPage page = (MockFormFileUploadPage)tester.getLastRenderedPage(); Session.get().setLocale(Locale.US); FormTester formTester = tester.newFormTester("form"); formTester.submit(); assertNull(page.getFileUpload()); tester.assertErrorMessage...
/** * Test that formTester deal with Multipart form correctly when no actual upload */
Test that formTester deal with Multipart form correctly when no actual upload
testSubmitWithoutUploadFile
{ "repo_name": "Servoy/wicket", "path": "wicket/src/test/java/org/apache/wicket/util/tester/FormTesterTest.java", "license": "apache-2.0", "size": 9034 }
[ "java.util.Locale", "org.apache.wicket.Session" ]
import java.util.Locale; import org.apache.wicket.Session;
import java.util.*; import org.apache.wicket.*;
[ "java.util", "org.apache.wicket" ]
java.util; org.apache.wicket;
2,371,629
public static void initElements(ElementLocatorFactory factory, Object page) { final ElementLocatorFactory factoryRef = factory; initElements(new DefaultFieldDecorator(factoryRef), page); }
static void function(ElementLocatorFactory factory, Object page) { final ElementLocatorFactory factoryRef = factory; initElements(new DefaultFieldDecorator(factoryRef), page); }
/** * Similar to the other "initElements" methods, but takes an {@link ElementLocatorFactory} which * is used for providing the mechanism for fniding elements. If the ElementLocatorFactory returns * null then the field won't be decorated. * * @param factory The factory to use * @param page The obje...
Similar to the other "initElements" methods, but takes an <code>ElementLocatorFactory</code> which is used for providing the mechanism for fniding elements. If the ElementLocatorFactory returns null then the field won't be decorated
initElements
{ "repo_name": "sevaseva/selenium", "path": "java/client/src/org/openqa/selenium/support/PageFactory.java", "license": "apache-2.0", "size": 5546 }
[ "org.openqa.selenium.support.pagefactory.DefaultFieldDecorator", "org.openqa.selenium.support.pagefactory.ElementLocatorFactory" ]
import org.openqa.selenium.support.pagefactory.DefaultFieldDecorator; import org.openqa.selenium.support.pagefactory.ElementLocatorFactory;
import org.openqa.selenium.support.pagefactory.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
2,504,446
public BitSet getStateBits() { return stateBits; }
BitSet function() { return stateBits; }
/** * Returns state bits as {@link BitSet}. * * @return state bits */
Returns state bits as <code>BitSet</code>
getStateBits
{ "repo_name": "Gerguis/openhab2", "path": "bundles/binding/org.openhab.binding.satel/src/main/java/org/openhab/binding/satel/internal/event/IntegraStateEvent.java", "license": "epl-1.0", "size": 2640 }
[ "java.util.BitSet" ]
import java.util.BitSet;
import java.util.*;
[ "java.util" ]
java.util;
25,467
protected void setNonContinuousLayoutDivider(Component newDivider, boolean rememberSizes) { // FIXME: use rememberSizes for something nonContinuousLayoutDivider = newDivider; }
void function(Component newDivider, boolean rememberSizes) { nonContinuousLayoutDivider = newDivider; }
/** * This method sets the component to use as the nonContinuousLayoutDivider. * * @param newDivider The component to use as the nonContinuousLayoutDivider. * @param rememberSizes FIXME: document. */
This method sets the component to use as the nonContinuousLayoutDivider
setNonContinuousLayoutDivider
{ "repo_name": "aosm/gcc_40", "path": "libjava/javax/swing/plaf/basic/BasicSplitPaneUI.java", "license": "gpl-2.0", "size": 41958 }
[ "java.awt.Component" ]
import java.awt.Component;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,754,499
protected List<AccountingLineTableRow> createRowsForFields() { List<AccountingLineTableRow> rows = new ArrayList<AccountingLineTableRow>(); int countForThisRow = 0; AccountingLineTableRow row = new AccountingLineTableRow(); for (AccountingLineViewField field : fields) { ...
List<AccountingLineTableRow> function() { List<AccountingLineTableRow> rows = new ArrayList<AccountingLineTableRow>(); int countForThisRow = 0; AccountingLineTableRow row = new AccountingLineTableRow(); for (AccountingLineViewField field : fields) { row.addCell(createHeaderCellForField(field)); row.addCell(createCellFo...
/** * Creates rows for the inner tables for each field inside this columsn * definition * * @return a List of created AccountingLineTableRows */
Creates rows for the inner tables for each field inside this columsn definition
createRowsForFields
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/sys/document/web/AccountingLineViewColumns.java", "license": "apache-2.0", "size": 10123 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,056,648
@Override public Object getState() { List<Field> fields = new ArrayList<Field>(); addStatefulFields(this, fields); Map<String, Object> stateMap = new HashMap<String, Object>(); for (Field field : fields) { Object state = field.getState(); if (state ...
Object function() { List<Field> fields = new ArrayList<Field>(); addStatefulFields(this, fields); Map<String, Object> stateMap = new HashMap<String, Object>(); for (Field field : fields) { Object state = field.getState(); if (state != null) { stateMap.put(field.getName(), state); } } if (stateMap.isEmpty()) { return nu...
/** * Return the FieldSet state. The following state is returned: * * <ul> * <li>all the input Field values and other FieldSets contained in this * FieldSet and child containers.</li> * </ul> * * @return the state of input Fields and FieldSets contained in this FieldSet ...
Return the FieldSet state. The following state is returned: all the input Field values and other FieldSets contained in this FieldSet and child containers.
getState
{ "repo_name": "medgar/click", "path": "framework/src/org/apache/click/control/FieldSet.java", "license": "apache-2.0", "size": 49701 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,075,167
private static void divideBlockToTasks(Map<String, List<List<Distributable>>> outputMap, String key, List<Distributable> blockOfEachNode) { List<List<Distributable>> taskLists = outputMap.get(key); int tasksOfNode = taskLists.size(); int i = 0; for (Distributable block : blockOfEachNode) { ...
static void function(Map<String, List<List<Distributable>>> outputMap, String key, List<Distributable> blockOfEachNode) { List<List<Distributable>> taskLists = outputMap.get(key); int tasksOfNode = taskLists.size(); int i = 0; for (Distributable block : blockOfEachNode) { taskLists.get(i % tasksOfNode).add(block); i++;...
/** * This will divide the blocks of a node to tasks of the node. * * @param outputMap * @param key * @param blockOfEachNode */
This will divide the blocks of a node to tasks of the node
divideBlockToTasks
{ "repo_name": "zzcclp/carbondata", "path": "processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java", "license": "apache-2.0", "size": 52368 }
[ "java.util.List", "java.util.Map", "org.apache.carbondata.core.datastore.block.Distributable" ]
import java.util.List; import java.util.Map; import org.apache.carbondata.core.datastore.block.Distributable;
import java.util.*; import org.apache.carbondata.core.datastore.block.*;
[ "java.util", "org.apache.carbondata" ]
java.util; org.apache.carbondata;
1,148,351
public void loadProjectData( ProjectInfo currentSelectedProject, boolean zoomTo ) throws Exception { if (geopapDataLayer != null) geopapDataLayer.removeAllRenderables(); Envelope bounds = new Envelope(); File dbFile = currentSelectedProject.databaseFile; try (Connection...
void function( ProjectInfo currentSelectedProject, boolean zoomTo ) throws Exception { if (geopapDataLayer != null) geopapDataLayer.removeAllRenderables(); Envelope bounds = new Envelope(); File dbFile = currentSelectedProject.databaseFile; try (Connection connection = DriverManager.getConnection(STR + dbFile.getAbsolu...
/** * Extract data from the db and add them to the map view. * * @param projectTemplate * @return * @throws Exception */
Extract data from the db and add them to the map view
loadProjectData
{ "repo_name": "moovida/jgrasstools", "path": "apps/src/main/java/org/hortonmachine/geopaparazzi/GeopaparazziController.java", "license": "gpl-3.0", "size": 48333 }
[ "gov.nasa.worldwind.geom.Sector", "gov.nasa.worldwind.render.BasicShapeAttributes", "gov.nasa.worldwind.render.Material", "gov.nasa.worldwind.render.Path", "java.awt.Color", "java.io.File", "java.sql.Connection", "java.sql.DriverManager", "java.util.List", "org.geotools.geometry.jts.ReferencedEnve...
import gov.nasa.worldwind.geom.Sector; import gov.nasa.worldwind.render.BasicShapeAttributes; import gov.nasa.worldwind.render.Material; import gov.nasa.worldwind.render.Path; import java.awt.Color; import java.io.File; import java.sql.Connection; import java.sql.DriverManager; import java.util.List; import org.geotool...
import gov.nasa.worldwind.geom.*; import gov.nasa.worldwind.render.*; import java.awt.*; import java.io.*; import java.sql.*; import java.util.*; import org.geotools.geometry.jts.*; import org.hortonmachine.gears.io.geopaparazzi.*; import org.hortonmachine.nww.utils.*; import org.locationtech.jts.geom.*;
[ "gov.nasa.worldwind", "java.awt", "java.io", "java.sql", "java.util", "org.geotools.geometry", "org.hortonmachine.gears", "org.hortonmachine.nww", "org.locationtech.jts" ]
gov.nasa.worldwind; java.awt; java.io; java.sql; java.util; org.geotools.geometry; org.hortonmachine.gears; org.hortonmachine.nww; org.locationtech.jts;
1,307,218
FD loadDirect(LeafReaderContext context) throws Exception;
FD loadDirect(LeafReaderContext context) throws Exception;
/** * Loads directly the atomic field data for the reader, ignoring any caching involved. */
Loads directly the atomic field data for the reader, ignoring any caching involved
loadDirect
{ "repo_name": "strapdata/elassandra", "path": "server/src/main/java/org/elasticsearch/index/fielddata/IndexFieldData.java", "license": "apache-2.0", "size": 10510 }
[ "org.apache.lucene.index.LeafReaderContext" ]
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.index.*;
[ "org.apache.lucene" ]
org.apache.lucene;
2,440,632
void addSecurityProvider(SecurityProvider securityProvider);
void addSecurityProvider(SecurityProvider securityProvider);
/** * Adds a securityProvider. * * @param securityProvider * Ask remo */
Adds a securityProvider
addSecurityProvider
{ "repo_name": "adnovum/katharsis-framework", "path": "katharsis-core/src/main/java/io/katharsis/module/Module.java", "license": "apache-2.0", "size": 4751 }
[ "io.katharsis.security.SecurityProvider" ]
import io.katharsis.security.SecurityProvider;
import io.katharsis.security.*;
[ "io.katharsis.security" ]
io.katharsis.security;
1,005,279
private void addAllChildrenDependencies( DependencyNode dependencyNode ) { for ( DependencyNode subdependencyNode : dependencyNode.getChildren() ) { Artifact artifact = subdependencyNode.getArtifact(); if ( artifact.getGroupId().equals( project.getGroupId() ) ...
void function( DependencyNode dependencyNode ) { for ( DependencyNode subdependencyNode : dependencyNode.getChildren() ) { Artifact artifact = subdependencyNode.getArtifact(); if ( artifact.getGroupId().equals( project.getGroupId() ) && artifact.getArtifactId().equals( project.getArtifactId() ) && artifact.getVersion()...
/** * Recursive method to get all dependencies from a given <code>dependencyNode</code> * * @param dependencyNode not null */
Recursive method to get all dependencies from a given <code>dependencyNode</code>
addAllChildrenDependencies
{ "repo_name": "dmlloyd/maven-plugins", "path": "maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/Dependencies.java", "license": "apache-2.0", "size": 8743 }
[ "org.apache.maven.artifact.Artifact", "org.apache.maven.shared.dependency.graph.DependencyNode" ]
import org.apache.maven.artifact.Artifact; import org.apache.maven.shared.dependency.graph.DependencyNode;
import org.apache.maven.artifact.*; import org.apache.maven.shared.dependency.graph.*;
[ "org.apache.maven" ]
org.apache.maven;
2,102,512
public WorkItemQueryResult queryByWiql( final Wiql wiql, final String project, final String team, final Boolean timePrecision, final Integer top) { final UUID locationId = UUID.fromString("1a9c53f7-f243-4447-b110-35ef023636e4"); //$NON-NLS-1$ final ApiRe...
WorkItemQueryResult function( final Wiql wiql, final String project, final String team, final Boolean timePrecision, final Integer top) { final UUID locationId = UUID.fromString(STR); final ApiResourceVersion apiVersion = new ApiResourceVersion(STR); final Map<String, Object> routeValues = new HashMap<String, Object>()...
/** * [Preview API 3.1-preview.2] Gets the results of the query. * * @param wiql * The query containing the wiql. * @param project * Project ID or project name * @param team * Team ID or team name * @param timePrecision * ...
[Preview API 3.1-preview.2] Gets the results of the query
queryByWiql
{ "repo_name": "Microsoft/vso-httpclient-java", "path": "Rest/alm-tfs-client/src/main/generated/com/microsoft/alm/teamfoundation/workitemtracking/webapi/WorkItemTrackingHttpClientBase.java", "license": "mit", "size": 169431 }
[ "com.microsoft.alm.client.HttpMethod", "com.microsoft.alm.client.VssMediaTypes", "com.microsoft.alm.client.VssRestRequest", "com.microsoft.alm.client.model.NameValueCollection", "com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.Wiql", "com.microsoft.alm.teamfoundation.workitemtracking.webap...
import com.microsoft.alm.client.HttpMethod; import com.microsoft.alm.client.VssMediaTypes; import com.microsoft.alm.client.VssRestRequest; import com.microsoft.alm.client.model.NameValueCollection; import com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.Wiql; import com.microsoft.alm.teamfoundation.worki...
import com.microsoft.alm.client.*; import com.microsoft.alm.client.model.*; import com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.*; import com.microsoft.alm.visualstudio.services.webapi.*; import java.util.*;
[ "com.microsoft.alm", "java.util" ]
com.microsoft.alm; java.util;
2,347,232
public void add(K key, V value) { if (treatCollectionsAsImmutable) { Collection<V> newC = cf.newCollection(); Collection<V> c = map.get(key); if (c != null) { newC.addAll(c); } newC.add(value); map.put(key, newC); // replacing the old collection } else { Colle...
void function(K key, V value) { if (treatCollectionsAsImmutable) { Collection<V> newC = cf.newCollection(); Collection<V> c = map.get(key); if (c != null) { newC.addAll(c); } newC.add(value); map.put(key, newC); } else { Collection<V> c = map.get(key); if (c == null) { c = cf.newCollection(); map.put(key, c); } c.add(v...
/** * Adds the value to the Collection mapped to by the key. * * @param key * @param value */
Adds the value to the Collection mapped to by the key
add
{ "repo_name": "masonium/tregex", "path": "src/edu/stanford/nlp/util/CollectionValuedMap.java", "license": "gpl-2.0", "size": 12094 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,247,070
public void testTimeIntervalCET_DST_End() { long interval = TimeUnit.MINUTES.toMillis(20); DateTimeZone tz = DateTimeZone.forID("CET"); Rounding rounding = new TimeIntervalRounding(interval, tz); assertThat(rounding.round(time("2015-10-25T01:55:00+02:00")), isDate(time("2015-10-25T0...
void function() { long interval = TimeUnit.MINUTES.toMillis(20); DateTimeZone tz = DateTimeZone.forID("CET"); Rounding rounding = new TimeIntervalRounding(interval, tz); assertThat(rounding.round(time(STR)), isDate(time(STR), tz)); assertThat(rounding.round(time(STR)), isDate(time(STR), tz)); assertThat(rounding.round(...
/** * test DST end with interval rounding * CET: 25 October 2015, 03:00:00 clocks were turned backward 1 hour to 25 October 2015, 02:00:00 local standard time */
test DST end with interval rounding
testTimeIntervalCET_DST_End
{ "repo_name": "gmarz/elasticsearch", "path": "core/src/test/java/org/elasticsearch/common/rounding/TimeZoneRoundingTests.java", "license": "apache-2.0", "size": 35396 }
[ "java.util.concurrent.TimeUnit", "org.elasticsearch.common.rounding.Rounding", "org.joda.time.DateTimeZone" ]
import java.util.concurrent.TimeUnit; import org.elasticsearch.common.rounding.Rounding; import org.joda.time.DateTimeZone;
import java.util.concurrent.*; import org.elasticsearch.common.rounding.*; import org.joda.time.*;
[ "java.util", "org.elasticsearch.common", "org.joda.time" ]
java.util; org.elasticsearch.common; org.joda.time;
2,410,580
private void fillBuffer() throws IOException { init(); final int bit = bits.nextBit(); if (bit == -1) { // EOF return; } if (bit == 1) { // literal value final int literal; if (literalTree != null) { ...
void function() throws IOException { init(); final int bit = bits.nextBit(); if (bit == -1) { return; } if (bit == 1) { final int literal; if (literalTree != null) { literal = literalTree.read(bits); } else { literal = bits.nextByte(); } if (literal == -1) { return; } buffer.put(literal); } else { final int distanceLow...
/** * Fill the sliding dictionary with more data. * @throws IOException */
Fill the sliding dictionary with more data
fillBuffer
{ "repo_name": "apache/commons-compress", "path": "src/main/java/org/apache/commons/compress/archivers/zip/ExplodingInputStream.java", "license": "apache-2.0", "size": 6647 }
[ "java.io.IOException", "org.apache.commons.compress.utils.ExactMath" ]
import java.io.IOException; import org.apache.commons.compress.utils.ExactMath;
import java.io.*; import org.apache.commons.compress.utils.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
622,774
public boolean isAtEnd() throws IOException { return bufferPos == bufferSize && !refillBuffer(false); }
boolean function() throws IOException { return bufferPos == bufferSize && !refillBuffer(false); }
/** * Returns true if the stream has reached the end of the input. This is the * case if either the end of the underlying input source has been reached or * if the stream has reached a limit created using {@link #pushLimit(int)}. */
Returns true if the stream has reached the end of the input. This is the case if either the end of the underlying input source has been reached or if the stream has reached a limit created using <code>#pushLimit(int)</code>
isAtEnd
{ "repo_name": "zhupan/protostuff", "path": "protostuff-core/src/main/java/com/dyuproject/protostuff/CodedInput.java", "license": "apache-2.0", "size": 34006 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,008,581
public SystemInfo getSystemInfo() { String json = callMethod("get_system_info", null); return GSON.fromJson(getResultFromResponse(json), SystemInfo.class); }
SystemInfo function() { String json = callMethod(STR, null); return GSON.fromJson(getResultFromResponse(json), SystemInfo.class); }
/** * Get System Information * * @return SystemInfo */
Get System Information
getSystemInfo
{ "repo_name": "cisco-system-traffic-generator/trex-java-sdk", "path": "src/main/java/com/cisco/trex/ClientBase.java", "license": "apache-2.0", "size": 16905 }
[ "com.cisco.trex.stateless.model.SystemInfo" ]
import com.cisco.trex.stateless.model.SystemInfo;
import com.cisco.trex.stateless.model.*;
[ "com.cisco.trex" ]
com.cisco.trex;
2,139,072
EList<DirectPositionType> getPos();
EList<DirectPositionType> getPos();
/** * Returns the value of the '<em><b>Pos</b></em>' containment reference list. * The list contents are of type {@link net.opengis.gml.DirectPositionType}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Pos</em>' containment reference list isn't clear, * there really should be more of a descr...
Returns the value of the 'Pos' containment reference list. The list contents are of type <code>net.opengis.gml.DirectPositionType</code>. If the meaning of the 'Pos' containment reference list isn't clear, there really should be more of a description here...
getPos
{ "repo_name": "markus1978/citygml4emf", "path": "de.hub.citygml.emf.ecore/src/net/opengis/gml/BSplineType.java", "license": "apache-2.0", "size": 14893 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,554,746
public static File getFile(File f, ServletContext sc) { // is the filename absolute? if (!f.isAbsolute()) { // relative path -> use getRealPath to resolve in WEB-INF String fn = sc.getRealPath(f.getPath()); if (fn == null) { // TODO: use getResourc...
static File function(File f, ServletContext sc) { if (!f.isAbsolute()) { String fn = sc.getRealPath(f.getPath()); if (fn == null) { return null; } f = new File(fn); } return f; }
/** * get a real File for a web app File. * * If the File is not absolute the path is appended to the base directory of * the web-app. * * @param file * @param sc * @return */
get a real File for a web app File. If the File is not absolute the path is appended to the base directory of the web-app
getFile
{ "repo_name": "BackupTheBerlios/digilib", "path": "servlet/src/main/java/digilib/servlet/ServletOps.java", "license": "lgpl-3.0", "size": 14321 }
[ "java.io.File", "javax.servlet.ServletContext" ]
import java.io.File; import javax.servlet.ServletContext;
import java.io.*; import javax.servlet.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
1,627,140
public static void unregisterFiles(LinkedList<String> obsoletes) { for (String fileName : obsoletes) { fileName2SharedFile.remove(fileName); } }
static void function(LinkedList<String> obsoletes) { for (String fileName : obsoletes) { fileName2SharedFile.remove(fileName); } }
/** * Unregisters the presence of many files in a shared disk * @param obsoletes list of file names to be unregistered */
Unregisters the presence of many files in a shared disk
unregisterFiles
{ "repo_name": "ElsevierSoftwareX/SOFTX-D-15-00010", "path": "compss/compss-rt/rt/src/main/java/integratedtoolkit/util/SharedDiskManager.java", "license": "apache-2.0", "size": 11598 }
[ "java.util.LinkedList" ]
import java.util.LinkedList;
import java.util.*;
[ "java.util" ]
java.util;
2,224,002
public Iterator<AnycastInputControl> getAIControlAdapterIterator();
Iterator<AnycastInputControl> function();
/** * Get an iterator over all control adapter for the aistreams for this destination. Used by the * controllables to list remoteConsumerReceivers for a given remoteQueuePoint * */
Get an iterator over all control adapter for the aistreams for this destination. Used by the controllables to list remoteConsumerReceivers for a given remoteQueuePoint
getAIControlAdapterIterator
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/interfaces/DestinationHandler.java", "license": "epl-1.0", "size": 33915 }
[ "com.ibm.ws.sib.processor.runtime.impl.AnycastInputControl", "java.util.Iterator" ]
import com.ibm.ws.sib.processor.runtime.impl.AnycastInputControl; import java.util.Iterator;
import com.ibm.ws.sib.processor.runtime.impl.*; import java.util.*;
[ "com.ibm.ws", "java.util" ]
com.ibm.ws; java.util;
827,920
public T searchPath(File... searchPath) { for (File file : searchPath) { addPath(file); } return (T) this; }
T function(File... searchPath) { for (File file : searchPath) { addPath(file); } return (T) this; }
/** * Specifies a set of search paths. */
Specifies a set of search paths
searchPath
{ "repo_name": "007slm/jodd", "path": "jodd-core/src/main/java/jodd/io/findfile/FindFile.java", "license": "bsd-3-clause", "size": 18122 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,732,462
final boolean isWordFactory = wordFactoryType.equals(targetMethod.getDeclaringClass()); if (isWordFactory) { return !targetMethod.isConstructor(); } final boolean isObjectAccess = objectAccessType.equals(targetMethod.getDeclaringClass()); final boolean isBarrieredAccess = bar...
final boolean isWordFactory = wordFactoryType.equals(targetMethod.getDeclaringClass()); if (isWordFactory) { return !targetMethod.isConstructor(); } final boolean isObjectAccess = objectAccessType.equals(targetMethod.getDeclaringClass()); final boolean isBarrieredAccess = barrieredAccessType.equals(targetMethod.getDecl...
/** * Determines if a given method denotes a word operation. */
Determines if a given method denotes a word operation
isWordOperation
{ "repo_name": "smarr/Truffle", "path": "compiler/src/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordTypes.java", "license": "gpl-2.0", "size": 8583 }
[ "org.graalvm.compiler.word.Word" ]
import org.graalvm.compiler.word.Word;
import org.graalvm.compiler.word.*;
[ "org.graalvm.compiler" ]
org.graalvm.compiler;
2,722,082
private static String searchErrorMessage(List<String> output) { //check if troubles with ssh keys int i = 0; for (int length = output.size(); i < length && !output.get(i).contains("fatal:"); i++) { } StringBuilder builder = new StringBuilder(); if (i == output.size())...
static String function(List<String> output) { int i = 0; for (int length = output.size(); i < length && !output.get(i).contains(STR); i++) { } StringBuilder builder = new StringBuilder(); if (i == output.size()) { for (String line : output) { if (!(line.startsWith("hint:") line.startsWith(STR))) { builder.append(line)....
/** * Searches useful information in command output * * @param output * command execution output * @return filtered output as message */
Searches useful information in command output
searchErrorMessage
{ "repo_name": "sunix/che-plugins", "path": "plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/server/nativegit/CommandProcess.java", "license": "epl-1.0", "size": 6146 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,207,548
private native int gav1GetFrame( long context, VideoDecoderOutputBuffer outputBuffer, boolean decodeOnly);
native int function( long context, VideoDecoderOutputBuffer outputBuffer, boolean decodeOnly);
/** * Gets the decoded frame. * * @param context Decoder context. * @param outputBuffer Output buffer for the decoded frame. * @return {@link #GAV1_OK} if successful, {@link #GAV1_DECODE_ONLY} if successful but the frame * is decode-only, {@link #GAV1_ERROR} if an error occurred. */
Gets the decoded frame
gav1GetFrame
{ "repo_name": "superbderrick/ExoPlayer", "path": "extensions/av1/src/main/java/com/google/android/exoplayer2/ext/av1/Gav1Decoder.java", "license": "apache-2.0", "size": 8292 }
[ "com.google.android.exoplayer2.video.VideoDecoderOutputBuffer" ]
import com.google.android.exoplayer2.video.VideoDecoderOutputBuffer;
import com.google.android.exoplayer2.video.*;
[ "com.google.android" ]
com.google.android;
675,963
public Observable<generated.rx.async.vertx.tables.pojos.Something> fetchBySomestringObservable(List<String> values) { return fetchObservable(Something.SOMETHING.SOMESTRING,values); }
Observable<generated.rx.async.vertx.tables.pojos.Something> function(List<String> values) { return fetchObservable(Something.SOMETHING.SOMESTRING,values); }
/** * Fetch records that have <code>someString IN (values)</code> asynchronously */
Fetch records that have <code>someString IN (values)</code> asynchronously
fetchBySomestringObservable
{ "repo_name": "jklingsporn/vertx-jooq-async", "path": "vertx-jooq-async-generate/src/test/java/generated/rx/async/vertx/tables/daos/SomethingDao.java", "license": "mit", "size": 10456 }
[ "io.reactivex.Observable", "java.util.List" ]
import io.reactivex.Observable; import java.util.List;
import io.reactivex.*; import java.util.*;
[ "io.reactivex", "java.util" ]
io.reactivex; java.util;
224,999
private void buildCommands() { // Register /authme and /email commands CommandDescription authMeBase = buildAuthMeBaseCommand(); CommandDescription emailBase = buildEmailBaseCommand(); // Register the base login command CommandDescription loginBase = CommandDescription.build...
void function() { CommandDescription authMeBase = buildAuthMeBaseCommand(); CommandDescription emailBase = buildEmailBaseCommand(); CommandDescription loginBase = CommandDescription.builder() .parent(null) .labels("login", "l", "log") .description(STR) .detailedDescription(STR) .withArgument(STR, STR, MANDATORY) .permi...
/** * Builds the command description objects for all available AuthMe commands. */
Builds the command description objects for all available AuthMe commands
buildCommands
{ "repo_name": "Xephi/AuthMeReloaded", "path": "src/main/java/fr/xephi/authme/command/CommandInitializer.java", "license": "gpl-3.0", "size": 28227 }
[ "com.google.common.collect.ImmutableList", "fr.xephi.authme.command.executable.captcha.CaptchaCommand", "fr.xephi.authme.command.executable.changepassword.ChangePasswordCommand", "fr.xephi.authme.command.executable.login.LoginCommand", "fr.xephi.authme.command.executable.logout.LogoutCommand", "fr.xephi.a...
import com.google.common.collect.ImmutableList; import fr.xephi.authme.command.executable.captcha.CaptchaCommand; import fr.xephi.authme.command.executable.changepassword.ChangePasswordCommand; import fr.xephi.authme.command.executable.login.LoginCommand; import fr.xephi.authme.command.executable.logout.LogoutCommand; ...
import com.google.common.collect.*; import fr.xephi.authme.command.executable.captcha.*; import fr.xephi.authme.command.executable.changepassword.*; import fr.xephi.authme.command.executable.login.*; import fr.xephi.authme.command.executable.logout.*; import fr.xephi.authme.command.executable.register.*; import fr.xeph...
[ "com.google.common", "fr.xephi.authme", "java.util" ]
com.google.common; fr.xephi.authme; java.util;
2,401,108
public Set<Plot> getPlots() { return PS.get().getPlots(this); }
Set<Plot> function() { return PS.get().getPlots(this); }
/** * Get the plots the player owns * @see #PS.java for more searching functions * @return Set of plots */
Get the plots the player owns
getPlots
{ "repo_name": "PiLogic/PlotSquared", "path": "src/main/java/com/intellectualcrafters/plot/object/PlotPlayer.java", "license": "gpl-3.0", "size": 7037 }
[ "com.intellectualcrafters.plot.PS", "java.util.Set" ]
import com.intellectualcrafters.plot.PS; import java.util.Set;
import com.intellectualcrafters.plot.*; import java.util.*;
[ "com.intellectualcrafters.plot", "java.util" ]
com.intellectualcrafters.plot; java.util;
2,520,175
public void testGetLastMillisecond() { Locale saved = Locale.getDefault(); Locale.setDefault(Locale.UK); TimeZone savedZone = TimeZone.getDefault(); TimeZone.setDefault(TimeZone.getTimeZone("Europe/London")); Millisecond m = new Millisecond(750, 1, 1, 1, 1, 1, 1970); ...
void function() { Locale saved = Locale.getDefault(); Locale.setDefault(Locale.UK); TimeZone savedZone = TimeZone.getDefault(); TimeZone.setDefault(TimeZone.getTimeZone(STR)); Millisecond m = new Millisecond(750, 1, 1, 1, 1, 1, 1970); assertEquals(61750L, m.getLastMillisecond()); Locale.setDefault(saved); TimeZone.setD...
/** * Some checks for the getLastMillisecond() method. */
Some checks for the getLastMillisecond() method
testGetLastMillisecond
{ "repo_name": "integrated/jfreechart", "path": "tests/org/jfree/data/time/junit/MillisecondTests.java", "license": "lgpl-2.1", "size": 13012 }
[ "java.util.Locale", "java.util.TimeZone", "org.jfree.data.time.Millisecond" ]
import java.util.Locale; import java.util.TimeZone; import org.jfree.data.time.Millisecond;
import java.util.*; import org.jfree.data.time.*;
[ "java.util", "org.jfree.data" ]
java.util; org.jfree.data;
2,275,619
public ZipEntry getNextEntry() throws IOException { ZipEntry entry; if (firstEntry != null) { entry = firstEntry; firstEntry = null; } else { entry = super.getNextEntry(); } return entry; }
ZipEntry function() throws IOException { ZipEntry entry; if (firstEntry != null) { entry = firstEntry; firstEntry = null; } else { entry = super.getNextEntry(); } return entry; }
/** * Returns the next entry or null when there are no more entries. * Does actually return a JarEntry, if you don't want to cast it yourself * use <code>getNextJarEntry()</code>. Does not return any entries found * at the beginning of the ZipFile that are special * (those that start with "META-INF/"). ...
Returns the next entry or null when there are no more entries. Does actually return a JarEntry, if you don't want to cast it yourself use <code>getNextJarEntry()</code>. Does not return any entries found at the beginning of the ZipFile that are special (those that start with "META-INF/")
getNextEntry
{ "repo_name": "aosm/gcc_40", "path": "libjava/java/util/jar/JarInputStream.java", "license": "gpl-2.0", "size": 6119 }
[ "java.io.IOException", "java.util.zip.ZipEntry" ]
import java.io.IOException; import java.util.zip.ZipEntry;
import java.io.*; import java.util.zip.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,208,295
public static List<BooleanTerm> createBooleanTerms(String...inputs) throws ParseException{ List<BooleanTerm> list = new LinkedList<BooleanTerm>(); for(String input: inputs){ list.add(createBooleanTerm(input)); } return list; }
static List<BooleanTerm> function(String...inputs) throws ParseException{ List<BooleanTerm> list = new LinkedList<BooleanTerm>(); for(String input: inputs){ list.add(createBooleanTerm(input)); } return list; }
/** * Create a list of boolean terms, one for each input SQL. * @param inputs * @return * @throws ParseException */
Create a list of boolean terms, one for each input SQL
createBooleanTerms
{ "repo_name": "zimingd/Synapse-Repository-Services", "path": "lib/lib-table-query/src/main/java/org/sagebionetworks/table/query/util/SqlElementUntils.java", "license": "apache-2.0", "size": 26701 }
[ "java.util.LinkedList", "java.util.List", "org.sagebionetworks.table.query.ParseException", "org.sagebionetworks.table.query.model.BooleanTerm" ]
import java.util.LinkedList; import java.util.List; import org.sagebionetworks.table.query.ParseException; import org.sagebionetworks.table.query.model.BooleanTerm;
import java.util.*; import org.sagebionetworks.table.query.*; import org.sagebionetworks.table.query.model.*;
[ "java.util", "org.sagebionetworks.table" ]
java.util; org.sagebionetworks.table;
609,058
private GoogleClientSecretsForApiBuilder from(Configuration config, String filePath) { from(config); this.filePath = filePath; return this; }
GoogleClientSecretsForApiBuilder function(Configuration config, String filePath) { from(config); this.filePath = filePath; return this; }
/** * Reads properties from the provided {@link Configuration} object * <br><br> * Understands the following properties suffixes: * <br><br> * <ul> * <li>clientId</li> * <li>clientSecret</li> * </ul><br> * For example, the AdWords OAuth2 client ID can be read from: * <c...
Reads properties from the provided <code>Configuration</code> object Understands the following properties suffixes: clientId clientSecret For example, the AdWords OAuth2 client ID can be read from: <code>api.adwords.clientId</code>
from
{ "repo_name": "raja15792/googleads-java-lib", "path": "modules/ads_lib/src/main/java/com/google/api/ads/common/lib/auth/GoogleClientSecretsBuilder.java", "license": "apache-2.0", "size": 7439 }
[ "org.apache.commons.configuration.Configuration" ]
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.*;
[ "org.apache.commons" ]
org.apache.commons;
545,603
@Override protected boolean printGlyphVector(GlyphVector gv, float x, float y) { if ((gv.getLayoutFlags() & GlyphVector.FLAG_HAS_TRANSFORMS) != 0) { return false; } if (gv.getNumGlyphs() == 0) { return true; // nothing to do. } AffineTra...
boolean function(GlyphVector gv, float x, float y) { if ((gv.getLayoutFlags() & GlyphVector.FLAG_HAS_TRANSFORMS) != 0) { return false; } if (gv.getNumGlyphs() == 0) { return true; } AffineTransform deviceTransform = getTransform(); AffineTransform fontTransform = new AffineTransform(deviceTransform); Font font = gv.get...
/** return true if the Graphics instance can directly print * this glyphvector */
return true if the Graphics instance can directly print this glyphvector
printGlyphVector
{ "repo_name": "isaacl/openjdk-jdk", "path": "src/windows/classes/sun/awt/windows/WPathGraphics.java", "license": "gpl-2.0", "size": 75305 }
[ "java.awt.Color", "java.awt.Font", "java.awt.font.GlyphVector", "java.awt.geom.AffineTransform", "java.awt.geom.Point2D", "java.util.Arrays" ]
import java.awt.Color; import java.awt.Font; import java.awt.font.GlyphVector; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import java.util.Arrays;
import java.awt.*; import java.awt.font.*; import java.awt.geom.*; import java.util.*;
[ "java.awt", "java.util" ]
java.awt; java.util;
1,836,794
public static String [] getAvailableNames() { UResourceBundle numberingSystemsInfo = UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, "numberingSystems"); UResourceBundle nsCurrent = numberingSystemsInfo.get("numberingSystems"); UResourceBundle temp; String ...
static String [] function() { UResourceBundle numberingSystemsInfo = UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, STR); UResourceBundle nsCurrent = numberingSystemsInfo.get(STR); UResourceBundle temp; String nsName; ArrayList<String> output = new ArrayList<String>(); UResourceBundleIterator it = nsCurrent.g...
/** * Returns a string array containing a list of the names of numbering systems * currently known to ICU. * @stable ICU 4.2 */
Returns a string array containing a list of the names of numbering systems currently known to ICU
getAvailableNames
{ "repo_name": "abhijitvalluri/fitnotifications", "path": "icu4j/src/main/java/com/ibm/icu/text/NumberingSystem.java", "license": "apache-2.0", "size": 13180 }
[ "com.ibm.icu.impl.ICUData", "com.ibm.icu.util.UResourceBundle", "com.ibm.icu.util.UResourceBundleIterator", "java.util.ArrayList" ]
import com.ibm.icu.impl.ICUData; import com.ibm.icu.util.UResourceBundle; import com.ibm.icu.util.UResourceBundleIterator; import java.util.ArrayList;
import com.ibm.icu.impl.*; import com.ibm.icu.util.*; import java.util.*;
[ "com.ibm.icu", "java.util" ]
com.ibm.icu; java.util;
2,603,665
@Override public NodeId getAllocateNodeId(Node node) { return _idForNode(node, true); }
NodeId function(Node node) { return _idForNode(node, true); }
/** * Find the NodeId for a node, allocating a new NodeId if the Node does not * yet have a NodeId */
Find the NodeId for a node, allocating a new NodeId if the Node does not yet have a NodeId
getAllocateNodeId
{ "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.graph.Node", "org.apache.jena.tdb2.store.NodeId" ]
import org.apache.jena.graph.Node; import org.apache.jena.tdb2.store.NodeId;
import org.apache.jena.graph.*; import org.apache.jena.tdb2.store.*;
[ "org.apache.jena" ]
org.apache.jena;
2,089,208
List<ConsecutivoFactura> lista= consecutivoFacturaDao.findAll(); assertNotNull(lista); }
List<ConsecutivoFactura> lista= consecutivoFacturaDao.findAll(); assertNotNull(lista); }
/** * Test method for {@link co.innovate.rentavoz.repositories.impl.GenericJpaRepository#findAll()}. */
Test method for <code>co.innovate.rentavoz.repositories.impl.GenericJpaRepository#findAll()</code>
testFindAll
{ "repo_name": "kaisenlean/rentavoz3", "path": "src/test/java/co/innovate/rentavoz/dao/consecutivofactura/ConsecutivoFacturaDaoImplTest.java", "license": "gpl-2.0", "size": 958 }
[ "co.innovate.rentavoz.model.facturacion.ConsecutivoFactura", "java.util.List", "org.junit.Assert" ]
import co.innovate.rentavoz.model.facturacion.ConsecutivoFactura; import java.util.List; import org.junit.Assert;
import co.innovate.rentavoz.model.facturacion.*; import java.util.*; import org.junit.*;
[ "co.innovate.rentavoz", "java.util", "org.junit" ]
co.innovate.rentavoz; java.util; org.junit;
2,800,093
public URL getSentryURL() throws MalformedURLException { String path = getPrefix() + String.format(API_FORMAT, getProjectId()); return new URL(getProtocol(), getHost(), getPort(), path); }
URL function() throws MalformedURLException { String path = getPrefix() + String.format(API_FORMAT, getProjectId()); return new URL(getProtocol(), getHost(), getPort(), path); }
/** * The Sentry server URL that we post the message to. * * @return sentry server url * @throws MalformedURLException */
The Sentry server URL that we post the message to
getSentryURL
{ "repo_name": "KoljaTM/Yarrn", "path": "Yarrn/src/main/java/de/vanmar/android/yarrn/sentry/SentrySender.java", "license": "mit", "size": 11315 }
[ "java.net.MalformedURLException" ]
import java.net.MalformedURLException;
import java.net.*;
[ "java.net" ]
java.net;
310,921
@Test public void testReplaceValueNoStoreEntryUnequalCacheLoaderWriterEntry() throws Exception { final FakeStore fakeStore = new FakeStore(Collections.<String, String>emptyMap()); this.store = spy(fakeStore); final FakeCacheLoaderWriter fakeWriter = new FakeCacheLoaderWriter(Collections.singletonMap("k...
void function() throws Exception { final FakeStore fakeStore = new FakeStore(Collections.<String, String>emptyMap()); this.store = spy(fakeStore); final FakeCacheLoaderWriter fakeWriter = new FakeCacheLoaderWriter(Collections.singletonMap("key", STR)); final EhcacheWithLoaderWriter<String, String> ehcache = this.getEhc...
/** * Tests the effect of a {@link EhcacheWithLoaderWriter#replace(Object, Object, Object)} for * <ul> * <li>key not present in {@code Store}</li> * <li>key with unequal value present via {@code CacheLoaderWriter}</li> * </ul> */
Tests the effect of a <code>EhcacheWithLoaderWriter#replace(Object, Object, Object)</code> for key not present in Store key with unequal value present via CacheLoaderWriter
testReplaceValueNoStoreEntryUnequalCacheLoaderWriterEntry
{ "repo_name": "rishabhmonga/ehcache3", "path": "core/src/test/java/org/ehcache/core/EhcacheWithLoaderWriterBasicReplaceValueTest.java", "license": "apache-2.0", "size": 43736 }
[ "java.util.Collections", "java.util.EnumSet", "org.ehcache.core.statistics.CacheOperationOutcomes", "org.hamcrest.CoreMatchers", "org.junit.Assert", "org.mockito.Mockito" ]
import java.util.Collections; import java.util.EnumSet; import org.ehcache.core.statistics.CacheOperationOutcomes; import org.hamcrest.CoreMatchers; import org.junit.Assert; import org.mockito.Mockito;
import java.util.*; import org.ehcache.core.statistics.*; import org.hamcrest.*; import org.junit.*; import org.mockito.*;
[ "java.util", "org.ehcache.core", "org.hamcrest", "org.junit", "org.mockito" ]
java.util; org.ehcache.core; org.hamcrest; org.junit; org.mockito;
1,586,856
public boolean IsMandatoryFieldEmpty() { for (JTextField mandatoryTextField : mandatoryTextFields) { if (mandatoryTextField.getText().trim().isEmpty()) { btnImport.setEnabled(false); return true; } } btnImport.setEnabled(true); return false; }
boolean function() { for (JTextField mandatoryTextField : mandatoryTextFields) { if (mandatoryTextField.getText().trim().isEmpty()) { btnImport.setEnabled(false); return true; } } btnImport.setEnabled(true); return false; }
/** * Check if at least one mandatory field is empty. * * @return true if at least one mandatory field is empty, false if not */
Check if at least one mandatory field is empty
IsMandatoryFieldEmpty
{ "repo_name": "uncertweb/SOS-database-client", "path": "src/main/java/org/uncertweb/sos_db_client/view/UncertaintyView.java", "license": "gpl-3.0", "size": 13997 }
[ "javax.swing.JTextField" ]
import javax.swing.JTextField;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,083,601
@Test public void selectTracksWithinCapabilitiesAndForceLowestBitrateSelectLowerBitrate() throws Exception { Format.Builder formatBuilder = AUDIO_FORMAT.buildUpon(); Format unsupportedLowBitrateFormat = formatBuilder.setId("unsupported").setAverageBitrate(5000).build(); Format lowerBitrate...
void function() throws Exception { Format.Builder formatBuilder = AUDIO_FORMAT.buildUpon(); Format unsupportedLowBitrateFormat = formatBuilder.setId(STR).setAverageBitrate(5000).build(); Format lowerBitrateFormat = formatBuilder.setId("lower").setAverageBitrate(15000).build(); Format higherBitrateFormat = formatBuilder...
/** * Tests that track selector will select the lowest bitrate supported audio track when {@link * Parameters#forceLowestBitrate} is set. */
Tests that track selector will select the lowest bitrate supported audio track when <code>Parameters#forceLowestBitrate</code> is set
selectTracksWithinCapabilitiesAndForceLowestBitrateSelectLowerBitrate
{ "repo_name": "google/ExoPlayer", "path": "library/core/src/test/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelectorTest.java", "license": "apache-2.0", "size": 116562 }
[ "com.google.android.exoplayer2.Format", "com.google.android.exoplayer2.RendererCapabilities", "com.google.android.exoplayer2.source.TrackGroupArray", "java.util.HashMap", "java.util.Map" ]
import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.RendererCapabilities; import com.google.android.exoplayer2.source.TrackGroupArray; import java.util.HashMap; import java.util.Map;
import com.google.android.exoplayer2.*; import com.google.android.exoplayer2.source.*; import java.util.*;
[ "com.google.android", "java.util" ]
com.google.android; java.util;
1,321,117
public void run() { while(running) { // Read for client state changes try { } catch(Exception e) { } // Send wiper status to client try { boolean wipersDetected = NightWiperActivity.getWipersDetected(); boolean wiperStatus = NightWiperActivity.get...
void function() { while(running) { try { } catch(Exception e) { } try { boolean wipersDetected = NightWiperActivity.getWipersDetected(); boolean wiperStatus = NightWiperActivity.getWiperStatus(); String wiperStatusString; wiperStatusString = wipersDetected ? "1" : "0"; String wiperMessage = "+WIP>" + wiperStatusString;...
/** * Thread run method */
Thread run method
run
{ "repo_name": "hymanc-umich/NightWiper", "path": "NightWiper_Android/src/org/umtri/NightWiper/CommunicationThread.java", "license": "apache-2.0", "size": 2306 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
981,387
@Override public String getName() { return Streams.checkFileName(name); }
String function() { return Streams.checkFileName(name); }
/** * Returns the items file name. * * @return File name, if known, or null. * @throws InvalidFileNameException The file name contains a NUL character, * which might be an indicator of a security attack. If you intend to * use the file na...
Returns the items file name
getName
{ "repo_name": "mayonghui2112/helloWorld", "path": "sourceCode/apache-tomcat-7.0.82-src/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java", "license": "apache-2.0", "size": 43666 }
[ "org.apache.tomcat.util.http.fileupload.util.Streams" ]
import org.apache.tomcat.util.http.fileupload.util.Streams;
import org.apache.tomcat.util.http.fileupload.util.*;
[ "org.apache.tomcat" ]
org.apache.tomcat;
1,015,107
boolean result = true; XIndexContainer points = null; log.println("testing getDrawPages() ... "); points = oObj.getGluePoints(); result = points != null; tRes.tested("getGluePoints()", result); }
boolean result = true; XIndexContainer points = null; log.println(STR); points = oObj.getGluePoints(); result = points != null; tRes.tested(STR, result); }
/** * Gets glue points collection. <p> * Has <b> OK </b> status if the value returned is not null. <p> */
Gets glue points collection. Has OK status if the value returned is not null.
_getGluePoints
{ "repo_name": "sbbic/core", "path": "qadevOOo/tests/java/ifc/drawing/_XGluePointsSupplier.java", "license": "gpl-3.0", "size": 1734 }
[ "com.sun.star.container.XIndexContainer" ]
import com.sun.star.container.XIndexContainer;
import com.sun.star.container.*;
[ "com.sun.star" ]
com.sun.star;
1,383,050
Object convertToBinaryStringStorageType( Object object ) throws KettleValueException;
Object convertToBinaryStringStorageType( Object object ) throws KettleValueException;
/** * Converts the specified data object to the binary string storage type. * * @param object * the data object to convert * @return the data in a binary string storage type * @throws KettleValueException * In case there is a data conversion error. */
Converts the specified data object to the binary string storage type
convertToBinaryStringStorageType
{ "repo_name": "flbrino/pentaho-kettle", "path": "core/src/main/java/org/pentaho/di/core/row/ValueMetaInterface.java", "license": "apache-2.0", "size": 39624 }
[ "org.pentaho.di.core.exception.KettleValueException" ]
import org.pentaho.di.core.exception.KettleValueException;
import org.pentaho.di.core.exception.*;
[ "org.pentaho.di" ]
org.pentaho.di;
1,493,747
@SuppressWarnings("unchecked") private void registerSubclassCompilerIfNeeded(Intent intent) { if (!compilers.containsKey(intent.getClass())) { Class<?> cls = intent.getClass(); while (cls != Object.class) { // As long as we're within the Intent class descendants ...
@SuppressWarnings(STR) void function(Intent intent) { if (!compilers.containsKey(intent.getClass())) { Class<?> cls = intent.getClass(); while (cls != Object.class) { if (Intent.class.isAssignableFrom(cls)) { IntentCompiler<?> compiler = compilers.get(cls); if (compiler != null) { compilers.put(intent.getClass(), compi...
/** * Registers an intent compiler of the specified intent if an intent compiler * for the intent is not registered. This method traverses the class hierarchy of * the intent. Once an intent compiler for a parent type is found, this method * registers the found intent compiler. * * @param ...
Registers an intent compiler of the specified intent if an intent compiler for the intent is not registered. This method traverses the class hierarchy of the intent. Once an intent compiler for a parent type is found, this method registers the found intent compiler
registerSubclassCompilerIfNeeded
{ "repo_name": "opennetworkinglab/spring-open", "path": "src/main/java/net/onrc/onos/core/newintent/IntentManagerRuntime.java", "license": "apache-2.0", "size": 13553 }
[ "net.onrc.onos.api.newintent.Intent", "net.onrc.onos.api.newintent.IntentCompiler" ]
import net.onrc.onos.api.newintent.Intent; import net.onrc.onos.api.newintent.IntentCompiler;
import net.onrc.onos.api.newintent.*;
[ "net.onrc.onos" ]
net.onrc.onos;
1,879,293
void setBounds(Envelope newBounds);
void setBounds(Envelope newBounds);
/** * Set the current rectangular bounds of the node as drawn. * @param newBounds the new bounds envelope, which cannot be null. */
Set the current rectangular bounds of the node as drawn
setBounds
{ "repo_name": "stumoodie/VisualLanguageToolkit", "path": "src/org/pathwayeditor/businessobjects/drawingprimitives/IDrawingNodeAttribute.java", "license": "apache-2.0", "size": 4046 }
[ "org.pathwayeditor.figure.geometry.Envelope" ]
import org.pathwayeditor.figure.geometry.Envelope;
import org.pathwayeditor.figure.geometry.*;
[ "org.pathwayeditor.figure" ]
org.pathwayeditor.figure;
417,038
EAttribute getParticipant_Name();
EAttribute getParticipant_Name();
/** * Returns the meta object for the attribute '{@link org.eclipse.bpmn2.Participant#getName <em>Name</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Name</em>'. * @see org.eclipse.bpmn2.Participant#getName() * @see #getParticipant() * @generated...
Returns the meta object for the attribute '<code>org.eclipse.bpmn2.Participant#getName Name</code>'.
getParticipant_Name
{ "repo_name": "Rikkola/kie-wb-common", "path": "kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-emf/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java", "license": "apache-2.0", "size": 929298 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,124,408
private void allocateBuffer(boolean extraBytes) { int cksumBytes = totalChecksumBytes(); int capacityNeeded = headerSize() + uncompressedSizeWithoutHeader + cksumBytes + (extraBytes ? headerSize() : 0); ByteBuffer newBuf = ByteBuffer.allocate(capacityNeeded); // Copy header bytes. ...
void function(boolean extraBytes) { int cksumBytes = totalChecksumBytes(); int capacityNeeded = headerSize() + uncompressedSizeWithoutHeader + cksumBytes + (extraBytes ? headerSize() : 0); ByteBuffer newBuf = ByteBuffer.allocate(capacityNeeded); System.arraycopy(buf.array(), buf.arrayOffset(), newBuf.array(), newBuf.ar...
/** * Always allocates a new buffer of the correct size. Copies header bytes * from the existing buffer. Does not change header fields. * Reserve room to keep checksum bytes too. * * @param extraBytes whether to reserve room in the buffer to read the next * block's header */
Always allocates a new buffer of the correct size. Copies header bytes from the existing buffer. Does not change header fields. Reserve room to keep checksum bytes too
allocateBuffer
{ "repo_name": "indi60/hbase-pmc", "path": "target/hbase-0.94.1/hbase-0.94.1/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java", "license": "apache-2.0", "size": 82523 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
222,100
public static Properties readPropertiesStream(InputStream inputStream) { try { final Properties prop = new Properties(); // try to read in utf 8 prop.load(new InputStreamReader(inputStream, Charset.forName("utf-8"))); JKCollectionUtil.fixPropertiesKeys(prop); return prop; } catch (IOExcepti...
static Properties function(InputStream inputStream) { try { final Properties prop = new Properties(); prop.load(new InputStreamReader(inputStream, Charset.forName("utf-8"))); JKCollectionUtil.fixPropertiesKeys(prop); return prop; } catch (IOException e) { JKExceptionUtil.handle(e); return null; } finally { close(inputS...
/** * Read properties stream. * * @param inputStream the input stream * @return the properties */
Read properties stream
readPropertiesStream
{ "repo_name": "kiswanij/jk-util", "path": "src/main/java/com/jk/util/JKIOUtil.java", "license": "mit", "size": 21956 }
[ "com.jk.util.exceptions.handler.JKExceptionUtil", "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader", "java.nio.charset.Charset", "java.util.Properties" ]
import com.jk.util.exceptions.handler.JKExceptionUtil; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.Charset; import java.util.Properties;
import com.jk.util.exceptions.handler.*; import java.io.*; import java.nio.charset.*; import java.util.*;
[ "com.jk.util", "java.io", "java.nio", "java.util" ]
com.jk.util; java.io; java.nio; java.util;
2,484,775