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 PostsResult getResultByPlace(Boolean important, String locationId, String createdOrder) throws NotSignedInException { Account account; try { account = getAccountHandler.getMyAccount(); } catch (NotSignedInException e) { account = null; } PostsResult postsResult = new PostsResult()...
PostsResult function(Boolean important, String locationId, String createdOrder) throws NotSignedInException { Account account; try { account = getAccountHandler.getMyAccount(); } catch (NotSignedInException e) { account = null; } PostsResult postsResult = new PostsResult(); List<Post> posts = null; if (account != null ...
/** * Get PostsResult. * @param account * @param characterId * @param createdOrder * @return PostsResult */
Get PostsResult
getResultByPlace
{ "repo_name": "jeffgager/heroesofthefall", "path": "hotf/src/com/hotf/server/action/GetPostsHandler.java", "license": "mit", "size": 10106 }
[ "com.hotf.client.action.result.PostResult", "com.hotf.client.action.result.PostsResult", "com.hotf.client.exception.NotSignedInException", "com.hotf.server.model.Account", "com.hotf.server.model.Post", "java.util.List" ]
import com.hotf.client.action.result.PostResult; import com.hotf.client.action.result.PostsResult; import com.hotf.client.exception.NotSignedInException; import com.hotf.server.model.Account; import com.hotf.server.model.Post; import java.util.List;
import com.hotf.client.action.result.*; import com.hotf.client.exception.*; import com.hotf.server.model.*; import java.util.*;
[ "com.hotf.client", "com.hotf.server", "java.util" ]
com.hotf.client; com.hotf.server; java.util;
2,520,677
static boolean inLongRange(BigInteger value) { return value.bitLength() <= 63; }
static boolean inLongRange(BigInteger value) { return value.bitLength() <= 63; }
/** * Check if the value fits in 64 bits (a long). * @param value * @return true if the value fits in 64 bits (including the sign). */
Check if the value fits in 64 bits (a long)
inLongRange
{ "repo_name": "karianna/jdk8_tl", "path": "jdk/test/java/lang/Math/ExactArithTests.java", "license": "gpl-2.0", "size": 9702 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,656,582
private void newUnitReceived(GridUriDeploymentUnitDescriptor newDesc, Collection<Class<?>> clss) { assert newDesc != null; assert newDesc.getType() == GridUriDeploymentUnitDescriptor.Type.FILE; if (clss != null && !clss.isEmpty()) { try { addResources(newDesc.get...
void function(GridUriDeploymentUnitDescriptor newDesc, Collection<Class<?>> clss) { assert newDesc != null; assert newDesc.getType() == GridUriDeploymentUnitDescriptor.Type.FILE; if (clss != null && !clss.isEmpty()) { try { addResources(newDesc.getClassLoader(), newDesc, clss.toArray(new Class<?>[clss.size()])); } catc...
/** * Deploys all tasks that correspond to given descriptor. * First method checks tasks versions and stops processing tasks that * have both versioned and unversioned instances. * <p> * Than it deletes tasks with lower version and deploys newest tasks. * * @param newDesc Tasks deploy...
Deploys all tasks that correspond to given descriptor. First method checks tasks versions and stops processing tasks that have both versioned and unversioned instances. Than it deletes tasks with lower version and deploys newest tasks
newUnitReceived
{ "repo_name": "tkpanther/ignite", "path": "modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/UriDeploymentSpi.java", "license": "apache-2.0", "size": 50949 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.ListIterator", "org.apache.ignite.internal.util.typedef.internal.LT", "org.apache.ignite.internal.util.typedef.internal.U", "org.apache.ignite.spi.IgniteSpiException" ]
import java.util.ArrayList; import java.util.Collection; import java.util.ListIterator; import org.apache.ignite.internal.util.typedef.internal.LT; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.IgniteSpiException;
import java.util.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.spi.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,399,153
public static void copyResource(String from, String to) throws IOException { InputStream in = null; OutputStream out = null; try { ClassLoader cl = FileUtils.class.getClassLoader(); if (cl != null) { in = cl.getResourceAsStream(fr...
static void function(String from, String to) throws IOException { InputStream in = null; OutputStream out = null; try { ClassLoader cl = FileUtils.class.getClassLoader(); if (cl != null) { in = cl.getResourceAsStream(from); } else { in = ClassLoader.getSystemResourceAsStream(from); } out = new FileOutputStream(to); byt...
/** * Copies the file at the specified from path to the * specified to path. * * @param from - the from path * @param to - the to path * @throws IOException */
Copies the file at the specified from path to the specified to path
copyResource
{ "repo_name": "takisd123/executequery", "path": "src/org/underworldlabs/util/FileUtils.java", "license": "gpl-3.0", "size": 12030 }
[ "java.io.FileOutputStream", "java.io.IOException", "java.io.InputStream", "java.io.OutputStream" ]
import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
414,035
public void printPlotter_perIteration() { // 1st: append plot to print per iteration System.out.println("Printing per-iteraion plot..."); ChartPlotter dynamicCommunity = new DynamicCommunityPlotter("Community Live Statistic"); this.printPlotter_perIteration.put(dynamicCommunity.getPlotterId(), dynam...
void function() { System.out.println(STR); ChartPlotter dynamicCommunity = new DynamicCommunityPlotter(STR); this.printPlotter_perIteration.put(dynamicCommunity.getPlotterId(), dynamicCommunity); this.plotPrintChart(this.printPlotter_perIteration, MaGateParam.currentIterationId); System.out.println(STR); }
/** * To be completed, blank plot so far */
To be completed, blank plot so far
printPlotter_perIteration
{ "repo_name": "huangye177/magate", "path": "src/main/java/ch/hefr/gridgroup/magate/plot/PlotManager.java", "license": "lgpl-3.0", "size": 6558 }
[ "ch.hefr.gridgroup.magate.env.MaGateParam" ]
import ch.hefr.gridgroup.magate.env.MaGateParam;
import ch.hefr.gridgroup.magate.env.*;
[ "ch.hefr.gridgroup" ]
ch.hefr.gridgroup;
798,248
public void checkBounds(){ if(this.view_rect.getMap_center_x() > Constants.MAP_RECT_RIGHT || this.view_rect.getMap_center_x() < Constants.MAP_RECT_LEFT || this.view_rect.getMap_center_y() > Constants.MAP_RECT_TOP || this.view_rect.getMap_center_y() < Constants.MAP_RECT_BOTTOM) { ...
void function(){ if(this.view_rect.getMap_center_x() > Constants.MAP_RECT_RIGHT this.view_rect.getMap_center_x() < Constants.MAP_RECT_LEFT this.view_rect.getMap_center_y() > Constants.MAP_RECT_TOP this.view_rect.getMap_center_y() < Constants.MAP_RECT_BOTTOM) { this.back_to_map.setEnabled(true); this.back_to_map.setVisi...
/** * If the user pans out of the view of the map, shows the "show map" button. */
If the user pans out of the view of the map, shows the "show map" button
checkBounds
{ "repo_name": "lbouma/Cyclopath", "path": "android/src/org/cyclopath/android/MapSurface.java", "license": "apache-2.0", "size": 48472 }
[ "android.view.View", "org.cyclopath.android.conf.Constants" ]
import android.view.View; import org.cyclopath.android.conf.Constants;
import android.view.*; import org.cyclopath.android.conf.*;
[ "android.view", "org.cyclopath.android" ]
android.view; org.cyclopath.android;
983,599
void processVersionTag(EntryEvent event);
void processVersionTag(EntryEvent event);
/** * Perform a versioning check with the incoming event. Throws a * ConcurrentCacheModificationException if there is a problem. */
Perform a versioning check with the incoming event. Throws a ConcurrentCacheModificationException if there is a problem
processVersionTag
{ "repo_name": "smgoller/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/versions/VersionStamp.java", "license": "apache-2.0", "size": 2709 }
[ "org.apache.geode.cache.EntryEvent" ]
import org.apache.geode.cache.EntryEvent;
import org.apache.geode.cache.*;
[ "org.apache.geode" ]
org.apache.geode;
1,100,021
protected void writeHunkHeader(int aStartLine, int aEndLine, int bStartLine, int bEndLine) throws IOException { out.write('@'); out.write('@'); writeRange('-', aStartLine + 1, aEndLine - aStartLine); writeRange('+', bStartLine + 1, bEndLine - bStartLine); out.write(' '); out.write('@'); out.write('@...
void function(int aStartLine, int aEndLine, int bStartLine, int bEndLine) throws IOException { out.write('@'); out.write('@'); writeRange('-', aStartLine + 1, aEndLine - aStartLine); writeRange('+', bStartLine + 1, bEndLine - bStartLine); out.write(' '); out.write('@'); out.write('@'); out.write('\n'); }
/** * Output a hunk header * * @param aStartLine * within first source * @param aEndLine * within first source * @param bStartLine * within second source * @param bEndLine * within second source * @throws IOException */
Output a hunk header
writeHunkHeader
{ "repo_name": "DanielliUrbieta/ProjetoHidraWS", "path": "src/org/eclipse/jgit/diff/DiffFormatter.java", "license": "gpl-2.0", "size": 35491 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,571,335
@Override public Member getLocalMember() { return channel.getLocalMember(true); } // --------------------------------------------------------- Public Methods
Member function() { return channel.getLocalMember(true); }
/** * Return the member that represents this node. * * @return Member */
Return the member that represents this node
getLocalMember
{ "repo_name": "plumer/codana", "path": "tomcat_files/8.0.22/SimpleTcpCluster.java", "license": "mit", "size": 28515 }
[ "org.apache.catalina.tribes.Member" ]
import org.apache.catalina.tribes.Member;
import org.apache.catalina.tribes.*;
[ "org.apache.catalina" ]
org.apache.catalina;
1,622,162
//------------------------- AUTOGENERATED START ------------------------- ///CLOVER:OFF public static IndexQuoteId.Meta meta() { return IndexQuoteId.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(IndexQuoteId.Meta.INSTANCE); } private static final long serialVersionUID = 1L; ...
static IndexQuoteId.Meta function() { return IndexQuoteId.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(IndexQuoteId.Meta.INSTANCE); } private static final long serialVersionUID = 1L; private int cachedHashCode; private IndexQuoteId( Index index, FieldName fieldName, ObservableSource observableSource) { Joda...
/** * The meta-bean for {@code IndexQuoteId}. * @return the meta-bean, not null */
The meta-bean for IndexQuoteId
meta
{ "repo_name": "ChinaQuants/Strata", "path": "modules/market/src/main/java/com/opengamma/strata/market/observable/IndexQuoteId.java", "license": "apache-2.0", "size": 13901 }
[ "com.opengamma.strata.basics.index.Index", "com.opengamma.strata.data.FieldName", "com.opengamma.strata.data.ObservableSource", "org.joda.beans.JodaBeanUtils" ]
import com.opengamma.strata.basics.index.Index; import com.opengamma.strata.data.FieldName; import com.opengamma.strata.data.ObservableSource; import org.joda.beans.JodaBeanUtils;
import com.opengamma.strata.basics.index.*; import com.opengamma.strata.data.*; import org.joda.beans.*;
[ "com.opengamma.strata", "org.joda.beans" ]
com.opengamma.strata; org.joda.beans;
1,552,841
public DateRangeAggregationBuilder addRange(String key, ZonedDateTime from, ZonedDateTime to) { addRange(new RangeAggregator.Range(key, convertDateTime(from), convertDateTime(to))); return this; }
DateRangeAggregationBuilder function(String key, ZonedDateTime from, ZonedDateTime to) { addRange(new RangeAggregator.Range(key, convertDateTime(from), convertDateTime(to))); return this; }
/** * Add a new range to this aggregation. * * @param key * the key to use for this range in the response * @param from * the lower bound on the dates, inclusive * @param to * the upper bound on the dates, exclusive */
Add a new range to this aggregation
addRange
{ "repo_name": "GlenRSmith/elasticsearch", "path": "server/src/main/java/org/elasticsearch/search/aggregations/bucket/range/DateRangeAggregationBuilder.java", "license": "apache-2.0", "size": 13985 }
[ "java.time.ZonedDateTime" ]
import java.time.ZonedDateTime;
import java.time.*;
[ "java.time" ]
java.time;
198,960
public static void readBinary(InputStream is, ContentHandler output, String contentType, Long lastModified, int statusCode, String fileName) { try { outputStartDocument(output, contentType, lastModified, statusCode, fileName, XMLConstants.XS_BASE64BINARY_QNAME, DEFAULT_BINARY_DOCUMENT_ELEMENT); ...
static void function(InputStream is, ContentHandler output, String contentType, Long lastModified, int statusCode, String fileName) { try { outputStartDocument(output, contentType, lastModified, statusCode, fileName, XMLConstants.XS_BASE64BINARY_QNAME, DEFAULT_BINARY_DOCUMENT_ELEMENT); XMLUtils.inputStreamToBase64Chara...
/** * Generate a "standard" Orbeon binary document. * * @param is InputStream to read from * @param output output ContentHandler to write binary document to * @param contentType optional content type to set as attribute on the root element * @param lastModified optiona...
Generate a "standard" Orbeon binary document
readBinary
{ "repo_name": "evlist/orbeon-forms", "path": "src/main/java/org/orbeon/oxf/processor/ProcessorUtils.java", "license": "lgpl-2.1", "size": 12884 }
[ "java.io.BufferedInputStream", "java.io.InputStream", "org.orbeon.oxf.common.OXFException", "org.orbeon.oxf.xml.XMLConstants", "org.orbeon.oxf.xml.XMLUtils", "org.xml.sax.ContentHandler" ]
import java.io.BufferedInputStream; import java.io.InputStream; import org.orbeon.oxf.common.OXFException; import org.orbeon.oxf.xml.XMLConstants; import org.orbeon.oxf.xml.XMLUtils; import org.xml.sax.ContentHandler;
import java.io.*; import org.orbeon.oxf.common.*; import org.orbeon.oxf.xml.*; import org.xml.sax.*;
[ "java.io", "org.orbeon.oxf", "org.xml.sax" ]
java.io; org.orbeon.oxf; org.xml.sax;
432,763
public static int indexOf(List<?> list, Object o, int fromIndex) { if (fromIndex < 0) { fromIndex = 0; } int size = list.size(); for (int i = fromIndex; i < size; i++) { Object element = list.get(i); if (o == null) { if (element ==...
static int function(List<?> list, Object o, int fromIndex) { if (fromIndex < 0) { fromIndex = 0; } int size = list.size(); for (int i = fromIndex; i < size; i++) { Object element = list.get(i); if (o == null) { if (element == null) { return i; } } else if (o == element o.equals(element)) { return i; } } return -1; }
/** * Searches for the first occurrence of the given argument in list starting from * a specified index. The equality is tested using the operator <tt>==<tt> and * the <tt>equals</tt> method. * @param list * @param o an object (can be null) * @param fromIndex * @return the index of t...
Searches for the first occurrence of the given argument in list starting from a specified index. The equality is tested using the operator == and the equals method
indexOf
{ "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/emf/ecore/xmi/util/ECollections.java", "license": "apache-2.0", "size": 37180 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,029,705
private static void writeItems(final Collection<Item> itemCollection, final DataOutput dos, final boolean dotted) throws IOException { int size = itemCollection.size(); Item[] items = itemCollection.toArray(new Item[size]); Arrays.sort(items); for (int i = 0; i < size; i+...
static void function(final Collection<Item> itemCollection, final DataOutput dos, final boolean dotted) throws IOException { int size = itemCollection.size(); Item[] items = itemCollection.toArray(new Item[size]); Arrays.sort(items); for (int i = 0; i < size; i++) { dos.writeUTF(items[i].name); dos.writeInt(items[i].ac...
/** * Sorts the items in the collection and writes it to the data output stream * * @param itemCollection * collection of items * @param dos * a <code>DataOutputStream</code> value * @param dotted * a <code>boolean</code> value * @exception ...
Sorts the items in the collection and writes it to the data output stream
writeItems
{ "repo_name": "leapframework/framework", "path": "base/lang/src/main/java/leap/lang/asm/commons/SerialVersionUIDAdder.java", "license": "apache-2.0", "size": 20433 }
[ "java.io.DataOutput", "java.io.IOException", "java.util.Arrays", "java.util.Collection" ]
import java.io.DataOutput; import java.io.IOException; import java.util.Arrays; import java.util.Collection;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,004,299
IHAWriteSetStateResponse getHAWriteSetState(IHAWriteSetStateRequest req) throws IOException;
IHAWriteSetStateResponse getHAWriteSetState(IHAWriteSetStateRequest req) throws IOException;
/** * Request metadata about the current write set from the quorum leader. * * @param req * The request. * * @return The response. */
Request metadata about the current write set from the quorum leader
getHAWriteSetState
{ "repo_name": "smalyshev/blazegraph", "path": "bigdata/src/java/com/bigdata/ha/HAPipelineGlue.java", "license": "gpl-2.0", "size": 12863 }
[ "com.bigdata.ha.msg.IHAWriteSetStateRequest", "com.bigdata.ha.msg.IHAWriteSetStateResponse", "java.io.IOException" ]
import com.bigdata.ha.msg.IHAWriteSetStateRequest; import com.bigdata.ha.msg.IHAWriteSetStateResponse; import java.io.IOException;
import com.bigdata.ha.msg.*; import java.io.*;
[ "com.bigdata.ha", "java.io" ]
com.bigdata.ha; java.io;
1,491,443
@XmlElement(name="last_ds") @XmlJavaTypeAdapter(DoubleAdapter.class) public Double getLastDs() { return lastDs; }
@XmlElement(name=STR) @XmlJavaTypeAdapter(DoubleAdapter.class) Double function() { return lastDs; }
/** * Gets the last data source value. * * @return the last data source time stamp */
Gets the last data source value
getLastDs
{ "repo_name": "tdefilip/opennms", "path": "opennms-rrd/opennms-rrd-model/src/main/java/org/opennms/netmgt/rrd/model/AbstractDS.java", "license": "agpl-3.0", "size": 5964 }
[ "javax.xml.bind.annotation.XmlElement", "javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter" ]
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.*;
[ "javax.xml" ]
javax.xml;
508,432
private JSONObject prepareJSONObject() { // query JSONObject query = new JSONObject(); query.put("id", new JSONNumber(appId)); if (reason != null) { query.put("reason", new JSONString(reason)); } return query; }
JSONObject function() { JSONObject query = new JSONObject(); query.put("id", new JSONNumber(appId)); if (reason != null) { query.put(STR, new JSONString(reason)); } return query; }
/** * Prepares a JSON object. * @return JSONObject - the whole query */
Prepares a JSON object
prepareJSONObject
{ "repo_name": "licehammer/perun", "path": "perun-web-gui/src/main/java/cz/metacentrum/perun/webgui/json/registrarManager/HandleApplication.java", "license": "bsd-2-clause", "size": 13434 }
[ "com.google.gwt.json.client.JSONNumber", "com.google.gwt.json.client.JSONObject", "com.google.gwt.json.client.JSONString" ]
import com.google.gwt.json.client.JSONNumber; import com.google.gwt.json.client.JSONObject; import com.google.gwt.json.client.JSONString;
import com.google.gwt.json.client.*;
[ "com.google.gwt" ]
com.google.gwt;
351,959
public VkPreisfindungPreislisteDto getAktuellePreislisteByPreislistenname( Integer pkPreislistenname) throws EJBExceptionLP { final String METHOD_NAME = "getAktuellePreislisteByPreislistenname"; myLogger.entry(); if (pkPreislistenname == null) { throw new EJBExceptionLP(EJBExceptionLP.FEHLER_PKFIELD_IS_N...
VkPreisfindungPreislisteDto function( Integer pkPreislistenname) throws EJBExceptionLP { final String METHOD_NAME = STR; myLogger.entry(); if (pkPreislistenname == null) { throw new EJBExceptionLP(EJBExceptionLP.FEHLER_PKFIELD_IS_NULL, new Exception()); } VkPreisfindungPreislisteDto dto = null; Query query = em .create...
/** * Preisliste mit aktuellem Gueltigkeitsdatum suchen. * * @param pkPreislistenname * Integer * @return VkPreisfindungPreislisteDto * @throws EJBExceptionLP */
Preisliste mit aktuellem Gueltigkeitsdatum suchen
getAktuellePreislisteByPreislistenname
{ "repo_name": "erdincay/ejb", "path": "src/com/lp/server/artikel/ejbfac/VkPreisfindungFacBean.java", "license": "agpl-3.0", "size": 161149 }
[ "com.lp.server.artikel.service.VkPreisfindungPreislisteDto", "com.lp.util.EJBExceptionLP", "java.sql.Date", "java.util.GregorianCalendar", "javax.persistence.Query" ]
import com.lp.server.artikel.service.VkPreisfindungPreislisteDto; import com.lp.util.EJBExceptionLP; import java.sql.Date; import java.util.GregorianCalendar; import javax.persistence.Query;
import com.lp.server.artikel.service.*; import com.lp.util.*; import java.sql.*; import java.util.*; import javax.persistence.*;
[ "com.lp.server", "com.lp.util", "java.sql", "java.util", "javax.persistence" ]
com.lp.server; com.lp.util; java.sql; java.util; javax.persistence;
1,217,179
public boolean sendCommandFeedback() { MinecraftServer minecraftserver = MinecraftServer.getServer(); return minecraftserver == null || !minecraftserver.isAnvilFileSet() || minecraftserver.worldServers[0].getGameRules().getBoolean("commandBlockOutput"); }
boolean function() { MinecraftServer minecraftserver = MinecraftServer.getServer(); return minecraftserver == null !minecraftserver.isAnvilFileSet() minecraftserver.worldServers[0].getGameRules().getBoolean(STR); }
/** * Returns true if the command sender should be sent feedback about executed commands */
Returns true if the command sender should be sent feedback about executed commands
sendCommandFeedback
{ "repo_name": "TorchPowered/Thallium", "path": "src/main/java/net/minecraft/command/server/CommandBlockLogic.java", "license": "mit", "size": 7452 }
[ "net.minecraft.server.MinecraftServer" ]
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.*;
[ "net.minecraft.server" ]
net.minecraft.server;
491,391
protected boolean isDeprecated(AstNode astNode) { return isAnnotation(astNode, DEPRECATED); }
boolean function(AstNode astNode) { return isAnnotation(astNode, DEPRECATED); }
/** * Analyzes if a node is deprecated class or method. * * @param astNode to be analyzed. * @return the analysis result. */
Analyzes if a node is deprecated class or method
isDeprecated
{ "repo_name": "fundacionjala/enforce-sonarqube-plugin", "path": "apex-checks/src/main/java/org/fundacionjala/enforce/sonarqube/apex/checks/unofficial/AnnotationMethodCheck.java", "license": "mit", "size": 1809 }
[ "com.sonar.sslr.api.AstNode" ]
import com.sonar.sslr.api.AstNode;
import com.sonar.sslr.api.*;
[ "com.sonar.sslr" ]
com.sonar.sslr;
892,703
@Override public void activateParameters() { String[] keys = listParameters(); for ( String key : keys ) { String value; try { value = getParameterValue( key ); } catch ( UnknownParamException e ) { value = ""; } String defValue; try { defValue =...
void function() { String[] keys = listParameters(); for ( String key : keys ) { String value; try { value = getParameterValue( key ); } catch ( UnknownParamException e ) { value = STRSTRSTR" ) ); } } }
/** * Activates all parameters by setting their values. If no values already exist, the method will attempt to set the * parameter to the default value. If no default value exists, the method will set the value of the parameter to the * empty string (""). * * @see org.pentaho.di.core.parameters.NamedPara...
Activates all parameters by setting their values. If no values already exist, the method will attempt to set the parameter to the default value. If no default value exists, the method will set the value of the parameter to the empty string ("")
activateParameters
{ "repo_name": "denisprotopopov/pentaho-kettle", "path": "engine/src/org/pentaho/di/trans/Trans.java", "license": "apache-2.0", "size": 196543 }
[ "org.pentaho.di.core.parameters.UnknownParamException" ]
import org.pentaho.di.core.parameters.UnknownParamException;
import org.pentaho.di.core.parameters.*;
[ "org.pentaho.di" ]
org.pentaho.di;
652,668
@ApiModelProperty(value = "When set to **true**, Connect messages are signed with an X509 certificate. This provides support for 2-way SSL.") public String getSignMessageWithX509Certificate() { return signMessageWithX509Certificate; }
@ApiModelProperty(value = STR) String function() { return signMessageWithX509Certificate; }
/** * When set to **true**, Connect messages are signed with an X509 certificate. This provides support for 2-way SSL.. * @return signMessageWithX509Certificate **/
When set to **true**, Connect messages are signed with an X509 certificate. This provides support for 2-way SSL.
getSignMessageWithX509Certificate
{ "repo_name": "docusign/docusign-java-client", "path": "src/main/java/com/docusign/esign/model/ConnectCustomConfiguration.java", "license": "mit", "size": 41932 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,590,121
@Override public void endTest(Test test) { TestCase testCase = (TestCase) test; if (mFailed) { String stackTrace = null; if (mThrowable != null) { stackTrace = Log.getStackTraceString(mThrowable); } mReporter.testFailed(testCase.get...
void function(Test test) { TestCase testCase = (TestCase) test; if (mFailed) { String stackTrace = null; if (mThrowable != null) { stackTrace = Log.getStackTraceString(mThrowable); } mReporter.testFailed(testCase.getClass().getName(), testCase.getName(), stackTrace); } else { mReporter.testPassed(testCase.getClass().ge...
/** Called when a test has ended. @param test The test that ended. */
Called when a test has ended
endTest
{ "repo_name": "endlessm/chromium-browser", "path": "testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusListener.java", "license": "bsd-3-clause", "size": 2613 }
[ "android.util.Log", "junit.framework.Test", "junit.framework.TestCase" ]
import android.util.Log; import junit.framework.Test; import junit.framework.TestCase;
import android.util.*; import junit.framework.*;
[ "android.util", "junit.framework" ]
android.util; junit.framework;
1,714,123
void handleMouseMotionEvent(MouseEvent ev);
void handleMouseMotionEvent(MouseEvent ev);
/** * Handles a mouse motion event. This is usually forwarded to * {@link Component#processMouseEvent(MouseEvent)} of the swing * component. * * @param ev the mouse motion event */
Handles a mouse motion event. This is usually forwarded to <code>Component#processMouseEvent(MouseEvent)</code> of the swing component
handleMouseMotionEvent
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/gnu/java/awt/peer/swing/SwingComponent.java", "license": "gpl-2.0", "size": 3355 }
[ "java.awt.event.MouseEvent" ]
import java.awt.event.MouseEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
2,279,620
public static RelNode createRenameRel( RelDataType outputType, RelNode rel) { RelDataType inputType = rel.getRowType(); List<RelDataTypeField> inputFields = inputType.getFieldList(); int n = inputFields.size(); List<RelDataTypeField> outputFields = outputType.getFieldList(); assert ou...
static RelNode function( RelDataType outputType, RelNode rel) { RelDataType inputType = rel.getRowType(); List<RelDataTypeField> inputFields = inputType.getFieldList(); int n = inputFields.size(); List<RelDataTypeField> outputFields = outputType.getFieldList(); assert outputFields.size() == n : STR + inputType + STR + ...
/** * Creates a LogicalProject which accomplishes a rename. * * @param outputType a row type descriptor whose field names the generated * LogicalProject must match * @param rel the rel whose output is to be renamed; rel.getRowType() * must be the same as outp...
Creates a LogicalProject which accomplishes a rename
createRenameRel
{ "repo_name": "YrAuYong/incubator-calcite", "path": "core/src/main/java/org/apache/calcite/plan/RelOptUtil.java", "license": "apache-2.0", "size": 119673 }
[ "java.util.ArrayList", "java.util.List", "org.apache.calcite.rel.RelNode", "org.apache.calcite.rel.type.RelDataType", "org.apache.calcite.rel.type.RelDataTypeField", "org.apache.calcite.rex.RexBuilder", "org.apache.calcite.rex.RexNode", "org.apache.calcite.util.Pair" ]
import java.util.ArrayList; import java.util.List; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rel.type.RelDataTypeField; import org.apache.calcite.rex.RexBuilder; import org.apache.calcite.rex.RexNode; import org.apache.calcite.util.Pair;
import java.util.*; import org.apache.calcite.rel.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.rex.*; import org.apache.calcite.util.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
1,007,785
private boolean makeSureFileLockRemainsGone(File lock, long timeToWait) { for (long start = System.currentTimeMillis(); System.currentTimeMillis() < start + timeToWait;) { Sleeper.sleepTight(500); if (lock.exists()) return false; } return !lock.exists(); }
boolean function(File lock, long timeToWait) { for (long start = System.currentTimeMillis(); System.currentTimeMillis() < start + timeToWait;) { Sleeper.sleepTight(500); if (lock.exists()) return false; } return !lock.exists(); }
/** * When initializing the profile, Opera rapidly starts, stops, restarts and stops again; we need * to wait a bit to make sure the file lock is really gone. * * @param lock the parent.lock file in the profile directory * @param timeToWait minimum time to wait to see if the file shows back up again. Th...
When initializing the profile, Opera rapidly starts, stops, restarts and stops again; we need to wait a bit to make sure the file lock is really gone
makeSureFileLockRemainsGone
{ "repo_name": "jsarenik/jajomojo-selenium", "path": "java/server/src/org/openqa/selenium/server/browserlaunchers/OperaCustomProfileLauncher.java", "license": "apache-2.0", "size": 12634 }
[ "java.io.File", "org.openqa.selenium.browserlaunchers.Sleeper" ]
import java.io.File; import org.openqa.selenium.browserlaunchers.Sleeper;
import java.io.*; import org.openqa.selenium.browserlaunchers.*;
[ "java.io", "org.openqa.selenium" ]
java.io; org.openqa.selenium;
2,700,989
boolean isThisHost(String hostName) { try { InetAddress thisAddr = InetAddress.getLocalHost(); //XXX multinic?? InetAddress hostAddr = InetAddress.getByName(hostName); return hostAddr.equals(thisAddr); } catch (UnknownHostException e) { logger.log(Level.SEVERE, "Unexpected exception", e); } ...
boolean isThisHost(String hostName) { try { InetAddress thisAddr = InetAddress.getLocalHost(); InetAddress hostAddr = InetAddress.getByName(hostName); return hostAddr.equals(thisAddr); } catch (UnknownHostException e) { logger.log(Level.SEVERE, STR, e); } return true; }
/** * Return an indication of whether the <code>hostName</code> is this host. * * @return true if this <code>hostName</code> is this host */
Return an indication of whether the <code>hostName</code> is this host
isThisHost
{ "repo_name": "pfirmstone/river-internet", "path": "qa/src/org/apache/river/qa/harness/QAConfig.java", "license": "apache-2.0", "size": 110034 }
[ "java.net.InetAddress", "java.net.UnknownHostException", "java.util.logging.Level" ]
import java.net.InetAddress; import java.net.UnknownHostException; import java.util.logging.Level;
import java.net.*; import java.util.logging.*;
[ "java.net", "java.util" ]
java.net; java.util;
1,650,276
public static boolean checkTimeInRangeWithSkew(Date timeToCheck, Date startDate, Date endDate, int skewInMinutes) { if (startDate.after(endDate) || startDate.equals(endDate)) { String msg = String .format( "Illegal time interval: start date must be before end date. [start date: %s, en...
static boolean function(Date timeToCheck, Date startDate, Date endDate, int skewInMinutes) { if (startDate.after(endDate) startDate.equals(endDate)) { String msg = String .format( STR, startDate, endDate); throw new IllegalArgumentException(msg); } Calendar cal = Calendar.getInstance(); cal.setTime(startDate); cal.add(...
/** * Checks that a date falls in the interval allowing for a certain clock skew * expressed in minutes. The interval defined by (startDate, endDate) is * modified to be (startDate - skewInMinutes, endDate + skewInMinutes). * * @param timeToCheck * the time to be checked * @param startDat...
Checks that a date falls in the interval allowing for a certain clock skew expressed in minutes. The interval defined by (startDate, endDate) is modified to be (startDate - skewInMinutes, endDate + skewInMinutes)
checkTimeInRangeWithSkew
{ "repo_name": "ellert/voms-api-java", "path": "src/main/java/org/italiangrid/voms/util/TimeUtils.java", "license": "apache-2.0", "size": 2364 }
[ "java.util.Calendar", "java.util.Date" ]
import java.util.Calendar; import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,005,873
@Override public Properties getProperties() { return properties; }
Properties function() { return properties; }
/** * Gets the current used properties. Can be null if no properties are set. * * @return the current used properties. * @see #setProperties(java.util.Properties) */
Gets the current used properties. Can be null if no properties are set
getProperties
{ "repo_name": "emrahkocaman/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/config/XmlConfigBuilder.java", "license": "apache-2.0", "size": 104398 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
1,278,429
Entity getEntityByPrincipalId(String principalId);
Entity getEntityByPrincipalId(String principalId);
/** * Fetches full entity info, populated from EDS, based on the Entity's principal id * @param principalId the principal id to look the entity up for * @return the corresponding entity info */
Fetches full entity info, populated from EDS, based on the Entity's principal id
getEntityByPrincipalId
{ "repo_name": "ua-eas/ua-rice-2.1.9", "path": "kim/kim-ldap/src/main/java/org/kuali/rice/kim/dao/LdapPrincipalDao.java", "license": "apache-2.0", "size": 3157 }
[ "org.kuali.rice.kim.api.identity.entity.Entity" ]
import org.kuali.rice.kim.api.identity.entity.Entity;
import org.kuali.rice.kim.api.identity.entity.*;
[ "org.kuali.rice" ]
org.kuali.rice;
2,468,680
private MachineInfoAveragingPrerequisitesOperator addAverageCalculation(DAG dag, Configuration conf) { MachineInfoAveragingPrerequisitesOperator prereqAverageOper = dag.addOperator("Aggregator", MachineInfoAveragingPrerequisitesOperator.class); MachineInfoAveragingOperator averageOperator = dag.addOperator(...
MachineInfoAveragingPrerequisitesOperator function(DAG dag, Configuration conf) { MachineInfoAveragingPrerequisitesOperator prereqAverageOper = dag.addOperator(STR, MachineInfoAveragingPrerequisitesOperator.class); MachineInfoAveragingOperator averageOperator = dag.addOperator(STR, MachineInfoAveragingOperator.class); ...
/** * This function sets up the DAG for calculating the average * * @param dag the DAG instance * @param conf the configuration instance * @return MachineInfoAveragingPrerequisitesOperator */
This function sets up the DAG for calculating the average
addAverageCalculation
{ "repo_name": "yogidevendra/incubator-apex-malhar", "path": "examples/machinedata/src/main/java/org/apache/apex/examples/machinedata/Application.java", "license": "apache-2.0", "size": 3527 }
[ "com.datatorrent.contrib.redis.RedisKeyValPairOutputOperator", "com.datatorrent.lib.io.SmtpOutputOperator", "java.util.Map", "org.apache.apex.examples.machinedata.data.MachineKey", "org.apache.apex.examples.machinedata.operator.MachineInfoAveragingOperator", "org.apache.apex.examples.machinedata.operator....
import com.datatorrent.contrib.redis.RedisKeyValPairOutputOperator; import com.datatorrent.lib.io.SmtpOutputOperator; import java.util.Map; import org.apache.apex.examples.machinedata.data.MachineKey; import org.apache.apex.examples.machinedata.operator.MachineInfoAveragingOperator; import org.apache.apex.examples.mach...
import com.datatorrent.contrib.redis.*; import com.datatorrent.lib.io.*; import java.util.*; import org.apache.apex.examples.machinedata.data.*; import org.apache.apex.examples.machinedata.operator.*; import org.apache.hadoop.conf.*;
[ "com.datatorrent.contrib", "com.datatorrent.lib", "java.util", "org.apache.apex", "org.apache.hadoop" ]
com.datatorrent.contrib; com.datatorrent.lib; java.util; org.apache.apex; org.apache.hadoop;
2,393,938
public static String toAbsoluteURL(String base, String path) { boolean abs = false; if (StringUtils.isBlank(path)) { path = ""; } else { for (String scheme: SCHEMES) { if (path.startsWith(scheme)) { abs = true; ...
static String function(String base, String path) { boolean abs = false; if (StringUtils.isBlank(path)) { path = ""; } else { for (String scheme: SCHEMES) { if (path.startsWith(scheme)) { abs = true; break; } } } if (abs) { return path; } return base + path; }
/** * Returns an absolute URL which is a combination of a base part plus path, * or in the case that the path is already an absolute URL, the path alone * @param base the url base path * @param path the path to append to base * @return an absolute URL representing the combination of base+p...
Returns an absolute URL which is a combination of a base part plus path, or in the case that the path is already an absolute URL, the path alone
toAbsoluteURL
{ "repo_name": "kuali/kc-rice", "path": "rice-middleware/kns/src/main/java/org/kuali/rice/kns/util/WebUtils.java", "license": "apache-2.0", "size": 43933 }
[ "org.apache.commons.lang.StringUtils" ]
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
747,263
public static <K> BigDecimal addToBigDecimalInMap(Map<K, Object> theMap, K mapKey, BigDecimal addNumber) { Object currentNumberObj = theMap.get(mapKey); BigDecimal currentNumber = null; if (currentNumberObj == null) { currentNumber = ZERO_BD; } else if (currentNumberObj i...
static <K> BigDecimal function(Map<K, Object> theMap, K mapKey, BigDecimal addNumber) { Object currentNumberObj = theMap.get(mapKey); BigDecimal currentNumber = null; if (currentNumberObj == null) { currentNumber = ZERO_BD; } else if (currentNumberObj instanceof BigDecimal) { currentNumber = (BigDecimal) currentNumberO...
/** * Assuming theMap not null; if null will throw a NullPointerException */
Assuming theMap not null; if null will throw a NullPointerException
addToBigDecimalInMap
{ "repo_name": "nomakaFr/ofbiz_ynh", "path": "sources/framework/base/src/org/ofbiz/base/util/UtilMisc.java", "license": "apache-2.0", "size": 27374 }
[ "java.math.BigDecimal", "java.util.Map" ]
import java.math.BigDecimal; import java.util.Map;
import java.math.*; import java.util.*;
[ "java.math", "java.util" ]
java.math; java.util;
458,165
public int readTag() throws IOException { byte b = (byte) this.read(); this.tagClass = (b & Tag.CLASS_MASK) >> 6; this.pCBit = (b & Tag.PC_MASK) >> 5; this.tag = b & Tag.TAG_MASK; // For larger tag values, the first octet has all ones in bits 5 to 1, // and the tag value is then encoded in ...
int function() throws IOException { byte b = (byte) this.read(); this.tagClass = (b & Tag.CLASS_MASK) >> 6; this.pCBit = (b & Tag.PC_MASK) >> 5; this.tag = b & Tag.TAG_MASK; if (tag == Tag.TAG_MASK) { byte temp; tag = 0; do { temp = (byte) this.read(); tag = (tag << 7) (0x7F & temp); } while (0 != (0x80 & temp)); } ret...
/** * Reads the tag field. Returns the tag value. * Tag class and primitive / constructive mark can be get then by getTagClass() and isTagPrimitive() methods * * @return * @throws IOException */
Reads the tag field. Returns the tag value. Tag class and primitive / constructive mark can be get then by getTagClass() and isTagPrimitive() methods
readTag
{ "repo_name": "RestComm/jasn", "path": "asn-impl/src/main/java/org/mobicents/protocols/asn/AsnInputStream.java", "license": "agpl-3.0", "size": 30496 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
885,830
public void setDbConnector(DbConnector dbConnector) { JodaBeanUtils.notNull(dbConnector, "dbConnector"); this._dbConnector = dbConnector; }
void function(DbConnector dbConnector) { JodaBeanUtils.notNull(dbConnector, STR); this._dbConnector = dbConnector; }
/** * Sets the Database connector. * @param dbConnector the new value of the property, not null */
Sets the Database connector
setDbConnector
{ "repo_name": "McLeodMoores/starling", "path": "projects/starling-client/src/main/java/com/mcleodmoores/starling/client/component/BasicDbHolidayMasterComponentFactory.java", "license": "apache-2.0", "size": 19878 }
[ "com.opengamma.util.db.DbConnector", "org.joda.beans.JodaBeanUtils" ]
import com.opengamma.util.db.DbConnector; import org.joda.beans.JodaBeanUtils;
import com.opengamma.util.db.*; import org.joda.beans.*;
[ "com.opengamma.util", "org.joda.beans" ]
com.opengamma.util; org.joda.beans;
629,114
public EnvEntryType<SessionBeanType<T>> getOrCreateEnvEntry() { List<Node> nodeList = childNode.get("env-entry"); if (nodeList != null && nodeList.size() > 0) { return new EnvEntryTypeImpl<SessionBeanType<T>>(this, "env-entry", childNode, nodeList.get(0)); } return createEn...
EnvEntryType<SessionBeanType<T>> function() { List<Node> nodeList = childNode.get(STR); if (nodeList != null && nodeList.size() > 0) { return new EnvEntryTypeImpl<SessionBeanType<T>>(this, STR, childNode, nodeList.get(0)); } return createEnvEntry(); }
/** * If not already created, a new <code>env-entry</code> element will be created and returned. * Otherwise, the first existing <code>env-entry</code> element will be returned. * @return the instance defined for the element <code>env-entry</code> */
If not already created, a new <code>env-entry</code> element will be created and returned. Otherwise, the first existing <code>env-entry</code> element will be returned
getOrCreateEnvEntry
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ejbjar32/SessionBeanTypeImpl.java", "license": "epl-1.0", "size": 107840 }
[ "java.util.List", "org.jboss.shrinkwrap.descriptor.api.ejbjar32.SessionBeanType", "org.jboss.shrinkwrap.descriptor.api.javaee7.EnvEntryType", "org.jboss.shrinkwrap.descriptor.impl.javaee7.EnvEntryTypeImpl", "org.jboss.shrinkwrap.descriptor.spi.node.Node" ]
import java.util.List; import org.jboss.shrinkwrap.descriptor.api.ejbjar32.SessionBeanType; import org.jboss.shrinkwrap.descriptor.api.javaee7.EnvEntryType; import org.jboss.shrinkwrap.descriptor.impl.javaee7.EnvEntryTypeImpl; import org.jboss.shrinkwrap.descriptor.spi.node.Node;
import java.util.*; import org.jboss.shrinkwrap.descriptor.api.ejbjar32.*; import org.jboss.shrinkwrap.descriptor.api.javaee7.*; import org.jboss.shrinkwrap.descriptor.impl.javaee7.*; import org.jboss.shrinkwrap.descriptor.spi.node.*;
[ "java.util", "org.jboss.shrinkwrap" ]
java.util; org.jboss.shrinkwrap;
2,761,640
public CharSequence getDrawerTitle(int edgeGravity) { final int absGravity = GravityCompat.getAbsoluteGravity( edgeGravity, ViewCompat.getLayoutDirection(this)); if (absGravity == Gravity.LEFT) { return mTitleLeft; } else if (absGravity == Gravity.RIGHT) { ...
CharSequence function(int edgeGravity) { final int absGravity = GravityCompat.getAbsoluteGravity( edgeGravity, ViewCompat.getLayoutDirection(this)); if (absGravity == Gravity.LEFT) { return mTitleLeft; } else if (absGravity == Gravity.RIGHT) { return mTitleRight; } return null; }
/** * Returns the title of the drawer with the given gravity. * * @param edgeGravity Gravity.LEFT, RIGHT, START or END. Expresses which * drawer to return the title for. * @return The title of the drawer, or null if none set. * @see #setDrawerTitle(int, CharSequence) */
Returns the title of the drawer with the given gravity
getDrawerTitle
{ "repo_name": "mattlogan/ReverseDrawerLayout", "path": "library/src/main/java/com/matthewlogan/reversedrawerlayout/library/ReverseDrawerLayout.java", "license": "mit", "size": 64597 }
[ "android.support.v4.view.GravityCompat", "android.support.v4.view.ViewCompat", "android.view.Gravity" ]
import android.support.v4.view.GravityCompat; import android.support.v4.view.ViewCompat; import android.view.Gravity;
import android.support.v4.view.*; import android.view.*;
[ "android.support", "android.view" ]
android.support; android.view;
1,246,899
public String reload(){ String data=executeInternal(); try { JSONUtility.prepareServletResponseJSON(ServletActionContext.getResponse()); PrintWriter out = ServletActionContext.getResponse().getWriter(); StringBuilder sb=new StringBuilder(); sb.append("{"); JSONUtility.appendBooleanValue(sb, JSONUt...
String function(){ String data=executeInternal(); try { JSONUtility.prepareServletResponseJSON(ServletActionContext.getResponse()); PrintWriter out = ServletActionContext.getResponse().getWriter(); StringBuilder sb=new StringBuilder(); sb.append("{"); JSONUtility.appendBooleanValue(sb, JSONUtility.JSON_FIELDS.SUCCESS, ...
/** * Reload the screen * @return */
Reload the screen
reload
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/screen/action/AbstractScreenEditAction.java", "license": "gpl-3.0", "size": 13089 }
[ "com.aurel.track.json.JSONUtility", "java.io.IOException", "java.io.PrintWriter", "org.apache.commons.lang3.exception.ExceptionUtils", "org.apache.struts2.ServletActionContext" ]
import com.aurel.track.json.JSONUtility; import java.io.IOException; import java.io.PrintWriter; import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.struts2.ServletActionContext;
import com.aurel.track.json.*; import java.io.*; import org.apache.commons.lang3.exception.*; import org.apache.struts2.*;
[ "com.aurel.track", "java.io", "org.apache.commons", "org.apache.struts2" ]
com.aurel.track; java.io; org.apache.commons; org.apache.struts2;
2,885,217
public static ListDialog newInstance(String title, DialogInterface.OnClickListener onClick, int active, String... choices) { ListDialog f = new ListDialog(); f.title = title; f.choices = choices; f.active = active; f.onC = onClick; ...
static ListDialog function(String title, DialogInterface.OnClickListener onClick, int active, String... choices) { ListDialog f = new ListDialog(); f.title = title; f.choices = choices; f.active = active; f.onC = onClick; return f; } public ListDialog() { this.setCancelable(false); }
/** * Create a new instance of ListDialog, providing args. */
Create a new instance of ListDialog, providing args
newInstance
{ "repo_name": "dhbw-timetable/dhbw-timetable-android", "path": "app/src/main/java/dhbw/timetable/dialogs/ListDialog.java", "license": "mit", "size": 1562 }
[ "android.content.DialogInterface" ]
import android.content.DialogInterface;
import android.content.*;
[ "android.content" ]
android.content;
804,270
public SortedMap<String, AVMNodeDescriptor> getDirectoryListing(int version, String path, boolean includeDeleted) { if (path == null) { throw new AVMBadArgumentException("Null path."); } return...
SortedMap<String, AVMNodeDescriptor> function(int version, String path, boolean includeDeleted) { if (path == null) { throw new AVMBadArgumentException(STR); } return fAVMRepository.getListing(version, path, includeDeleted); }
/** * Get a listing of a Folder by name, with the option of seeing * Deleted Nodes. * @param version The version id to look in. * @param path The simple absolute path to the file node. * @param includeDeleted Whether to see Deleted Nodes. * @return A Map of names to descriptors. ...
Get a listing of a Folder by name, with the option of seeing Deleted Nodes
getDirectoryListing
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/repository/source/java/org/alfresco/repo/avm/AVMServiceImpl.java", "license": "lgpl-3.0", "size": 59118 }
[ "java.util.SortedMap", "org.alfresco.service.cmr.avm.AVMBadArgumentException", "org.alfresco.service.cmr.avm.AVMNodeDescriptor" ]
import java.util.SortedMap; import org.alfresco.service.cmr.avm.AVMBadArgumentException; import org.alfresco.service.cmr.avm.AVMNodeDescriptor;
import java.util.*; import org.alfresco.service.cmr.avm.*;
[ "java.util", "org.alfresco.service" ]
java.util; org.alfresco.service;
118,849
public static Map<Object, Object> getResourceMap() { Map<Object, Object> map = resources.get(); return (map != null ? Collections.unmodifiableMap(map) : Collections.emptyMap()); }
static Map<Object, Object> function() { Map<Object, Object> map = resources.get(); return (map != null ? Collections.unmodifiableMap(map) : Collections.emptyMap()); }
/** * Return all resources that are bound to the current thread. * <p>Mainly for debugging purposes. Resource managers should always invoke * {@code hasResource} for a specific resource key that they are interested in. * @return a Map with resource keys (usually the resource factory) and resource * values (us...
Return all resources that are bound to the current thread. Mainly for debugging purposes. Resource managers should always invoke hasResource for a specific resource key that they are interested in
getResourceMap
{ "repo_name": "leogoing/spring_jeesite", "path": "spring-tx-4.0/org/springframework/transaction/support/TransactionSynchronizationManager.java", "license": "apache-2.0", "size": 20210 }
[ "java.util.Collections", "java.util.Map" ]
import java.util.Collections; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,128,348
public List<? extends GenPolynomial<C>> univariateList(int modv, long e) { List<GenPolynomial<C>> pols = new ArrayList<GenPolynomial<C>>(nvar); int nm = nvar - modv; for (int i = 0; i < nm; i++) { GenPolynomial<C> p = univariate(modv, nm - 1 - i, e); pols.add(p); ...
List<? extends GenPolynomial<C>> function(int modv, long e) { List<GenPolynomial<C>> pols = new ArrayList<GenPolynomial<C>>(nvar); int nm = nvar - modv; for (int i = 0; i < nm; i++) { GenPolynomial<C> p = univariate(modv, nm - 1 - i, e); pols.add(p); } return pols; }
/** * Generate list of univariate polynomials in all variables with given * exponent. * @param modv number of module variables. * @param e the exponent of the variables. * @return List(X_1^e,...,X_n^e) a list of univariate polynomials. */
Generate list of univariate polynomials in all variables with given exponent
univariateList
{ "repo_name": "breandan/java-algebra-system", "path": "src/edu/jas/poly/GenPolynomialRing.java", "license": "gpl-2.0", "size": 39543 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,533,901
public List<LocalDate> getAccrualStart() { List<FloatingCashFlowDetails> cashFlowDetails = getCashFlowDetails(); List<LocalDate> accrualStart = new ArrayList<>(); for (int i = 0; i < cashFlowDetails.size(); i++) { accrualStart.add(cashFlowDetails.get(i).getAccrualStartDate()); } return ...
List<LocalDate> function() { List<FloatingCashFlowDetails> cashFlowDetails = getCashFlowDetails(); List<LocalDate> accrualStart = new ArrayList<>(); for (int i = 0; i < cashFlowDetails.size(); i++) { accrualStart.add(cashFlowDetails.get(i).getAccrualStartDate()); } return accrualStart; }
/** * Returns the accrual start dates of the cash flow. * @return the accrual start dates of the cash flow. */
Returns the accrual start dates of the cash flow
getAccrualStart
{ "repo_name": "ChinaQuants/OG-Platform", "path": "projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/model/fixedincome/FloatingLegCashFlows.java", "license": "apache-2.0", "size": 26803 }
[ "java.util.ArrayList", "java.util.List", "org.threeten.bp.LocalDate" ]
import java.util.ArrayList; import java.util.List; import org.threeten.bp.LocalDate;
import java.util.*; import org.threeten.bp.*;
[ "java.util", "org.threeten.bp" ]
java.util; org.threeten.bp;
1,157,799
public SourceReport getSourceReport() { return sourceReport; }
SourceReport function() { return sourceReport; }
/** * Returns the source report. This report contains all information about * tags, reader and source needed to generate the final reports of the * notification channels. * @return Returns the sourceReport */
Returns the source report. This report contains all information about tags, reader and source needed to generate the final reports of the notification channels
getSourceReport
{ "repo_name": "tavlima/fosstrak-reader", "path": "reader-rprm-core/src/main/java/org/fosstrak/reader/rprm/core/Source.java", "license": "lgpl-2.1", "size": 100250 }
[ "org.fosstrak.reader.rprm.core.readreport.SourceReport" ]
import org.fosstrak.reader.rprm.core.readreport.SourceReport;
import org.fosstrak.reader.rprm.core.readreport.*;
[ "org.fosstrak.reader" ]
org.fosstrak.reader;
2,168,379
public static List<OAuth.Parameter> getOAuthParameters(Request request) { final Set<OAuth.Parameter> parameters = new HashSet<OAuth.Parameter>(); // Authorization headers. final Form headers = (Form) request.getAttributes().get("org.restlet.http.headers"); for (final OAuth.Para...
static List<OAuth.Parameter> function(Request request) { final Set<OAuth.Parameter> parameters = new HashSet<OAuth.Parameter>(); final Form headers = (Form) request.getAttributes().get(STR); for (final OAuth.Parameter parameter : OAuthMessage.decodeAuthorization(headers.getFirstValue(STR, true))) { if (!parameter.getKe...
/** * Translate request parameters into OAuth.Parameter objects. * * @param request * @return parameters */
Translate request parameters into OAuth.Parameter objects
getOAuthParameters
{ "repo_name": "devacfr/spring-restlet", "path": "restlet.ext.shindig/src/main/java/org/cfr/restlet/ext/shindig/auth/OAuthResource.java", "license": "unlicense", "size": 17219 }
[ "java.util.ArrayList", "java.util.HashSet", "java.util.List", "java.util.Set", "net.oauth.OAuth", "net.oauth.OAuthMessage", "org.restlet.Context", "org.restlet.Request", "org.restlet.data.Form", "org.restlet.data.MediaType", "org.restlet.data.Method" ]
import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import net.oauth.OAuth; import net.oauth.OAuthMessage; import org.restlet.Context; import org.restlet.Request; import org.restlet.data.Form; import org.restlet.data.MediaType; import org.restlet.data.Method;
import java.util.*; import net.oauth.*; import org.restlet.*; import org.restlet.data.*;
[ "java.util", "net.oauth", "org.restlet", "org.restlet.data" ]
java.util; net.oauth; org.restlet; org.restlet.data;
812,072
createIndex("test"); ensureGreen(); int numDocs = randomIntBetween(100, 150); IndexRequestBuilder[] docs = new IndexRequestBuilder[numDocs]; for (int i = 0; i < numDocs; i++) { docs[i] = client().prepareIndex("test", "type1", String.valueOf(i)).setSource( ...
createIndex("test"); ensureGreen(); int numDocs = randomIntBetween(100, 150); IndexRequestBuilder[] docs = new IndexRequestBuilder[numDocs]; for (int i = 0; i < numDocs; i++) { docs[i] = client().prepareIndex("test", "type1", String.valueOf(i)).setSource( STR, English.intToEnglish(i), STR, i ); } List<String> stringFie...
/** * This test simply checks to make sure nothing crashes. Test indexes 100-150 documents, * constructs 20-100 random queries and tries to profile them */
This test simply checks to make sure nothing crashes. Test indexes 100-150 documents, constructs 20-100 random queries and tries to profile them
testProfileQuery
{ "repo_name": "mmaracic/elasticsearch", "path": "core/src/test/java/org/elasticsearch/search/profile/QueryProfilerIT.java", "license": "apache-2.0", "size": 25745 }
[ "java.util.Arrays", "java.util.List", "java.util.Map", "org.apache.lucene.util.English", "org.elasticsearch.action.index.IndexRequestBuilder", "org.elasticsearch.action.search.SearchResponse", "org.elasticsearch.action.search.SearchType", "org.elasticsearch.index.query.QueryBuilder", "org.elasticsea...
import java.util.Arrays; import java.util.List; import java.util.Map; import org.apache.lucene.util.English; import org.elasticsearch.action.index.IndexRequestBuilder; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.SearchType; import org.elasticsearch.index.query.QueryBuil...
import java.util.*; import org.apache.lucene.util.*; import org.elasticsearch.action.index.*; import org.elasticsearch.action.search.*; import org.elasticsearch.index.query.*; import org.elasticsearch.search.profile.*; import org.hamcrest.*;
[ "java.util", "org.apache.lucene", "org.elasticsearch.action", "org.elasticsearch.index", "org.elasticsearch.search", "org.hamcrest" ]
java.util; org.apache.lucene; org.elasticsearch.action; org.elasticsearch.index; org.elasticsearch.search; org.hamcrest;
1,136,178
public static SSLEngine getSslEngine(SslConnection connection) { if (connection instanceof UndertowSslConnection) { return ((UndertowSslConnection) connection).getSSLEngine(); } else { return JsseXnioSsl.getSslEngine(connection); } }
static SSLEngine function(SslConnection connection) { if (connection instanceof UndertowSslConnection) { return ((UndertowSslConnection) connection).getSSLEngine(); } else { return JsseXnioSsl.getSslEngine(connection); } }
/** * Get the SSL engine for a given connection. * * @return the SSL engine */
Get the SSL engine for a given connection
getSslEngine
{ "repo_name": "amannm/undertow", "path": "core/src/main/java/io/undertow/protocols/ssl/UndertowXnioSsl.java", "license": "apache-2.0", "size": 15173 }
[ "javax.net.ssl.SSLEngine", "org.xnio.ssl.JsseXnioSsl", "org.xnio.ssl.SslConnection" ]
import javax.net.ssl.SSLEngine; import org.xnio.ssl.JsseXnioSsl; import org.xnio.ssl.SslConnection;
import javax.net.ssl.*; import org.xnio.ssl.*;
[ "javax.net", "org.xnio.ssl" ]
javax.net; org.xnio.ssl;
1,125,383
public static SortedSet<String> roleNames() { return ROLE_MAP.keySet().stream().collect(Sets.toUnmodifiableSortedSet()); }
static SortedSet<String> function() { return ROLE_MAP.keySet().stream().collect(Sets.toUnmodifiableSortedSet()); }
/** * The set of possible role names. * * @return an ordered, immutable set of possible role names */
The set of possible role names
roleNames
{ "repo_name": "robin13/elasticsearch", "path": "server/src/main/java/org/elasticsearch/cluster/node/DiscoveryNodeRole.java", "license": "apache-2.0", "size": 11700 }
[ "java.util.SortedSet", "org.elasticsearch.common.util.set.Sets" ]
import java.util.SortedSet; import org.elasticsearch.common.util.set.Sets;
import java.util.*; import org.elasticsearch.common.util.set.*;
[ "java.util", "org.elasticsearch.common" ]
java.util; org.elasticsearch.common;
1,721,511
@SuppressWarnings("unchecked") @Nullable private <R> R cast(@Nullable Object obj, Class<R> cls) throws IgniteCheckedException { if (obj == null) return null; if (cls.isInstance(obj)) return (R)obj; else throw new IgniteCheckedException("Failed to cast...
@SuppressWarnings(STR) @Nullable <R> R function(@Nullable Object obj, Class<R> cls) throws IgniteCheckedException { if (obj == null) return null; if (cls.isInstance(obj)) return (R)obj; else throw new IgniteCheckedException(STR + cls + STR + obj.getClass() + ']'); }
/** * Tries to cast the object to expected type. * * @param obj Object which will be casted. * @param cls Class * @param <R> Type of expected result. * @return Object has casted to expected type. * @throws IgniteCheckedException If {@code obj} has different to {@code cls} type. *...
Tries to cast the object to expected type
cast
{ "repo_name": "dlnufox/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java", "license": "apache-2.0", "size": 70905 }
[ "org.apache.ignite.IgniteCheckedException", "org.jetbrains.annotations.Nullable" ]
import org.apache.ignite.IgniteCheckedException; import org.jetbrains.annotations.Nullable;
import org.apache.ignite.*; import org.jetbrains.annotations.*;
[ "org.apache.ignite", "org.jetbrains.annotations" ]
org.apache.ignite; org.jetbrains.annotations;
1,289,447
@SuppressWarnings("unchecked") void addProvidersFromSkylark(Object toAdd) throws EvalException { if (!(toAdd instanceof Iterable)) { throw new EvalException( null, String.format( AppleSkylarkCommon.BAD_PROVIDERS_ITER_ERROR, EvalUtils.getDataTypeName(toAdd)))...
@SuppressWarnings(STR) void addProvidersFromSkylark(Object toAdd) throws EvalException { if (!(toAdd instanceof Iterable)) { throw new EvalException( null, String.format( AppleSkylarkCommon.BAD_PROVIDERS_ITER_ERROR, EvalUtils.getDataTypeName(toAdd))); } else { Iterable<Object> toAddIterable = (Iterable<Object>) toAdd; ...
/** * Adds the given providers from skylark. An error is thrown if toAdd is not an iterable of * ObjcProvider instances. */
Adds the given providers from skylark. An error is thrown if toAdd is not an iterable of ObjcProvider instances
addProvidersFromSkylark
{ "repo_name": "aehlig/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProvider.java", "license": "apache-2.0", "size": 46597 }
[ "com.google.devtools.build.lib.syntax.EvalException", "com.google.devtools.build.lib.syntax.EvalUtils" ]
import com.google.devtools.build.lib.syntax.EvalException; import com.google.devtools.build.lib.syntax.EvalUtils;
import com.google.devtools.build.lib.syntax.*;
[ "com.google.devtools" ]
com.google.devtools;
2,740,833
public static GeoQuery query(String name, double lat, double lon, int ... precisions) { return query(name, GeoHashUtils.stringEncode(lon, lat), precisions); }
static GeoQuery function(String name, double lat, double lon, int ... precisions) { return query(name, GeoHashUtils.stringEncode(lon, lat), precisions); }
/** * Create a new geolocation query from a given geocoordinate * * @param lat * latitude of the location * @param lon * longitude of the location * @return new geolocation query */
Create a new geolocation query from a given geocoordinate
query
{ "repo_name": "strapdata/elassandra5-rc", "path": "core/src/main/java/org/elasticsearch/search/suggest/completion2x/context/GeolocationContextMapping.java", "license": "apache-2.0", "size": 30315 }
[ "org.elasticsearch.common.geo.GeoHashUtils" ]
import org.elasticsearch.common.geo.GeoHashUtils;
import org.elasticsearch.common.geo.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
362,839
@Test public void oneMoreSourceFieldInAButItIsOmitted() { Mapper<AWithOneMoreSourceField, AResourceWithOneMoreSourceField> mapper = Mapping .from(AWithOneMoreSourceField.class) .to(AResourceWithOneMoreSourceField.class) .omitInSource(a -> a.getOnlyInA()) .mapper(); AWithOneM...
void function() { Mapper<AWithOneMoreSourceField, AResourceWithOneMoreSourceField> mapper = Mapping .from(AWithOneMoreSourceField.class) .to(AResourceWithOneMoreSourceField.class) .omitInSource(a -> a.getOnlyInA()) .mapper(); AWithOneMoreSourceField aWithOneMoreSourceField = new AWithOneMoreSourceField(1, 10, "text"); ...
/** * Ensures that an unmatched source field is omitted. */
Ensures that an unmatched source field is omitted
oneMoreSourceFieldInAButItIsOmitted
{ "repo_name": "remondis-it/remap", "path": "src/test/java/com/remondis/remap/basic/MapperTest.java", "license": "apache-2.0", "size": 14645 }
[ "com.remondis.remap.Mapper", "com.remondis.remap.Mapping", "org.junit.Assert" ]
import com.remondis.remap.Mapper; import com.remondis.remap.Mapping; import org.junit.Assert;
import com.remondis.remap.*; import org.junit.*;
[ "com.remondis.remap", "org.junit" ]
com.remondis.remap; org.junit;
1,288,589
public void undoClosure(long time, int tabId) { createStackTabs(true); if (mStackTabs == null) return; for (int i = 0; i < mStackTabs.length; i++) { StackTab tab = mStackTabs[i]; if (tab.getId() == tabId) { tab.setDiscardAmount(getDiscardRange()); ...
void function(long time, int tabId) { createStackTabs(true); if (mStackTabs == null) return; for (int i = 0; i < mStackTabs.length; i++) { StackTab tab = mStackTabs[i]; if (tab.getId() == tabId) { tab.setDiscardAmount(getDiscardRange()); tab.setDying(false); tab.getLayoutTab().setMaxContentHeight(getMaxTabHeight()); } ...
/** * Reverts the closure of the tab specified by {@code tabId}. This will run an undiscard * animation on that tab. * @param time The current time of the app in ms. * @param tabId The id of the tab to animate. */
Reverts the closure of the tab specified by tabId. This will run an undiscard animation on that tab
undoClosure
{ "repo_name": "mogoweb/365browser", "path": "app/src/main/java/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java", "license": "apache-2.0", "size": 111945 }
[ "org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation" ]
import org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation;
import org.chromium.chrome.browser.compositor.layouts.phone.stack.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
1,543,436
public ServiceFuture<VpnClientIPsecParametersInner> beginGetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback<VpnClientIPsecParametersInner> serviceCallback) { return ServiceFuture.fromResponse(beginGetVpnclientIpsecParametersWithServiceResponseA...
ServiceFuture<VpnClientIPsecParametersInner> function(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback<VpnClientIPsecParametersInner> serviceCallback) { return ServiceFuture.fromResponse(beginGetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayNam...
/** * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGat...
The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider
beginGetVpnclientIpsecParametersAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/implementation/VirtualNetworkGatewaysInner.java", "license": "mit", "size": 304865 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,790,209
public void mostrarMensaje(String mensaje, boolean error) { int tipo = (error ? JOptionPane.ERROR_MESSAGE: JOptionPane.INFORMATION_MESSAGE); JOptionPane.showMessageDialog(this, mensaje, "CupIphone", tipo); }
void function(String mensaje, boolean error) { int tipo = (error ? JOptionPane.ERROR_MESSAGE: JOptionPane.INFORMATION_MESSAGE); JOptionPane.showMessageDialog(this, mensaje, STR, tipo); }
/** * Muestra un mensaje * @param mensaje * @param error */
Muestra un mensaje
mostrarMensaje
{ "repo_name": "vargax/ejemplos", "path": "java/apo/n15_cupIphone/source/uniandes/cupi2/cupIphone/interfaz/PanelPantalla.java", "license": "gpl-2.0", "size": 10465 }
[ "javax.swing.JOptionPane" ]
import javax.swing.JOptionPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
781,029
@Test public void whenIteratorThenReturnsIteratorOfList() { Integer elem1 = new Integer(1); Integer elem2 = new Integer(2); Integer elem3 = new Integer(3); SimpleLinkedList<Integer> list = new SimpleLinkedList<>(); list.add(elem1); list.add(elem2); list.a...
void function() { Integer elem1 = new Integer(1); Integer elem2 = new Integer(2); Integer elem3 = new Integer(3); SimpleLinkedList<Integer> list = new SimpleLinkedList<>(); list.add(elem1); list.add(elem2); list.add(elem3); Iterator<Integer> iterator = list.iterator(); assertThat(iterator.hasNext(), is(true)); assertTh...
/** * Tests iterator(). */
Tests iterator()
whenIteratorThenReturnsIteratorOfList
{ "repo_name": "dinar92/java_training", "path": "chapter_005/src/test/java/ru/job4j/collections/SimpleLinkedListTest.java", "license": "apache-2.0", "size": 1846 }
[ "java.util.Iterator", "org.hamcrest.core.Is", "org.junit.Assert" ]
import java.util.Iterator; import org.hamcrest.core.Is; import org.junit.Assert;
import java.util.*; import org.hamcrest.core.*; import org.junit.*;
[ "java.util", "org.hamcrest.core", "org.junit" ]
java.util; org.hamcrest.core; org.junit;
2,161,289
public static ScanRequest buildScanRequest(final byte[] regionName, final Scan scan, final int numberOfRows, final boolean closeScanner) throws IOException { ScanRequest.Builder builder = ScanRequest.newBuilder(); RegionSpecifier region = buildRegionSpecifier( RegionSpecifierType.REGION_NA...
static ScanRequest function(final byte[] regionName, final Scan scan, final int numberOfRows, final boolean closeScanner) throws IOException { ScanRequest.Builder builder = ScanRequest.newBuilder(); RegionSpecifier region = buildRegionSpecifier( RegionSpecifierType.REGION_NAME, regionName); builder.setNumberOfRows(numb...
/** * Create a protocol buffer ScanRequest for a client Scan * * @param regionName * @param scan * @param numberOfRows * @param closeScanner * @return a scan request * @throws IOException */
Create a protocol buffer ScanRequest for a client Scan
buildScanRequest
{ "repo_name": "lilonglai/hbase-0.96.2", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/RequestConverter.java", "license": "apache-2.0", "size": 57605 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.Scan", "org.apache.hadoop.hbase.protobuf.generated.ClientProtos", "org.apache.hadoop.hbase.protobuf.generated.HBaseProtos" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.protobuf.generated.ClientProtos; import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos;
import java.io.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.protobuf.generated.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,842,515
private void ocrContinuousDecode(byte[] data, int width, int height) { PlanarYUVLuminanceSource source = activity.getCameraManager() .buildLuminanceSource(data, width, height); if (source == null) { sendContinuousOcrFailMessage(); return; } OcrResult ocrResult = OcrRecognizeAsyncTask.getOcrResult(...
void function(byte[] data, int width, int height) { PlanarYUVLuminanceSource source = activity.getCameraManager() .buildLuminanceSource(data, width, height); if (source == null) { sendContinuousOcrFailMessage(); return; } OcrResult ocrResult = OcrRecognizeAsyncTask.getOcrResult(activity, baseApi, null, source); Handler...
/** * Perform an OCR decode for realtime recognition mode. * * @param data * Image data * @param width * Image width * @param height * Image height */
Perform an OCR decode for realtime recognition mode
ocrContinuousDecode
{ "repo_name": "dominhhai/AndroidOCR", "path": "android/src/hpcc/hut/edu/vn/ocr/DecodeHandler.java", "license": "apache-2.0", "size": 3858 }
[ "android.os.Handler", "android.os.Message" ]
import android.os.Handler; import android.os.Message;
import android.os.*;
[ "android.os" ]
android.os;
1,521,047
public static List<File> listFilesAndSort(File[] folderNames, String... extensions) { List<File> completeFilesList = new ArrayList<File>(); for (int i = 0; i < folderNames.length; i++) { Collection<File> filesCollection = FileUtils.listFiles(folderNames[i], extensions, true); ...
static List<File> function(File[] folderNames, String... extensions) { List<File> completeFilesList = new ArrayList<File>(); for (int i = 0; i < folderNames.length; i++) { Collection<File> filesCollection = FileUtils.listFiles(folderNames[i], extensions, true); completeFilesList.addAll(filesCollection); } Collections.s...
/** * Returns the sorted list of the files in the given folders with the given file extensions. * Sorting is done on the basis of CreationTime if the CreationTime is not available or if they are equal * then sorting is done by LastModifiedTime * @param folderNames - array of folders which we need to...
Returns the sorted list of the files in the given folders with the given file extensions. Sorting is done on the basis of CreationTime if the CreationTime is not available or if they are equal then sorting is done by LastModifiedTime
listFilesAndSort
{ "repo_name": "apache/bookkeeper", "path": "bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieShell.java", "license": "apache-2.0", "size": 95877 }
[ "java.io.File", "java.io.Serializable", "java.util.ArrayList", "java.util.Collection", "java.util.Collections", "java.util.Comparator", "java.util.List", "org.apache.commons.io.FileUtils" ]
import java.io.File; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; import org.apache.commons.io.FileUtils;
import java.io.*; import java.util.*; import org.apache.commons.io.*;
[ "java.io", "java.util", "org.apache.commons" ]
java.io; java.util; org.apache.commons;
2,649,511
public DataType toDataType(DataTypeFactory factory) { DataType resolvedDataType = resolutionFactory.apply(factory); if (isNullable == Boolean.TRUE) { resolvedDataType = resolvedDataType.nullable(); } else if (isNullable == Boolean.FALSE) { resolvedDataType = resolvedD...
DataType function(DataTypeFactory factory) { DataType resolvedDataType = resolutionFactory.apply(factory); if (isNullable == Boolean.TRUE) { resolvedDataType = resolvedDataType.nullable(); } else if (isNullable == Boolean.FALSE) { resolvedDataType = resolvedDataType.notNull(); } if (conversionClass != null) { resolvedD...
/** * Converts this instance to a resolved {@link DataType} possibly enriched with additional * nullability and conversion class information. */
Converts this instance to a resolved <code>DataType</code> possibly enriched with additional nullability and conversion class information
toDataType
{ "repo_name": "apache/flink", "path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/UnresolvedDataType.java", "license": "apache-2.0", "size": 3850 }
[ "org.apache.flink.table.catalog.DataTypeFactory" ]
import org.apache.flink.table.catalog.DataTypeFactory;
import org.apache.flink.table.catalog.*;
[ "org.apache.flink" ]
org.apache.flink;
1,118,882
EClass getUiTabAssignment();
EClass getUiTabAssignment();
/** * Returns the meta object for class '{@link org.lunifera.ecview.semantic.uimodel.UiTabAssignment <em>Ui Tab Assignment</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Ui Tab Assignment</em>'. * @see org.lunifera.ecview.semantic.uimodel.UiTabAssignment *...
Returns the meta object for class '<code>org.lunifera.ecview.semantic.uimodel.UiTabAssignment Ui Tab Assignment</code>'.
getUiTabAssignment
{ "repo_name": "lunifera/lunifera-ecview-addons", "path": "org.lunifera.ecview.semantic.uimodel/src/org/lunifera/ecview/semantic/uimodel/UiModelPackage.java", "license": "epl-1.0", "size": 498897 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,419,583
private void setRowWordWarp(int row, int columns, boolean warp, FlexTable table) { CellFormatter cellFormatter = table.getCellFormatter(); for (int i=0; i<columns; i++) { cellFormatter.setWordWrap(row, i, warp); } }
void function(int row, int columns, boolean warp, FlexTable table) { CellFormatter cellFormatter = table.getCellFormatter(); for (int i=0; i<columns; i++) { cellFormatter.setWordWrap(row, i, warp); } }
/** * Set the WordWarp for all the row cells * * @param row The row cell * @param columns Number of row columns * @param warp * @param table The table to change word wrap */
Set the WordWarp for all the row cells
setRowWordWarp
{ "repo_name": "papamas/DMS-KANGREG-XI-MANADO", "path": "src/main/java/com/openkm/frontend/client/widget/properties/Document.java", "license": "gpl-3.0", "size": 16699 }
[ "com.google.gwt.user.client.ui.FlexTable", "com.google.gwt.user.client.ui.HTMLTable" ]
import com.google.gwt.user.client.ui.FlexTable; import com.google.gwt.user.client.ui.HTMLTable;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
784,029
@Override protected void onPreExecute () { /// progress dialog and disable 'Move' button mCurrentDialog = IndeterminateProgressDialog.newInstance(R.string.wait_a_moment, false); mCurrentDialog.show(getSupportFragmentManager(), WAIT_DIALOG_TAG); }
void function () { mCurrentDialog = IndeterminateProgressDialog.newInstance(R.string.wait_a_moment, false); mCurrentDialog.show(getSupportFragmentManager(), WAIT_DIALOG_TAG); }
/** * Updates the UI before trying the movement */
Updates the UI before trying the movement
onPreExecute
{ "repo_name": "Maysami/elenoon-drive", "path": "src/com/elenoondrive/android/ui/activity/UploadFilesActivity.java", "license": "gpl-2.0", "size": 14468 }
[ "com.elenoondrive.android.ui.dialog.IndeterminateProgressDialog" ]
import com.elenoondrive.android.ui.dialog.IndeterminateProgressDialog;
import com.elenoondrive.android.ui.dialog.*;
[ "com.elenoondrive.android" ]
com.elenoondrive.android;
927,897
public List<ReportSynthesisSrfProgress> getFlagshipSrfProgress(List<LiaisonInstitution> lInstitutions, long phaseID);
List<ReportSynthesisSrfProgress> function(List<LiaisonInstitution> lInstitutions, long phaseID);
/** * This method shows a table for the Srf Progress In AR Synthesis 2018. * * @param lInstitutions * @param phaseID * @return */
This method shows a table for the Srf Progress In AR Synthesis 2018
getFlagshipSrfProgress
{ "repo_name": "CCAFS/MARLO", "path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ReportSynthesisSrfProgressManager.java", "license": "gpl-3.0", "size": 3406 }
[ "java.util.List", "org.cgiar.ccafs.marlo.data.model.LiaisonInstitution", "org.cgiar.ccafs.marlo.data.model.ReportSynthesisSrfProgress" ]
import java.util.List; import org.cgiar.ccafs.marlo.data.model.LiaisonInstitution; import org.cgiar.ccafs.marlo.data.model.ReportSynthesisSrfProgress;
import java.util.*; import org.cgiar.ccafs.marlo.data.model.*;
[ "java.util", "org.cgiar.ccafs" ]
java.util; org.cgiar.ccafs;
313,332
public void close() throws IOException { out.close(); }
void function() throws IOException { out.close(); }
/** * Close the stream. * */
Close the stream
close
{ "repo_name": "apache/velocity-tools", "path": "velocity-tools-view-jsp/src/main/java/org/apache/velocity/tools/view/jsp/jspimpl/JspWriterImpl.java", "license": "apache-2.0", "size": 12620 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,873,080
EClass getStringValueNotEquals();
EClass getStringValueNotEquals();
/** * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ecl.ecl.StringValueNotEquals <em>String Value Not Equals</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>String Value Not Equals</em>'. * @see com.b2international.snowowl....
Returns the meta object for class '<code>com.b2international.snowowl.snomed.ecl.ecl.StringValueNotEquals String Value Not Equals</code>'.
getStringValueNotEquals
{ "repo_name": "IHTSDO/snow-owl", "path": "snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclPackage.java", "license": "apache-2.0", "size": 121411 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
578,945
public RxRawPacket decode(ByteBuffer buf) { RxRawPacket packet = null; if (this.state == State.IDLE) { this.state = State.HEADER_MAGIC_0; } this.bufSrc = buf; while (this.bufSrc.remaining() > 0 && this.state != State.IDLE) { switch (this.state) { case IDLE: case HEADER_MAGI...
RxRawPacket function(ByteBuffer buf) { RxRawPacket packet = null; if (this.state == State.IDLE) { this.state = State.HEADER_MAGIC_0; } this.bufSrc = buf; while (this.bufSrc.remaining() > 0 && this.state != State.IDLE) { switch (this.state) { case IDLE: case HEADER_MAGIC_0: this.reset(); this.state = State.HEADER_MAGIC_...
/** * Try to decode a raw packet from given buffer. * @param buf : buffer with received data. * @return a full raw packet of null if more data needed. */
Try to decode a raw packet from given buffer
decode
{ "repo_name": "jbdubois/obus", "path": "java/src/com/parrot/obus/internal/Protocol.java", "license": "lgpl-2.1", "size": 17790 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
210,984
public List<LdapUserResponse> filterAnyDomain(List<LdapUserResponse> input) { if(s_logger.isTraceEnabled()) { s_logger.trace("filtering existing users"); } final List<LdapUserResponse> ldapResponses = new ArrayList<LdapUserResponse>(); for (final LdapUserResponse user : i...
List<LdapUserResponse> function(List<LdapUserResponse> input) { if(s_logger.isTraceEnabled()) { s_logger.trace(STR); } final List<LdapUserResponse> ldapResponses = new ArrayList<LdapUserResponse>(); for (final LdapUserResponse user : input) { if (isNotAlreadyImportedInTheCurrentDomain(user)) { ldapResponses.add(user); ...
/** * filter the list of ldap users. no users visible to the caller should be in the returned list * @param input ldap response list of users * @return a list of ldap users not already in ACS */
filter the list of ldap users. no users visible to the caller should be in the returned list
filterAnyDomain
{ "repo_name": "GabrielBrascher/cloudstack", "path": "plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LdapListUsersCmd.java", "license": "apache-2.0", "size": 21141 }
[ "java.util.ArrayList", "java.util.List", "org.apache.cloudstack.api.response.LdapUserResponse" ]
import java.util.ArrayList; import java.util.List; import org.apache.cloudstack.api.response.LdapUserResponse;
import java.util.*; import org.apache.cloudstack.api.response.*;
[ "java.util", "org.apache.cloudstack" ]
java.util; org.apache.cloudstack;
433,752
void update(String id, Relationship.Update update) throws RelationNotFoundException;
void update(String id, Relationship.Update update) throws RelationNotFoundException;
/** * Persists the provided relationship on the current position in the inventory traversal. * * @param id the id of the relationship to update * @param update the update * * @throws org.hawkular.inventory.api.RelationNotFoundException if the relationship is not found in the database ...
Persists the provided relationship on the current position in the inventory traversal
update
{ "repo_name": "Jiri-Kremser/hawkular-inventory", "path": "api/src/main/java/org/hawkular/inventory/api/WriteRelationshipInterface.java", "license": "apache-2.0", "size": 4781 }
[ "org.hawkular.inventory.api.model.Relationship" ]
import org.hawkular.inventory.api.model.Relationship;
import org.hawkular.inventory.api.model.*;
[ "org.hawkular.inventory" ]
org.hawkular.inventory;
1,879,213
public void testBasicHalfMapFile() throws Exception { // Make up a directory hierarchy that has a regiondir ("7e0102") and familyname. Path outputDir = new Path(new Path(this.testDir, "7e0102"), "familyname"); StoreFile.Writer writer = new StoreFile.WriterBuilder(conf, cacheConf, this.fs, ...
void function() throws Exception { Path outputDir = new Path(new Path(this.testDir, STR), STR); StoreFile.Writer writer = new StoreFile.WriterBuilder(conf, cacheConf, this.fs, 2 * 1024) .withOutputDir(outputDir) .build(); writeStoreFile(writer); checkHalfHFile(new StoreFile(this.fs, writer.getPath(), conf, cacheConf, S...
/** * Write a file and then assert that we can read from top and bottom halves * using two HalfMapFiles. * @throws Exception */
Write a file and then assert that we can read from top and bottom halves using two HalfMapFiles
testBasicHalfMapFile
{ "repo_name": "zqxjjj/NobidaBase", "path": "target/hbase-0.94.9/hbase-0.94.9/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFile.java", "license": "apache-2.0", "size": 42120 }
[ "org.apache.hadoop.fs.Path", "org.apache.hadoop.hbase.io.hfile.NoOpDataBlockEncoder", "org.apache.hadoop.hbase.regionserver.StoreFile" ]
import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.io.hfile.NoOpDataBlockEncoder; import org.apache.hadoop.hbase.regionserver.StoreFile;
import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.io.hfile.*; import org.apache.hadoop.hbase.regionserver.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,425,185
@Test public void createRectangle() { Geometry.createRectangle(1.0, 2.0); }
void function() { Geometry.createRectangle(1.0, 2.0); }
/** * Tests the successful creation of a rectangle. */
Tests the successful creation of a rectangle
createRectangle
{ "repo_name": "satishbabusee/dyn4j", "path": "junit/org/dyn4j/geometry/GeometryTest.java", "license": "bsd-3-clause", "size": 54121 }
[ "org.dyn4j.geometry.Geometry" ]
import org.dyn4j.geometry.Geometry;
import org.dyn4j.geometry.*;
[ "org.dyn4j.geometry" ]
org.dyn4j.geometry;
2,796,604
DataLayer dataLayer = TagManager.getInstance(context).getDataLayer(); dataLayer.pushEvent("openScreen", DataLayer.mapOf("screenName", screenName)); }
DataLayer dataLayer = TagManager.getInstance(context).getDataLayer(); dataLayer.pushEvent(STR, DataLayer.mapOf(STR, screenName)); }
/** * Push an "openScreen" event with the given screen name. Tags that match that event will fire. */
Push an "openScreen" event with the given screen name. Tags that match that event will fire
pushOpenScreenEvent
{ "repo_name": "kommitters/co.kommit.gtm", "path": "android/src/co/kommit/gtm/Utils.java", "license": "mit", "size": 950 }
[ "com.google.android.gms.tagmanager.DataLayer", "com.google.android.gms.tagmanager.TagManager" ]
import com.google.android.gms.tagmanager.DataLayer; import com.google.android.gms.tagmanager.TagManager;
import com.google.android.gms.tagmanager.*;
[ "com.google.android" ]
com.google.android;
1,019,315
@FIXVersion(introduced = "4.2", retired = "4.3") @TagNumRef(tagNum = TagNum.OptAttribute) public void setOptAttribute(Character optAttribute) { getSafeInstrument().setOptAttribute(optAttribute); }
@FIXVersion(introduced = "4.2", retired = "4.3") @TagNumRef(tagNum = TagNum.OptAttribute) void function(Character optAttribute) { getSafeInstrument().setOptAttribute(optAttribute); }
/** * Message field setter. * @param optAttribute field value */
Message field setter
setOptAttribute
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/group/InstrmtStrikePriceGroup.java", "license": "gpl-3.0", "size": 38176 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
2,083,713
@NotNull XPath choicePickerXP(@NotNull InputHelperType helper);
@NotNull XPath choicePickerXP(@NotNull InputHelperType helper);
/** * Get the scroll view picker {@link XPath} for * {@link Platform#ANDROID}. * @param helper {@link PlatformType} instance. * @return {@link XPath} value. */
Get the scroll view picker <code>XPath</code> for <code>Platform#ANDROID</code>
choicePickerXP
{ "repo_name": "protoman92/XTestKit", "path": "src/main/java/org/swiften/xtestkit/base/model/ChoiceInputType.java", "license": "apache-2.0", "size": 3382 }
[ "org.jetbrains.annotations.NotNull", "org.swiften.xtestkitcomponents.xpath.XPath" ]
import org.jetbrains.annotations.NotNull; import org.swiften.xtestkitcomponents.xpath.XPath;
import org.jetbrains.annotations.*; import org.swiften.xtestkitcomponents.xpath.*;
[ "org.jetbrains.annotations", "org.swiften.xtestkitcomponents" ]
org.jetbrains.annotations; org.swiften.xtestkitcomponents;
1,786,029
public static void createParentDirsOfFile(File file) throws IOException { File parentDir = file.getParentFile(); if (parentDir != null) { createDirs(parentDir); } }
static void function(File file) throws IOException { File parentDir = file.getParentFile(); if (parentDir != null) { createDirs(parentDir); } }
/** * Creates parent directories of file if it has a parent directory */
Creates parent directories of file if it has a parent directory
createParentDirsOfFile
{ "repo_name": "CS2103JAN2017-F11-B3/main", "path": "src/main/java/seedu/task/commons/util/FileUtil.java", "license": "mit", "size": 4193 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,287,968
public static boolean isAccessTokenExpired(APIKeyValidationInfoDTO accessTokenDO) { long validityPeriod = accessTokenDO.getValidityPeriod(); long issuedTime = accessTokenDO.getIssuedTime(); long timestampSkew = ServiceReferenceHolder.getInstance().getOauthServerConfiguration...
static boolean function(APIKeyValidationInfoDTO accessTokenDO) { long validityPeriod = accessTokenDO.getValidityPeriod(); long issuedTime = accessTokenDO.getIssuedTime(); long timestampSkew = ServiceReferenceHolder.getInstance().getOauthServerConfiguration().getTimeStampSkewInSeconds() * 1000; long currentTime = System...
/** * validates if an accessToken has expired or not * * @param accessTokenDO * @return true if token has expired else false */
validates if an accessToken has expired or not
isAccessTokenExpired
{ "repo_name": "tharikaGitHub/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java", "license": "apache-2.0", "size": 563590 }
[ "org.wso2.carbon.apimgt.impl.APIConstants", "org.wso2.carbon.apimgt.impl.dto.APIKeyValidationInfoDTO", "org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder" ]
import org.wso2.carbon.apimgt.impl.APIConstants; import org.wso2.carbon.apimgt.impl.dto.APIKeyValidationInfoDTO; import org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder;
import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.impl.dto.*; import org.wso2.carbon.apimgt.impl.internal.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,323,725
public AuthenticationAssertion load(String id) throws AssertionException { AuthenticationAssertion s = null; synchronized (_assertions) { s = (AuthenticationAssertion) _assertions.get(id); } if (logger.isDebugEnabled()) logger.debug("[load(" + id + ")] Assert...
AuthenticationAssertion function(String id) throws AssertionException { AuthenticationAssertion s = null; synchronized (_assertions) { s = (AuthenticationAssertion) _assertions.get(id); } if (logger.isDebugEnabled()) logger.debug(STR + id + STR + (s == null ? STR : STR found"); return s; }
/** * Load and return the AuthenticationAssertion associated with the specified assertion * identifier from this Store, without removing it. If there is no * such stored AuthenticationAssertion, return <code>null</code>. * * @param id AuthenticationAssertion identifier of the assertion to load...
Load and return the AuthenticationAssertion associated with the specified assertion identifier from this Store, without removing it. If there is no such stored AuthenticationAssertion, return <code>null</code>
load
{ "repo_name": "atricore/josso1", "path": "components/josso-memory-assertionstore/src/main/java/org/josso/gateway/assertion/service/store/MemoryAssertionStore.java", "license": "lgpl-2.1", "size": 5047 }
[ "org.josso.gateway.assertion.AuthenticationAssertion", "org.josso.gateway.assertion.exceptions.AssertionException" ]
import org.josso.gateway.assertion.AuthenticationAssertion; import org.josso.gateway.assertion.exceptions.AssertionException;
import org.josso.gateway.assertion.*; import org.josso.gateway.assertion.exceptions.*;
[ "org.josso.gateway" ]
org.josso.gateway;
2,314,483
public boolean prepareRevoke(PersistentMemberPattern pattern, DistributionManager dm, InternalDistributedMember sender) { if (logger.isDebugEnabled()) { logger.debug("Preparing revoke if pattern {}", pattern); } PendingRevokeListener membershipListener= new PendingRevokeListe...
boolean function(PersistentMemberPattern pattern, DistributionManager dm, InternalDistributedMember sender) { if (logger.isDebugEnabled()) { logger.debug(STR, pattern); } PendingRevokeListener membershipListener= new PendingRevokeListener(pattern, sender, dm); synchronized(this) { for(MemberRevocationListener listener ...
/** * Prepare the revoke of a persistent id. * @param pattern the pattern to revoke * @param dm the distribution manager * @param sender the originator of the prepare * @return true if this member is not currently running the chosen disk store. * false if the revoke should be aborted because the disk ...
Prepare the revoke of a persistent id
prepareRevoke
{ "repo_name": "ameybarve15/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/PersistentMemberManager.java", "license": "apache-2.0", "size": 8906 }
[ "com.gemstone.gemfire.distributed.internal.DistributionManager", "com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember", "java.util.Set" ]
import com.gemstone.gemfire.distributed.internal.DistributionManager; import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember; import java.util.Set;
import com.gemstone.gemfire.distributed.internal.*; import com.gemstone.gemfire.distributed.internal.membership.*; import java.util.*;
[ "com.gemstone.gemfire", "java.util" ]
com.gemstone.gemfire; java.util;
205,831
@Test public void testMessageWithCorruptFileName() throws Exception { try (ZipArchiveInputStream in = new ZipArchiveInputStream(Files.newInputStream(getFile("COMPRESS-351.zip").toPath()))) { ZipArchiveEntry ze = in.getNextZipEntry(); while (ze != null) { ze = in.g...
void function() throws Exception { try (ZipArchiveInputStream in = new ZipArchiveInputStream(Files.newInputStream(getFile(STR).toPath()))) { ZipArchiveEntry ze = in.getNextZipEntry(); while (ze != null) { ze = in.getNextZipEntry(); } fail(STR); } catch (final EOFException ex) { final String m = ex.getMessage(); assertT...
/** * Test case for * <a href="https://issues.apache.org/jira/browse/COMPRESS-351" * >COMPRESS-351</a>. */
Test case for COMPRESS-351
testMessageWithCorruptFileName
{ "repo_name": "apache/commons-compress", "path": "src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStreamTest.java", "license": "apache-2.0", "size": 34057 }
[ "java.io.EOFException", "java.nio.file.Files", "org.junit.Assert" ]
import java.io.EOFException; import java.nio.file.Files; import org.junit.Assert;
import java.io.*; import java.nio.file.*; import org.junit.*;
[ "java.io", "java.nio", "org.junit" ]
java.io; java.nio; org.junit;
627,543
private Iterable<Map<GoogleWebmasterFilter.Dimension, ApiDimensionFilter>> getFilterGroups(WorkUnitState wuState) { List<Map<GoogleWebmasterFilter.Dimension, ApiDimensionFilter>> filters = new ArrayList<>(); for (String filter : splitter.split(wuState.getProp(GoogleWebMasterSource.KEY_REQUEST_FILTERS))) { ...
Iterable<Map<GoogleWebmasterFilter.Dimension, ApiDimensionFilter>> function(WorkUnitState wuState) { List<Map<GoogleWebmasterFilter.Dimension, ApiDimensionFilter>> filters = new ArrayList<>(); for (String filter : splitter.split(wuState.getProp(GoogleWebMasterSource.KEY_REQUEST_FILTERS))) { String[] parts = Iterables.t...
/** * Currently, the filter group is just one filter at a time, there is no cross-dimension filters combination. * TODO: May need to implement this feature in the future based on use cases. */
Currently, the filter group is just one filter at a time, there is no cross-dimension filters combination
getFilterGroups
{ "repo_name": "jinhyukchang/gobblin", "path": "gobblin-modules/google-ingestion/src/main/java/org/apache/gobblin/ingestion/google/webmaster/GoogleWebmasterExtractor.java", "license": "apache-2.0", "size": 10987 }
[ "com.google.api.services.webmasters.model.ApiDimensionFilter", "com.google.common.base.Splitter", "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "org.apache.gobblin.configuration.WorkUnitState" ]
import com.google.api.services.webmasters.model.ApiDimensionFilter; import com.google.common.base.Splitter; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.gobblin.configuration.WorkUnitState;
import com.google.api.services.webmasters.model.*; import com.google.common.base.*; import java.util.*; import org.apache.gobblin.configuration.*;
[ "com.google.api", "com.google.common", "java.util", "org.apache.gobblin" ]
com.google.api; com.google.common; java.util; org.apache.gobblin;
272,144
public void setPriceInvoiced (BigDecimal PriceInvoiced) { set_Value (COLUMNNAME_PriceInvoiced, PriceInvoiced); }
void function (BigDecimal PriceInvoiced) { set_Value (COLUMNNAME_PriceInvoiced, PriceInvoiced); }
/** Set Price Invoiced. @param PriceInvoiced The priced invoiced to the customer (in the currency of the customer's AR price list) - 0 for default price */
Set Price Invoiced
setPriceInvoiced
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempiere_360/base/src/org/compiere/model/X_S_TimeExpenseLine.java", "license": "gpl-2.0", "size": 20033 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
945,515
public void invite(String userId, ApiCallback<Void> callback) { mDataRetriever.getRoomsRestClient().inviteToRoom(mRoomId, userId, callback); }
void function(String userId, ApiCallback<Void> callback) { mDataRetriever.getRoomsRestClient().inviteToRoom(mRoomId, userId, callback); }
/** * Invite a user to this room. * @param userId the user id * @param callback the callback for when done */
Invite a user to this room
invite
{ "repo_name": "Nehasing/Nehachat", "path": "matrix-sdk/src/main/java/org/matrix/androidsdk/data/Room.java", "license": "apache-2.0", "size": 57990 }
[ "org.matrix.androidsdk.rest.callback.ApiCallback" ]
import org.matrix.androidsdk.rest.callback.ApiCallback;
import org.matrix.androidsdk.rest.callback.*;
[ "org.matrix.androidsdk" ]
org.matrix.androidsdk;
211,088
@Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BillingPaymentsResponse billingPaymentsResponse = (BillingPaymentsResponse) o; return Objects.equals(this.billingPayments, billingP...
boolean function(java.lang.Object o) { if (this == o) { return true; } if (o == null getClass() != o.getClass()) { return false; } BillingPaymentsResponse billingPaymentsResponse = (BillingPaymentsResponse) o; return Objects.equals(this.billingPayments, billingPaymentsResponse.billingPayments) && Objects.equals(this.ne...
/** * Compares objects. * * @return true or false depending on comparison result. */
Compares objects
equals
{ "repo_name": "docusign/docusign-java-client", "path": "src/main/java/com/docusign/esign/model/BillingPaymentsResponse.java", "license": "mit", "size": 4576 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
2,916,091
public void xmlDecl(String version, String encoding, String standalone, Augmentations augs) throws XNIException { // the version need only be set once; if // document's XML 1.0|1.1, that's how it'll stay fVersion = version; fStandalone = "yes".equals(standalone); } // xml...
void function(String version, String encoding, String standalone, Augmentations augs) throws XNIException { fVersion = version; fStandalone = "yes".equals(standalone); }
/** * Notifies of the presence of an XMLDecl line in the document. If * present, this method will be called immediately following the * startDocument call. * * @param version The XML version. * @param encoding The IANA encoding name of the document, or null if * ...
Notifies of the presence of an XMLDecl line in the document. If present, this method will be called immediately following the startDocument call
xmlDecl
{ "repo_name": "openjdk/jdk8u", "path": "jaxp/src/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java", "license": "gpl-2.0", "size": 91913 }
[ "com.sun.org.apache.xerces.internal.xni.Augmentations", "com.sun.org.apache.xerces.internal.xni.XNIException" ]
import com.sun.org.apache.xerces.internal.xni.Augmentations; import com.sun.org.apache.xerces.internal.xni.XNIException;
import com.sun.org.apache.xerces.internal.xni.*;
[ "com.sun.org" ]
com.sun.org;
1,551,459
public static void fireJoinedCluster(byte[] nodeID, boolean asynchronous) { try { Log.info("Firing joined cluster event for another node:" + new String(nodeID, StandardCharsets.UTF_8)); Event event = new Event(EventType.joined_cluster, nodeID); events.put(event); ...
static void function(byte[] nodeID, boolean asynchronous) { try { Log.info(STR + new String(nodeID, StandardCharsets.UTF_8)); Event event = new Event(EventType.joined_cluster, nodeID); events.put(event); if (!asynchronous) { while (!event.isProcessed()) { Thread.sleep(50); } } } catch (InterruptedException e) { Log.err...
/** * Triggers event indicating that another JVM is now part of a cluster.<p> * * This event will be triggered in another thread. This will avoid potential deadlocks * in Coherence. * * @param nodeID nodeID assigned to the JVM when joining the cluster. * @param asynchronous true if...
Triggers event indicating that another JVM is now part of a cluster. This event will be triggered in another thread. This will avoid potential deadlocks in Coherence
fireJoinedCluster
{ "repo_name": "speedy01/Openfire", "path": "xmppserver/src/main/java/org/jivesoftware/openfire/cluster/ClusterManager.java", "license": "apache-2.0", "size": 24082 }
[ "java.nio.charset.StandardCharsets" ]
import java.nio.charset.StandardCharsets;
import java.nio.charset.*;
[ "java.nio" ]
java.nio;
2,855,475
public UnsignedLong plus(UnsignedLong val) { return fromLongBits(this.value + checkNotNull(val).value); }
UnsignedLong function(UnsignedLong val) { return fromLongBits(this.value + checkNotNull(val).value); }
/** * Returns the result of adding this and {@code val}. If the result would have more than 64 bits, * returns the low 64 bits of the result. * * @since 14.0 */
Returns the result of adding this and val. If the result would have more than 64 bits, returns the low 64 bits of the result
plus
{ "repo_name": "hambroperks/j2objc", "path": "guava/sources/com/google/common/primitives/UnsignedLong.java", "license": "apache-2.0", "size": 11038 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,442,144
@Override public void update (Observable arg0, Object arg1) { if (myLevelsDisplay.isAllUserInputIsValid()) { myLevelConfiguringController.configureLevels(myLevelsDisplay.transformToLevels()); } else { new ErrorPopup(Constants.LEVEL_ERROR); } }
void function (Observable arg0, Object arg1) { if (myLevelsDisplay.isAllUserInputIsValid()) { myLevelConfiguringController.configureLevels(myLevelsDisplay.transformToLevels()); } else { new ErrorPopup(Constants.LEVEL_ERROR); } }
/** * This is called when the user hits finished from the file menu. */
This is called when the user hits finished from the file menu
update
{ "repo_name": "thefreshduke/voogasalad", "path": "src/gameAuthoring/scenes/levelBuilding/LevelBuildingScene.java", "license": "mit", "size": 3238 }
[ "java.util.Observable" ]
import java.util.Observable;
import java.util.*;
[ "java.util" ]
java.util;
2,469,982
public void setConfigLocations(String[] locations) { if (locations != null) { Assert.noNullElements(locations, "Config locations must not be null"); this.configLocations = new String[locations.length]; for (int i = 0; i < locations.length; i++) { this.configLocations[i] = resolvePath(locations[i]...
void function(String[] locations) { if (locations != null) { Assert.noNullElements(locations, STR); this.configLocations = new String[locations.length]; for (int i = 0; i < locations.length; i++) { this.configLocations[i] = resolvePath(locations[i]).trim(); } } else { this.configLocations = null; } }
/** * Set the config locations for this application context. * <p>If not set, the implementation may use a default as appropriate. */
Set the config locations for this application context. If not set, the implementation may use a default as appropriate
setConfigLocations
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/spring-2.5.6-src/src/org/springframework/context/support/AbstractRefreshableConfigApplicationContext.java", "license": "unlicense", "size": 5245 }
[ "org.springframework.util.Assert" ]
import org.springframework.util.Assert;
import org.springframework.util.*;
[ "org.springframework.util" ]
org.springframework.util;
2,414,409
private ListenerList getListeners() { if (this.listeners == null) { this.listeners = new ListenerList(ListenerList.IDENTITY); } // no else. return this.listeners; }
ListenerList function() { if (this.listeners == null) { this.listeners = new ListenerList(ListenerList.IDENTITY); } return this.listeners; }
/** * <p> * Gets the listeners of this {@link InterpreterRegistry}. * </p> * * @return The listeners of this {@link InterpreterRegistry}. */
Gets the listeners of this <code>InterpreterRegistry</code>.
getListeners
{ "repo_name": "dresden-ocl/dresdenocl", "path": "plugins/org.dresdenocl.interpreter/src/org/dresdenocl/interpreter/internal/InterpreterRegistry.java", "license": "lgpl-3.0", "size": 8662 }
[ "org.eclipse.core.runtime.ListenerList" ]
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.core.runtime.*;
[ "org.eclipse.core" ]
org.eclipse.core;
1,639,233
@ServiceMethod(returns = ReturnType.SINGLE) public VpnGatewayInner reset(String resourceGroupName, String gatewayName) { return resetAsync(resourceGroupName, gatewayName).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) VpnGatewayInner function(String resourceGroupName, String gatewayName) { return resetAsync(resourceGroupName, gatewayName).block(); }
/** * Resets the primary of the vpn gateway in the specified resource group. * * @param resourceGroupName The resource group name of the VpnGateway. * @param gatewayName The name of the gateway. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws Manageme...
Resets the primary of the vpn gateway in the specified resource group
reset
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnGatewaysClientImpl.java", "license": "mit", "size": 124002 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.network.fluent.models.VpnGatewayInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.network.fluent.models.VpnGatewayInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
682,115
public final void absolute() { x = Math.abs(x); y = Math.abs(y); z = Math.abs(z); }
final void function() { x = Math.abs(x); y = Math.abs(y); z = Math.abs(z); }
/** * Sets each component of this tuple to its absolute value. */
Sets each component of this tuple to its absolute value
absolute
{ "repo_name": "magsilva/java3d-vecmath", "path": "src/javax/vecmath/Tuple3f.java", "license": "gpl-2.0", "size": 16531 }
[ "java.lang.Math" ]
import java.lang.Math;
import java.lang.*;
[ "java.lang" ]
java.lang;
2,706,773
public int login(String sid, String user, String pass) { try { JSONObject post = new JSONObject(); post.put("username", user); post.put("passwd", pass); post.put("sid", sid); APIResponse re = doRequest("/auth", post); switch(re.state)...
int function(String sid, String user, String pass) { try { JSONObject post = new JSONObject(); post.put(STR, user); post.put(STR, pass); post.put("sid", sid); APIResponse re = doRequest("/auth", post); switch(re.state) { case SUCCEEDED: JSONObject data = (JSONObject) re.data; String group = prefs.getString("group", nul...
/** * Sends an authentication request * @param user * @param pass * @return 0: ok, 1: invalid user/passwd, 2: no connection, 3: maintenance, 4: everything else */
Sends an authentication request
login
{ "repo_name": "Cedgetec/SchulinfoAPP", "path": "app/src/main/java/de/gebatzens/sia/SiaAPI.java", "license": "apache-2.0", "size": 19500 }
[ "android.content.SharedPreferences", "android.util.Log", "com.google.firebase.messaging.FirebaseMessaging", "de.gebatzens.sia.data.Filter", "java.io.IOException", "org.json.JSONObject" ]
import android.content.SharedPreferences; import android.util.Log; import com.google.firebase.messaging.FirebaseMessaging; import de.gebatzens.sia.data.Filter; import java.io.IOException; import org.json.JSONObject;
import android.content.*; import android.util.*; import com.google.firebase.messaging.*; import de.gebatzens.sia.data.*; import java.io.*; import org.json.*;
[ "android.content", "android.util", "com.google.firebase", "de.gebatzens.sia", "java.io", "org.json" ]
android.content; android.util; com.google.firebase; de.gebatzens.sia; java.io; org.json;
2,528,694
public static String getTimeNow(Date theTime) { return getDateTime(TIME_PATTERN, theTime); }
static String function(Date theTime) { return getDateTime(TIME_PATTERN, theTime); }
/** * This method returns the current date time in the format: * MM/dd/yyyy HH:MM a * * @param theTime the current time * @return the current date/time */
This method returns the current date time in the format:
getTimeNow
{ "repo_name": "loveingenioustech/demo", "path": "appfuse-demo/src/main/java/demo/util/DateUtil.java", "license": "mit", "size": 5644 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
935,147
private void processTaglibDir(String prefix, String tagDir) throws JspParseException { Taglib taglib = null; try { taglib = _tagManager.addTaglibDir(prefix, tagDir); String tagURI = "urn:jsptagdir:" + tagDir; _parseState.pushNamespace(prefix, tagURI); _namespaces = new Namespace...
void function(String prefix, String tagDir) throws JspParseException { Taglib taglib = null; try { taglib = _tagManager.addTaglibDir(prefix, tagDir); String tagURI = STR + tagDir; _parseState.pushNamespace(prefix, tagURI); _namespaces = new Namespace(_namespaces, prefix, tagURI); return; } catch (JspParseException e) {...
/** * Adds a new known tag dir to the current namespace. */
Adds a new known tag dir to the current namespace
processTaglibDir
{ "repo_name": "mdaniel/svn-caucho-com-resin", "path": "modules/resin/src/com/caucho/jsp/JspParser.java", "license": "gpl-2.0", "size": 58278 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
2,379,871
public Enumeration<String> engineAliases() { return this.certificateMap.keys(); }
Enumeration<String> function() { return this.certificateMap.keys(); }
/** * Lists all the alias names of this keystore. * * @return enumeration of the alias names */
Lists all the alias names of this keystore
engineAliases
{ "repo_name": "dCache/JGlobus", "path": "ssl-proxies/src/test/java/org/globus/gsi/provider/MockKeyStore.java", "license": "apache-2.0", "size": 13820 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
614,639
@Override public void print(int ch) throws IOException { if (isClosed() || isHead()) return; // server/13ww if (SIZE <= _charLength) flushCharBuffer(); _charBuffer[_charLength++] = (char) ch; }
void function(int ch) throws IOException { if (isClosed() isHead()) return; if (SIZE <= _charLength) flushCharBuffer(); _charBuffer[_charLength++] = (char) ch; }
/** * Writes a character to the output. */
Writes a character to the output
print
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/server/http/ToByteResponseStream.java", "license": "gpl-2.0", "size": 13006 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
128,499
public void setVersionNumber(Long versionNumber) { this.versionNumber = versionNumber; } } static class Constants { final static String ROOT_ELEMENT_NAME = "naturalLanguageTemplate"; final static String TYPE_NAME = "NaturalLanguageTemplateType"; } ...
void function(Long versionNumber) { this.versionNumber = versionNumber; } } static class Constants { final static String ROOT_ELEMENT_NAME = STR; final static String TYPE_NAME = STR; } static class Elements { final static String ATTRIBUTES = STR; final static String LANGUAGE_CODE = STR; final static String NATURAL_LANG...
/** * Sets the value of versionNumber on this builder to the given value. * * @param versionNumber the versionNumber value to set. * */
Sets the value of versionNumber on this builder to the given value
setVersionNumber
{ "repo_name": "bhutchinson/rice", "path": "rice-middleware/krms/api/src/main/java/org/kuali/rice/krms/api/repository/language/NaturalLanguageTemplate.java", "license": "apache-2.0", "size": 13886 }
[ "org.kuali.rice.krms.api.KrmsConstants" ]
import org.kuali.rice.krms.api.KrmsConstants;
import org.kuali.rice.krms.api.*;
[ "org.kuali.rice" ]
org.kuali.rice;
660,590
public List<Long> getRequests() { return db.getRequests(); }
List<Long> function() { return db.getRequests(); }
/** * Returns last 20 requests * @return */
Returns last 20 requests
getRequests
{ "repo_name": "telefonicaid/fiware-cosmos-ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java", "license": "apache-2.0", "size": 6090 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,574,424
private Component createTableBox() { Box tableBox = Box.createVerticalBox(); tableBox.add(createControlBox()); tableBox.add(Box.createVerticalStrut(5)); table.setAlignmentX(Container.LEFT_ALIGNMENT); tableBox.add(table); return tableBox; }
Component function() { Box tableBox = Box.createVerticalBox(); tableBox.add(createControlBox()); tableBox.add(Box.createVerticalStrut(5)); table.setAlignmentX(Container.LEFT_ALIGNMENT); tableBox.add(table); return tableBox; }
/** * Creates a new Component with PageableTable. * @return PageableTableComponent. */
Creates a new Component with PageableTable
createTableBox
{ "repo_name": "chelu/jdal", "path": "swing/src/main/java/org/jdal/swing/table/TablePanel.java", "license": "apache-2.0", "size": 9132 }
[ "java.awt.Component", "java.awt.Container", "javax.swing.Box" ]
import java.awt.Component; import java.awt.Container; import javax.swing.Box;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,311,438
public static MarshalResult marshal (Object data, String contextPath) throws JAXBException { final JAXBContext ctx = getJaxbContext(contextPath); return marshal(data, ctx); }
static MarshalResult function (Object data, String contextPath) throws JAXBException { final JAXBContext ctx = getJaxbContext(contextPath); return marshal(data, ctx); }
/** * Serializes (marshals) a given JAXB object and returns the result as * byte array, along with the validation events collected during * marshalling. * @param data the object to marshal * @param contextPath the context path to retrieve the corresponding JAXB * context for. * @return...
Serializes (marshals) a given JAXB object and returns the result as byte array, along with the validation events collected during marshalling
marshal
{ "repo_name": "jCoderZ/fawkez-old", "path": "src/java/org/jcoderz/commons/util/JaxbUtil.java", "license": "bsd-3-clause", "size": 13678 }
[ "javax.xml.bind.JAXBContext", "javax.xml.bind.JAXBException" ]
import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException;
import javax.xml.bind.*;
[ "javax.xml" ]
javax.xml;
517,189