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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
boolean validateFederationRequest(FederationRequest req, String token); | boolean validateFederationRequest(FederationRequest req, String token); | /**
* Compares the provided token with this Gitblit instance's tokens and
* determines if the requested permission may be granted to the token.
*
* @param req
* @param token
* @return true if the request can be executed
* @since 1.4.0
*/ | Compares the provided token with this Gitblit instance's tokens and determines if the requested permission may be granted to the token | validateFederationRequest | {
"repo_name": "mrjoel/gitblit",
"path": "src/main/java/com/gitblit/manager/IFederationManager.java",
"license": "apache-2.0",
"size": 5565
} | [
"com.gitblit.Constants"
] | import com.gitblit.Constants; | import com.gitblit.*; | [
"com.gitblit"
] | com.gitblit; | 821,504 |
public SimpleNaturalIdLoadAccess bySimpleNaturalId(String entityName) {
return getSession().bySimpleNaturalId(entityName);
}
| SimpleNaturalIdLoadAccess function(String entityName) { return getSession().bySimpleNaturalId(entityName); } | /**
* Create an {@link SimpleNaturalIdLoadAccess} instance to retrieve the specified entity by its
* natural id.
*
* @param entityName The entity name of the entity type to be retrieved
* @return load delegate for loading the specified entity type by natural id
* @throws HibernateException If the specified ... | Create an <code>SimpleNaturalIdLoadAccess</code> instance to retrieve the specified entity by its natural id | bySimpleNaturalId | {
"repo_name": "koskedk/openmrs-core",
"path": "api/src/main/java/org/openmrs/api/db/hibernate/DbSession.java",
"license": "mpl-2.0",
"size": 41239
} | [
"org.hibernate.SimpleNaturalIdLoadAccess"
] | import org.hibernate.SimpleNaturalIdLoadAccess; | import org.hibernate.*; | [
"org.hibernate"
] | org.hibernate; | 2,131,029 |
private void freeConnection(Connection con) {
if (con != null) {
try {
con.close();
} catch (Exception e) {
SilverTrace.error("publication", "ProjectManagerBmEJB.freeConnection()",
"root.EX_CONNECTION_CLOSE_FAILED", "", e);
}
}
} | void function(Connection con) { if (con != null) { try { con.close(); } catch (Exception e) { SilverTrace.error(STR, STR, STR, "", e); } } } | /**
* Method declaration
* @param con
* @see
*/ | Method declaration | freeConnection | {
"repo_name": "stephaneperry/Silverpeas-Components",
"path": "project-manager/project-manager-ejb/src/main/java/com/silverpeas/projectManager/control/ejb/ProjectManagerBmEJB.java",
"license": "agpl-3.0",
"size": 38475
} | [
"com.stratelia.silverpeas.silvertrace.SilverTrace",
"java.sql.Connection"
] | import com.stratelia.silverpeas.silvertrace.SilverTrace; import java.sql.Connection; | import com.stratelia.silverpeas.silvertrace.*; import java.sql.*; | [
"com.stratelia.silverpeas",
"java.sql"
] | com.stratelia.silverpeas; java.sql; | 1,522,847 |
public Adapter createDiagramModelArchimateObjectAdapter() {
return null;
}
| Adapter function() { return null; } | /**
* Creates a new adapter for an object of class '{@link com.archimatetool.model.IDiagramModelArchimateObject <em>Diagram Model Archimate Object</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when ... | Creates a new adapter for an object of class '<code>com.archimatetool.model.IDiagramModelArchimateObject Diagram Model Archimate Object</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. | createDiagramModelArchimateObjectAdapter | {
"repo_name": "archimatetool/archi",
"path": "com.archimatetool.model/src/com/archimatetool/model/util/ArchimateAdapterFactory.java",
"license": "mit",
"size": 112141
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 357,293 |
public CstBaseMethodRef getMethodRef() {
return (CstBaseMethodRef) getRef();
} | CstBaseMethodRef function() { return (CstBaseMethodRef) getRef(); } | /**
* Gets the method constant.
*
* @return {@code non-null;} the constant
*/ | Gets the method constant | getMethodRef | {
"repo_name": "enimey/DexHunter",
"path": "dalvik/dexgen/src/com/android/dexgen/dex/file/MethodIdItem.java",
"license": "apache-2.0",
"size": 1922
} | [
"com.android.dexgen.rop.cst.CstBaseMethodRef"
] | import com.android.dexgen.rop.cst.CstBaseMethodRef; | import com.android.dexgen.rop.cst.*; | [
"com.android.dexgen"
] | com.android.dexgen; | 1,590,031 |
@Message(id = 318, value = "Creation of timers is not allowed during lifecycle callback of non-singleton EJBs")
IllegalStateException failToCreateTimerDoLifecycle(); | @Message(id = 318, value = STR) IllegalStateException failToCreateTimerDoLifecycle(); | /**
* Creates an exception indicating the creation of timers is not allowed during lifecycle callback of non-singleton EJBs
*
* @return an {@link IllegalStateException} for the error.
*/ | Creates an exception indicating the creation of timers is not allowed during lifecycle callback of non-singleton EJBs | failToCreateTimerDoLifecycle | {
"repo_name": "golovnin/wildfly",
"path": "ejb3/src/main/java/org/jboss/as/ejb3/logging/EjbLogger.java",
"license": "lgpl-2.1",
"size": 147179
} | [
"org.jboss.logging.annotations.Message"
] | import org.jboss.logging.annotations.Message; | import org.jboss.logging.annotations.*; | [
"org.jboss.logging"
] | org.jboss.logging; | 1,150,684 |
@Override
protected void handleAlarmNew(Event e) {
ObjectNode payload = preparePayload(e.getAlarm());
payload.put("type", "ALARM_NEW");
F.Promise<WS.Response> res = reportEvent(payload);
if (res != null) {
Logger.debug("[MONITOR] IBM Monitor response code: " + res.ge... | void function(Event e) { ObjectNode payload = preparePayload(e.getAlarm()); payload.put("type", STR); F.Promise<WS.Response> res = reportEvent(payload); if (res != null) { Logger.debug(STR + res.get(monitorResponseTimeout).getStatus()); } Logger.debug(STR + e.getAlarm() + STR); stats.incrementTotalIncidents(); } | /**
* Invoked by ALARM_OPEN_EXPIRED events triggered by the EMHT system on new alarm arrivals
* @param e An Event object containing relevant data for this event type
*/ | Invoked by ALARM_OPEN_EXPIRED events triggered by the EMHT system on new alarm arrivals | handleAlarmNew | {
"repo_name": "SINTEF-SIT/emht",
"path": "app/monitor/external/ibm/IBMMonitor.java",
"license": "mit",
"size": 9876
} | [
"com.fasterxml.jackson.databind.node.ObjectNode"
] | import com.fasterxml.jackson.databind.node.ObjectNode; | import com.fasterxml.jackson.databind.node.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 2,893,019 |
public Set<K> keySet() {
throw new UnsupportedOperationException(
"keySet() is intentionally unimplemented");
} | Set<K> function() { throw new UnsupportedOperationException( STR); } | /**
* Intentionally unimplemented.
*/ | Intentionally unimplemented | keySet | {
"repo_name": "Guavus/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LruHashMap.java",
"license": "apache-2.0",
"size": 32037
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 80,746 |
public static List<Setting.AffixSetting<?>> getSettings() {
List<Setting.AffixSetting<?>> settings = new ArrayList<>();
settings.addAll(Exporter.getSettings());
settings.addAll(HttpExporter.getSettings());
return settings;
} | static List<Setting.AffixSetting<?>> function() { List<Setting.AffixSetting<?>> settings = new ArrayList<>(); settings.addAll(Exporter.getSettings()); settings.addAll(HttpExporter.getSettings()); return settings; } | /**
* Return all the settings of all the exporters, no matter if HTTP or Local
*/ | Return all the settings of all the exporters, no matter if HTTP or Local | getSettings | {
"repo_name": "gfyoung/elasticsearch",
"path": "x-pack/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporters.java",
"license": "apache-2.0",
"size": 9224
} | [
"java.util.ArrayList",
"java.util.List",
"org.elasticsearch.common.settings.Setting",
"org.elasticsearch.xpack.monitoring.exporter.http.HttpExporter"
] | import java.util.ArrayList; import java.util.List; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.xpack.monitoring.exporter.http.HttpExporter; | import java.util.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.xpack.monitoring.exporter.http.*; | [
"java.util",
"org.elasticsearch.common",
"org.elasticsearch.xpack"
] | java.util; org.elasticsearch.common; org.elasticsearch.xpack; | 68,642 |
public void process(Reader xmlFile, Reader xslFile, Writer output) throws TransformerException
{
process(new StreamSource(xmlFile),
new StreamSource(xslFile),
new StreamResult(output));
}
| void function(Reader xmlFile, Reader xslFile, Writer output) throws TransformerException { process(new StreamSource(xmlFile), new StreamSource(xslFile), new StreamResult(output)); } | /** Transform an XML and XSL document as <code>Reader</code>s,
* placing the resulting transformed document in a
* <code>Writer</code>. Convenient for handling an XML
* document as a String (<code>StringReader</code>) residing
in memory, not on disk. The output document could easily
be
* handle... | Transform an XML and XSL document as <code>Reader</code>s, placing the resulting transformed document in a <code>Writer</code>. Convenient for handling an XML document as a String (<code>StringReader</code>) residing handled as a String (<code>StringWriter</code>) or as a <code>JSPWriter</code> in a JavaServer page | process | {
"repo_name": "dbarowy/java-aws-mturk",
"path": "src/com/amazon/mechanicalturk/common/domain/XslTransformer.java",
"license": "apache-2.0",
"size": 4589
} | [
"java.io.Reader",
"java.io.Writer",
"javax.xml.transform.TransformerException",
"javax.xml.transform.stream.StreamResult",
"javax.xml.transform.stream.StreamSource"
] | import java.io.Reader; import java.io.Writer; import javax.xml.transform.TransformerException; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; | import java.io.*; import javax.xml.transform.*; import javax.xml.transform.stream.*; | [
"java.io",
"javax.xml"
] | java.io; javax.xml; | 1,772,783 |
private Format3FDSelect readFormat3FDSelect(CFFDataInput dataInput, int format, int nGlyphs, CFFFontROS ros) throws IOException {
Format3FDSelect fdselect = new Format3FDSelect(ros);
fdselect.format = format;
fdselect.nbRanges = dataInput.readCard16();
fdselect.range3 = new Range3[fdselect.nbRanges];... | Format3FDSelect function(CFFDataInput dataInput, int format, int nGlyphs, CFFFontROS ros) throws IOException { Format3FDSelect fdselect = new Format3FDSelect(ros); fdselect.format = format; fdselect.nbRanges = dataInput.readCard16(); fdselect.range3 = new Range3[fdselect.nbRanges]; for (int i = 0; i < fdselect.nbRanges... | /**
* Read the Format 3 of the FDSelect data structure.
*
* @param dataInput
* @param format
* @param nGlyphs
* @param ros
* @return
* @throws IOException
*/ | Read the Format 3 of the FDSelect data structure | readFormat3FDSelect | {
"repo_name": "sencko/NALB",
"path": "nalb2013/src/org/apache/fontbox/cff/CFFParser.java",
"license": "gpl-2.0",
"size": 37397
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 230,017 |
@Deprecated
public static boolean isEmpty( List<?> list ) {
return Utils.isEmpty( list );
} | static boolean function( List<?> list ) { return Utils.isEmpty( list ); } | /**
* Check if the list supplied is empty. An array is empty when it is null or when the length is 0
*
* @param list
* the list to check
* @return true if the supplied list is empty
* @deprecated
* @see org.pentaho.di.core.util.Utils#isEmpty(List)
*/ | Check if the list supplied is empty. An array is empty when it is null or when the length is 0 | isEmpty | {
"repo_name": "mkambol/pentaho-kettle",
"path": "core/src/main/java/org/pentaho/di/core/Const.java",
"license": "apache-2.0",
"size": 121415
} | [
"java.util.List",
"org.pentaho.di.core.util.Utils"
] | import java.util.List; import org.pentaho.di.core.util.Utils; | import java.util.*; import org.pentaho.di.core.util.*; | [
"java.util",
"org.pentaho.di"
] | java.util; org.pentaho.di; | 2,908,888 |
protected IToken doEvaluate(ICharacterScanner scanner, boolean resume) {
if (resume) {
if (endSequenceDetected(scanner))
return fToken;
} else {
int c= scanner.read();
char cCheck = (char) c;
if (c == START_SEQUENCES[0] || c == START_SEQUENCES[1]) {
// check for the sequence identifier
in... | IToken function(ICharacterScanner scanner, boolean resume) { if (resume) { if (endSequenceDetected(scanner)) return fToken; } else { int c= scanner.read(); char cCheck = (char) c; if (c == START_SEQUENCES[0] c == START_SEQUENCES[1]) { int c2 = scanner.read(); if (c2 == getIdentifierChar()) { if (sequenceDetected(scanne... | /**
* Evaluates this rules without considering any column constraints. Resumes
* detection, i.e. look sonly for the end sequence required by this rule if the
* <code>resume</code> flag is set.
*
* @param scanner the character scanner to be used
* @param resume <code>true</code> if detection should be resume... | Evaluates this rules without considering any column constraints. Resumes detection, i.e. look sonly for the end sequence required by this rule if the <code>resume</code> flag is set | doEvaluate | {
"repo_name": "atell/freemarkeclipse-dp",
"path": "src/org/jboss/ide/eclipse/freemarker/editor/rules/GenericDirectiveRule.java",
"license": "lgpl-2.1",
"size": 4959
} | [
"org.eclipse.jface.text.rules.ICharacterScanner",
"org.eclipse.jface.text.rules.IToken",
"org.eclipse.jface.text.rules.Token"
] | import org.eclipse.jface.text.rules.ICharacterScanner; import org.eclipse.jface.text.rules.IToken; import org.eclipse.jface.text.rules.Token; | import org.eclipse.jface.text.rules.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 767,570 |
protected static KieServicesClient createDefaultStaticClient() {
return createDefaultStaticClient(DEFAULT_TIMEOUT);
} | static KieServicesClient function() { return createDefaultStaticClient(DEFAULT_TIMEOUT); } | /**
* Create client with default REST configuration - usable for helper purposes(creating containers...).
* @return Kie server client.
*/ | Create client with default REST configuration - usable for helper purposes(creating containers...) | createDefaultStaticClient | {
"repo_name": "markcoble/droolsjbpm-integration",
"path": "kie-server-parent/kie-server-tests/kie-server-integ-tests-common/src/main/java/org/kie/server/integrationtests/shared/basetests/KieServerBaseIntegrationTest.java",
"license": "apache-2.0",
"size": 10370
} | [
"org.kie.server.client.KieServicesClient"
] | import org.kie.server.client.KieServicesClient; | import org.kie.server.client.*; | [
"org.kie.server"
] | org.kie.server; | 2,372,410 |
public FluentCv filterCirclesToLine(double maxDistance, String... tag) {
if (this.mat.cols() < 2) {
return store(this.mat, tag);
}
List<Point> points = new ArrayList<>();
// collect the circles into a list of points
for (int i = 0; i < this.mat.cols(); i++) {
... | FluentCv function(double maxDistance, String... tag) { if (this.mat.cols() < 2) { return store(this.mat, tag); } List<Point> points = new ArrayList<>(); for (int i = 0; i < this.mat.cols(); i++) { float[] circle = new float[3]; this.mat.get(0, i, circle); float x = circle[0]; float y = circle[1]; points.add(new Point(x... | /**
* Filter circles as returned from e.g. houghCircles to only those that are within maxDistance
* of the best fitting line.
*
* @param tag
* @return
*/ | Filter circles as returned from e.g. houghCircles to only those that are within maxDistance of the best fitting line | filterCirclesToLine | {
"repo_name": "fca1/openpnp",
"path": "src/main/java/org/openpnp/vision/FluentCv.java",
"license": "gpl-3.0",
"size": 28510
} | [
"java.util.ArrayList",
"java.util.List",
"org.opencv.core.CvType",
"org.opencv.core.Mat",
"org.opencv.core.Point"
] | import java.util.ArrayList; import java.util.List; import org.opencv.core.CvType; import org.opencv.core.Mat; import org.opencv.core.Point; | import java.util.*; import org.opencv.core.*; | [
"java.util",
"org.opencv.core"
] | java.util; org.opencv.core; | 1,834,636 |
protected RemotableQuickFinder.Builder createQuickFinderLegacy(Class<?> containingClass, String attributeName) {
Object sampleComponent;
try {
sampleComponent = containingClass.newInstance();
} catch (InstantiationException e) {
throw new RiceRuntimeException(e);
... | RemotableQuickFinder.Builder function(Class<?> containingClass, String attributeName) { Object sampleComponent; try { sampleComponent = containingClass.newInstance(); } catch (InstantiationException e) { throw new RiceRuntimeException(e); } catch (IllegalAccessException e) { throw new RiceRuntimeException(e); } String ... | /**
* Legacy implementation of createQuickFinder. Uses the legacy DataObjectMetadataService.
*/ | Legacy implementation of createQuickFinder. Uses the legacy DataObjectMetadataService | createQuickFinderLegacy | {
"repo_name": "mztaylor/rice-git",
"path": "rice-middleware/kns/src/main/java/org/kuali/rice/krad/service/impl/KNSLegacyDataAdapterImpl.java",
"license": "apache-2.0",
"size": 47580
} | [
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.apache.commons.lang.StringUtils",
"org.kuali.rice.core.api.exception.RiceRuntimeException",
"org.kuali.rice.core.api.uif.RemotableQuickFinder",
"org.kuali.rice.krad.util.KRADConstants"
] | import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.lang.StringUtils; import org.kuali.rice.core.api.exception.RiceRuntimeException; import org.kuali.rice.core.api.uif.RemotableQuickFinder; import org.kuali.rice.krad.util.KRADConstants; | import java.util.*; import org.apache.commons.lang.*; import org.kuali.rice.core.api.exception.*; import org.kuali.rice.core.api.uif.*; import org.kuali.rice.krad.util.*; | [
"java.util",
"org.apache.commons",
"org.kuali.rice"
] | java.util; org.apache.commons; org.kuali.rice; | 1,821,240 |
String newBaseUrl = getBaseUrl(request);
if (Pattern.matches(Constants.URL_REGEX, getBaseUrl(request))) {
newBaseUrl = newBaseUrl.substring(newBaseUrl.indexOf(
request.getContextPath()));
}
newBaseUrl = newBaseUrl.replace(request.getContextPath(), "");
try {
return ServletContextFactory.ge... | String newBaseUrl = getBaseUrl(request); if (Pattern.matches(Constants.URL_REGEX, getBaseUrl(request))) { newBaseUrl = newBaseUrl.substring(newBaseUrl.indexOf( request.getContextPath())); } newBaseUrl = newBaseUrl.replace(request.getContextPath(), ""); try { return ServletContextFactory.getServletContext().getRealPath(... | /**
* gets default value of baseDir (based on baseURL).
*
* @param request request
* @return default baseDir value
*/ | gets default value of baseDir (based on baseURL) | getBaseDir | {
"repo_name": "Pokaboo/elec",
"path": "elec/src/com/ckfinder/connector/configuration/DefaultPathBuilder.java",
"license": "apache-2.0",
"size": 1642
} | [
"com.ckfinder.connector.ServletContextFactory",
"java.util.regex.Pattern"
] | import com.ckfinder.connector.ServletContextFactory; import java.util.regex.Pattern; | import com.ckfinder.connector.*; import java.util.regex.*; | [
"com.ckfinder.connector",
"java.util"
] | com.ckfinder.connector; java.util; | 2,410,054 |
private final void checkMapFromControlTypeA(
DepictorPort ThePort,
Q PrtCon,
boolean bound,
R CurDist,
PointF InPt,
PointF OutPt) {
Q Dcon = PrtCon;
if (ControlsVisible) {
if (getNamedVar()) {
double XDist = (tLGetHex(Dcon).getLoc()).x - InPt.x;
double YDist = (tLGetHex(Dcon).getLoc()).y ... | final void function( DepictorPort ThePort, Q PrtCon, boolean bound, R CurDist, PointF InPt, PointF OutPt) { Q Dcon = PrtCon; if (ControlsVisible) { if (getNamedVar()) { double XDist = (tLGetHex(Dcon).getLoc()).x - InPt.x; double YDist = (tLGetHex(Dcon).getLoc()).y - InPt.y; double Dist = XDist * XDist + YDist * YDist; ... | /**
* Checks whether the map tool is mapping from a type-A depictor.
*/ | Checks whether the map tool is mapping from a type-A depictor | checkMapFromControlTypeA | {
"repo_name": "viridian1138/VectorVictor",
"path": "VectorVictor/VectorVictor/src/geomdir/depictors/Dsca1Base.java",
"license": "gpl-3.0",
"size": 134785
} | [
"android.graphics.PointF"
] | import android.graphics.PointF; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,609,926 |
void browseTimeInterval(TreeImageTimeSet node)
{
state = TreeViewer.LOADING_DATA;
SecurityContext ctx = getSecurityContext();
currentLoader = new TimeIntervalsLoader(component, ctx, node);
currentLoader.load();
}
| void browseTimeInterval(TreeImageTimeSet node) { state = TreeViewer.LOADING_DATA; SecurityContext ctx = getSecurityContext(); currentLoader = new TimeIntervalsLoader(component, ctx, node); currentLoader.load(); } | /**
* Browses the node hosting the time interval to browse.
*
* @param node The node to browse.
*/ | Browses the node hosting the time interval to browse | browseTimeInterval | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerModel.java",
"license": "gpl-2.0",
"size": 44194
} | [
"org.openmicroscopy.shoola.agents.treeviewer.TimeIntervalsLoader",
"org.openmicroscopy.shoola.agents.util.browser.TreeImageTimeSet",
"org.openmicroscopy.shoola.env.data.util.SecurityContext"
] | import org.openmicroscopy.shoola.agents.treeviewer.TimeIntervalsLoader; import org.openmicroscopy.shoola.agents.util.browser.TreeImageTimeSet; import org.openmicroscopy.shoola.env.data.util.SecurityContext; | import org.openmicroscopy.shoola.agents.treeviewer.*; import org.openmicroscopy.shoola.agents.util.browser.*; import org.openmicroscopy.shoola.env.data.util.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 2,358,006 |
public static void renderDiagnostics(final Diagnosable component, final WebXmlRenderContext renderContext) {
List<Diagnostic> diags = component.getDiagnostics(Diagnostic.WARNING);
if (diags != null) {
renderHelper(renderContext, diags, Diagnostic.WARNING);
}
diags = component.getDiagnostics(Diagnostic.ERR... | static void function(final Diagnosable component, final WebXmlRenderContext renderContext) { List<Diagnostic> diags = component.getDiagnostics(Diagnostic.WARNING); if (diags != null) { renderHelper(renderContext, diags, Diagnostic.WARNING); } diags = component.getDiagnostics(Diagnostic.ERROR); if (diags != null) { rend... | /**
* Render diagnostics for the component.
* @param component the component being rendered
* @param renderContext the RenderContext to paint to.
*/ | Render diagnostics for the component | renderDiagnostics | {
"repo_name": "marksreeves/wcomponents",
"path": "wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/DiagnosticRenderUtil.java",
"license": "gpl-3.0",
"size": 2541
} | [
"com.github.bordertech.wcomponents.Diagnosable",
"com.github.bordertech.wcomponents.servlet.WebXmlRenderContext",
"com.github.bordertech.wcomponents.validation.Diagnostic",
"java.util.List"
] | import com.github.bordertech.wcomponents.Diagnosable; import com.github.bordertech.wcomponents.servlet.WebXmlRenderContext; import com.github.bordertech.wcomponents.validation.Diagnostic; import java.util.List; | import com.github.bordertech.wcomponents.*; import com.github.bordertech.wcomponents.servlet.*; import com.github.bordertech.wcomponents.validation.*; import java.util.*; | [
"com.github.bordertech",
"java.util"
] | com.github.bordertech; java.util; | 2,717,402 |
private void configureMenu(Menu menu) {
if (menu == null) {
return;
}
// Set visibility of account/folder settings menu items
if (messageListFragment == null) {
menu.findItem(R.id.account_settings).setVisible(false);
menu.findItem(R.id.folder_sett... | void function(Menu menu) { if (menu == null) { return; } if (messageListFragment == null) { menu.findItem(R.id.account_settings).setVisible(false); menu.findItem(R.id.folder_settings).setVisible(false); } else { menu.findItem(R.id.account_settings).setVisible( messageListFragment.isSingleAccountMode()); menu.findItem(R... | /**
* Hide menu items not appropriate for the current context.
*
* <p><strong>Note:</strong>
* Please adjust the comments in {@code res/menu/message_list_option.xml} if you change the
* visibility of a menu item in this method.
* </p>
*
* @param menu
* The {@link Men... | Hide menu items not appropriate for the current context. Note: Please adjust the comments in res/menu/message_list_option.xml if you change the visibility of a menu item in this method. | configureMenu | {
"repo_name": "philipwhiuk/k-9",
"path": "k9mail/src/main/java/com/fsck/k9/activity/MessageList.java",
"license": "apache-2.0",
"size": 60074
} | [
"android.os.Build",
"android.view.Menu",
"android.view.MenuItem"
] | import android.os.Build; import android.view.Menu; import android.view.MenuItem; | import android.os.*; import android.view.*; | [
"android.os",
"android.view"
] | android.os; android.view; | 2,896,507 |
public void releaseResources(String user, Resource res) {
allocatedMB.decr(res.getMemorySize());
allocatedVCores.decr(res.getVirtualCores());
QueueMetrics userMetrics = getUserMetrics(user);
if (userMetrics != null) {
userMetrics.releaseResources(user, res);
}
if (parent != null) {
... | void function(String user, Resource res) { allocatedMB.decr(res.getMemorySize()); allocatedVCores.decr(res.getVirtualCores()); QueueMetrics userMetrics = getUserMetrics(user); if (userMetrics != null) { userMetrics.releaseResources(user, res); } if (parent != null) { parent.releaseResources(user, res); } } | /**
* Release Resource for container size change.
*
* @param user
* @param res
*/ | Release Resource for container size change | releaseResources | {
"repo_name": "WIgor/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/QueueMetrics.java",
"license": "apache-2.0",
"size": 20967
} | [
"org.apache.hadoop.yarn.api.records.Resource"
] | import org.apache.hadoop.yarn.api.records.Resource; | import org.apache.hadoop.yarn.api.records.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 922,047 |
private static boolean hasASingleRangeOrNoneWithMatchingBrackets(String expression) {
int numberOfRanges = countOccurrencesOf(expression, '[') + countOccurrencesOf(expression, '{');
return countOccurrencesOf(expression, '[') == countOccurrencesOf(expression, ']') &&
countOccurrencesOf(expression, '{')... | static boolean function(String expression) { int numberOfRanges = countOccurrencesOf(expression, '[') + countOccurrencesOf(expression, '{'); return countOccurrencesOf(expression, '[') == countOccurrencesOf(expression, ']') && countOccurrencesOf(expression, '{') == countOccurrencesOf(expression, '}') && (numberOfRanges ... | /**
* A naive check for matching brackets.
* <p/>
* TODO improve to use a stack based implementation if needed
*/ | A naive check for matching brackets. TODO improve to use a stack based implementation if needed | hasASingleRangeOrNoneWithMatchingBrackets | {
"repo_name": "cloudera/director-byon-plugin-example",
"path": "src/main/java/com/cloudera/director/byon/util/HostGroups.java",
"license": "apache-2.0",
"size": 4434
} | [
"com.cloudera.director.byon.util.Strings"
] | import com.cloudera.director.byon.util.Strings; | import com.cloudera.director.byon.util.*; | [
"com.cloudera.director"
] | com.cloudera.director; | 1,623,233 |
public static int dayMinus(long stampA, long stampB) {
GregorianCalendar big = new GregorianCalendar();
GregorianCalendar small = new GregorianCalendar();
if (stampA > stampB) {
big.setTimeInMillis(stampA);
small.setTimeInMillis(stampB);
} else {
b... | static int function(long stampA, long stampB) { GregorianCalendar big = new GregorianCalendar(); GregorianCalendar small = new GregorianCalendar(); if (stampA > stampB) { big.setTimeInMillis(stampA); small.setTimeInMillis(stampB); } else { big.setTimeInMillis(stampB); small.setTimeInMillis(stampA); } big.set(Calendar.H... | /**
* get the number of days between two days
*
* @param stampA one day
* @param stampB another day
* @return
*/ | get the number of days between two days | dayMinus | {
"repo_name": "wufengwhu/offline",
"path": "src/main/java/cn/jpush/tool/Time.java",
"license": "mit",
"size": 6709
} | [
"java.util.Calendar",
"java.util.GregorianCalendar"
] | import java.util.Calendar; import java.util.GregorianCalendar; | import java.util.*; | [
"java.util"
] | java.util; | 589,631 |
protected List<Selector> groups() throws ParserException {
List<Selector> groups = new ArrayList<Selector>();
int groupNumber = 0;
while (!end()) {
ignoreWhitespaces();
parserListener.beginGroup(groupNumber, pos);
Selector selector = selector();
... | List<Selector> function() throws ParserException { List<Selector> groups = new ArrayList<Selector>(); int groupNumber = 0; while (!end()) { ignoreWhitespaces(); parserListener.beginGroup(groupNumber, pos); Selector selector = selector(); groups.add(selector); parserListener.endGroup(selector); groupNumber++; ignoreWhit... | /**
* selectors_group
* : selector [ COMMA S* selector ]*
*/ | selectors_group : selector [ COMMA S* selector ] | groups | {
"repo_name": "utluiz/parCSSer",
"path": "src/main/java/br/com/starcode/parccser/Parser.java",
"license": "mit",
"size": 27409
} | [
"br.com.starcode.parccser.model.Selector",
"java.util.ArrayList",
"java.util.List"
] | import br.com.starcode.parccser.model.Selector; import java.util.ArrayList; import java.util.List; | import br.com.starcode.parccser.model.*; import java.util.*; | [
"br.com.starcode",
"java.util"
] | br.com.starcode; java.util; | 1,613,101 |
public void disconnect(BaseWork a, BaseWork b) {
workGraph.get(a).remove(b);
invertedWorkGraph.get(b).remove(a);
if (getParents(b).isEmpty()) {
roots.add(b);
}
if (getChildren(a).isEmpty()) {
leaves.add(a);
}
edgeProperties.remove(new ImmutablePair<BaseWork, BaseWork>(a, b));
... | void function(BaseWork a, BaseWork b) { workGraph.get(a).remove(b); invertedWorkGraph.get(b).remove(a); if (getParents(b).isEmpty()) { roots.add(b); } if (getChildren(a).isEmpty()) { leaves.add(a); } edgeProperties.remove(new ImmutablePair<BaseWork, BaseWork>(a, b)); } | /**
* disconnect removes an edge between a and b. Both a and
* b have to be in the graph. If there is no matching edge
* no change happens.
*/ | disconnect removes an edge between a and b. Both a and b have to be in the graph. If there is no matching edge no change happens | disconnect | {
"repo_name": "vergilchiu/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/plan/SparkWork.java",
"license": "apache-2.0",
"size": 12565
} | [
"org.apache.commons.lang3.tuple.ImmutablePair"
] | import org.apache.commons.lang3.tuple.ImmutablePair; | import org.apache.commons.lang3.tuple.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,603,259 |
public InterpretedClassDef findClass(String name)
{
//return _program.findClass(name);
return null;
} | InterpretedClassDef function(String name) { return null; } | /**
* Finds the class
*/ | Finds the class | findClass | {
"repo_name": "dlitz/resin",
"path": "modules/quercus/src/com/caucho/quercus/page/InterpretedPage.java",
"license": "gpl-2.0",
"size": 3908
} | [
"com.caucho.quercus.program.InterpretedClassDef"
] | import com.caucho.quercus.program.InterpretedClassDef; | import com.caucho.quercus.program.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 814,021 |
private void commonInit() {
BootstrapBaseBehavior.addTo(this);
}
| void function() { BootstrapBaseBehavior.addTo(this); } | /**
* common initializer
*/ | common initializer | commonInit | {
"repo_name": "schlotze/u-qasar.platform",
"path": "src/main/java/eu/uqasar/web/components/util/AjaxBootstrapTabbedPanel.java",
"license": "apache-2.0",
"size": 2620
} | [
"de.agilecoders.wicket.core.markup.html.bootstrap.behavior.BootstrapBaseBehavior"
] | import de.agilecoders.wicket.core.markup.html.bootstrap.behavior.BootstrapBaseBehavior; | import de.agilecoders.wicket.core.markup.html.bootstrap.behavior.*; | [
"de.agilecoders.wicket"
] | de.agilecoders.wicket; | 1,936,376 |
public void run() {
long startTime, endTime, rms;
int rmh, rmm;
// get a list of selection cycles with data
ArrayList<SelectionCycle> cycles = new ArrayList<SelectionCycle>();
ArrayList<String> roundArr = new ArrayList<String>();
for (SelectionCycle sc : Configuration.getExperiment().getSelectionCycles(... | void function() { long startTime, endTime, rms; int rmh, rmm; ArrayList<SelectionCycle> cycles = new ArrayList<SelectionCycle>(); ArrayList<String> roundArr = new ArrayList<String>(); for (SelectionCycle sc : Configuration.getExperiment().getSelectionCycles()) { if (sc != null) { cycles.add(sc); roundArr.add(sc.getName... | /**
* Performs the main computation
*/ | Performs the main computation | run | {
"repo_name": "drivenbyentropy/aptasuite",
"path": "src/main/java/lib/aptatrace/AptaTraceMotif.java",
"license": "gpl-3.0",
"size": 38306
} | [
"com.itextpdf.text.pdf.parser.clipper.Paths",
"java.util.ArrayList",
"java.util.HashMap"
] | import com.itextpdf.text.pdf.parser.clipper.Paths; import java.util.ArrayList; import java.util.HashMap; | import com.itextpdf.text.pdf.parser.clipper.*; import java.util.*; | [
"com.itextpdf.text",
"java.util"
] | com.itextpdf.text; java.util; | 2,464,032 |
InetSocketAddress getPublicAddress(); | InetSocketAddress getPublicAddress(); | /**
* What address should Hazelcast advertise to other members and clients.
* When the port is set to {@code 0} then it will broadcast the same
* port that it is bound to.
*
* @return address to advertise to others
*/ | What address should Hazelcast advertise to other members and clients. When the port is set to 0 then it will broadcast the same port that it is bound to | getPublicAddress | {
"repo_name": "mdogan/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/spi/MemberAddressProvider.java",
"license": "apache-2.0",
"size": 2803
} | [
"java.net.InetSocketAddress"
] | import java.net.InetSocketAddress; | import java.net.*; | [
"java.net"
] | java.net; | 2,453,965 |
public Kuzzle refreshIndex(final Options options, final ResponseListener<JSONObject> listener) {
return this.refreshIndex(null, options, listener);
}
/**
* {@link #refreshIndex(Options, ResponseListener)} | Kuzzle function(final Options options, final ResponseListener<JSONObject> listener) { return this.refreshIndex(null, options, listener); } /** * {@link #refreshIndex(Options, ResponseListener)} | /**
* Forces the default data index to refresh on each modification
*
* @param options - Request options
* @param listener - Response callback listener
* @return this
*/ | Forces the default data index to refresh on each modification | refreshIndex | {
"repo_name": "kuzzleio/sdk-android",
"path": "src/main/java/io/kuzzle/sdk/core/Kuzzle.java",
"license": "apache-2.0",
"size": 81564
} | [
"io.kuzzle.sdk.listeners.ResponseListener",
"org.json.JSONObject"
] | import io.kuzzle.sdk.listeners.ResponseListener; import org.json.JSONObject; | import io.kuzzle.sdk.listeners.*; import org.json.*; | [
"io.kuzzle.sdk",
"org.json"
] | io.kuzzle.sdk; org.json; | 1,498,201 |
@Beta
public static int saturatedSubtract(int a, int b) {
return Ints.saturatedCast((long) a - b);
} | static int function(int a, int b) { return Ints.saturatedCast((long) a - b); } | /**
* Returns the difference of {@code a} and {@code b} unless it would overflow or underflow in
* which case {@code Integer.MAX_VALUE} or {@code Integer.MIN_VALUE} is returned, respectively.
*
* @since 20.0
*/ | Returns the difference of a and b unless it would overflow or underflow in which case Integer.MAX_VALUE or Integer.MIN_VALUE is returned, respectively | saturatedSubtract | {
"repo_name": "antlr/codebuff",
"path": "output/java_guava/1.4.19/IntMath.java",
"license": "bsd-2-clause",
"size": 24021
} | [
"com.google.common.primitives.Ints"
] | import com.google.common.primitives.Ints; | import com.google.common.primitives.*; | [
"com.google.common"
] | com.google.common; | 1,454,943 |
public List<CaseManagementIssue> filterIssues(List<CaseManagementIssue> issues, String programId) {
LoggedInInfo loggedInInfo = LoggedInInfo.loggedInInfo.get();
List<CaseManagementIssue> filteredIssues = new ArrayList<CaseManagementIssue>();
if (issues.isEmpty()) {
return issues;
}
// Get Role - if n... | List<CaseManagementIssue> function(List<CaseManagementIssue> issues, String programId) { LoggedInInfo loggedInInfo = LoggedInInfo.loggedInInfo.get(); List<CaseManagementIssue> filteredIssues = new ArrayList<CaseManagementIssue>(); if (issues.isEmpty()) { return issues; } List<ProgramProvider> ppList = programProviderDa... | /**
* Filters a list of CaseManagementIssue objects based on role.
*/ | Filters a list of CaseManagementIssue objects based on role | filterIssues | {
"repo_name": "vvanherk/oscar_emr",
"path": "src/main/java/org/oscarehr/casemgmt/service/CaseManagementManager.java",
"license": "gpl-2.0",
"size": 61144
} | [
"com.quatro.model.security.Secrole",
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"java.util.Map",
"org.oscarehr.PMmodule",
"org.oscarehr.casemgmt.model.CaseManagementIssue",
"org.oscarehr.util.LoggedInInfo"
] | import com.quatro.model.security.Secrole; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; import org.oscarehr.PMmodule; import org.oscarehr.casemgmt.model.CaseManagementIssue; import org.oscarehr.util.LoggedInInfo; | import com.quatro.model.security.*; import java.util.*; import org.oscarehr.*; import org.oscarehr.casemgmt.model.*; import org.oscarehr.util.*; | [
"com.quatro.model",
"java.util",
"org.oscarehr",
"org.oscarehr.casemgmt",
"org.oscarehr.util"
] | com.quatro.model; java.util; org.oscarehr; org.oscarehr.casemgmt; org.oscarehr.util; | 32,946 |
@Override
public boolean isNull(final QueryContext context)
throws SQLException
{
final int leftValue = _left.evalBoolean(context);
if (leftValue == FALSE)
return false;
final int rightValue = _right.evalBoolean(context);
if (rightValue == FALSE)
return false;
return leftVa... | boolean function(final QueryContext context) throws SQLException { final int leftValue = _left.evalBoolean(context); if (leftValue == FALSE) return false; final int rightValue = _right.evalBoolean(context); if (rightValue == FALSE) return false; return leftValue == UNKNOWN rightValue == UNKNOWN; } | /**
* Returns true for a null expression
*/ | Returns true for a null expression | isNull | {
"repo_name": "christianchristensen/resin",
"path": "modules/resin/src/com/caucho/db/sql/BinaryAndExpr.java",
"license": "gpl-2.0",
"size": 3625
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,162,324 |
@Override
public Feature[] getPeaks(RawDataFile rawDataFile) {
Vector<Feature> peakSet = new Vector<Feature>();
for (int row = 0; row < getNumberOfRows(); row++) {
Feature p = peakListRows.get(row).getPeak(rawDataFile);
if (p != null)
peakSet.add(p);
}
return peakSet.toAr... | Feature[] function(RawDataFile rawDataFile) { Vector<Feature> peakSet = new Vector<Feature>(); for (int row = 0; row < getNumberOfRows(); row++) { Feature p = peakListRows.get(row).getPeak(rawDataFile); if (p != null) peakSet.add(p); } return peakSet.toArray(new Feature[0]); } | /**
* Returns all peaks for a raw data file
*/ | Returns all peaks for a raw data file | getPeaks | {
"repo_name": "du-lab/mzmine2",
"path": "src/main/java/net/sf/mzmine/datamodel/impl/SimplePeakList.java",
"license": "gpl-2.0",
"size": 10789
} | [
"java.util.Vector",
"net.sf.mzmine.datamodel.Feature",
"net.sf.mzmine.datamodel.RawDataFile"
] | import java.util.Vector; import net.sf.mzmine.datamodel.Feature; import net.sf.mzmine.datamodel.RawDataFile; | import java.util.*; import net.sf.mzmine.datamodel.*; | [
"java.util",
"net.sf.mzmine"
] | java.util; net.sf.mzmine; | 1,103,999 |
public void sendChatMessage(final String msg) throws CommandException {
if (!isConnected()) {
throw new CommandException(coreMessages.getMessage("core.chatMessage.error.notConnected"));
} else if (me.isAway()) {
throw new CommandException(coreMessages.getMessage("core.chatMes... | void function(final String msg) throws CommandException { if (!isConnected()) { throw new CommandException(coreMessages.getMessage(STR)); } else if (me.isAway()) { throw new CommandException(coreMessages.getMessage(STR)); } else if (msg.trim().length() == 0) { throw new CommandException(coreMessages.getMessage(STR)); }... | /**
* Sends a chat message over the network, to all the other users.
*
* @param msg The message to send.
* @throws CommandException If there is no connection to the network,
* or the application user is away,
* or the message is empty,
* or the message is too l... | Sends a chat message over the network, to all the other users | sendChatMessage | {
"repo_name": "yuchaosydney/kouchat",
"path": "src/main/java/net/usikkert/kouchat/misc/Controller.java",
"license": "gpl-3.0",
"size": 32190
} | [
"net.usikkert.kouchat.Constants",
"net.usikkert.kouchat.util.Tools"
] | import net.usikkert.kouchat.Constants; import net.usikkert.kouchat.util.Tools; | import net.usikkert.kouchat.*; import net.usikkert.kouchat.util.*; | [
"net.usikkert.kouchat"
] | net.usikkert.kouchat; | 1,204,687 |
private OntModel createSpecialModel(VitroRequest vreq, String key) {
if (!isParameterPresent(vreq, key)) {
return null;
}
String modelUri = vreq.getParameter(key);
OntModel ont = findModelInRdfService(vreq, modelUri, CONFIGURATION);
if (ont == null) {
ont = findModelInRdfService(vreq, modelUri, CON... | OntModel function(VitroRequest vreq, String key) { if (!isParameterPresent(vreq, key)) { return null; } String modelUri = vreq.getParameter(key); OntModel ont = findModelInRdfService(vreq, modelUri, CONFIGURATION); if (ont == null) { ont = findModelInRdfService(vreq, modelUri, CONTENT); } if (ont == null) { throw new I... | /**
* If the request asks for a special model by URI, create it from the
* Database.
*
* @return the model they asked for, or null if they didn't ask for one.
* @throws IllegalStateException
* if it's not found.
*/ | If the request asks for a special model by URI, create it from the Database | createSpecialModel | {
"repo_name": "vivo-project/Vitro",
"path": "api/src/main/java/edu/cornell/mannlib/vitro/webapp/filters/ModelSwitcher.java",
"license": "bsd-3-clause",
"size": 8554
} | [
"edu.cornell.mannlib.vitro.webapp.controller.VitroRequest",
"org.apache.jena.ontology.OntModel"
] | import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import org.apache.jena.ontology.OntModel; | import edu.cornell.mannlib.vitro.webapp.controller.*; import org.apache.jena.ontology.*; | [
"edu.cornell.mannlib",
"org.apache.jena"
] | edu.cornell.mannlib; org.apache.jena; | 2,219,869 |
public void addRestrictedUserAgent(String userAgent) {
try {
Pattern nRule = Pattern.compile(userAgent);
restrictedUserAgents = addREArray(restrictedUserAgents, nRule);
} catch (PatternSyntaxException pse) {
log.error(sm.getString("http11processor.regexp.error", u... | void function(String userAgent) { try { Pattern nRule = Pattern.compile(userAgent); restrictedUserAgents = addREArray(restrictedUserAgents, nRule); } catch (PatternSyntaxException pse) { log.error(sm.getString(STR, userAgent), pse); } } | /**
* Add restricted user-agent (which will downgrade the connector
* to HTTP/1.0 mode). The user agent String given will be matched
* via regexp to the user-agent header submitted by the client.
*
* @param userAgent user-agent string
*/ | Add restricted user-agent (which will downgrade the connector to HTTP/1.0 mode). The user agent String given will be matched via regexp to the user-agent header submitted by the client | addRestrictedUserAgent | {
"repo_name": "plumer/codana",
"path": "tomcat_files/7.0.0/AbstractHttp11Processor.java",
"license": "mit",
"size": 18790
} | [
"java.util.regex.Pattern",
"java.util.regex.PatternSyntaxException"
] | import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; | import java.util.regex.*; | [
"java.util"
] | java.util; | 1,720,791 |
public Date getEndTime() {
return endTime;
} | Date function() { return endTime; } | /**
* Gets the endTime.
*
* <p>The ending day for the returned training events in Coordinated Universal Time (UTC). If not
* specified in the request, it lists the current time.
*
* @return the endTime
*/ | Gets the endTime. The ending day for the returned training events in Coordinated Universal Time (UTC). If not specified in the request, it lists the current time | getEndTime | {
"repo_name": "watson-developer-cloud/java-sdk",
"path": "visual-recognition/src/main/java/com/ibm/watson/visual_recognition/v4/model/TrainingEvents.java",
"license": "apache-2.0",
"size": 2471
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 988,560 |
@Test public void testFilterQueryOnProjectView8() {
try (TryThreadLocal.Memo ignored = Prepare.THREAD_TRIM.push(true)) {
MaterializationService.setThreadLocal();
final String m = "select \"salary\", \"commission\",\n"
+ "\"deptno\", \"empid\", \"name\" from \"emps\"";
final String v = ... | @Test void function() { try (TryThreadLocal.Memo ignored = Prepare.THREAD_TRIM.push(true)) { MaterializationService.setThreadLocal(); final String m = STRsalary\STRcommission\",\nSTR\"deptno\STRempid\STRname\STRemps\STRselect * from \"emps\" where \"name\" is nullSTRselect * from V where \STR is nullSTR{\nSTR version: ... | /** Test case for
* <a href="https://issues.apache.org/jira/browse/CALCITE-988">[CALCITE-988]
* FilterToProjectUnifyRule.invert(MutableRel, MutableRel, MutableProject)
* works incorrectly</a>. */ | Test case for [CALCITE-988] FilterToProjectUnifyRule.invert(MutableRel, MutableRel, MutableProject) | testFilterQueryOnProjectView8 | {
"repo_name": "dindin5258/calcite",
"path": "core/src/test/java/org/apache/calcite/test/MaterializationTest.java",
"license": "apache-2.0",
"size": 103932
} | [
"org.apache.calcite.adapter.java.ReflectiveSchema",
"org.apache.calcite.materialize.MaterializationService",
"org.apache.calcite.prepare.Prepare",
"org.apache.calcite.util.TryThreadLocal",
"org.junit.Test"
] | import org.apache.calcite.adapter.java.ReflectiveSchema; import org.apache.calcite.materialize.MaterializationService; import org.apache.calcite.prepare.Prepare; import org.apache.calcite.util.TryThreadLocal; import org.junit.Test; | import org.apache.calcite.adapter.java.*; import org.apache.calcite.materialize.*; import org.apache.calcite.prepare.*; import org.apache.calcite.util.*; import org.junit.*; | [
"org.apache.calcite",
"org.junit"
] | org.apache.calcite; org.junit; | 2,079,126 |
private RpcSaslProto processSaslMessage(RpcSaslProto saslMessage)
throws SaslException, IOException, AccessControlException,
InterruptedException {
final RpcSaslProto saslResponse;
final SaslState state = saslMessage.getState(); // required
switch (state) {
case NEGOT... | RpcSaslProto function(RpcSaslProto saslMessage) throws SaslException, IOException, AccessControlException, InterruptedException { final RpcSaslProto saslResponse; final SaslState state = saslMessage.getState(); switch (state) { case NEGOTIATE: { if (sentNegotiate) { throw new AccessControlException( STR); } saslRespons... | /**
* Process a saslMessge.
* @param saslMessage received SASL message
* @return the sasl response to send back to client
* @throws SaslException if authentication or generating response fails,
* or SASL protocol mixup
* @throws IOException if a SaslServer cannot be ... | Process a saslMessge | processSaslMessage | {
"repo_name": "odpi/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java",
"license": "apache-2.0",
"size": 113207
} | [
"java.io.IOException",
"javax.security.sasl.SaslException",
"org.apache.hadoop.ipc.protobuf.RpcHeaderProtos",
"org.apache.hadoop.security.AccessControlException",
"org.apache.hadoop.security.SaslRpcServer"
] | import java.io.IOException; import javax.security.sasl.SaslException; import org.apache.hadoop.ipc.protobuf.RpcHeaderProtos; import org.apache.hadoop.security.AccessControlException; import org.apache.hadoop.security.SaslRpcServer; | import java.io.*; import javax.security.sasl.*; import org.apache.hadoop.ipc.protobuf.*; import org.apache.hadoop.security.*; | [
"java.io",
"javax.security",
"org.apache.hadoop"
] | java.io; javax.security; org.apache.hadoop; | 2,166,941 |
public void detachFragmentUi(FragmentUi fragmentUi) {
if (DEBUG) {
Log.d(TAG, "Detached fragment UI: " + fragmentUi);
}
mFragmentUis.remove(fragmentUi);
}
/**
* Responds to a patient being selected.
*
* @param patient the selected {@link org.projectbuendia... | void function(FragmentUi fragmentUi) { if (DEBUG) { Log.d(TAG, STR + fragmentUi); } mFragmentUis.remove(fragmentUi); } /** * Responds to a patient being selected. * * @param patient the selected {@link org.projectbuendia.client.data.app.AppPatient} | /**
* Unregisters a {@link FragmentUi} with this controller for the purposes of subscribing to
* events.
*/ | Unregisters a <code>FragmentUi</code> with this controller for the purposes of subscribing to events | detachFragmentUi | {
"repo_name": "G1DR4/client",
"path": "app/src/main/java/org/projectbuendia/client/ui/lists/PatientSearchController.java",
"license": "apache-2.0",
"size": 13246
} | [
"android.util.Log",
"org.projectbuendia.client.data.app.AppPatient"
] | import android.util.Log; import org.projectbuendia.client.data.app.AppPatient; | import android.util.*; import org.projectbuendia.client.data.app.*; | [
"android.util",
"org.projectbuendia.client"
] | android.util; org.projectbuendia.client; | 1,173,529 |
public CreativeTabs getCreativeTabToDisplayOn()
{
return this.displayOnCreativeTab;
} | CreativeTabs function() { return this.displayOnCreativeTab; } | /**
* Returns the CreativeTab to display the given block on.
*/ | Returns the CreativeTab to display the given block on | getCreativeTabToDisplayOn | {
"repo_name": "TheGreatAndPowerfulWeegee/wipunknown",
"path": "build/tmp/recompileMc/sources/net/minecraft/block/Block.java",
"license": "gpl-3.0",
"size": 129758
} | [
"net.minecraft.creativetab.CreativeTabs"
] | import net.minecraft.creativetab.CreativeTabs; | import net.minecraft.creativetab.*; | [
"net.minecraft.creativetab"
] | net.minecraft.creativetab; | 1,160,002 |
public static <R> R readOnly(R toReadOnly) {
return proxy((p, m, args) -> {
return If($($.readOnlyToSearch).forEach(s -> {
if (m.getName().contains(s))
return BreakWithResult(m);
... | static <R> R function(R toReadOnly) { return proxy((p, m, args) -> { return If($($.readOnlyToSearch).forEach(s -> { if (m.getName().contains(s)) return BreakWithResult(m); else return null; }), rm -> { if (rm.isAnnotationPresent(ReadOnly.class)) return m.invoke(toReadOnly, args); else throw new ModifyReadOnlyException(... | /**
* Make an object which has interfaces to a read-only one.<br>
* When an invocation comes, the InvocatinHandler will check the method.
*
* <pre>
if methodName.contains elements in $.readOnlyToSearch
Check whether the method has ReadOnly annotation
... | Make an object which has interfaces to a read-only one. When an invocation comes, the InvocatinHandler will check the method. <code> </code> | readOnly | {
"repo_name": "NatureCode/Style",
"path": "src/net/cassite/style/reflect/Reflect.java",
"license": "mit",
"size": 6656
} | [
"net.cassite.style.reflect.readonly.ModifyReadOnlyException",
"net.cassite.style.reflect.readonly.ReadOnly",
"net.cassite.style.reflect.readonly.Writable"
] | import net.cassite.style.reflect.readonly.ModifyReadOnlyException; import net.cassite.style.reflect.readonly.ReadOnly; import net.cassite.style.reflect.readonly.Writable; | import net.cassite.style.reflect.readonly.*; | [
"net.cassite.style"
] | net.cassite.style; | 983,035 |
public X509CRL generate(
PrivateKey key,
String provider)
throws CRLException, IllegalStateException, NoSuchProviderException, NoSuchAlgorithmException, SignatureException, InvalidKeyException
{
return generate(key, provider, null);
} | X509CRL function( PrivateKey key, String provider) throws CRLException, IllegalStateException, NoSuchProviderException, NoSuchAlgorithmException, SignatureException, InvalidKeyException { return generate(key, provider, null); } | /**
* generate an X509 certificate, based on the current issuer and subject
* using the passed in provider for the signing.
*/ | generate an X509 certificate, based on the current issuer and subject using the passed in provider for the signing | generate | {
"repo_name": "ripple/ripple-lib-java",
"path": "ripple-bouncycastle/src/main/java/org/ripple/bouncycastle/x509/X509V2CRLGenerator.java",
"license": "isc",
"size": 13707
} | [
"java.security.InvalidKeyException",
"java.security.NoSuchAlgorithmException",
"java.security.NoSuchProviderException",
"java.security.PrivateKey",
"java.security.SignatureException",
"java.security.cert.CRLException"
] | import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.PrivateKey; import java.security.SignatureException; import java.security.cert.CRLException; | import java.security.*; import java.security.cert.*; | [
"java.security"
] | java.security; | 2,505,130 |
public ArrayList<Parameter> getParameters() {
return parameters;
} | ArrayList<Parameter> function() { return parameters; } | /**
* Get the parameter list.
*
* @return the parameter list
*/ | Get the parameter list | getParameters | {
"repo_name": "titus08/frostwire-desktop",
"path": "lib/jars-src/h2-1.3.164/org/h2/command/Prepared.java",
"license": "gpl-3.0",
"size": 10168
} | [
"java.util.ArrayList",
"org.h2.expression.Parameter"
] | import java.util.ArrayList; import org.h2.expression.Parameter; | import java.util.*; import org.h2.expression.*; | [
"java.util",
"org.h2.expression"
] | java.util; org.h2.expression; | 900,470 |
@XmlParameter("font-weight")
Expression getWeight(); | @XmlParameter(STR) Expression getWeight(); | /**
* The "font-weight" SvgParameter element gives the amount of weight or boldness to use for a
* font. Allowed values are "normal" and "bold". If null, the default is "normal".
*
* @return Expression or or Expression.NIL
*/ | The "font-weight" SvgParameter element gives the amount of weight or boldness to use for a font. Allowed values are "normal" and "bold". If null, the default is "normal" | getWeight | {
"repo_name": "geotools/geotools",
"path": "modules/library/opengis/src/main/java/org/opengis/style/Font.java",
"license": "lgpl-2.1",
"size": 2565
} | [
"org.opengis.annotation.XmlParameter",
"org.opengis.filter.expression.Expression"
] | import org.opengis.annotation.XmlParameter; import org.opengis.filter.expression.Expression; | import org.opengis.annotation.*; import org.opengis.filter.expression.*; | [
"org.opengis.annotation",
"org.opengis.filter"
] | org.opengis.annotation; org.opengis.filter; | 483,035 |
public List<Certificate> getLogRoots() {
String response = postInvoker.makeGetRequest(logUrl + GET_ROOTS_PATH);
return parseRootCertsResponse(response);
} | List<Certificate> function() { String response = postInvoker.makeGetRequest(logUrl + GET_ROOTS_PATH); return parseRootCertsResponse(response); } | /**
* Retrieves accepted Root Certificates.
*
* @return a list of root certificates.
*/ | Retrieves accepted Root Certificates | getLogRoots | {
"repo_name": "google/certificate-transparency-java",
"path": "src/main/java/org/certificatetransparency/ctlog/comm/HttpLogClient.java",
"license": "apache-2.0",
"size": 15577
} | [
"java.security.cert.Certificate",
"java.util.List"
] | import java.security.cert.Certificate; import java.util.List; | import java.security.cert.*; import java.util.*; | [
"java.security",
"java.util"
] | java.security; java.util; | 1,574,099 |
EReference getmethodHeading_FormalParams(); | EReference getmethodHeading_FormalParams(); | /**
* Returns the meta object for the containment reference '{@link org.xtext.example.delphi.delphi.methodHeading#getFormalParams <em>Formal Params</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Formal Params</em>'.
* @see org.xtext.exam... | Returns the meta object for the containment reference '<code>org.xtext.example.delphi.delphi.methodHeading#getFormalParams Formal Params</code>'. | getmethodHeading_FormalParams | {
"repo_name": "adolfosbh/cs2as",
"path": "org.xtext.example.delphi/src-gen/org/xtext/example/delphi/delphi/DelphiPackage.java",
"license": "epl-1.0",
"size": 434880
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 416,321 |
public KafkaFuture<Void> all() {
final KafkaFutureImpl<Void> result = new KafkaFutureImpl<>(); | KafkaFuture<Void> function() { final KafkaFutureImpl<Void> result = new KafkaFutureImpl<>(); | /**
* Return a future which succeeds if all the topic elections succeed.
*/ | Return a future which succeeds if all the topic elections succeed | all | {
"repo_name": "KevinLiLu/kafka",
"path": "clients/src/main/java/org/apache/kafka/clients/admin/ElectLeadersResult.java",
"license": "apache-2.0",
"size": 3132
} | [
"org.apache.kafka.common.KafkaFuture",
"org.apache.kafka.common.internals.KafkaFutureImpl"
] | import org.apache.kafka.common.KafkaFuture; import org.apache.kafka.common.internals.KafkaFutureImpl; | import org.apache.kafka.common.*; import org.apache.kafka.common.internals.*; | [
"org.apache.kafka"
] | org.apache.kafka; | 850,238 |
private boolean drawNameHorizontal(BufferedImage map, Graphics2D g, String name, Set<Point> locations,
WorldGraph graph, boolean boldBackground, double yOffset, boolean enableBoundsChecking,
TextType textType)
{
if (name.length() == 0)
return false;
Point centroid = findCentroid(locations);
ce... | boolean function(BufferedImage map, Graphics2D g, String name, Set<Point> locations, WorldGraph graph, boolean boldBackground, double yOffset, boolean enableBoundsChecking, TextType textType) { if (name.length() == 0) return false; Point centroid = findCentroid(locations); centroid.y += yOffset; MapText text = createMa... | /**
*
* Side effect: This adds a new MapText to mapTexts.
*
* @param yOffset Distance added to the y direction when determining where to draw the name. Positive y is down.
* @return True iff text was drawn.
*/ | Side effect: This adds a new MapText to mapTexts | drawNameHorizontal | {
"repo_name": "jeheydorn/nortantis",
"path": "src/nortantis/TextDrawer.java",
"license": "apache-2.0",
"size": 46947
} | [
"java.awt.Graphics2D",
"java.awt.image.BufferedImage",
"java.util.ArrayList",
"java.util.List",
"java.util.Set"
] | import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.List; import java.util.Set; | import java.awt.*; import java.awt.image.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 1,428,006 |
private void sendTaskFailed(ExecutorDriver driver, Task task) {
driver.sendStatusUpdate(
new TaskStatusBuilder()
.setTaskId(task.getTaskInfo().getTaskId())
.setState(TaskState.TASK_FAILED)
.build()
);
}
protected class TimedHealthCheck extends TimerTask {
Task task;
... | void function(ExecutorDriver driver, Task task) { driver.sendStatusUpdate( new TaskStatusBuilder() .setTaskId(task.getTaskInfo().getTaskId()) .setState(TaskState.TASK_FAILED) .build() ); } protected class TimedHealthCheck extends TimerTask { Task task; ExecutorDriver driver; public TimedHealthCheck(ExecutorDriver drive... | /**
* Let the scheduler know that the task has failed.
*/ | Let the scheduler know that the task has failed | sendTaskFailed | {
"repo_name": "dmitrypekar/hdfs",
"path": "hdfs-executor/src/main/java/org/apache/mesos/hdfs/executor/AbstractNodeExecutor.java",
"license": "apache-2.0",
"size": 12766
} | [
"java.util.TimerTask",
"org.apache.mesos.ExecutorDriver",
"org.apache.mesos.Protos",
"org.apache.mesos.protobuf.TaskStatusBuilder"
] | import java.util.TimerTask; import org.apache.mesos.ExecutorDriver; import org.apache.mesos.Protos; import org.apache.mesos.protobuf.TaskStatusBuilder; | import java.util.*; import org.apache.mesos.*; import org.apache.mesos.protobuf.*; | [
"java.util",
"org.apache.mesos"
] | java.util; org.apache.mesos; | 2,771,450 |
public ActivitiSpec thenUserTask(String taskDefinitionKey,
Set<String> collectVars, Map<String, Object> putVars) {
writeBddPhrase("THEN: User Task '%1$s' is created", taskDefinitionKey);
return whenUserTaskCompleted(taskDefinitionKey, collectVars, putVars);
} | ActivitiSpec function(String taskDefinitionKey, Set<String> collectVars, Map<String, Object> putVars) { writeBddPhrase(STR, taskDefinitionKey); return whenUserTaskCompleted(taskDefinitionKey, collectVars, putVars); } | /**
* User Task resulting from the scenario specification.
*
* <p>
* Task will be asserted to exist, variables collected and/or updated and
* then completed.
*
* @param taskDefinitionKey
* Key (BPMN id) for user task.
* @param collectVars
* Variabl... | User Task resulting from the scenario specification. Task will be asserted to exist, variables collected and/or updated and then completed | thenUserTask | {
"repo_name": "tstephen/activiti-bdd",
"path": "src/main/java/org/activiti/bdd/ActivitiSpec.java",
"license": "apache-2.0",
"size": 28984
} | [
"java.util.Map",
"java.util.Set"
] | import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,853,973 |
@Nonnull
public ReportRootGetSkypeForBusinessDeviceUsageDistributionUserCountsRequest expand(@Nonnull final String value) {
addExpandOption(value);
return this;
} | ReportRootGetSkypeForBusinessDeviceUsageDistributionUserCountsRequest function(@Nonnull final String value) { addExpandOption(value); return this; } | /**
* Sets the expand clause for the request
*
* @param value the expand clause
* @return the updated request
*/ | Sets the expand clause for the request | expand | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/ReportRootGetSkypeForBusinessDeviceUsageDistributionUserCountsRequest.java",
"license": "mit",
"size": 3031
} | [
"com.microsoft.graph.requests.ReportRootGetSkypeForBusinessDeviceUsageDistributionUserCountsRequest",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.requests.ReportRootGetSkypeForBusinessDeviceUsageDistributionUserCountsRequest; import javax.annotation.Nonnull; | import com.microsoft.graph.requests.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 2,652,767 |
protected static void preloadAndLaunch(final Class<? extends Preloader> preloaderClass, final String... args) {
preloadAndLaunch(ClassUtility.getClassFromStaticMethod(3), preloaderClass, args);
} | static void function(final Class<? extends Preloader> preloaderClass, final String... args) { preloadAndLaunch(ClassUtility.getClassFromStaticMethod(3), preloaderClass, args); } | /**
* Launch the Current JavaFX Application with given preloader.
*
* @param preloaderClass the preloader class used as splash screen with progress
* @param args arguments passed to java command line
*/ | Launch the Current JavaFX Application with given preloader | preloadAndLaunch | {
"repo_name": "JRebirth/JRebirth",
"path": "org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/application/AbstractApplication.java",
"license": "apache-2.0",
"size": 24073
} | [
"org.jrebirth.af.core.util.ClassUtility"
] | import org.jrebirth.af.core.util.ClassUtility; | import org.jrebirth.af.core.util.*; | [
"org.jrebirth.af"
] | org.jrebirth.af; | 2,460,880 |
EReference getOrdersType_OrderReference1(); | EReference getOrdersType_OrderReference1(); | /**
* Returns the meta object for the containment reference list '{@link com.example.example.importreferences.OrdersType#getOrderReference1 <em>Order Reference1</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Order Reference1</em>'.
*... | Returns the meta object for the containment reference list '<code>com.example.example.importreferences.OrdersType#getOrderReference1 Order Reference1</code>'. | getOrdersType_OrderReference1 | {
"repo_name": "patrickneubauer/XMLIntellEdit",
"path": "individual-experiments/SandboxProject/src/com/example/example/importreferences/ImportreferencesPackage.java",
"license": "mit",
"size": 32560
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,331,960 |
public StringTag setValue(String value) throws UnsupportedEncodingException {
if (value != null) {
this.value = value;
}
byte[] bb = this.value.getBytes("UTF-8");
size = VINT.fromValue(bb.length);
return this;
}
/**
* method to get "pretty" represent... | StringTag function(String value) throws UnsupportedEncodingException { if (value != null) { this.value = value; } byte[] bb = this.value.getBytes("UTF-8"); size = VINT.fromValue(bb.length); return this; } /** * method to get STR represented {@link Tag} | /**
* setter for value, updates the size of this tag
*
* @param value
* - value to be set
* @return - this for chaining
* @throws UnsupportedEncodingException
* - in case UTF-8 encoding is not supported
*/ | setter for value, updates the size of this tag | setValue | {
"repo_name": "Red5/red5-io",
"path": "src/main/java/org/red5/io/matroska/dtd/StringTag.java",
"license": "apache-2.0",
"size": 3416
} | [
"java.io.UnsupportedEncodingException",
"org.red5.io.matroska.VINT"
] | import java.io.UnsupportedEncodingException; import org.red5.io.matroska.VINT; | import java.io.*; import org.red5.io.matroska.*; | [
"java.io",
"org.red5.io"
] | java.io; org.red5.io; | 2,328,158 |
private void checkField(final boolean invalid, final String failLabel, final String fieldLabel)
throws RequestProcessAdviceException {
if (invalid) {
throw new RequestProcessAdviceException(new JSONObject().put(Keys.MSG, langPropsService.get(failLabel)
+ " - " + l... | void function(final boolean invalid, final String failLabel, final String fieldLabel) throws RequestProcessAdviceException { if (invalid) { throw new RequestProcessAdviceException(new JSONObject().put(Keys.MSG, langPropsService.get(failLabel) + STR + langPropsService.get(fieldLabel))); } } | /**
* Checks field.
*
* @param invalid the specified invalid flag
* @param failLabel the specified fail label
* @param fieldLabel the specified field label
* @throws RequestProcessAdviceException request process advice exception
*/ | Checks field | checkField | {
"repo_name": "sky54521/symphony",
"path": "src/main/java/org/b3log/symphony/processor/advice/validate/UserRegister2Validation.java",
"license": "gpl-3.0",
"size": 4590
} | [
"org.b3log.latke.Keys",
"org.b3log.latke.servlet.advice.RequestProcessAdviceException",
"org.json.JSONObject"
] | import org.b3log.latke.Keys; import org.b3log.latke.servlet.advice.RequestProcessAdviceException; import org.json.JSONObject; | import org.b3log.latke.*; import org.b3log.latke.servlet.advice.*; import org.json.*; | [
"org.b3log.latke",
"org.json"
] | org.b3log.latke; org.json; | 2,524,583 |
//@PDA jdbc40
public void setString(String parameterName, String x) throws SQLException
{
validateStatement();
statement_.setString(statement_.findParameterIndex(parameterName), x);
} | void function(String parameterName, String x) throws SQLException { validateStatement(); statement_.setString(statement_.findParameterIndex(parameterName), x); } | /**
* Sets the designated parameter to the given Java <code>String</code> value.
* The driver converts this
* to an SQL <code>VARCHAR</code> or <code>LONGVARCHAR</code> value
* (depending on the argument's
* size relative to the driver's limits on <code>VARCHAR</code> values)
* when it sen... | Sets the designated parameter to the given Java <code>String</code> value. The driver converts this to an SQL <code>VARCHAR</code> or <code>LONGVARCHAR</code> value (depending on the argument's size relative to the driver's limits on <code>VARCHAR</code> values) when it sends it to the database | setString | {
"repo_name": "devjunix/libjt400-java",
"path": "src/com/ibm/as400/access/AS400JDBCRowSet.java",
"license": "epl-1.0",
"size": 312119
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,759,622 |
RFuture<V> addListeners(FutureListener<? super V>... listeners); | RFuture<V> addListeners(FutureListener<? super V>... listeners); | /**
* Adds the specified listeners to this future. The
* specified listeners are notified when this future is
* {@linkplain #isDone() done}. If this future is already
* completed, the specified listeners are notified immediately.
*
* @param listeners - listeners for future object
*... | Adds the specified listeners to this future. The specified listeners are notified when this future is #isDone() done. If this future is already completed, the specified listeners are notified immediately | addListeners | {
"repo_name": "jackygurui/redisson",
"path": "redisson/src/main/java/org/redisson/api/RFuture.java",
"license": "apache-2.0",
"size": 6438
} | [
"io.netty.util.concurrent.FutureListener"
] | import io.netty.util.concurrent.FutureListener; | import io.netty.util.concurrent.*; | [
"io.netty.util"
] | io.netty.util; | 859,479 |
public static boolean verify(PublicKey publicKey, String signedData, String signature) {
Signature sig;
try {
sig = Signature.getInstance(SIGNATURE_ALGORITHM);
sig.initVerify(publicKey);
sig.update(signedData.getBytes());
if (!sig.verify(Base64.decode(... | static boolean function(PublicKey publicKey, String signedData, String signature) { Signature sig; try { sig = Signature.getInstance(SIGNATURE_ALGORITHM); sig.initVerify(publicKey); sig.update(signedData.getBytes()); if (!sig.verify(Base64.decode(signature, Base64.DEFAULT))) { Log.e(TAG, STR); return false; } return tr... | /**
* Verifies that the signature from the server matches the computed
* signature on the data. Returns true if the data is correctly signed.
*
* @param publicKey public key associated with the developer account
* @param signedData signed data from server
* @param signature server signatu... | Verifies that the signature from the server matches the computed signature on the data. Returns true if the data is correctly signed | verify | {
"repo_name": "TeamBliss-LP/android_packages_apps_DeviceControl",
"path": "app/src/main/java/com/anjlab/android/iab/v3/Security.java",
"license": "gpl-3.0",
"size": 5370
} | [
"android.util.Base64",
"android.util.Log",
"java.security.InvalidKeyException",
"java.security.NoSuchAlgorithmException",
"java.security.PublicKey",
"java.security.Signature",
"java.security.SignatureException"
] | import android.util.Base64; import android.util.Log; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.PublicKey; import java.security.Signature; import java.security.SignatureException; | import android.util.*; import java.security.*; | [
"android.util",
"java.security"
] | android.util; java.security; | 1,230,152 |
@Test
public void testAddCheckpointWithFailedRemove() throws Exception {
final CuratorFramework client = mock(CuratorFramework.class, Mockito.RETURNS_DEEP_STUBS);
final RetrievableStateStorageHelper<CompletedCheckpoint> storageHelperMock = mock(RetrievableStateStorageHelper.class);
ZooKeeperStateHandleStor... | void function() throws Exception { final CuratorFramework client = mock(CuratorFramework.class, Mockito.RETURNS_DEEP_STUBS); final RetrievableStateStorageHelper<CompletedCheckpoint> storageHelperMock = mock(RetrievableStateStorageHelper.class); ZooKeeperStateHandleStore<CompletedCheckpoint> zookeeperStateHandleStoreMoc... | /**
* Tests that the checkpoint does not exist in the store when we fail to add
* it into the store (i.e., there exists an exception thrown by the method).
*/ | Tests that the checkpoint does not exist in the store when we fail to add it into the store (i.e., there exists an exception thrown by the method) | testAddCheckpointWithFailedRemove | {
"repo_name": "mtunique/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStoreTest.java",
"license": "apache-2.0",
"size": 11578
} | [
"org.apache.curator.framework.CuratorFramework",
"org.apache.flink.runtime.concurrent.Executors",
"org.apache.flink.runtime.zookeeper.RetrievableStateStorageHelper",
"org.apache.flink.runtime.zookeeper.ZooKeeperStateHandleStore",
"org.mockito.Mockito",
"org.powermock.api.mockito.PowerMockito"
] | import org.apache.curator.framework.CuratorFramework; import org.apache.flink.runtime.concurrent.Executors; import org.apache.flink.runtime.zookeeper.RetrievableStateStorageHelper; import org.apache.flink.runtime.zookeeper.ZooKeeperStateHandleStore; import org.mockito.Mockito; import org.powermock.api.mockito.PowerMock... | import org.apache.curator.framework.*; import org.apache.flink.runtime.concurrent.*; import org.apache.flink.runtime.zookeeper.*; import org.mockito.*; import org.powermock.api.mockito.*; | [
"org.apache.curator",
"org.apache.flink",
"org.mockito",
"org.powermock.api"
] | org.apache.curator; org.apache.flink; org.mockito; org.powermock.api; | 228,846 |
private static void installAlternatingBackgroundRenderers(JTable table) {
HashSet<Class<?>> classes = new HashSet<Class<?>>();
for (int col=0; col<table.getColumnCount(); col++) {
Class<?> clazz = table.getColumnClass(col);
if (!classes.contains(clazz)) {
clas... | static void function(JTable table) { HashSet<Class<?>> classes = new HashSet<Class<?>>(); for (int col=0; col<table.getColumnCount(); col++) { Class<?> clazz = table.getColumnClass(col); if (!classes.contains(clazz)) { classes.add(clazz); TableCellRenderer renderer = table.getDefaultRenderer(clazz); table.setDefaultRen... | /**
* Install alternating background renderer for the columns.
* @param table the table for which the renderers must be installed
*/ | Install alternating background renderer for the columns | installAlternatingBackgroundRenderers | {
"repo_name": "gogognome/gogoswing",
"path": "src/main/java/nl/gogognome/lib/swing/plaf/DefaultTableUI.java",
"license": "apache-2.0",
"size": 3820
} | [
"java.util.HashSet",
"javax.swing.JTable",
"javax.swing.table.TableCellRenderer"
] | import java.util.HashSet; import javax.swing.JTable; import javax.swing.table.TableCellRenderer; | import java.util.*; import javax.swing.*; import javax.swing.table.*; | [
"java.util",
"javax.swing"
] | java.util; javax.swing; | 2,720,530 |
void executeBuild(UUID buildId, AnalysisResult analysisResult,
BuildResult buildResult,
BuildConfigurationCollection configurations,
ImmutableMap<PackageIdentifier, Path> packageRoots)
throws BuildFailedException, InterruptedException, TestExecException, AbruptExitException {
Stopwatch tim... | void executeBuild(UUID buildId, AnalysisResult analysisResult, BuildResult buildResult, BuildConfigurationCollection configurations, ImmutableMap<PackageIdentifier, Path> packageRoots) throws BuildFailedException, InterruptedException, TestExecException, AbruptExitException { Stopwatch timer = Stopwatch.createStarted()... | /**
* Performs the execution phase (phase 3) of the build, in which the Builder
* is applied to the action graph to bring the targets up to date. (This
* function will return prior to execution-proper if --nobuild was specified.)
* @param buildId UUID of the build id
* @param analysisResult the analysis ... | Performs the execution phase (phase 3) of the build, in which the Builder is applied to the action graph to bring the targets up to date. (This function will return prior to execution-proper if --nobuild was specified.) | executeBuild | {
"repo_name": "abergmeier-dsfishlabs/bazel",
"path": "src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java",
"license": "apache-2.0",
"size": 31154
} | [
"com.google.common.base.Stopwatch",
"com.google.common.collect.ImmutableMap",
"com.google.common.collect.ImmutableSet",
"com.google.common.collect.Iterables",
"com.google.devtools.build.lib.actions.ActionContextProvider",
"com.google.devtools.build.lib.actions.ActionGraph",
"com.google.devtools.build.li... | import com.google.common.base.Stopwatch; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.devtools.build.lib.actions.ActionContextProvider; import com.google.devtools.build.lib.actions.ActionGraph; import com.goog... | import com.google.common.base.*; import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.actions.cache.*; import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.analysis.config.*; import com.google.devtools.build.lib.buildto... | [
"com.google.common",
"com.google.devtools",
"java.util"
] | com.google.common; com.google.devtools; java.util; | 464,121 |
public final void collectBucket(LeafBucketCollector subCollector, int doc, long bucketOrd) throws IOException {
grow(bucketOrd + 1);
collectExistingBucket(subCollector, doc, bucketOrd);
} | final void function(LeafBucketCollector subCollector, int doc, long bucketOrd) throws IOException { grow(bucketOrd + 1); collectExistingBucket(subCollector, doc, bucketOrd); } | /**
* Utility method to collect the given doc in the given bucket (identified by the bucket ordinal)
*/ | Utility method to collect the given doc in the given bucket (identified by the bucket ordinal) | collectBucket | {
"repo_name": "uschindler/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/search/aggregations/bucket/BucketsAggregator.java",
"license": "apache-2.0",
"size": 19848
} | [
"java.io.IOException",
"org.elasticsearch.search.aggregations.LeafBucketCollector"
] | import java.io.IOException; import org.elasticsearch.search.aggregations.LeafBucketCollector; | import java.io.*; import org.elasticsearch.search.aggregations.*; | [
"java.io",
"org.elasticsearch.search"
] | java.io; org.elasticsearch.search; | 1,529,957 |
public AenderungsanfrageJson doFilteringOutWhatIShouldntSee(final AenderungsanfrageJson aenderungsanfrage,
final boolean citizenOrClerk) throws Exception {
final boolean isCitizen = Boolean.TRUE.equals(citizenOrClerk);
final boolean isClerk = Boolean.FALSE.equals(citizenOrClerk);
... | AenderungsanfrageJson function(final AenderungsanfrageJson aenderungsanfrage, final boolean citizenOrClerk) throws Exception { final boolean isCitizen = Boolean.TRUE.equals(citizenOrClerk); final boolean isClerk = Boolean.FALSE.equals(citizenOrClerk); if (aenderungsanfrage == null) { return null; } else { final Aenderu... | /**
* DOCUMENT ME!
*
* @param aenderungsanfrage DOCUMENT ME!
* @param citizenOrClerk DOCUMENT ME!
*
* @return DOCUMENT ME!
*
* @throws Exception DOCUMENT ME!
*/ | DOCUMENT ME | doFilteringOutWhatIShouldntSee | {
"repo_name": "cismet/verdis-server",
"path": "src/main/java/de/cismet/verdis/server/utils/AenderungsanfrageUtils.java",
"license": "lgpl-3.0",
"size": 89795
} | [
"de.cismet.verdis.server.json.AenderungsanfrageJson",
"de.cismet.verdis.server.json.FlaecheAenderungJson",
"de.cismet.verdis.server.json.NachrichtJson",
"org.geojson.Feature"
] | import de.cismet.verdis.server.json.AenderungsanfrageJson; import de.cismet.verdis.server.json.FlaecheAenderungJson; import de.cismet.verdis.server.json.NachrichtJson; import org.geojson.Feature; | import de.cismet.verdis.server.json.*; import org.geojson.*; | [
"de.cismet.verdis",
"org.geojson"
] | de.cismet.verdis; org.geojson; | 241,319 |
private int[] getStufen() {
int max = 0;
for (int i = 0; i < listVisibleNodes.size(); i++)
max = Math.max(max, ((TNNode) listVisibleNodes.get(i)).getStufe());
if (max <= 1)
return new int[0];
int stufen[] = new int[max - 1];
stufen[0] = 1;
... | int[] function() { int max = 0; for (int i = 0; i < listVisibleNodes.size(); i++) max = Math.max(max, ((TNNode) listVisibleNodes.get(i)).getStufe()); if (max <= 1) return new int[0]; int stufen[] = new int[max - 1]; stufen[0] = 1; for (int i = 2; i < listVisibleNodes.size(); i++) if (((TNNode) listVisibleNodes.get(i)).... | /**
* Returns an array of indices which represent the different depth tree levels.
* return int[] Beginning-Indices of depth levels.
*/ | Returns an array of indices which represent the different depth tree levels. return int[] Beginning-Indices of depth levels | getStufen | {
"repo_name": "elitak/peertrust",
"path": "sandbox/TomcatPeerTrust/src/org/peertrust/demo/client/applet/NonWindowTNGuiBasedTNTreeDiagramm.java",
"license": "gpl-2.0",
"size": 36014
} | [
"org.peertrust.tnviz.app.TNNode"
] | import org.peertrust.tnviz.app.TNNode; | import org.peertrust.tnviz.app.*; | [
"org.peertrust.tnviz"
] | org.peertrust.tnviz; | 181,180 |
final Configuration conf = HBaseConfiguration.create();
final String[] remainingArgs = new GenericOptionsParser(conf, args)
.getRemainingArgs();
if (remainingArgs.length != 4) {
System.out.println(getUsage());
} else {
HBaseUtil.moveColumnFamilyData(conf, remainingArgs[0], remainingArgs[1], remainingA... | final Configuration conf = HBaseConfiguration.create(); final String[] remainingArgs = new GenericOptionsParser(conf, args) .getRemainingArgs(); if (remainingArgs.length != 4) { System.out.println(getUsage()); } else { HBaseUtil.moveColumnFamilyData(conf, remainingArgs[0], remainingArgs[1], remainingArgs[2], remainingA... | /**
* Creates an 1:1 duplicate of a table with all it's data.
*
* @param args
* cli-parameter
* @throws Exception
* when an error occurs
*/ | Creates an 1:1 duplicate of a table with all it's data | main | {
"repo_name": "memonews/hbase-utils",
"path": "src/main/java/com/memonews/hbase/MoveColumnFamilyData.java",
"license": "apache-2.0",
"size": 2020
} | [
"com.memonews.hbase.util.HBaseUtil",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.HBaseConfiguration",
"org.apache.hadoop.util.GenericOptionsParser"
] | import com.memonews.hbase.util.HBaseUtil; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.util.GenericOptionsParser; | import com.memonews.hbase.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.util.*; | [
"com.memonews.hbase",
"org.apache.hadoop"
] | com.memonews.hbase; org.apache.hadoop; | 2,546,590 |
@Override
public ImageIcon getIconForFlexoRole(Class<? extends FlexoRole<?>> flexoRoleClass) {
if (XMLIndividualRole.class.isAssignableFrom(flexoRoleClass)) {
return getIconForTechnologyObject(XMLIndividualRole.class);
}
return null;
} | ImageIcon function(Class<? extends FlexoRole<?>> flexoRoleClass) { if (XMLIndividualRole.class.isAssignableFrom(flexoRoleClass)) { return getIconForTechnologyObject(XMLIndividualRole.class); } return null; } | /**
* Return icon representing supplied pattern property
*
* @param object
* @return
*/ | Return icon representing supplied pattern property | getIconForFlexoRole | {
"repo_name": "openflexo-team/openflexo-technology-adapters",
"path": "openflexo-technology-adapters-ui/xmlconnector-ui/src/main/java/org/openflexo/technologyadapter/xml/controller/XMLAdapterController.java",
"license": "gpl-3.0",
"size": 7194
} | [
"javax.swing.ImageIcon",
"org.openflexo.foundation.fml.FlexoRole",
"org.openflexo.technologyadapter.xml.fml.XMLIndividualRole"
] | import javax.swing.ImageIcon; import org.openflexo.foundation.fml.FlexoRole; import org.openflexo.technologyadapter.xml.fml.XMLIndividualRole; | import javax.swing.*; import org.openflexo.foundation.fml.*; import org.openflexo.technologyadapter.xml.fml.*; | [
"javax.swing",
"org.openflexo.foundation",
"org.openflexo.technologyadapter"
] | javax.swing; org.openflexo.foundation; org.openflexo.technologyadapter; | 691,416 |
protected String getErrorMessage(Exception ex) {
if (ex instanceof BaseException) {
return ex.getMessage();
} else {
return "Problem while getting decoration";
}
} | String function(Exception ex) { if (ex instanceof BaseException) { return ex.getMessage(); } else { return STR; } } | /**
* Decoration error message
*/ | Decoration error message | getErrorMessage | {
"repo_name": "flesire/ontrack",
"path": "ontrack-service/src/main/java/net/nemerosa/ontrack/service/DecorationServiceImpl.java",
"license": "mit",
"size": 2790
} | [
"net.nemerosa.ontrack.common.BaseException"
] | import net.nemerosa.ontrack.common.BaseException; | import net.nemerosa.ontrack.common.*; | [
"net.nemerosa.ontrack"
] | net.nemerosa.ontrack; | 1,483,226 |
public Object execute(ProxyInvocation proxyInvocation) throws Throwable {
return proxyInvocation.invokeOriginalBehavior();
}
| Object function(ProxyInvocation proxyInvocation) throws Throwable { return proxyInvocation.invokeOriginalBehavior(); } | /**
* Executes the mock behavior.
*
* @param proxyInvocation The proxy method invocation, not null
* @return The result value
*/ | Executes the mock behavior | execute | {
"repo_name": "Silvermedia/unitils",
"path": "unitils-mock/src/main/java/org/unitils/mock/mockbehavior/impl/OriginalBehaviorInvokingMockBehavior.java",
"license": "apache-2.0",
"size": 2372
} | [
"org.unitils.mock.core.proxy.ProxyInvocation"
] | import org.unitils.mock.core.proxy.ProxyInvocation; | import org.unitils.mock.core.proxy.*; | [
"org.unitils.mock"
] | org.unitils.mock; | 353,612 |
private List<ColumnInfo> getColumnInfo(ResultSetMetaData metaData, SQLPlatform platform, DbSourceOptions<R> request) throws SQLException {
final int rowCapacity = request.getRowCapacity();
final int columnCount = metaData.getColumnCount();
final List<ColumnInfo> columnInfoList = new ArrayLis... | List<ColumnInfo> function(ResultSetMetaData metaData, SQLPlatform platform, DbSourceOptions<R> request) throws SQLException { final int rowCapacity = request.getRowCapacity(); final int columnCount = metaData.getColumnCount(); final List<ColumnInfo> columnInfoList = new ArrayList<>(columnCount); final SQLType.TypeResol... | /**
* Returns the array of column information from the result-set meta-data
* @param metaData the result set meta data
* @param platform the database platform
* @param request the request descriptor
* @return the array of column information
* @throws SQLExcepti... | Returns the array of column information from the result-set meta-data | getColumnInfo | {
"repo_name": "zavtech/morpheus-core",
"path": "src/main/java/com/zavtech/morpheus/source/DbSource.java",
"license": "apache-2.0",
"size": 9805
} | [
"com.zavtech.morpheus.util.sql.SQLExtractor",
"com.zavtech.morpheus.util.sql.SQLPlatform",
"com.zavtech.morpheus.util.sql.SQLType",
"java.sql.ResultSetMetaData",
"java.sql.SQLException",
"java.util.ArrayList",
"java.util.List"
] | import com.zavtech.morpheus.util.sql.SQLExtractor; import com.zavtech.morpheus.util.sql.SQLPlatform; import com.zavtech.morpheus.util.sql.SQLType; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; | import com.zavtech.morpheus.util.sql.*; import java.sql.*; import java.util.*; | [
"com.zavtech.morpheus",
"java.sql",
"java.util"
] | com.zavtech.morpheus; java.sql; java.util; | 2,076,825 |
private synchronized void handleSubscriptions(MQTTMessage msg) {
if (msg instanceof MQTTSuback) {
MQTTSuback suback = (MQTTSuback) msg;
MQTTSubscribe subscribe = (MQTTSubscribe) mMqttIdentifierHelper.getSentPackages().get(suback.getPackageIdentifier());
String[] topicFilters = subscribe.getTop... | synchronized void function(MQTTMessage msg) { if (msg instanceof MQTTSuback) { MQTTSuback suback = (MQTTSuback) msg; MQTTSubscribe subscribe = (MQTTSubscribe) mMqttIdentifierHelper.getSentPackages().get(suback.getPackageIdentifier()); String[] topicFilters = subscribe.getTopicFilters(); byte[] qoss = suback.getPayload(... | /**
* Manages subscription messages
*
* @param msg the message to handle
*/ | Manages subscription messages | handleSubscriptions | {
"repo_name": "Qatja/android",
"path": "qatja-android/src/main/java/se/wetcat/qatja/android/QatjaService.java",
"license": "apache-2.0",
"size": 35522
} | [
"android.util.Log",
"java.io.IOException",
"java.net.InetSocketAddress",
"java.net.Socket",
"se.wetcat.qatja.messages.MQTTMessage",
"se.wetcat.qatja.messages.MQTTSuback",
"se.wetcat.qatja.messages.MQTTSubscribe",
"se.wetcat.qatja.messages.MQTTUnsuback",
"se.wetcat.qatja.messages.MQTTUnsubscribe"
] | import android.util.Log; import java.io.IOException; import java.net.InetSocketAddress; import java.net.Socket; import se.wetcat.qatja.messages.MQTTMessage; import se.wetcat.qatja.messages.MQTTSuback; import se.wetcat.qatja.messages.MQTTSubscribe; import se.wetcat.qatja.messages.MQTTUnsuback; import se.wetcat.qatja.mes... | import android.util.*; import java.io.*; import java.net.*; import se.wetcat.qatja.messages.*; | [
"android.util",
"java.io",
"java.net",
"se.wetcat.qatja"
] | android.util; java.io; java.net; se.wetcat.qatja; | 550,176 |
public void setContainer( GUIContainer container ) {
this.container = container;
}
/**
*
* @return the player who triggered this event as a {@link HumanEntity} | void function( GUIContainer container ) { this.container = container; } /** * * @return the player who triggered this event as a {@link HumanEntity} | /**
* Sets a container that should be opened instead
* @param container the alternative container
*/ | Sets a container that should be opened instead | setContainer | {
"repo_name": "LegendOnline/InventoryAPI",
"path": "src/main/java/com/minecraftlegend/inventoryapi/Events/ContainerOpenEvent.java",
"license": "gpl-3.0",
"size": 1269
} | [
"com.minecraftlegend.inventoryapi.GUIContainer",
"org.bukkit.entity.HumanEntity"
] | import com.minecraftlegend.inventoryapi.GUIContainer; import org.bukkit.entity.HumanEntity; | import com.minecraftlegend.inventoryapi.*; import org.bukkit.entity.*; | [
"com.minecraftlegend.inventoryapi",
"org.bukkit.entity"
] | com.minecraftlegend.inventoryapi; org.bukkit.entity; | 2,080,909 |
Set<StreamState> getCurrentStreams(); | Set<StreamState> getCurrentStreams(); | /**
* Returns the current state of all ongoing streams.
*/ | Returns the current state of all ongoing streams | getCurrentStreams | {
"repo_name": "DavidHerzogTU-Berlin/cassandraToRun",
"path": "src/java/org/apache/cassandra/streaming/StreamManagerMBean.java",
"license": "apache-2.0",
"size": 1164
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,712,851 |
public ApiResponse<ElectronicServiceChannel> findServiceElectronicChannelWithHttpInfo(String serviceId, String electronicChannelId) throws ApiException {
com.squareup.okhttp.Call call = findServiceElectronicChannelCall(serviceId, electronicChannelId, null, null);
Type localVarReturnType = new TypeTo... | ApiResponse<ElectronicServiceChannel> function(String serviceId, String electronicChannelId) throws ApiException { com.squareup.okhttp.Call call = findServiceElectronicChannelCall(serviceId, electronicChannelId, null, null); Type localVarReturnType = new TypeToken<ElectronicServiceChannel>(){}.getType(); return apiClie... | /**
* finds ElectronicChannel by electronicChannelId
* finds ElectronicChannels by electronicChannelId
* @param serviceId Service id (required)
* @param electronicChannelId electronicChannel id (required)
* @return ApiResponse<ElectronicServiceChannel>
* @throws ApiException If fail ... | finds ElectronicChannel by electronicChannelId finds ElectronicChannels by electronicChannelId | findServiceElectronicChannelWithHttpInfo | {
"repo_name": "Metatavu/kunta-api-spec",
"path": "java-client-generated/src/main/java/fi/metatavu/kuntaapi/client/ElectronicChannelsApi.java",
"license": "agpl-3.0",
"size": 14716
} | [
"com.google.gson.reflect.TypeToken",
"fi.metatavu.kuntaapi.ApiException",
"fi.metatavu.kuntaapi.ApiResponse",
"fi.metatavu.kuntaapi.client.model.ElectronicServiceChannel",
"java.lang.reflect.Type"
] | import com.google.gson.reflect.TypeToken; import fi.metatavu.kuntaapi.ApiException; import fi.metatavu.kuntaapi.ApiResponse; import fi.metatavu.kuntaapi.client.model.ElectronicServiceChannel; import java.lang.reflect.Type; | import com.google.gson.reflect.*; import fi.metatavu.kuntaapi.*; import fi.metatavu.kuntaapi.client.model.*; import java.lang.reflect.*; | [
"com.google.gson",
"fi.metatavu.kuntaapi",
"java.lang"
] | com.google.gson; fi.metatavu.kuntaapi; java.lang; | 1,169,877 |
@Override
public SystemTimer getCCPTimer() {
synchronized (this.ccpTimerMutex) {
if (this.ccpTimer != null) {
return this.ccpTimer;
}
this.ccpTimer = new SystemTimer(getDistributedSystem(), true);
if (this.isClosing) {
this.ccpTimer.cancel(); // poison it, don't throw.
... | SystemTimer function() { synchronized (this.ccpTimerMutex) { if (this.ccpTimer != null) { return this.ccpTimer; } this.ccpTimer = new SystemTimer(getDistributedSystem(), true); if (this.isClosing) { this.ccpTimer.cancel(); } return this.ccpTimer; } } | /**
* Get cache-wide CacheClientProxy SystemTimer
*
* @return the timer, lazily created
*/ | Get cache-wide CacheClientProxy SystemTimer | getCCPTimer | {
"repo_name": "charliemblack/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java",
"license": "apache-2.0",
"size": 186222
} | [
"org.apache.geode.internal.SystemTimer"
] | import org.apache.geode.internal.SystemTimer; | import org.apache.geode.internal.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,073,279 |
void flush() throws IOException; | void flush() throws IOException; | /**
* If the underlying link implements some form of output buffering, then
* this method should flush the buffer. If the link does not do any form
* of buffering, this method should do nothing.
* @throws IOException
*/ | If the underlying link implements some form of output buffering, then this method should flush the buffer. If the link does not do any form of buffering, this method should do nothing | flush | {
"repo_name": "Mobicents/smpp",
"path": "src/main/java/org/mobicents/protocols/smpp/net/SmscLink.java",
"license": "lgpl-3.0",
"size": 4866
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,948,347 |
public CashFlow getCashFlow() {
return cashFlow;
} | CashFlow function() { return cashFlow; } | /**
* Gets the cash flow.
*
* @return the cash flow
*/ | Gets the cash flow | getCashFlow | {
"repo_name": "uaijug/chronos",
"path": "src/main/java/br/com/uaijug/chronos/institution/cashFlow/controller/CashFlowController.java",
"license": "gpl-3.0",
"size": 10488
} | [
"br.com.uaijug.chronos.institution.cashFlow.model.CashFlow"
] | import br.com.uaijug.chronos.institution.cashFlow.model.CashFlow; | import br.com.uaijug.chronos.institution.*; | [
"br.com.uaijug"
] | br.com.uaijug; | 1,691,451 |
private static Text[] readPartitions(FileSystem fs, Path p,
JobConf job) throws IOException {
SequenceFile.Reader reader = new SequenceFile.Reader(fs, p, job);
List<Text> parts = new ArrayList<Text>();
Text key = new Text();
NullWritable value = Null... | static Text[] function(FileSystem fs, Path p, JobConf job) throws IOException { SequenceFile.Reader reader = new SequenceFile.Reader(fs, p, job); List<Text> parts = new ArrayList<Text>(); Text key = new Text(); NullWritable value = NullWritable.get(); while (reader.next(key, value)) { parts.add(key); key = new Text(); ... | /**
* Read the cut points from the given sequence file.
* @param fs the file system
* @param p the path to read
* @param job the job config
* @return the strings to split the partitions on
* @throws IOException
*/ | Read the cut points from the given sequence file | readPartitions | {
"repo_name": "ryanobjc/hadoop-cloudera",
"path": "src/examples/org/apache/hadoop/examples/terasort/TeraSort.java",
"license": "apache-2.0",
"size": 8780
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.io.NullWritable",
"org.apache.hadoop.io.SequenceFile",
"org.apache.hadoop.io.Text",
"org.apache.hadoop.mapred.JobConf"
] | import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.NullWritable; import org.apache.hadoop.io.SequenceFile; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapred.JobConf; | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.io.*; import org.apache.hadoop.mapred.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,474,447 |
@Override public void visitErrorNode(@NotNull ErrorNode node) { } | @Override public void visitErrorNode(@NotNull ErrorNode node) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | visitTerminal | {
"repo_name": "andra49/CSSGenerator",
"path": "CSSGenerator/src/CSSBaseListener.java",
"license": "mit",
"size": 4957
} | [
"org.antlr.v4.runtime.misc.NotNull",
"org.antlr.v4.runtime.tree.ErrorNode"
] | import org.antlr.v4.runtime.misc.NotNull; import org.antlr.v4.runtime.tree.ErrorNode; | import org.antlr.v4.runtime.misc.*; import org.antlr.v4.runtime.tree.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 386,000 |
public static void clearCache() {
PROPERTIES.clear();
DECLARED_KEY_VALUE_PROPERTIES.clear();
DECLARED_METHODS.clear();
ACCESSIBLE_KEY_VALUE_PROPERTIES.clear();
ACCESSIBLE_METHODS.clear();
}
private static final Logger LOGGER = Logger.getLogger(KeyValueLibrary.class.getPackage().getName());
private sta... | static void function() { PROPERTIES.clear(); DECLARED_KEY_VALUE_PROPERTIES.clear(); DECLARED_METHODS.clear(); ACCESSIBLE_KEY_VALUE_PROPERTIES.clear(); ACCESSIBLE_METHODS.clear(); } private static final Logger LOGGER = Logger.getLogger(KeyValueLibrary.class.getPackage().getName()); private static final Map<Type, Hashtab... | /**
* Clear the whole cache
*/ | Clear the whole cache | clearCache | {
"repo_name": "openflexo-team/connie",
"path": "connie-core/src/main/java/org/openflexo/kvc/KeyValueLibrary.java",
"license": "gpl-3.0",
"size": 17539
} | [
"java.lang.reflect.Type",
"java.util.Hashtable",
"java.util.Map",
"java.util.Vector",
"java.util.logging.Logger",
"org.openflexo.connie.binding.MethodDefinition"
] | import java.lang.reflect.Type; import java.util.Hashtable; import java.util.Map; import java.util.Vector; import java.util.logging.Logger; import org.openflexo.connie.binding.MethodDefinition; | import java.lang.reflect.*; import java.util.*; import java.util.logging.*; import org.openflexo.connie.binding.*; | [
"java.lang",
"java.util",
"org.openflexo.connie"
] | java.lang; java.util; org.openflexo.connie; | 1,440,643 |
EReference getToolInfo_ContainerLabel(); | EReference getToolInfo_ContainerLabel(); | /**
* Returns the meta object for the container reference '{@link fr.lip6.move.pnml.ptnet.ToolInfo#getContainerLabel <em>Container Label</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the container reference '<em>Container Label</em>'.
* @see fr.lip6.move.pnml.ptnet.To... | Returns the meta object for the container reference '<code>fr.lip6.move.pnml.ptnet.ToolInfo#getContainerLabel Container Label</code>'. | getToolInfo_ContainerLabel | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-PTNet/src/fr/lip6/move/pnml/ptnet/PtnetPackage.java",
"license": "epl-1.0",
"size": 146931
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,556,487 |
public Object clone() throws CloneNotSupportedException {
XYAreaRenderer2 clone = (XYAreaRenderer2) super.clone();
clone.legendArea = ShapeUtilities.clone(this.legendArea);
return clone;
}
| Object function() throws CloneNotSupportedException { XYAreaRenderer2 clone = (XYAreaRenderer2) super.clone(); clone.legendArea = ShapeUtilities.clone(this.legendArea); return clone; } | /**
* Returns a clone of the renderer.
*
* @return A clone.
*
* @throws CloneNotSupportedException if the renderer cannot be cloned.
*/ | Returns a clone of the renderer | clone | {
"repo_name": "nologic/nabs",
"path": "client/trunk/shared/libraries/jfreechart-1.0.5/source/org/jfree/chart/renderer/xy/XYAreaRenderer2.java",
"license": "gpl-2.0",
"size": 18640
} | [
"org.jfree.util.ShapeUtilities"
] | import org.jfree.util.ShapeUtilities; | import org.jfree.util.*; | [
"org.jfree.util"
] | org.jfree.util; | 2,692,388 |
public static long calculateBrokerMaxCapacity(SystemResourceUsage systemResourceUsage, ResourceQuota defaultQuota) {
double bandwidthOutLimit = systemResourceUsage.bandwidthOut.limit * KBITS_TO_BYTES;
double bandwidthInLimit = systemResourceUsage.bandwidthIn.limit * KBITS_TO_BYTES;
long cap... | static long function(SystemResourceUsage systemResourceUsage, ResourceQuota defaultQuota) { double bandwidthOutLimit = systemResourceUsage.bandwidthOut.limit * KBITS_TO_BYTES; double bandwidthInLimit = systemResourceUsage.bandwidthIn.limit * KBITS_TO_BYTES; long capacity = calculateBrokerCapacity(defaultQuota, systemRe... | /**
* Estimate the maximum number namespace bundles a ResourceUnit is able to handle with all resource
*/ | Estimate the maximum number namespace bundles a ResourceUnit is able to handle with all resource | calculateBrokerMaxCapacity | {
"repo_name": "rdhabalia/pulsar",
"path": "pulsar-broker/src/main/java/com/yahoo/pulsar/broker/loadbalance/data/ResourceUnitRanking.java",
"license": "apache-2.0",
"size": 12991
} | [
"com.yahoo.pulsar.common.policies.data.ResourceQuota"
] | import com.yahoo.pulsar.common.policies.data.ResourceQuota; | import com.yahoo.pulsar.common.policies.data.*; | [
"com.yahoo.pulsar"
] | com.yahoo.pulsar; | 1,009,686 |
private boolean sendNotification(
OMAInfo omaInfo, DownloadInfo downloadInfo, long downloadId, String statusMessage) {
if (omaInfo == null) return false;
if (omaInfo.isValueEmpty(OMA_INSTALL_NOTIFY_URI)) return false;
PostStatusTask task = new PostStatusTask(omaInfo, downloadInfo... | boolean function( OMAInfo omaInfo, DownloadInfo downloadInfo, long downloadId, String statusMessage) { if (omaInfo == null) return false; if (omaInfo.isValueEmpty(OMA_INSTALL_NOTIFY_URI)) return false; PostStatusTask task = new PostStatusTask(omaInfo, downloadInfo, downloadId, statusMessage); task.execute(); return tru... | /**
* Sends the install notification to the server.
*
* @param omaInfo Information about the OMA content.
* @param downloadInfo Information about the download.
* @param downloadId Id of the download in Android DownloadManager.
* @param statusMessage The message to send to the notification ... | Sends the install notification to the server | sendNotification | {
"repo_name": "axinging/chromium-crosswalk",
"path": "chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java",
"license": "bsd-3-clause",
"size": 32248
} | [
"org.chromium.content.browser.DownloadInfo"
] | import org.chromium.content.browser.DownloadInfo; | import org.chromium.content.browser.*; | [
"org.chromium.content"
] | org.chromium.content; | 655,838 |
private boolean isOnline() {
try {
ServerStatus status = serverStatusService.getServerStatus();
if (ServerStatus.SERVER_ONLINE == status) {
checkKey(status.getRegistrationIdsValidationKey());
return true;
}
return false;
} catch (Exception e) {
return false;
}
}
/**
* {@inheritDoc} | boolean function() { try { ServerStatus status = serverStatusService.getServerStatus(); if (ServerStatus.SERVER_ONLINE == status) { checkKey(status.getRegistrationIdsValidationKey()); return true; } return false; } catch (Exception e) { return false; } } /** * {@inheritDoc} | /**
* Returns if the server is online by checking the {@link IServerStatusService}.
*
* @return Returns if the server is online by checking the {@link IServerStatusService}.
*/ | Returns if the server is online by checking the <code>IServerStatusService</code> | isOnline | {
"repo_name": "holidayfun/inspectIT",
"path": "inspectIT/src/info/novatec/inspectit/rcp/repository/CmrRepositoryDefinition.java",
"license": "agpl-3.0",
"size": 17417
} | [
"info.novatec.inspectit.cmr.service.IServerStatusService"
] | import info.novatec.inspectit.cmr.service.IServerStatusService; | import info.novatec.inspectit.cmr.service.*; | [
"info.novatec.inspectit"
] | info.novatec.inspectit; | 1,145,933 |
public @Nonnull String getAdminAddress() {
String v = adminAddress;
if(v==null) v = Messages.Mailer_Address_Not_Configured();
return v;
} | @Nonnull String function() { String v = adminAddress; if(v==null) v = Messages.Mailer_Address_Not_Configured(); return v; } | /**
* Gets the service administrator e-mail address.
* @return Admin address or "address not configured" stub
*/ | Gets the service administrator e-mail address | getAdminAddress | {
"repo_name": "lindzh/jenkins",
"path": "core/src/main/java/jenkins/model/JenkinsLocationConfiguration.java",
"license": "mit",
"size": 5978
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 2,220,711 |
public void processMetadata(Metadata metadata) {
}
| void function(Metadata metadata) { } | /**
* Process metadata records.
* @param metadata the metadata block
* @see org.kc7bfi.jflac.FrameListener#processMetadata(org.kc7bfi.jflac.metadata.MetadataBase)
*/ | Process metadata records | processMetadata | {
"repo_name": "srnsw/xena",
"path": "plugins/audio/ext/src/jflac-1.3/src/java/org/kc7bfi/jflac/apps/Tester.java",
"license": "gpl-3.0",
"size": 3059
} | [
"org.kc7bfi.jflac.metadata.Metadata"
] | import org.kc7bfi.jflac.metadata.Metadata; | import org.kc7bfi.jflac.metadata.*; | [
"org.kc7bfi.jflac"
] | org.kc7bfi.jflac; | 2,575,121 |
public ServiceFuture<KeyBundle> getKeyAsync(String vaultBaseUrl, String keyName, String keyVersion, final ServiceCallback<KeyBundle> serviceCallback) {
return ServiceFuture.fromResponse(getKeyWithServiceResponseAsync(vaultBaseUrl, keyName, keyVersion), serviceCallback);
} | ServiceFuture<KeyBundle> function(String vaultBaseUrl, String keyName, String keyVersion, final ServiceCallback<KeyBundle> serviceCallback) { return ServiceFuture.fromResponse(getKeyWithServiceResponseAsync(vaultBaseUrl, keyName, keyVersion), serviceCallback); } | /**
* Gets the public part of a stored key.
* The get key operation is applicable to all key types. If the requested key is symmetric, then no key material is released in the response. This operation requires the keys/get permission.
*
* @param vaultBaseUrl The vault name, for example https://myvaul... | Gets the public part of a stored key. The get key operation is applicable to all key types. If the requested key is symmetric, then no key material is released in the response. This operation requires the keys/get permission | getKeyAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/keyvault/microsoft-azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java",
"license": "mit",
"size": 884227
} | [
"com.microsoft.azure.keyvault.models.KeyBundle",
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.azure.keyvault.models.KeyBundle; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.azure.keyvault.models.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 1,553,031 |
public synchronized void requestPreviewFrame(Handler handler, int message) {
OpenCamera theCamera = camera;
if (theCamera != null && previewing) {
previewCallback.setHandler(handler, message);
theCamera.getCamera().setOneShotPreviewCallback(previewCallback);
}
} | synchronized void function(Handler handler, int message) { OpenCamera theCamera = camera; if (theCamera != null && previewing) { previewCallback.setHandler(handler, message); theCamera.getCamera().setOneShotPreviewCallback(previewCallback); } } | /**
* A single preview frame will be returned to the handler supplied. The data will arrive as byte[]
* in the message.obj field, with width and height encoded as message.arg1 and message.arg2,
* respectively.
*
* @param handler The handler to send the message to.
* @param message The what... | A single preview frame will be returned to the handler supplied. The data will arrive as byte[] in the message.obj field, with width and height encoded as message.arg1 and message.arg2, respectively | requestPreviewFrame | {
"repo_name": "WZero/ZxingAs",
"path": "zxing/src/main/java/com/google/zxing/client/android/camera/CameraManager.java",
"license": "apache-2.0",
"size": 13275
} | [
"android.os.Handler",
"com.google.zxing.client.android.camera.open.OpenCamera"
] | import android.os.Handler; import com.google.zxing.client.android.camera.open.OpenCamera; | import android.os.*; import com.google.zxing.client.android.camera.open.*; | [
"android.os",
"com.google.zxing"
] | android.os; com.google.zxing; | 2,783,517 |
private void raiseNoSuchBeanDefinitionException(
Class<?> type, String dependencyDescription, DependencyDescriptor descriptor)
throws NoSuchBeanDefinitionException {
throw new NoSuchBeanDefinitionException(type, dependencyDescription,
"expected at least 1 bean which qualifies as autowire candidate for t... | void function( Class<?> type, String dependencyDescription, DependencyDescriptor descriptor) throws NoSuchBeanDefinitionException { throw new NoSuchBeanDefinitionException(type, dependencyDescription, STR + STR + ObjectUtils.nullSafeToString(descriptor.getAnnotations())); } | /**
* Raise a NoSuchBeanDefinitionException for an unresolvable dependency.
*/ | Raise a NoSuchBeanDefinitionException for an unresolvable dependency | raiseNoSuchBeanDefinitionException | {
"repo_name": "shivpun/spring-framework",
"path": "spring-beans/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java",
"license": "apache-2.0",
"size": 61827
} | [
"org.springframework.beans.factory.NoSuchBeanDefinitionException",
"org.springframework.beans.factory.config.DependencyDescriptor",
"org.springframework.util.ObjectUtils"
] | import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.config.DependencyDescriptor; import org.springframework.util.ObjectUtils; | import org.springframework.beans.factory.*; import org.springframework.beans.factory.config.*; import org.springframework.util.*; | [
"org.springframework.beans",
"org.springframework.util"
] | org.springframework.beans; org.springframework.util; | 588,523 |
public static boolean removeUser(String userID, String password) {
MongoCollection<Document> users = md.getCollection("users");
// filter for query
Bson filter = Filters.eq("_id", new ObjectId(userID));
Document user = users.find(filter).first();
if(user == null) {
String messageGen = "This user does n... | static boolean function(String userID, String password) { MongoCollection<Document> users = md.getCollection("users"); Bson filter = Filters.eq("_id", new ObjectId(userID)); Document user = users.find(filter).first(); if(user == null) { String messageGen = STR; String messageCont = STR; ErrorHandler.getInstance().push(... | /**
* Removes an user.
*
* @param userID The user id
* @param password The password
*
* @return True if succeed, false otherwise.
*/ | Removes an user | removeUser | {
"repo_name": "gaelfoppolo/locomotor",
"path": "src/locomotor/core/DBH.java",
"license": "gpl-3.0",
"size": 42395
} | [
"com.mongodb.client.MongoCollection",
"com.mongodb.client.model.Filters",
"org.bson.Document",
"org.bson.conversions.Bson",
"org.bson.types.ObjectId"
] | import com.mongodb.client.MongoCollection; import com.mongodb.client.model.Filters; import org.bson.Document; import org.bson.conversions.Bson; import org.bson.types.ObjectId; | import com.mongodb.client.*; import com.mongodb.client.model.*; import org.bson.*; import org.bson.conversions.*; import org.bson.types.*; | [
"com.mongodb.client",
"org.bson",
"org.bson.conversions",
"org.bson.types"
] | com.mongodb.client; org.bson; org.bson.conversions; org.bson.types; | 405,426 |
public FileOptions GetFileOptions() {
return this.fileOptions;
} | FileOptions function() { return this.fileOptions; } | /**
* The FileOptions are set for each function, so calling this returns the file options for the current
* function execution, which will vary from place to place.
* @return
*/ | The FileOptions are set for each function, so calling this returns the file options for the current function execution, which will vary from place to place | GetFileOptions | {
"repo_name": "sk89q/CommandHelper",
"path": "src/main/java/com/laytonsmith/core/environments/GlobalEnv.java",
"license": "mit",
"size": 16605
} | [
"com.laytonsmith.core.compiler.FileOptions"
] | import com.laytonsmith.core.compiler.FileOptions; | import com.laytonsmith.core.compiler.*; | [
"com.laytonsmith.core"
] | com.laytonsmith.core; | 467,595 |
public static <A> boolean eq(Iterator<? extends A> a, Iterator<? extends A> b) {
while (true) {
if (a.hasNext() && b.hasNext()) {
if (Equality.ne(a.next(), b.next())) {
return false;
}
} else return !(a.hasNext() || b.hasNext());
}
} | static <A> boolean function(Iterator<? extends A> a, Iterator<? extends A> b) { while (true) { if (a.hasNext() && b.hasNext()) { if (Equality.ne(a.next(), b.next())) { return false; } } else return !(a.hasNext() b.hasNext()); } } | /**
* Test if both iterators yield the same elements.
* This method is not defined in {@link com.entwinemedia.fn.Equality} because equality on
* iterators should not be defined generally. Iterators may be infinite so testing them for equality
* should be used with care.
*/ | Test if both iterators yield the same elements. This method is not defined in <code>com.entwinemedia.fn.Equality</code> because equality on iterators should not be defined generally. Iterators may be infinite so testing them for equality should be used with care | eq | {
"repo_name": "entwinemedia/functional",
"path": "src/main/java/com/entwinemedia/fn/data/Iterators.java",
"license": "apache-2.0",
"size": 3849
} | [
"com.entwinemedia.fn.Equality",
"java.util.Iterator"
] | import com.entwinemedia.fn.Equality; import java.util.Iterator; | import com.entwinemedia.fn.*; import java.util.*; | [
"com.entwinemedia.fn",
"java.util"
] | com.entwinemedia.fn; java.util; | 2,012,911 |
public void insert(List<XdsRepositoryItem> items, RepositoryRequestContext context) throws RepositoryException;
| void function(List<XdsRepositoryItem> items, RepositoryRequestContext context) throws RepositoryException; | /**
* Inserts a list of {@link XdsRepositoryItem}s. This is possible when a
* submission set includes multiple documents. All the repository item will
* be insert in an atomic mode, either all will be inserted or non will be
* inserted.
*
* @param items a List of {@link XdsRepositor... | Inserts a list of <code>XdsRepositoryItem</code>s. This is possible when a submission set includes multiple documents. All the repository item will be insert in an atomic mode, either all will be inserted or non will be inserted | insert | {
"repo_name": "jembi/openxds",
"path": "openxds-api/src/main/java/org/openhealthtools/openxds/repository/api/XdsRepositoryService.java",
"license": "apache-2.0",
"size": 4627
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,325,782 |
public synchronized void loadUrl(@NonNull String url) {
// Check if configured proxy is available
if (!mProxyUtils.isProxyReady(mActivity)) {
return;
}
if (mWebView != null) {
mWebView.loadUrl(url, mRequestHeaders);
}
} | synchronized void function(@NonNull String url) { if (!mProxyUtils.isProxyReady(mActivity)) { return; } if (mWebView != null) { mWebView.loadUrl(url, mRequestHeaders); } } | /**
* Loads the URL in the WebView. If the proxy settings
* are still initializing, then the URL will not load
* as it is necessary to have the settings initialized
* before a load occurs.
*
* @param url the non-null URL to attempt to load in
* the WebView.
*/ | Loads the URL in the WebView. If the proxy settings are still initializing, then the URL will not load as it is necessary to have the settings initialized before a load occurs | loadUrl | {
"repo_name": "eXGameStudio/Browser",
"path": "app/src/main/java/acr/browser/lightning/view/LightningView.java",
"license": "mpl-2.0",
"size": 43201
} | [
"android.support.annotation.NonNull"
] | import android.support.annotation.NonNull; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 509,212 |
public static String getContent(InputStream is, boolean notClose, String charsetName) {
StringBuilder sb = new StringBuilder(102400);
try {
BufferedReader br = new BufferedReader(new InputStreamReader(is, charsetName));
char[] cs = new char[102400];
int len = -1;
while ((len = br.read(cs)) != -1) {
... | static String function(InputStream is, boolean notClose, String charsetName) { StringBuilder sb = new StringBuilder(102400); try { BufferedReader br = new BufferedReader(new InputStreamReader(is, charsetName)); char[] cs = new char[102400]; int len = -1; while ((len = br.read(cs)) != -1) { sb.append(cs, 0, len); } } ca... | /**
* get the input stream content.
* @param is
* @param notClose
* @param charsetName
* @return
* @author <a href="mailto:iffiff1@gmail.com">Tyler Chen</a>
* @since 2015-2-6
*/ | get the input stream content | getContent | {
"repo_name": "tylerchen/tc-util-project",
"path": "src/main/java/org/iff/infra/util/StreamHelper.java",
"license": "mit",
"size": 3760
} | [
"java.io.BufferedReader",
"java.io.InputStream",
"java.io.InputStreamReader"
] | import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; | import java.io.*; | [
"java.io"
] | java.io; | 2,337,760 |
public ClientConfig setLabels(Set<String> labels) {
isNotNull(labels, "labels");
this.labels.clear();
this.labels.addAll(labels);
return this;
} | ClientConfig function(Set<String> labels) { isNotNull(labels, STR); this.labels.clear(); this.labels.addAll(labels); return this; } | /**
* Set labels for the client. Deletes old labels if added earlier.
*
* @param labels The labels to be set
* @return configured {@link com.hazelcast.client.config.ClientConfig} for chaining
*/ | Set labels for the client. Deletes old labels if added earlier | setLabels | {
"repo_name": "mesutcelik/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/client/config/ClientConfig.java",
"license": "apache-2.0",
"size": 37925
} | [
"com.hazelcast.internal.util.Preconditions",
"java.util.Set"
] | import com.hazelcast.internal.util.Preconditions; import java.util.Set; | import com.hazelcast.internal.util.*; import java.util.*; | [
"com.hazelcast.internal",
"java.util"
] | com.hazelcast.internal; java.util; | 1,806,907 |
public Container getContainer() {
return (source instanceof Container) ? (Container)source : null;
} | Container function() { return (source instanceof Container) ? (Container)source : null; } | /**
* Returns the originator of the event.
*
* @return the <code>Container</code> object that originated
* the event, or <code>null</code> if the object is not a
* <code>Container</code>.
*/ | Returns the originator of the event | getContainer | {
"repo_name": "jgaltidor/VarJ",
"path": "analyzed_libs/jdk1.6.0_06_src/java/awt/event/ContainerEvent.java",
"license": "mit",
"size": 4351
} | [
"java.awt.Container"
] | import java.awt.Container; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,535,875 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.