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
private Character getCharacterByIdx(int index) { if (index < 0) { return null; } else if (index < firstParty.getNumMembers()) { return firstParty.getMember(index); } else { index -= firstParty.getNumMembers(); return secondParty.getMember(index); } }
Character function(int index) { if (index < 0) { return null; } else if (index < firstParty.getNumMembers()) { return firstParty.getMember(index); } else { index -= firstParty.getNumMembers(); return secondParty.getMember(index); } }
/** * Return character with the given index. This index is * in the range -1..5. For -1, null is returned. * * @param index Index of the character to retrieve * @return The respective member of one of the parties or null */
Return character with the given index. This index is in the range -1..5. For -1, null is returned
getCharacterByIdx
{ "repo_name": "chock-mostlyharmless/mostlyharmless", "path": "eclipse/Bravery Run/src/de/badlegrunners/braveryrun/userinterface/Battle.java", "license": "bsd-3-clause", "size": 9567 }
[ "de.badlegrunners.braveryrun.gamelogic.Character" ]
import de.badlegrunners.braveryrun.gamelogic.Character;
import de.badlegrunners.braveryrun.gamelogic.*;
[ "de.badlegrunners.braveryrun" ]
de.badlegrunners.braveryrun;
2,816,383
@Override public Status metaDataChanged(DsEvent evnt, DsMetaData meta) { Status rval; if (shutdown) { LOG.error("metadataChanged(): shutting down"); rval = shutdownStatus; clientCleanup(); } else { rval = super.metaDataChanged(evnt, meta)...
Status function(DsEvent evnt, DsMetaData meta) { Status rval; if (shutdown) { LOG.error(STR); rval = shutdownStatus; clientCleanup(); } else { rval = super.metaDataChanged(evnt, meta); client.metaDataChanged((TableMetaData) evnt.getEventSource()); } return rval; }
/** * New metadata received for an object. This event fires when * processing an operation for a table that has not yet been seen. * <p> * It could also fire if the metadata were to change. * Going forward in GoldenGate for Big Data 12.2 and onward, dynamic * schema changes will be support...
New metadata received for an object. This event fires when processing an operation for a table that has not yet been seen. It could also fire if the metadata were to change. Going forward in GoldenGate for Big Data 12.2 and onward, dynamic schema changes will be supported
metaDataChanged
{ "repo_name": "johnneal3/bdglue2", "path": "bdg-core/src/main/java/bdglue2/source/gghadoop/GG12Handler.java", "license": "apache-2.0", "size": 11762 }
[ "oracle.goldengate.datasource.DsEvent", "oracle.goldengate.datasource.GGDataSource", "oracle.goldengate.datasource.meta.DsMetaData", "oracle.goldengate.datasource.meta.TableMetaData" ]
import oracle.goldengate.datasource.DsEvent; import oracle.goldengate.datasource.GGDataSource; import oracle.goldengate.datasource.meta.DsMetaData; import oracle.goldengate.datasource.meta.TableMetaData;
import oracle.goldengate.datasource.*; import oracle.goldengate.datasource.meta.*;
[ "oracle.goldengate.datasource" ]
oracle.goldengate.datasource;
1,049,265
public void removeInputPort() throws GraphException { List<DataPort> inputPorts = getInputPorts(); // Remove the last one. DataPort inputPort = inputPorts.get(inputPorts.size() - 1); removeInputPort(inputPort); }
void function() throws GraphException { List<DataPort> inputPorts = getInputPorts(); DataPort inputPort = inputPorts.get(inputPorts.size() - 1); removeInputPort(inputPort); }
/** * Removes the last input port. * * @throws GraphException */
Removes the last input port
removeInputPort
{ "repo_name": "gouravshenoy/airavata", "path": "modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/system/EndBlockNode.java", "license": "apache-2.0", "size": 8529 }
[ "java.util.List", "org.apache.airavata.workflow.model.graph.DataPort", "org.apache.airavata.workflow.model.graph.GraphException" ]
import java.util.List; import org.apache.airavata.workflow.model.graph.DataPort; import org.apache.airavata.workflow.model.graph.GraphException;
import java.util.*; import org.apache.airavata.workflow.model.graph.*;
[ "java.util", "org.apache.airavata" ]
java.util; org.apache.airavata;
1,238,540
SourceFolder addSourceFolder(@NotNull VirtualFile file, boolean isTestSource);
SourceFolder addSourceFolder(@NotNull VirtualFile file, boolean isTestSource);
/** * Adds a source or test source root under the content root. * * @param file the directory to add as a source root. * @param isTestSource true if the directory is added as a test source root. * @return the object representing the added root. */
Adds a source or test source root under the content root
addSourceFolder
{ "repo_name": "jexp/idea2", "path": "platform/lang-api/src/com/intellij/openapi/roots/ContentEntry.java", "license": "apache-2.0", "size": 4442 }
[ "com.intellij.openapi.vfs.VirtualFile", "org.jetbrains.annotations.NotNull" ]
import com.intellij.openapi.vfs.VirtualFile; import org.jetbrains.annotations.NotNull;
import com.intellij.openapi.vfs.*; import org.jetbrains.annotations.*;
[ "com.intellij.openapi", "org.jetbrains.annotations" ]
com.intellij.openapi; org.jetbrains.annotations;
2,814,595
public void testGetByObjectIdVersionCorrection() { final DynamicDelegatingConfigMaster master = registerDelegates(); final ConfigDocument doc1 = master.add(UID_SCHEME_1, new ConfigDocument(_cfg1Scheme1)); final ConfigDocument doc2 = master.add(UID_SCHEME_2, new ConfigDocument(_cfg2Scheme2)); final Con...
void function() { final DynamicDelegatingConfigMaster master = registerDelegates(); final ConfigDocument doc1 = master.add(UID_SCHEME_1, new ConfigDocument(_cfg1Scheme1)); final ConfigDocument doc2 = master.add(UID_SCHEME_2, new ConfigDocument(_cfg2Scheme2)); final ConfigDocument doc3 = master.add(UID_SCHEME_3, new Con...
/** * Tests getting documents by object id / version correction. The underlying * master in this case does not track versions. */
Tests getting documents by object id / version correction. The underlying master in this case does not track versions
testGetByObjectIdVersionCorrection
{ "repo_name": "McLeodMoores/starling", "path": "projects/master/src/test/java/com/opengamma/master/config/impl/DynamicDelegatingConfigMasterTest.java", "license": "apache-2.0", "size": 49632 }
[ "com.opengamma.id.VersionCorrection", "com.opengamma.master.config.ConfigDocument", "org.testng.Assert", "org.threeten.bp.Instant" ]
import com.opengamma.id.VersionCorrection; import com.opengamma.master.config.ConfigDocument; import org.testng.Assert; import org.threeten.bp.Instant;
import com.opengamma.id.*; import com.opengamma.master.config.*; import org.testng.*; import org.threeten.bp.*;
[ "com.opengamma.id", "com.opengamma.master", "org.testng", "org.threeten.bp" ]
com.opengamma.id; com.opengamma.master; org.testng; org.threeten.bp;
2,655,967
public Builder setAutomaticEntriesInfoplistInput(Artifact automaticEntriesInfoplist) { this.automaticEntriesInfoplistInput = automaticEntriesInfoplist; return this; } /** * Adds any info plists specified in the given rule's {@code infoplist} or {@code infoplists} * attribute as w...
Builder function(Artifact automaticEntriesInfoplist) { this.automaticEntriesInfoplistInput = automaticEntriesInfoplist; return this; } /** * Adds any info plists specified in the given rule's {@code infoplist} or {@code infoplists} * attribute as well as from its {@code options} as inputs to this bundle's {@code Info.p...
/** * Adds an artifact representing an {@code Info.plist} that contains automatic entries * generated by xcode. */
Adds an artifact representing an Info.plist that contains automatic entries generated by xcode
setAutomaticEntriesInfoplistInput
{ "repo_name": "hhclam/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/objc/Bundling.java", "license": "apache-2.0", "size": 19706 }
[ "com.google.devtools.build.lib.actions.Artifact" ]
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.actions.*;
[ "com.google.devtools" ]
com.google.devtools;
2,486,421
protected void execute(HttpServletRequest request, HttpServletResponse response, RequestContext context) throws Exception { // process the request LOGGER.finer("Returning openSearchDescription XML ...."); String xml = readXml(request,context...
void function(HttpServletRequest request, HttpServletResponse response, RequestContext context) throws Exception { LOGGER.finer(STR); String xml = readXml(request,context); String contentType = STR; LOGGER.finer(STR+xml); writeCharacterResponse(response,xml,"UTF-8",contentType); }
/** * Executes a request. * @param request the servlet request * @param response the servlet response * @param context the request context * @throws Exception if an exception occurs */
Executes a request
execute
{ "repo_name": "usgin/usgin-geoportal", "path": "src/com/esri/gpt/control/rest/OpenSearchDescriptionServlet.java", "license": "apache-2.0", "size": 4602 }
[ "com.esri.gpt.framework.context.RequestContext", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import com.esri.gpt.framework.context.RequestContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import com.esri.gpt.framework.context.*; import javax.servlet.http.*;
[ "com.esri.gpt", "javax.servlet" ]
com.esri.gpt; javax.servlet;
2,245,308
static <M, P1, P2, P3, P4, P5> TypedModeledFramework5<M, P1, P2, P3, P4, P5> from(ModeledFrameworkBuilder<M> frameworkBuilder, ModelSpecBuilder<M> modelSpecBuilder, String pathWithIds) { TypedModelSpec5<M, P1, P2, P3, P4, P5> typedModelSpec = TypedModelSpec5.from(modelSpecBuilder, pathWithIds); ...
static <M, P1, P2, P3, P4, P5> TypedModeledFramework5<M, P1, P2, P3, P4, P5> from(ModeledFrameworkBuilder<M> frameworkBuilder, ModelSpecBuilder<M> modelSpecBuilder, String pathWithIds) { TypedModelSpec5<M, P1, P2, P3, P4, P5> typedModelSpec = TypedModelSpec5.from(modelSpecBuilder, pathWithIds); return (client, p1, p2, ...
/** * Return a new TypedModeledFramework using the given modeled framework builder, model spec builder and a path with ids. * When {@link #resolved(AsyncCuratorFramework, Object, Object, Object, Object, Object)} is called the actual ModeledFramework is generated with the * resolved model spec and resolve...
Return a new TypedModeledFramework using the given modeled framework builder, model spec builder and a path with ids. When <code>#resolved(AsyncCuratorFramework, Object, Object, Object, Object, Object)</code> is called the actual ModeledFramework is generated with the resolved model spec and resolved path
from
{ "repo_name": "mosoft521/curator", "path": "curator-x-async/src/main/java/org/apache/curator/x/async/modeled/typed/TypedModeledFramework5.java", "license": "apache-2.0", "size": 3205 }
[ "org.apache.curator.x.async.modeled.ModelSpecBuilder", "org.apache.curator.x.async.modeled.ModeledFrameworkBuilder" ]
import org.apache.curator.x.async.modeled.ModelSpecBuilder; import org.apache.curator.x.async.modeled.ModeledFrameworkBuilder;
import org.apache.curator.x.async.modeled.*;
[ "org.apache.curator" ]
org.apache.curator;
1,173,445
public EnvironmentInstanceDto toDto() { EnvironmentInstanceDto envInstanceDto = new EnvironmentInstanceDto(); envInstanceDto.setEnvironmentInstanceName(getName()); envInstanceDto.setDescription(this.getDescription()); envInstanceDto.setBlueprintName(this.getBlueprintName()); ...
EnvironmentInstanceDto function() { EnvironmentInstanceDto envInstanceDto = new EnvironmentInstanceDto(); envInstanceDto.setEnvironmentInstanceName(getName()); envInstanceDto.setDescription(this.getDescription()); envInstanceDto.setBlueprintName(this.getBlueprintName()); if (this.getStatus() != null) { envInstanceDto.s...
/** * the dto specification. * * @return the dto */
the dto specification
toDto
{ "repo_name": "hmunfru/fiware-paas", "path": "model/src/main/java/com/telefonica/euro_iaas/paasmanager/model/EnvironmentInstance.java", "license": "apache-2.0", "size": 11953 }
[ "com.telefonica.euro_iaas.paasmanager.model.dto.EnvironmentInstanceDto", "com.telefonica.euro_iaas.paasmanager.model.dto.TierInstanceDto", "java.util.ArrayList", "java.util.List" ]
import com.telefonica.euro_iaas.paasmanager.model.dto.EnvironmentInstanceDto; import com.telefonica.euro_iaas.paasmanager.model.dto.TierInstanceDto; import java.util.ArrayList; import java.util.List;
import com.telefonica.euro_iaas.paasmanager.model.dto.*; import java.util.*;
[ "com.telefonica.euro_iaas", "java.util" ]
com.telefonica.euro_iaas; java.util;
291,266
public void startShell() throws IOException { synchronized (this) { if (flag_closed) throw new IOException("This session is closed."); if (flag_execution_started) throw new IOException("A remote execution has already started."); ...
void function() throws IOException { synchronized (this) { if (flag_closed) throw new IOException(STR); if (flag_execution_started) throw new IOException(STR); flag_execution_started = true; } cm.requestShell(cn); }
/** * Start a shell on the remote machine. * * @throws IOException */
Start a shell on the remote machine
startShell
{ "repo_name": "MonALISA-CIT/fdt", "path": "src/ch/ethz/ssh2/Session.java", "license": "apache-2.0", "size": 16087 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,106,565
private FlowToken finishEndUserDefinedEnvironment(final UserDefinedEnvironment environment) throws SnuggleParseException { int endEndIndex = position; ErrorToken errorToken = makeSubstitutionAndRewind( startTokenIndex, endEndIndex, environment.getEndDefinitionSlice().extract());...
FlowToken function(final UserDefinedEnvironment environment) throws SnuggleParseException { int endEndIndex = position; ErrorToken errorToken = makeSubstitutionAndRewind( startTokenIndex, endEndIndex, environment.getEndDefinitionSlice().extract()); return errorToken == null ? readNextToken() : errorToken; }
/** * Finishes the handling of the end of a user-defined environment. This replaces the * <tt>\\end{envName}</tt> with the appropriate substitution and reparses. * * <p>PRE-CONDITION: position will point to the character immediately after * <tt>\\begin{envName}</tt>. */
Finishes the handling of the end of a user-defined environment. This replaces the \\end{envName} with the appropriate substitution and reparses. \\begin{envName}
finishEndUserDefinedEnvironment
{ "repo_name": "axkr/symja_android_library", "path": "symja_android_library/matheclipse-external/src/main/java/uk/ac/ed/ph/snuggletex/internal/LaTeXTokeniser.java", "license": "gpl-3.0", "size": 99213 }
[ "uk.ac.ed.ph.snuggletex.definitions.UserDefinedEnvironment", "uk.ac.ed.ph.snuggletex.tokens.ErrorToken", "uk.ac.ed.ph.snuggletex.tokens.FlowToken" ]
import uk.ac.ed.ph.snuggletex.definitions.UserDefinedEnvironment; import uk.ac.ed.ph.snuggletex.tokens.ErrorToken; import uk.ac.ed.ph.snuggletex.tokens.FlowToken;
import uk.ac.ed.ph.snuggletex.definitions.*; import uk.ac.ed.ph.snuggletex.tokens.*;
[ "uk.ac.ed" ]
uk.ac.ed;
1,551,983
default Optional<V> get(K key, QueryOptions opts) throws IOException { opts = opts.withStart(0).withLimit(2); List<V> results; try { results = getSource(keyPredicate(key), opts).read().toList(); } catch (QueryParseException e) { throw new IOException("Unexpected QueryParseException during ...
default Optional<V> get(K key, QueryOptions opts) throws IOException { opts = opts.withStart(0).withLimit(2); List<V> results; try { results = getSource(keyPredicate(key), opts).read().toList(); } catch (QueryParseException e) { throw new IOException(STR, e); } catch (OrmException e) { throw new IOException(e); } switc...
/** * Get a single document from the index. * * @param key document key. * @param opts query options. Options that do not make sense in the context of a single document, * such as start, will be ignored. * @return a single document if present. * @throws IOException */
Get a single document from the index
get
{ "repo_name": "gerrit-review/gerrit", "path": "java/com/google/gerrit/index/Index.java", "license": "apache-2.0", "size": 4567 }
[ "com.google.gerrit.index.query.QueryParseException", "com.google.gwtorm.server.OrmException", "java.io.IOException", "java.util.List", "java.util.Optional" ]
import com.google.gerrit.index.query.QueryParseException; import com.google.gwtorm.server.OrmException; import java.io.IOException; import java.util.List; import java.util.Optional;
import com.google.gerrit.index.query.*; import com.google.gwtorm.server.*; import java.io.*; import java.util.*;
[ "com.google.gerrit", "com.google.gwtorm", "java.io", "java.util" ]
com.google.gerrit; com.google.gwtorm; java.io; java.util;
2,555,467
public void closedUpdate() { final List<Packet> packets = new ArrayList<>(); collectHotbarSlotChange(packets); for (int i = EQUIPMENT_START_INDEX; i <= OFFHAND_SLOT_INDEX; i++) { collectSlotChangeMessages(packets, i, true); } if (!packets.isEmpty()) { ...
void function() { final List<Packet> packets = new ArrayList<>(); collectHotbarSlotChange(packets); for (int i = EQUIPMENT_START_INDEX; i <= OFFHAND_SLOT_INDEX; i++) { collectSlotChangeMessages(packets, i, true); } if (!packets.isEmpty()) { getPlayer().getConnection().send(packets); } }
/** * Update for changes while a other {@link ClientContainer} is opened. */
Update for changes while a other <code>ClientContainer</code> is opened
closedUpdate
{ "repo_name": "LanternPowered/LanternServer", "path": "src/main/java/org/lanternpowered/server/inventory/client/PlayerClientContainer.java", "license": "mit", "size": 7411 }
[ "java.util.ArrayList", "java.util.List", "org.lanternpowered.server.network.packet.Packet" ]
import java.util.ArrayList; import java.util.List; import org.lanternpowered.server.network.packet.Packet;
import java.util.*; import org.lanternpowered.server.network.packet.*;
[ "java.util", "org.lanternpowered.server" ]
java.util; org.lanternpowered.server;
780,810
void getPositionRelativeToContainer(View containerView, int[] position);
void getPositionRelativeToContainer(View containerView, int[] position);
/** * Calculate the relative position wrt to the given container view. * @param containerView The container view to be used. * @param position The position array to be used for returning the calculated position. */
Calculate the relative position wrt to the given container view
getPositionRelativeToContainer
{ "repo_name": "mogoweb/365browser", "path": "app/src/main/java/org/chromium/chrome/browser/toolbar/Toolbar.java", "license": "apache-2.0", "size": 4345 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
457,839
private String annotationToString() { StringBuilder sb = new StringBuilder("@").append(annotationType().getName()).append("("); Iterator<Method> iterator = AnnotationUtils.getAttributeMethods(annotationType()).iterator(); while (iterator.hasNext()) { Method attributeMethod = iterator.next(); sb.append(a...
String function() { StringBuilder sb = new StringBuilder("@").append(annotationType().getName()).append("("); Iterator<Method> iterator = AnnotationUtils.getAttributeMethods(annotationType()).iterator(); while (iterator.hasNext()) { Method attributeMethod = iterator.next(); sb.append(attributeMethod.getName()); sb.appe...
/** * See {@link Annotation#toString()} for guidelines on the recommended format. */
See <code>Annotation#toString()</code> for guidelines on the recommended format
annotationToString
{ "repo_name": "boggad/jdk9-sample", "path": "sample-catalog/spring-jdk9/src/spring.core/org/springframework/core/annotation/SynthesizedAnnotationInvocationHandler.java", "license": "mit", "size": 7993 }
[ "java.lang.reflect.Method", "java.util.Iterator" ]
import java.lang.reflect.Method; import java.util.Iterator;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
1,329,799
return DefaultSetHolder.DEFAULT_STOP_SET; } private static class DefaultSetHolder { static final CharArraySet DEFAULT_STOP_SET; static { try { DEFAULT_STOP_SET = WordlistLoader.getSnowballWordSet(IOUtils.getDecodingReader(SnowballFilter.class, DEFAULT_STOPWORD_FILE, IOUtils...
return DefaultSetHolder.DEFAULT_STOP_SET; } private static class DefaultSetHolder { static final CharArraySet DEFAULT_STOP_SET; static { try { DEFAULT_STOP_SET = WordlistLoader.getSnowballWordSet(IOUtils.getDecodingReader(SnowballFilter.class, DEFAULT_STOPWORD_FILE, IOUtils.CHARSET_UTF_8), Version.LUCENE_CURRENT); } ca...
/** * Returns an unmodifiable instance of the default stop words set. * @return default stop words set. */
Returns an unmodifiable instance of the default stop words set
getDefaultStopSet
{ "repo_name": "fogbeam/Heceta_solr", "path": "lucene/analysis/common/src/java/org/apache/lucene/analysis/da/DanishAnalyzer.java", "license": "apache-2.0", "size": 5087 }
[ "java.io.IOException", "java.io.Reader", "org.apache.lucene.analysis.Analyzer", "org.apache.lucene.analysis.core.LowerCaseFilter", "org.apache.lucene.analysis.core.StopFilter", "org.apache.lucene.analysis.snowball.SnowballFilter", "org.apache.lucene.analysis.standard.StandardFilter", "org.apache.lucen...
import java.io.IOException; import java.io.Reader; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.core.LowerCaseFilter; import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.snowball.SnowballFilter; import org.apache.lucene.analysis.standard.StandardFilter; ...
import java.io.*; import org.apache.lucene.analysis.*; import org.apache.lucene.analysis.core.*; import org.apache.lucene.analysis.snowball.*; import org.apache.lucene.analysis.standard.*; import org.apache.lucene.analysis.util.*; import org.apache.lucene.util.*;
[ "java.io", "org.apache.lucene" ]
java.io; org.apache.lucene;
502,975
File f = new File("Font\\LAIKA.otf"); FileInputStream in = new FileInputStream(f); font = Font.createFont(Font.TRUETYPE_FONT, in); } // table referencing notes data static String[] notes ={"B","C","Db","D","Eb","E","F","Gb","G","Ab","Bb","A"};
File f = new File(STR); FileInputStream in = new FileInputStream(f); font = Font.createFont(Font.TRUETYPE_FONT, in); } static String[] notes ={"B","C","Db","D","Eb","E","F","Gb","G","Ab","Bb","A"};
/** * this method create the static font * @throws Exception */
this method create the static font
createFont
{ "repo_name": "kara71/KaraOK", "path": "Content.java", "license": "gpl-2.0", "size": 3504 }
[ "java.awt.Font", "java.io.File", "java.io.FileInputStream" ]
import java.awt.Font; import java.io.File; import java.io.FileInputStream;
import java.awt.*; import java.io.*;
[ "java.awt", "java.io" ]
java.awt; java.io;
2,071,281
public GutterIconInfo addLineTrackingIcon(int line, Icon icon, String tip) throws BadLocationException { int offs = textArea.getLineStartOffset(line); return addOffsetTrackingIcon(offs, icon, tip); }
GutterIconInfo function(int line, Icon icon, String tip) throws BadLocationException { int offs = textArea.getLineStartOffset(line); return addOffsetTrackingIcon(offs, icon, tip); }
/** * Adds an icon that tracks an offset in the document, and is displayed * adjacent to the line numbers. This is useful for marking things such * as source code errors. * * @param line The line to track (zero-based). * @param icon The icon to display. This should be small (say 16x16). * @param ...
Adds an icon that tracks an offset in the document, and is displayed adjacent to the line numbers. This is useful for marking things such as source code errors
addLineTrackingIcon
{ "repo_name": "fanruan/finereport-design", "path": "designer_base/src/com/fr/design/gui/syntax/ui/rtextarea/Gutter.java", "license": "gpl-3.0", "size": 26284 }
[ "javax.swing.Icon", "javax.swing.text.BadLocationException" ]
import javax.swing.Icon; import javax.swing.text.BadLocationException;
import javax.swing.*; import javax.swing.text.*;
[ "javax.swing" ]
javax.swing;
2,129,734
protected static void processRows(final Element element, final List<FormRowIFace> cellRows, final DBTableInfo tableinfo) { Element rowsElement = (Element)element.selectSingleNode("rows"); if (rowsEleme...
static void function(final Element element, final List<FormRowIFace> cellRows, final DBTableInfo tableinfo) { Element rowsElement = (Element)element.selectSingleNode("rows"); if (rowsElement != null) { byte rowNumber = 0; for ( Iterator<?> i = rowsElement.elementIterator( "row" ); i.hasNext(); ) { Element rowElement = ...
/** * Processes all the rows * @param element the parent DOM element of the rows * @param cellRows the list the rows are to be added to */
Processes all the rows
processRows
{ "repo_name": "specify/specify6", "path": "src/edu/ku/brc/af/ui/forms/persist/ViewLoader.java", "license": "gpl-2.0", "size": 72771 }
[ "edu.ku.brc.af.core.db.DBTableInfo", "edu.ku.brc.helpers.XMLHelper", "java.util.Date", "java.util.Iterator", "java.util.List", "org.dom4j.Element" ]
import edu.ku.brc.af.core.db.DBTableInfo; import edu.ku.brc.helpers.XMLHelper; import java.util.Date; import java.util.Iterator; import java.util.List; import org.dom4j.Element;
import edu.ku.brc.af.core.db.*; import edu.ku.brc.helpers.*; import java.util.*; import org.dom4j.*;
[ "edu.ku.brc", "java.util", "org.dom4j" ]
edu.ku.brc; java.util; org.dom4j;
1,284,325
private void notifyErrorToAllWatchers(NdefError error) { if (mWatchIds.size() != 0) mClient.onError(error); }
void function(NdefError error) { if (mWatchIds.size() != 0) mClient.onError(error); }
/** * Notify all active watchers that an error happened when trying to read the tag coming nearby. */
Notify all active watchers that an error happened when trying to read the tag coming nearby
notifyErrorToAllWatchers
{ "repo_name": "scheib/chromium", "path": "services/device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java", "license": "bsd-3-clause", "size": 20977 }
[ "org.chromium.device.mojom.NdefError" ]
import org.chromium.device.mojom.NdefError;
import org.chromium.device.mojom.*;
[ "org.chromium.device" ]
org.chromium.device;
411,171
public String getServiceDateRange() { String ret = "0"; java.util.Date dt = null; try { java.text.DateFormat formatter = new java.text.SimpleDateFormat( "yyyyMMdd"); dt = formatter.parse(this.serviceDate); } catch (Exception e) { MiscUtils.getLogger().error("Error", e);...
String function() { String ret = "0"; java.util.Date dt = null; try { java.text.DateFormat formatter = new java.text.SimpleDateFormat( STR); dt = formatter.parse(this.serviceDate); } catch (Exception e) { MiscUtils.getLogger().error("Error", e); } oscar.util.DateUtils ut = new oscar.util.DateUtils(); long daysOld = Dat...
/** * Returns an int value representing the date range of a bill's age in days * since its initial service date * @return int */
Returns an int value representing the date range of a bill's age in days since its initial service date
getServiceDateRange
{ "repo_name": "hexbinary/landing", "path": "src/main/java/oscar/entities/MSPBill.java", "license": "gpl-2.0", "size": 13630 }
[ "java.util.Date", "org.oscarehr.util.MiscUtils" ]
import java.util.Date; import org.oscarehr.util.MiscUtils;
import java.util.*; import org.oscarehr.util.*;
[ "java.util", "org.oscarehr.util" ]
java.util; org.oscarehr.util;
2,298,567
public CsvConfiguration suggestCsvConfiguration() throws IllegalStateException { final byte[] sample = getSampleBuffer(); final String encoding = suggestEncoding(sample); return suggestCsvConfiguration(sample, encoding); }
CsvConfiguration function() throws IllegalStateException { final byte[] sample = getSampleBuffer(); final String encoding = suggestEncoding(sample); return suggestCsvConfiguration(sample, encoding); }
/** * Auto-detects the {@link CsvConfiguration} of a CSV style data file. * * @return * @throws IllegalStateException * if an error occurs during auto-detection */
Auto-detects the <code>CsvConfiguration</code> of a CSV style data file
suggestCsvConfiguration
{ "repo_name": "anandswarupv/DataCleaner", "path": "engine/utils/src/main/java/org/datacleaner/util/CsvConfigurationDetection.java", "license": "lgpl-3.0", "size": 9967 }
[ "org.apache.metamodel.csv.CsvConfiguration" ]
import org.apache.metamodel.csv.CsvConfiguration;
import org.apache.metamodel.csv.*;
[ "org.apache.metamodel" ]
org.apache.metamodel;
218,306
@SuppressWarnings("unchecked") public <N, V> List<HColumn<N, V>> getColumns(Keyspace ko, Object columnFamily, Object key, Set<String> columnNames, Serializer<N> nameSerializer, Serializer<V> valueSerializer) throws Exception { if (db_logger.isInfoEnabled()) { ...
@SuppressWarnings(STR) <N, V> List<HColumn<N, V>> function(Keyspace ko, Object columnFamily, Object key, Set<String> columnNames, Serializer<N> nameSerializer, Serializer<V> valueSerializer) throws Exception { if (db_logger.isInfoEnabled()) { db_logger.info(STR + columnFamily + STR + key + STR + columnNames); } SliceQu...
/** * Gets the columns. * * @param keyspace * the keyspace * @param columnFamily * the column family * @param key * the key * @param columnNames * the column names * @return columns * @throws Exception * ...
Gets the columns
getColumns
{ "repo_name": "jendap/usergrid-stack", "path": "core/src/main/java/org/usergrid/persistence/cassandra/CassandraService.java", "license": "apache-2.0", "size": 80319 }
[ "java.nio.ByteBuffer", "java.util.ArrayList", "java.util.List", "java.util.Set", "me.prettyprint.hector.api.Keyspace", "me.prettyprint.hector.api.Serializer", "me.prettyprint.hector.api.beans.ColumnSlice", "me.prettyprint.hector.api.beans.HColumn", "me.prettyprint.hector.api.factory.HFactory", "me...
import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; import java.util.Set; import me.prettyprint.hector.api.Keyspace; import me.prettyprint.hector.api.Serializer; import me.prettyprint.hector.api.beans.ColumnSlice; import me.prettyprint.hector.api.beans.HColumn; import me.prettyprint.hector.ap...
import java.nio.*; import java.util.*; import me.prettyprint.hector.api.*; import me.prettyprint.hector.api.beans.*; import me.prettyprint.hector.api.factory.*; import me.prettyprint.hector.api.query.*;
[ "java.nio", "java.util", "me.prettyprint.hector" ]
java.nio; java.util; me.prettyprint.hector;
2,809,036
public void processAllocation(RoutingAllocation allocation) { for (String ignoreNode : ignoreNodes) { allocation.addIgnoreShardForNode(shardId, ignoreNode); } } } static class NodeEntry<T> { private final String nodeId; private boolea...
void function(RoutingAllocation allocation) { for (String ignoreNode : ignoreNodes) { allocation.addIgnoreShardForNode(shardId, ignoreNode); } } } static class NodeEntry<T> { private final String nodeId; private boolean fetching; private T value; private boolean valueSet; private Throwable failure; public NodeEntry(Str...
/** * Process any changes needed to the allocation based on this fetch result. */
Process any changes needed to the allocation based on this fetch result
processAllocation
{ "repo_name": "weipinghe/elasticsearch", "path": "core/src/main/java/org/elasticsearch/gateway/AsyncShardFetch.java", "license": "apache-2.0", "size": 17264 }
[ "org.elasticsearch.cluster.routing.allocation.RoutingAllocation" ]
import org.elasticsearch.cluster.routing.allocation.RoutingAllocation;
import org.elasticsearch.cluster.routing.allocation.*;
[ "org.elasticsearch.cluster" ]
org.elasticsearch.cluster;
2,802,058
public List<String> getRolesForPath(String path) { buildTreeWithCacheCheck(); if (getSecureNodes().containsKey(path)) return getSecureNodes().get(path).getRequiredRoles(); return null; }
List<String> function(String path) { buildTreeWithCacheCheck(); if (getSecureNodes().containsKey(path)) return getSecureNodes().get(path).getRequiredRoles(); return null; }
/** * find out requires roles for given path * * @param path * @return */
find out requires roles for given path
getRolesForPath
{ "repo_name": "0x006EA1E5/oo6", "path": "src/main/java/org/otherobjects/cms/site/NavigationServiceImpl.java", "license": "gpl-3.0", "size": 11732 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,690,362
public int breakScript(String fileName, int lineNumber, PyObject locals) { final int ACTION_STOP = 0; final int ACTION_STEP = 1; final int ACTION_CONTINUE = 2; final int ACTION_STEPINTO = 3; try { mLocals = locals; // ...
int function(String fileName, int lineNumber, PyObject locals) { final int ACTION_STOP = 0; final int ACTION_STEP = 1; final int ACTION_CONTINUE = 2; final int ACTION_STEPINTO = 3; try { mLocals = locals; File file = new File(fileName); if (file.exists()) { String filePathName = fileName; try { filePathName = file.getC...
/** * breakScript method is called from the Python Script in order to stop its execution * * @param lineNumber script line number * @param locals giving the local variables if any * @return <ul> * <li>0 if script execution must be stopped</li> * <li>1 if sc...
breakScript method is called from the Python Script in order to stop its execution
breakScript
{ "repo_name": "qspin/qtaste", "path": "kernel/src/main/java/com/qspin/qtaste/testsuite/impl/JythonTestScript.java", "license": "lgpl-3.0", "size": 65709 }
[ "com.qspin.qtaste.debug.Breakpoint", "java.io.File", "javax.script.ScriptException", "org.python.core.PyObject" ]
import com.qspin.qtaste.debug.Breakpoint; import java.io.File; import javax.script.ScriptException; import org.python.core.PyObject;
import com.qspin.qtaste.debug.*; import java.io.*; import javax.script.*; import org.python.core.*;
[ "com.qspin.qtaste", "java.io", "javax.script", "org.python.core" ]
com.qspin.qtaste; java.io; javax.script; org.python.core;
2,427,965
@ApiModelProperty(example = "null", value = "") public String getFriendlyName() { return friendlyName; }
@ApiModelProperty(example = "null", value = "") String function() { return friendlyName; }
/** * Get friendlyName * @return friendlyName **/
Get friendlyName
getFriendlyName
{ "repo_name": "ixaris/ope-applicationclients", "path": "java-client/src/main/java/com/ixaris/ope/applications/client/model/ExternalAccountFilter.java", "license": "mit", "size": 4727 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
768,226
public final boolean isActive() throws BuildException { return CUtil.isActive(getProject(), ifCond, unlessCond); }
final boolean function() throws BuildException { return CUtil.isActive(getProject(), ifCond, unlessCond); }
/** * Returns true if the define's if and unless conditions (if any) are * satisfied. * * @exception BuildException * throws build exception if name is not set */
Returns true if the define's if and unless conditions (if any) are satisfied
isActive
{ "repo_name": "cniweb/ant-contrib", "path": "cpptasks/src/main/java/net/sf/antcontrib/cpptasks/VersionInfo.java", "license": "apache-2.0", "size": 20040 }
[ "org.apache.tools.ant.BuildException" ]
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.*;
[ "org.apache.tools" ]
org.apache.tools;
764,214
protected void destroyMBeans(ContextResourceLink resourceLink) throws Exception { // Destroy the MBean for the ContextResourceLink itself if (debug >= 3) { log("Destroying MBean for ContextResourceLink " + resourceLink); } MBeanUtils.destroyMBean(resourceLink); }
void function(ContextResourceLink resourceLink) throws Exception { if (debug >= 3) { log(STR + resourceLink); } MBeanUtils.destroyMBean(resourceLink); }
/** * Deregister the MBeans for the specified ContextResourceLink entry. * * @param resourceLink ContextResourceLink for which to destroy MBeans * @throws Exception if an exception is thrown during MBean destruction */
Deregister the MBeans for the specified ContextResourceLink entry
destroyMBeans
{ "repo_name": "NorthFacing/step-by-Java", "path": "fra-tomcat/fra-tomcat-analysis/source/book01/HowTomcatWorks/src/org/apache/catalina/mbeans/ServerLifecycleListener.java", "license": "gpl-2.0", "size": 51276 }
[ "org.apache.catalina.deploy.ContextResourceLink" ]
import org.apache.catalina.deploy.ContextResourceLink;
import org.apache.catalina.deploy.*;
[ "org.apache.catalina" ]
org.apache.catalina;
1,587,810
public void setBulkUploads(final Set<BulkUpload> bulkUpload) { this.bulkUploads = bulkUpload; }
void function(final Set<BulkUpload> bulkUpload) { this.bulkUploads = bulkUpload; }
/** * Set the value related to the column: bulkUpload. * @param bulkUpload the bulkUpload value you wish to set */
Set the value related to the column: bulkUpload
setBulkUploads
{ "repo_name": "servinglynk/hmis-lynk-open-source", "path": "hmis-model-v2017/src/main/java/com/servinglynk/hmis/warehouse/model/v2017/Export.java", "license": "mpl-2.0", "size": 53361 }
[ "com.servinglynk.hmis.warehouse.model.base.BulkUpload", "java.util.Set" ]
import com.servinglynk.hmis.warehouse.model.base.BulkUpload; import java.util.Set;
import com.servinglynk.hmis.warehouse.model.base.*; import java.util.*;
[ "com.servinglynk.hmis", "java.util" ]
com.servinglynk.hmis; java.util;
455,213
public static MatchResult assertMatchesRegex( String expectedRegex, String actual) { return assertMatchesRegex(null, expectedRegex, actual); } /** * Asserts that {@code expectedRegex} matches any substring of {@code actual}
static MatchResult function( String expectedRegex, String actual) { return assertMatchesRegex(null, expectedRegex, actual); } /** * Asserts that {@code expectedRegex} matches any substring of {@code actual}
/** * Variant of {@link #assertMatchesRegex(String,String,String)} using a * generic message. */
Variant of <code>#assertMatchesRegex(String,String,String)</code> using a generic message
assertMatchesRegex
{ "repo_name": "zorzella/test-libraries-for-java", "path": "src/main/java/com/google/common/testing/junit4/JUnitAsserts.java", "license": "apache-2.0", "size": 8069 }
[ "java.util.regex.MatchResult" ]
import java.util.regex.MatchResult;
import java.util.regex.*;
[ "java.util" ]
java.util;
1,287,105
Map<MetricName, ? extends Metric> metrics();
Map<MetricName, ? extends Metric> metrics();
/** * Return the metrics kept by the consumer * @return metrics */
Return the metrics kept by the consumer
metrics
{ "repo_name": "prasannapramod/apex-malhar", "path": "kafka/kafka-common/src/main/java/org/apache/apex/malhar/kafka/AbstractKafkaConsumer.java", "license": "apache-2.0", "size": 3791 }
[ "java.util.Map", "org.apache.kafka.common.Metric", "org.apache.kafka.common.MetricName" ]
import java.util.Map; import org.apache.kafka.common.Metric; import org.apache.kafka.common.MetricName;
import java.util.*; import org.apache.kafka.common.*;
[ "java.util", "org.apache.kafka" ]
java.util; org.apache.kafka;
1,742,734
protected synchronized void parse(short[] inBuf, int inBufLen) throws IOException { if (log.isLoggable(Level.FINEST)) { StringBuffer inBufStr = new StringBuffer("parsing buffer: "); for (int i = 0; i < inBufLen; i++) { // prepending the hex digit with 0x prefix for ...
synchronized void function(short[] inBuf, int inBufLen) throws IOException { if (log.isLoggable(Level.FINEST)) { StringBuffer inBufStr = new StringBuffer(STR); for (int i = 0; i < inBufLen; i++) { inBufStr.append("0x").append(Integer.toHexString(inBuf[i])) .append(STR); } log.finest(inBufStr.toString()); } else if (log...
/** * This method takes an input buffer and executes the appropriate * tn3270 commands and orders. */
This method takes an input buffer and executes the appropriate tn3270 commands and orders
parse
{ "repo_name": "AlanKrueger/freehost3270", "path": "client/src/main/java/net/sf/freehost3270/client/RWTn3270StreamParser.java", "license": "lgpl-2.1", "size": 58825 }
[ "java.io.IOException", "java.util.logging.Level" ]
import java.io.IOException; import java.util.logging.Level;
import java.io.*; import java.util.logging.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,543,475
@Experimental(Kind.SCHEMAS) <T> OutputReceiver<Row> getRowReceiver(TupleTag<T> tag); } ///////////////////////////////////////////////////////////////////////////// @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.PARAMETER}) @Experimental(Kind.STATE) pu...
@Experimental(Kind.SCHEMAS) <T> OutputReceiver<Row> getRowReceiver(TupleTag<T> tag); } @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.PARAMETER}) @Experimental(Kind.STATE) public @interface StateId { String value(); } @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementTy...
/** * Returns a {@link OutputReceiver} for publishing {@link Row} objects to the given tag. * * <p>The {@link PCollection} representing this tag must have a schema registered in order to * call this function. */
Returns a <code>OutputReceiver</code> for publishing <code>Row</code> objects to the given tag. The <code>PCollection</code> representing this tag must have a schema registered in order to call this function
getRowReceiver
{ "repo_name": "RyanSkraba/beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/DoFn.java", "license": "apache-2.0", "size": 42945 }
[ "com.google.auto.value.AutoValue", "java.lang.annotation.ElementType", "java.lang.annotation.Retention", "java.lang.annotation.RetentionPolicy", "java.lang.annotation.Target", "org.apache.beam.sdk.annotations.Experimental", "org.apache.beam.sdk.values.Row", "org.apache.beam.sdk.values.TupleTag", "or...
import com.google.auto.value.AutoValue; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.apache.beam.sdk.annotations.Experimental; import org.apache.beam.sdk.values.Row; import org.apache.beam.sdk....
import com.google.auto.value.*; import java.lang.annotation.*; import org.apache.beam.sdk.annotations.*; import org.apache.beam.sdk.values.*; import org.joda.time.*;
[ "com.google.auto", "java.lang", "org.apache.beam", "org.joda.time" ]
com.google.auto; java.lang; org.apache.beam; org.joda.time;
2,519,325
public static HashFunction hmacSha256(Key key) { return new MacHashFunction("HmacSHA256", key, hmacToString("hmacSha256", key)); }
static HashFunction function(Key key) { return new MacHashFunction(STR, key, hmacToString(STR, key)); }
/** * Returns a hash function implementing the Message Authentication Code (MAC) algorithm, using the * SHA-256 (256 hash bits) hash function and the given secret key. * * * @param key the secret key * @throws IllegalArgumentException if the given key is inappropriate for initializing this MAC * @s...
Returns a hash function implementing the Message Authentication Code (MAC) algorithm, using the SHA-256 (256 hash bits) hash function and the given secret key
hmacSha256
{ "repo_name": "migue/voltdb", "path": "third_party/java/src/com/google_voltpatches/common/hash/Hashing.java", "license": "agpl-3.0", "size": 26322 }
[ "java.security.Key" ]
import java.security.Key;
import java.security.*;
[ "java.security" ]
java.security;
646,067
private boolean checkPredicatesDeclaration() { List<NamedTypedList> predicates = this.domain.getPredicates(); Set<String> set = new HashSet<>(); boolean checked = true; for (NamedTypedList predicate : predicates) { for (TypedSymbol variable : predicate.getArguments()) { ...
boolean function() { List<NamedTypedList> predicates = this.domain.getPredicates(); Set<String> set = new HashSet<>(); boolean checked = true; for (NamedTypedList predicate : predicates) { for (TypedSymbol variable : predicate.getArguments()) { for (Symbol type : variable.getTypes()) { if (!this.domain.isDeclaredType(t...
/** * Checks the predicates declaration. More precisely, this method checks, if the domain is * typed, if each types of the variables used in the predicates declaration are defined, if * there is no duplicated predicate. * * @return <code>true</code> if the predicates declaration are well forme...
Checks the predicates declaration. More precisely, this method checks, if the domain is typed, if each types of the variables used in the predicates declaration are defined, if there is no duplicated predicate
checkPredicatesDeclaration
{ "repo_name": "pellierd/pddl4j", "path": "src/main/java/fr/uga/pddl4j/parser/Parser.java", "license": "lgpl-3.0", "size": 53966 }
[ "java.util.HashSet", "java.util.List", "java.util.Set" ]
import java.util.HashSet; import java.util.List; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
26,139
private synchronized void rebuildJournal() throws IOException { if (journalWriter != null) { journalWriter.close(); } Writer writer = new BufferedWriter(new FileWriter(journalFileTmp), IO_BUFFER_SIZE); writer.write(MAGIC); writer.write("\n"); writer.write...
synchronized void function() throws IOException { if (journalWriter != null) { journalWriter.close(); } Writer writer = new BufferedWriter(new FileWriter(journalFileTmp), IO_BUFFER_SIZE); writer.write(MAGIC); writer.write("\n"); writer.write(VERSION_1); writer.write("\n"); writer.write(Integer.toString(appVersion)); wr...
/** * Creates a new journal that omits redundant information. This replaces the * current journal if it exists. */
Creates a new journal that omits redundant information. This replaces the current journal if it exists
rebuildJournal
{ "repo_name": "pvkarthik87/HeyBeach", "path": "HeyBeach/app/src/main/java/com/karcompany/heybeach/cache/DiskLruCache.java", "license": "apache-2.0", "size": 33901 }
[ "java.io.BufferedWriter", "java.io.FileWriter", "java.io.IOException", "java.io.Writer" ]
import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
1,794,839
List<Polyfill> getPolyfills(String uaString);
List<Polyfill> getPolyfills(String uaString);
/** * Return a list of polyfills containing all sources of polyfills using default query setting * Alias polyfill will expand into specific polyfills. * @param uaString user agent string; can be in normalized format e.g. chrome/53.0.0 * @return list of polyfills */
Return a list of polyfills containing all sources of polyfills using default query setting Alias polyfill will expand into specific polyfills
getPolyfills
{ "repo_name": "reiniergs/polyfill-service", "path": "polyfill-service-api/src/main/java/org/polyfillservice/api/interfaces/PolyfillService.java", "license": "mit", "size": 2186 }
[ "java.util.List", "org.polyfillservice.api.components.Polyfill" ]
import java.util.List; import org.polyfillservice.api.components.Polyfill;
import java.util.*; import org.polyfillservice.api.components.*;
[ "java.util", "org.polyfillservice.api" ]
java.util; org.polyfillservice.api;
1,365,018
public UserGroupRestRep update(URI id, UserGroupUpdateParam input) { return client.put(UserGroupRestRep.class, input, getIdUrl(), id); }
UserGroupRestRep function(URI id, UserGroupUpdateParam input) { return client.put(UserGroupRestRep.class, input, getIdUrl(), id); }
/** * Updates an user group. * <p> * API Call: <tt>PUT /vdc/admin/user-groups</tt> * * @param input * the update configuration. * @return the updated user group. */
Updates an user group. API Call: PUT /vdc/admin/user-groups
update
{ "repo_name": "emcvipr/controller-client-java", "path": "client/src/main/java/com/emc/vipr/client/core/UserGroup.java", "license": "apache-2.0", "size": 2893 }
[ "com.emc.storageos.model.usergroup.UserGroupRestRep", "com.emc.storageos.model.usergroup.UserGroupUpdateParam" ]
import com.emc.storageos.model.usergroup.UserGroupRestRep; import com.emc.storageos.model.usergroup.UserGroupUpdateParam;
import com.emc.storageos.model.usergroup.*;
[ "com.emc.storageos" ]
com.emc.storageos;
1,722,480
public CcCompilationHelper addPublicHeaders(Collection<Artifact> headers) { for (Artifact header : headers) { addHeader(header, label); } return this; }
CcCompilationHelper function(Collection<Artifact> headers) { for (Artifact header : headers) { addHeader(header, label); } return this; }
/** * Adds {@code headers} as public header files. These files will be made visible to dependent * rules. They may be parsed/preprocessed or compiled into a header module depending on the * configuration. */
Adds headers as public header files. These files will be made visible to dependent rules. They may be parsed/preprocessed or compiled into a header module depending on the configuration
addPublicHeaders
{ "repo_name": "davidzchen/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationHelper.java", "license": "apache-2.0", "size": 89666 }
[ "com.google.devtools.build.lib.actions.Artifact", "java.util.Collection" ]
import com.google.devtools.build.lib.actions.Artifact; import java.util.Collection;
import com.google.devtools.build.lib.actions.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
1,727,573
@Override public long deleteFiles(String sessionId, long projectId, String directory) throws InvalidSessionException { validateSessionId(sessionId); final String userId = userInfoProvider.getUserId(); return getProjectRpcImpl(userId, projectId).deleteFiles(userId, projectId, directory); ...
long function(String sessionId, long projectId, String directory) throws InvalidSessionException { validateSessionId(sessionId); final String userId = userInfoProvider.getUserId(); return getProjectRpcImpl(userId, projectId).deleteFiles(userId, projectId, directory); }
/** * Deletes all files that are contained directly in the given directory. Files * in subdirectories are not deleted. * @param sessionId session id * @param projectId project ID * @param directory path of the directory * @return modification date for project */
Deletes all files that are contained directly in the given directory. Files in subdirectories are not deleted
deleteFiles
{ "repo_name": "be1be1/appinventor-polyu", "path": "appinventor/appengine/src/com/google/appinventor/server/ProjectServiceImpl.java", "license": "apache-2.0", "size": 25003 }
[ "com.google.appinventor.shared.rpc.InvalidSessionException" ]
import com.google.appinventor.shared.rpc.InvalidSessionException;
import com.google.appinventor.shared.rpc.*;
[ "com.google.appinventor" ]
com.google.appinventor;
237,726
public static <E extends Throwable> void assertThrows(ActionFuture future, Class<E> exceptionClass, String extraInfo) { assertThrows(future, exceptionClass, null, extraInfo); }
static <E extends Throwable> void function(ActionFuture future, Class<E> exceptionClass, String extraInfo) { assertThrows(future, exceptionClass, null, extraInfo); }
/** * Run future.actionGet() and check that it throws an exception of the right type * * @param extraInfo extra information to add to the failure message */
Run future.actionGet() and check that it throws an exception of the right type
assertThrows
{ "repo_name": "cwurm/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java", "license": "apache-2.0", "size": 34269 }
[ "org.elasticsearch.action.ActionFuture" ]
import org.elasticsearch.action.ActionFuture;
import org.elasticsearch.action.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
2,155,023
void writeInformation(PrintWriter writer) { for (URI uri : superClasses) { if (!uri.equals(parameterURI)) { writer.println(" <superType uri=\"" + uri + "\"/>"); } } for (URI uri : subClasses) { if (!uri.equals(parameterURI)) { writer.println(" <subType uri=\"" + uri + "...
void writeInformation(PrintWriter writer) { for (URI uri : superClasses) { if (!uri.equals(parameterURI)) { writer.println(STRSTR\"/>"); } } for (URI uri : subClasses) { if (!uri.equals(parameterURI)) { writer.println(STRSTR\"/>"); } } }
/** * Writes the information stored in this class as an XML fragment to the given writer. * @param writer used to write the XML. */
Writes the information stored in this class as an XML fragment to the given writer
writeInformation
{ "repo_name": "ilke-zilci/serviceMatchingUsingCP", "path": "lib/dino-0.2.2-src/dino-broker/src/uk/ac/ucl/cs/sse/dino/matchmaker/owls/ParameterData.java", "license": "gpl-2.0", "size": 3308 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
632,101
public SchemaDescriptor getDeclaredGlobalTemporaryTablesSchemaDescriptor() throws StandardException;
SchemaDescriptor function() throws StandardException;
/** * Get the descriptor for the declared global temporary table schema which is always named "SESSION". * * SQL92 allows a schema to specify a default character set - we will * not support this. * * @return The descriptor for the schema. * * @exception StandardException Thrown on failure */
Get the descriptor for the declared global temporary table schema which is always named "SESSION". SQL92 allows a schema to specify a default character set - we will not support this
getDeclaredGlobalTemporaryTablesSchemaDescriptor
{ "repo_name": "kavin256/Derby", "path": "java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java", "license": "apache-2.0", "size": 79425 }
[ "org.apache.derby.iapi.error.StandardException" ]
import org.apache.derby.iapi.error.StandardException;
import org.apache.derby.iapi.error.*;
[ "org.apache.derby" ]
org.apache.derby;
2,336,064
public static boolean hasAnyFavorites(IUserLayout layout) { Validate.notNull(layout, "Cannot determine whether a null layout contains favorites."); // (premature) performance optimization: short circuit returns true if nonzero favorite portlets return (!getFavoritePortlets(layout).isEmpty()...
static boolean function(IUserLayout layout) { Validate.notNull(layout, STR); return (!getFavoritePortlets(layout).isEmpty() !getFavoriteCollections(layout).isEmpty() ); }
/** * True if the layout contains any favorited collections or favorited individual portlets, false otherwise. * @param layout non-null user layout that might contain favorite portlets and/or collections * @return true if the layout contains at least one favorited portlet or collection, false otherwise ...
True if the layout contains any favorited collections or favorited individual portlets, false otherwise
hasAnyFavorites
{ "repo_name": "timlevett/uPortal", "path": "uportal-war/src/main/java/org/jasig/portal/portlets/favorites/FavoritesUtils.java", "license": "apache-2.0", "size": 9698 }
[ "org.apache.commons.lang3.Validate", "org.jasig.portal.layout.IUserLayout" ]
import org.apache.commons.lang3.Validate; import org.jasig.portal.layout.IUserLayout;
import org.apache.commons.lang3.*; import org.jasig.portal.layout.*;
[ "org.apache.commons", "org.jasig.portal" ]
org.apache.commons; org.jasig.portal;
1,867,367
public Expression[] getArgs() { return m_args; }
Expression[] function() { return m_args; }
/** * Return an expression array containing arguments at index 3 or greater. * * @return An array that contains the arguments at index 3 or greater. */
Return an expression array containing arguments at index 3 or greater
getArgs
{ "repo_name": "itgeeker/jdk", "path": "src/com/sun/org/apache/xpath/internal/functions/FunctionMultiArgs.java", "license": "apache-2.0", "size": 6504 }
[ "com.sun.org.apache.xpath.internal.Expression" ]
import com.sun.org.apache.xpath.internal.Expression;
import com.sun.org.apache.xpath.internal.*;
[ "com.sun.org" ]
com.sun.org;
1,002,883
@Test public void appendNullVaragsQueryParams() throws Exception { assertEquals("http://test.com/1", KieRemoteHttpRequest.appendQueryParameters("http://test.com/1", (Object[]) null)); }
void function() throws Exception { assertEquals("http: }
/** * Append null params * * @throws Exception */
Append null params
appendNullVaragsQueryParams
{ "repo_name": "jiripetrlik/droolsjbpm-integration", "path": "kie-remote/kie-remote-common/src/test/java/org/kie/remote/common/rest/KieRemoteHttpRequestTest.java", "license": "apache-2.0", "size": 77298 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,765,925
public static List<Expression> expressions (Expression... rgExpressions) { List<Expression> list = new ArrayList<> (rgExpressions.length); for (Expression expr : rgExpressions) if (expr != null) list.add (expr); return list; }
static List<Expression> function (Expression... rgExpressions) { List<Expression> list = new ArrayList<> (rgExpressions.length); for (Expression expr : rgExpressions) if (expr != null) list.add (expr); return list; }
/** * Creates a list of expressions from <code>rgExpressions</code>. * * @param rgSpecifiers * The expressions * @return A list of expressions */
Creates a list of expressions from <code>rgExpressions</code>
expressions
{ "repo_name": "intersense/patus-gw", "path": "src/ch/unibas/cs/hpwc/patus/util/CodeGeneratorUtil.java", "license": "lgpl-2.1", "size": 17902 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,079,755
public Object next() throws NoSuchElementException { if( nextList == null ){ throw new NoSuchElementException(); } Object ret = nextList; increment(); return ret; } public void remove(){ throw new UnsupportedOperationException(); }
Object function() throws NoSuchElementException { if( nextList == null ){ throw new NoSuchElementException(); } Object ret = nextList; increment(); return ret; } public void remove(){ throw new UnsupportedOperationException(); }
/** * Returns the next permutation in the iteration. * @return the next permutation in the iteration * @throws NoSuchElementException there are no more permutations */
Returns the next permutation in the iteration
next
{ "repo_name": "boompieman/iim_project", "path": "nxt_1.4.4/src/net/sourceforge/nite/search/ListPermuteIterator.java", "license": "gpl-3.0", "size": 3192 }
[ "java.util.NoSuchElementException" ]
import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
2,088,101
private String getWhereClause (Object[] rowData) { int size = m_fields.size(); StringBuffer singleRowWHERE = null; StringBuffer multiRowWHERE = null; for (int col = 0; col < size; col++) { GridField field = (GridField)m_fields.get (col); if (field.isKey()) { String columnName = field.getColum...
String function (Object[] rowData) { int size = m_fields.size(); StringBuffer singleRowWHERE = null; StringBuffer multiRowWHERE = null; for (int col = 0; col < size; col++) { GridField field = (GridField)m_fields.get (col); if (field.isKey()) { String columnName = field.getColumnName(); Object value = rowData[col]; if ...
/** * Get Record Where Clause from data (single key or multi-parent) * @param rowData data * @return where clause or null */
Get Record Where Clause from data (single key or multi-parent)
getWhereClause
{ "repo_name": "mgrigioni/oseb", "path": "base/src/org/compiere/model/GridTable.java", "license": "gpl-2.0", "size": 97286 }
[ "java.util.ArrayList", "java.util.logging.Level" ]
import java.util.ArrayList; import java.util.logging.Level;
import java.util.*; import java.util.logging.*;
[ "java.util" ]
java.util;
441,329
public static <T> T loadSpringBean(URL springXmlUrl, String beanName) throws IgniteException { try { return IgnitionEx.loadSpringBean(springXmlUrl, beanName); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
static <T> T function(URL springXmlUrl, String beanName) throws IgniteException { try { return IgnitionEx.loadSpringBean(springXmlUrl, beanName); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** * Loads Spring bean by its name from given Spring XML configuration file. If bean * with such name doesn't exist, exception is thrown. * * @param springXmlUrl Spring XML configuration file URL (cannot be {@code null}). * @param beanName Bean name (cannot be {@code null}). * @return Loa...
Loads Spring bean by its name from given Spring XML configuration file. If bean with such name doesn't exist, exception is thrown
loadSpringBean
{ "repo_name": "nizhikov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/Ignition.java", "license": "apache-2.0", "size": 26588 }
[ "org.apache.ignite.internal.IgnitionEx", "org.apache.ignite.internal.util.typedef.internal.U" ]
import org.apache.ignite.internal.IgnitionEx; import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.internal.*; import org.apache.ignite.internal.util.typedef.internal.*;
[ "org.apache.ignite" ]
org.apache.ignite;
867,625
public void verifyGatewayEqualsBlankWithServiceWithTgt() throws IOException { final String service = "http://www.yale.edu"; final String encodedService = URLEncoder.encode(service, "UTF-8"); final String establishSsoUrl = "/login?service=" + encodedService; beginAt(establishSsoUrl);...
void function() throws IOException { final String service = STRUTF-8STR/login?service=STR/login?service=STR&gateway=STR/validate?ticket=STR&service=STRyes\nSTR\n"; assertEquals(expected, validateOutput); }
/** * Test that /login?gateway=&service=whatever is the same as /login?gateway=true&service=whatever. * @throws IOException */
Test that /login?gateway=&service=whatever is the same as /login?gateway=true&service=whatever
verifyGatewayEqualsBlankWithServiceWithTgt
{ "repo_name": "keshvari/cas", "path": "cas-server-compatibility/src/test/java/org/jasig/cas/login/LoginAsCredentialsRequestorCompatibilityTests.java", "license": "apache-2.0", "size": 10053 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
628,109
public static void updateDrinkCategory(DrinkLibrary library, long id, DrinkCategory category, GUIActivity parent) { LogUtil.INSTANCE.i(TAG, "Editing category: %s (%d)", category, id); library.updateCategory(id, category); if (parent != null) { parent.updateUI(); } }
static void function(DrinkLibrary library, long id, DrinkCategory category, GUIActivity parent) { LogUtil.INSTANCE.i(TAG, STR, category, id); library.updateCategory(id, category); if (parent != null) { parent.updateUI(); } }
/** * Modifies an existing drink category. */
Modifies an existing drink category
updateDrinkCategory
{ "repo_name": "thaapasa/jalkametri-android", "path": "app/src/main/java/fi/tuska/jalkametri/data/DrinkActions.java", "license": "mit", "size": 9831 }
[ "fi.tuska.jalkametri.activity.GUIActivity", "fi.tuska.jalkametri.dao.DrinkCategory", "fi.tuska.jalkametri.dao.DrinkLibrary", "fi.tuska.jalkametri.util.LogUtil" ]
import fi.tuska.jalkametri.activity.GUIActivity; import fi.tuska.jalkametri.dao.DrinkCategory; import fi.tuska.jalkametri.dao.DrinkLibrary; import fi.tuska.jalkametri.util.LogUtil;
import fi.tuska.jalkametri.activity.*; import fi.tuska.jalkametri.dao.*; import fi.tuska.jalkametri.util.*;
[ "fi.tuska.jalkametri" ]
fi.tuska.jalkametri;
1,084,218
private String getString(String old, String column) { int index = mCursor.getColumnIndexOrThrow(column); if (old == null) { return mCursor.getString(index); } if (mNewChars == null) { mNewChars = new CharArrayBuffer(128); ...
String function(String old, String column) { int index = mCursor.getColumnIndexOrThrow(column); if (old == null) { return mCursor.getString(index); } if (mNewChars == null) { mNewChars = new CharArrayBuffer(128); } mCursor.copyStringToBuffer(index, mNewChars); int length = mNewChars.sizeCopied; if (length != old.length...
/** * Returns a String that holds the current value of the column, * optimizing for the case where the value hasn't changed. */
Returns a String that holds the current value of the column, optimizing for the case where the value hasn't changed
getString
{ "repo_name": "79144876/WordReviewProject", "path": "src/com/coleman/providers/downloads/DownloadInfo.java", "license": "apache-2.0", "size": 21953 }
[ "android.database.CharArrayBuffer" ]
import android.database.CharArrayBuffer;
import android.database.*;
[ "android.database" ]
android.database;
68,219
EList<Unit> getUnits();
EList<Unit> getUnits();
/** * Returns the value of the '<em><b>Units</b></em>' containment reference list. * The list contents are of type {@link org.eclipse.xtext.testlanguages.backtracking.beeLangTestLanguage.Unit}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Units</em>' containment reference list isn't clear...
Returns the value of the 'Units' containment reference list. The list contents are of type <code>org.eclipse.xtext.testlanguages.backtracking.beeLangTestLanguage.Unit</code>. If the meaning of the 'Units' containment reference list isn't clear, there really should be more of a description here...
getUnits
{ "repo_name": "miklossy/xtext-core", "path": "org.eclipse.xtext.testlanguages/src-gen/org/eclipse/xtext/testlanguages/backtracking/beeLangTestLanguage/Model.java", "license": "epl-1.0", "size": 2234 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
773,511
EReference getActivity_Inputs();
EReference getActivity_Inputs();
/** * Returns the meta object for the containment reference list '{@link activitydiagram.Activity#getInputs <em>Inputs</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference list '<em>Inputs</em>'. * @see activitydiagram.Activity#getInputs() * @see ...
Returns the meta object for the containment reference list '<code>activitydiagram.Activity#getInputs Inputs</code>'.
getActivity_Inputs
{ "repo_name": "gemoc/activitydiagram", "path": "dev/gemoc_sequential/language_workbench/org.gemoc.activitydiagram.sequential.model/src/activitydiagram/ActivitydiagramPackage.java", "license": "epl-1.0", "size": 91129 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,770,878
public CurrentStateBuilder sessionId(SessionId sessionId) { _sessionId = sessionId; return this; }
CurrentStateBuilder function(SessionId sessionId) { _sessionId = sessionId; return this; }
/** * Set the session id for this current state * @param sessionId session identifier * @return CurrentStateBuilder */
Set the session id for this current state
sessionId
{ "repo_name": "Teino1978-Corp/Teino1978-Corp-helix", "path": "helix-core/src/main/java/org/apache/helix/model/builder/CurrentStateBuilder.java", "license": "apache-2.0", "size": 4230 }
[ "org.apache.helix.api.id.SessionId" ]
import org.apache.helix.api.id.SessionId;
import org.apache.helix.api.id.*;
[ "org.apache.helix" ]
org.apache.helix;
2,000,567
EReference getCopier_Objects();
EReference getCopier_Objects();
/** * Returns the meta object for the containment reference list '{@link org.eclectic.frontend.qool.facilities.Copier#getObjects <em>Objects</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference list '<em>Objects</em>'. * @see org.eclectic.frontend.q...
Returns the meta object for the containment reference list '<code>org.eclectic.frontend.qool.facilities.Copier#getObjects Objects</code>'.
getCopier_Objects
{ "repo_name": "jesusc/eclectic", "path": "plugins/org.eclectic.frontend.asm/src-gen/org/eclectic/frontend/qool/facilities/FacilitiesPackage.java", "license": "gpl-3.0", "size": 11222 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,263,793
public boolean validateSignature(final Assertion assertion, final WsFederationConfiguration wsFederationConfiguration) { if (assertion == null) { LOGGER.warn("No assertion was provided to validate signatures"); return false; } bo...
boolean function(final Assertion assertion, final WsFederationConfiguration wsFederationConfiguration) { if (assertion == null) { LOGGER.warn(STR); return false; } boolean valid = false; if (assertion.getSignature() != null) { final SignaturePrevalidator validator = new SAMLSignatureProfileValidator(); try { validator....
/** * validateSignature checks to see if the signature on an assertion is valid. * * @param assertion a provided assertion * @param wsFederationConfiguration WS-Fed configuration provided. * @return true if the assertion's signature is valid, otherwise false */
validateSignature checks to see if the signature on an assertion is valid
validateSignature
{ "repo_name": "creamer/cas", "path": "support/cas-server-support-wsfederation/src/main/java/org/apereo/cas/support/wsfederation/WsFederationHelper.java", "license": "apache-2.0", "size": 16550 }
[ "net.shibboleth.utilities.java.support.resolver.CriteriaSet", "org.apereo.cas.support.saml.SamlUtils", "org.opensaml.core.criterion.EntityIdCriterion", "org.opensaml.saml.common.xml.SAMLConstants", "org.opensaml.saml.criterion.EntityRoleCriterion", "org.opensaml.saml.criterion.ProtocolCriterion", "org.o...
import net.shibboleth.utilities.java.support.resolver.CriteriaSet; import org.apereo.cas.support.saml.SamlUtils; import org.opensaml.core.criterion.EntityIdCriterion; import org.opensaml.saml.common.xml.SAMLConstants; import org.opensaml.saml.criterion.EntityRoleCriterion; import org.opensaml.saml.criterion.ProtocolCri...
import net.shibboleth.utilities.java.support.resolver.*; import org.apereo.cas.support.saml.*; import org.opensaml.core.criterion.*; import org.opensaml.saml.common.xml.*; import org.opensaml.saml.criterion.*; import org.opensaml.saml.saml1.core.*; import org.opensaml.saml.saml2.metadata.*; import org.opensaml.saml.sec...
[ "net.shibboleth.utilities", "org.apereo.cas", "org.opensaml.core", "org.opensaml.saml", "org.opensaml.security", "org.opensaml.xmlsec" ]
net.shibboleth.utilities; org.apereo.cas; org.opensaml.core; org.opensaml.saml; org.opensaml.security; org.opensaml.xmlsec;
936,830
default Criterion filterWithPeriod(TimePeriod time, AbstractTimePrimitiveFieldDescriptor r, boolean periodFromReducedPrecisionInstant) throws UnsupportedTimeException { return r instanceof TimePrimitiveFieldDescriptor ? createFilterWithPeriod(time, r, periodFromReducedPrecisionIn...
default Criterion filterWithPeriod(TimePeriod time, AbstractTimePrimitiveFieldDescriptor r, boolean periodFromReducedPrecisionInstant) throws UnsupportedTimeException { return r instanceof TimePrimitiveFieldDescriptor ? createFilterWithPeriod(time, r, periodFromReducedPrecisionInstant) : filterWithPeriod(time, (TimePri...
/** * Create a filter for the specified period and fields. If the period is no * real period but a instance, the method will call * {@link #filterWithInstant(TimeInstant, AbstractTimePrimitiveFieldDescriptor)}. * * @param time * the time * @param r * the pro...
Create a filter for the specified period and fields. If the period is no real period but a instance, the method will call <code>#filterWithInstant(TimeInstant, AbstractTimePrimitiveFieldDescriptor)</code>
filterWithPeriod
{ "repo_name": "EHJ-52n/SOS", "path": "hibernate/utils/src/main/java/org/n52/sos/ds/hibernate/util/TemporalRestriction.java", "license": "gpl-2.0", "size": 23669 }
[ "org.hibernate.criterion.Criterion", "org.n52.shetland.ogc.gml.time.TimePeriod", "org.n52.sos.exception.ows.concrete.UnsupportedTimeException" ]
import org.hibernate.criterion.Criterion; import org.n52.shetland.ogc.gml.time.TimePeriod; import org.n52.sos.exception.ows.concrete.UnsupportedTimeException;
import org.hibernate.criterion.*; import org.n52.shetland.ogc.gml.time.*; import org.n52.sos.exception.ows.concrete.*;
[ "org.hibernate.criterion", "org.n52.shetland", "org.n52.sos" ]
org.hibernate.criterion; org.n52.shetland; org.n52.sos;
756,440
public Collection<OriginEntryGroup> getAllScrubbableBackupGroups();
Collection<OriginEntryGroup> function();
/** * Gets a collection of all backup groups that are scrubbable (i.e. valid, process, scrub indicators all set to true) * * @return a Collection of scrubbable origin entry groups */
Gets a collection of all backup groups that are scrubbable (i.e. valid, process, scrub indicators all set to true)
getAllScrubbableBackupGroups
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-core/src/main/java/org/kuali/kfs/gl/dataaccess/OriginEntryGroupDao.java", "license": "agpl-3.0", "size": 3854 }
[ "java.util.Collection", "org.kuali.kfs.gl.businessobject.OriginEntryGroup" ]
import java.util.Collection; import org.kuali.kfs.gl.businessobject.OriginEntryGroup;
import java.util.*; import org.kuali.kfs.gl.businessobject.*;
[ "java.util", "org.kuali.kfs" ]
java.util; org.kuali.kfs;
2,125,312
public final MetaProperty<TradeHeader> tradeHeader() { return _tradeHeader; }
final MetaProperty<TradeHeader> function() { return _tradeHeader; }
/** * The meta-property for the {@code tradeHeader} property. * @return the meta-property, not null */
The meta-property for the tradeHeader property
tradeHeader
{ "repo_name": "McLeodMoores/starling", "path": "projects/starling-client/src/main/java/com/mcleodmoores/starling/client/portfolio/fpml5_8/FxSpotTrade.java", "license": "apache-2.0", "size": 24945 }
[ "org.joda.beans.MetaProperty" ]
import org.joda.beans.MetaProperty;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
1,949,656
public void setPlainProviders(Object... theProv) { setPlainProviders(Arrays.asList(theProv)); }
void function(Object... theProv) { setPlainProviders(Arrays.asList(theProv)); }
/** * Sets the non-resource specific providers which implement method calls on this server. * * @see #setResourceProviders(Collection) */
Sets the non-resource specific providers which implement method calls on this server
setPlainProviders
{ "repo_name": "steve1medix/hapi-fhir", "path": "hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java", "license": "apache-2.0", "size": 52651 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,448,082
@Path( "getPomSnippet/{repositoryId}" ) @GET @Produces( { MediaType.TEXT_PLAIN } ) @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION ) String getPomSnippet( @PathParam( "repositoryId" ) String repositoryId ) throws ArchivaRestServiceException;
@Path( STR ) @Produces( { MediaType.TEXT_PLAIN } ) @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION ) String getPomSnippet( @PathParam( STR ) String repositoryId ) throws ArchivaRestServiceException;
/** * return a pom snippet to use this repository with entities escaped (&lt; &gt;) * @since 1.4-M3 */
return a pom snippet to use this repository with entities escaped (&lt; &gt;)
getPomSnippet
{ "repo_name": "olamy/archiva", "path": "archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ManagedRepositoriesService.java", "license": "apache-2.0", "size": 4897 }
[ "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.core.MediaType", "org.apache.archiva.redback.authorization.RedbackAuthorization", "org.apache.archiva.security.common.ArchivaRoleConstants" ]
import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.apache.archiva.redback.authorization.RedbackAuthorization; import org.apache.archiva.security.common.ArchivaRoleConstants;
import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.archiva.redback.authorization.*; import org.apache.archiva.security.common.*;
[ "javax.ws", "org.apache.archiva" ]
javax.ws; org.apache.archiva;
2,563,854
public Optional<Closeable> startListeningPeers() { final Collection<Peer> configPeers = getConfigPeersWithGchangeApi(); if (CollectionUtils.isEmpty(configPeers)) { if (logger.isWarnEnabled()) { logger.warn(String.format("No compatible endpoints found in config option '%s...
Optional<Closeable> function() { final Collection<Peer> configPeers = getConfigPeersWithGchangeApi(); if (CollectionUtils.isEmpty(configPeers)) { if (logger.isWarnEnabled()) { logger.warn(String.format(STR, STR)); } return Optional.empty(); } ScheduledActionFuture<?> future = threadPool.scheduleAtFixedRate(() -> { conf...
/** * Watch network peers, from endpoints found in config * @return a tear down logic, to call to stop the listener */
Watch network peers, from endpoints found in config
startListeningPeers
{ "repo_name": "duniter-gchange/gchange-pod", "path": "gchange-pod-es-plugin/src/main/java/org/duniter/elasticsearch/gchange/service/NetworkService.java", "license": "agpl-3.0", "size": 3765 }
[ "java.io.Closeable", "java.util.Collection", "java.util.Optional", "java.util.concurrent.TimeUnit", "org.apache.commons.collections4.CollectionUtils", "org.duniter.core.client.model.local.Peer", "org.duniter.elasticsearch.threadpool.ScheduledActionFuture" ]
import java.io.Closeable; import java.util.Collection; import java.util.Optional; import java.util.concurrent.TimeUnit; import org.apache.commons.collections4.CollectionUtils; import org.duniter.core.client.model.local.Peer; import org.duniter.elasticsearch.threadpool.ScheduledActionFuture;
import java.io.*; import java.util.*; import java.util.concurrent.*; import org.apache.commons.collections4.*; import org.duniter.core.client.model.local.*; import org.duniter.elasticsearch.threadpool.*;
[ "java.io", "java.util", "org.apache.commons", "org.duniter.core", "org.duniter.elasticsearch" ]
java.io; java.util; org.apache.commons; org.duniter.core; org.duniter.elasticsearch;
1,483,668
@Generated @CVariable() public static native CFStringRef kCVImageBufferChromaLocation_Bottom();
@CVariable() static native CFStringRef function();
/** * Chroma sample is horizontally centered, but co-sited with the bottom row of luma samples. */
Chroma sample is horizontally centered, but co-sited with the bottom row of luma samples
kCVImageBufferChromaLocation_Bottom
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/corevideo/c/CoreVideo.java", "license": "apache-2.0", "size": 85217 }
[ "org.moe.natj.c.ann.CVariable" ]
import org.moe.natj.c.ann.CVariable;
import org.moe.natj.c.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
812,183
public int getNumberOfErrorStatementsInLog(String[] excludeExpList) throws IOException { DaemonProtocol proxy = getProxy(); String pattern = "ERROR"; return proxy.getNumberOfMatchesInLogFile(pattern, excludeExpList); }
int function(String[] excludeExpList) throws IOException { DaemonProtocol proxy = getProxy(); String pattern = "ERROR"; return proxy.getNumberOfMatchesInLogFile(pattern, excludeExpList); }
/** * Gets number of times ERROR log messages where logged in Daemon logs. * <br/> * Pattern used for searching is ERROR. <br/> * @param excludeExpList list of exception to exclude * @return number of occurrence of error message. * @throws IOException is thrown on RPC error. */
Gets number of times ERROR log messages where logged in Daemon logs. Pattern used for searching is ERROR.
getNumberOfErrorStatementsInLog
{ "repo_name": "Shmuma/hadoop", "path": "src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonClient.java", "license": "apache-2.0", "size": 13265 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,639,938
public static Cursor getAlarmsCursor(ContentResolver contentResolver) { return contentResolver.query( Alarm.Columns.CONTENT_URI, Alarm.Columns.ALARM_QUERY_COLUMNS, null, null, Alarm.Columns.DEFAULT_SORT_ORDER); }
static Cursor function(ContentResolver contentResolver) { return contentResolver.query( Alarm.Columns.CONTENT_URI, Alarm.Columns.ALARM_QUERY_COLUMNS, null, null, Alarm.Columns.DEFAULT_SORT_ORDER); }
/** * Queries all alarms * @return cursor over all alarms */
Queries all alarms
getAlarmsCursor
{ "repo_name": "rex-xxx/mt6572_x201", "path": "mediatek/frameworks-ext/base/policy/java/com/android/internal/policy/impl/keyguard/Alarms.java", "license": "gpl-2.0", "size": 25201 }
[ "android.content.ContentResolver", "android.database.Cursor" ]
import android.content.ContentResolver; import android.database.Cursor;
import android.content.*; import android.database.*;
[ "android.content", "android.database" ]
android.content; android.database;
407,512
public void createProfile ( String proFileName , byte[] password) throws ProtocolNotSupportedException,ProfileKeyValueLimitException;
void function ( String proFileName , byte[] password) throws ProtocolNotSupportedException,ProfileKeyValueLimitException;
/** * Create profile. * * @param proFileName the pro file name * @param password the password * @throws ProtocolNotSupportedException the protocol not supported exception * @throws ProfileKeyValueLimitException the profile key value limit exception */
Create profile
createProfile
{ "repo_name": "NeoSmartpen/AndroidSDK2.0", "path": "NASDK2.0_Studio/app/src/main/java/kr/neolab/sdk/pen/IPenAdt.java", "license": "gpl-3.0", "size": 22799 }
[ "kr.neolab.sdk.pen.bluetooth.lib.ProfileKeyValueLimitException", "kr.neolab.sdk.pen.bluetooth.lib.ProtocolNotSupportedException" ]
import kr.neolab.sdk.pen.bluetooth.lib.ProfileKeyValueLimitException; import kr.neolab.sdk.pen.bluetooth.lib.ProtocolNotSupportedException;
import kr.neolab.sdk.pen.bluetooth.lib.*;
[ "kr.neolab.sdk" ]
kr.neolab.sdk;
2,681,630
public Analyzer getAnalyzer() { return analyzer; }
Analyzer function() { return analyzer; }
/** * Returns an analyzer that will be used to parse source doc with. The default analyzer * is the {@link #DEFAULT_ANALYZER}. * * @return the analyzer that will be used to parse source doc with. * @see #DEFAULT_ANALYZER */
Returns an analyzer that will be used to parse source doc with. The default analyzer is the <code>#DEFAULT_ANALYZER</code>
getAnalyzer
{ "repo_name": "apache/jackrabbit", "path": "jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MoreLikeThis.java", "license": "apache-2.0", "size": 30464 }
[ "org.apache.lucene.analysis.Analyzer" ]
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.*;
[ "org.apache.lucene" ]
org.apache.lucene;
278,780
protected static EventVO createDemoExam() { ExamVO exameDemo = getExame(); List<PessoaVO> pessoasSelecionadas = getPessoas(); EventVO eventVO = new EventVO(); Long ppk=1l; for (PessoaVO pessoaVO : pessoasSelecionadas) { ParticipationVO participationVO = new ParticipationVO(); parti...
static EventVO function() { ExamVO exameDemo = getExame(); List<PessoaVO> pessoasSelecionadas = getPessoas(); EventVO eventVO = new EventVO(); Long ppk=1l; for (PessoaVO pessoaVO : pessoasSelecionadas) { ParticipationVO participationVO = new ParticipationVO(); participationVO.setPK(ppk++); participationVO.setPessoaVO(p...
/** * Cria demo de exame * @param pessoaVO * @param empresaVO * @return * @throws JazzBusinessException */
Cria demo de exame
createDemoExam
{ "repo_name": "darciopacifico/omr", "path": "modulesOMR/trunk/JazzOMRParser/parser/src/main/java/br/com/dlp/jazzomr/jasper/JazzOMRJRDataSourceProviderForDesign.java", "license": "apache-2.0", "size": 7954 }
[ "br.com.dlp.jazzomr.event.EventVO", "br.com.dlp.jazzomr.event.ParticipationVO", "br.com.dlp.jazzomr.exam.ExamVO", "br.com.dlp.jazzomr.person.PessoaVO", "java.util.List" ]
import br.com.dlp.jazzomr.event.EventVO; import br.com.dlp.jazzomr.event.ParticipationVO; import br.com.dlp.jazzomr.exam.ExamVO; import br.com.dlp.jazzomr.person.PessoaVO; import java.util.List;
import br.com.dlp.jazzomr.event.*; import br.com.dlp.jazzomr.exam.*; import br.com.dlp.jazzomr.person.*; import java.util.*;
[ "br.com.dlp", "java.util" ]
br.com.dlp; java.util;
1,108,910
public void addCertificates( Store certStore) { certs.addAll(certStore.getMatches(null)); }
void function( Store certStore) { certs.addAll(certStore.getMatches(null)); }
/** * Add the store of X509 Certificates to the generator. * * @param certStore a Store containing X509CertificateHolder objects */
Add the store of X509 Certificates to the generator
addCertificates
{ "repo_name": "thedrummeraki/Aki-SSL", "path": "src/org/bouncycastle/tsp/TimeStampTokenGenerator.java", "license": "apache-2.0", "size": 14746 }
[ "org.bouncycastle.util.Store" ]
import org.bouncycastle.util.Store;
import org.bouncycastle.util.*;
[ "org.bouncycastle.util" ]
org.bouncycastle.util;
1,605,630
public AxisLocation getDomainAxisLocation(int index) { AxisLocation result = this.domainAxisLocations.get(index); if (result == null) { result = AxisLocation.getOpposite(getDomainAxisLocation(0)); } return result; } /** * Sets the location of the domain axis...
AxisLocation function(int index) { AxisLocation result = this.domainAxisLocations.get(index); if (result == null) { result = AxisLocation.getOpposite(getDomainAxisLocation(0)); } return result; } /** * Sets the location of the domain axis and sends a {@link PlotChangeEvent}
/** * Returns the location for a domain axis. * * @param index the axis index. * * @return The location. * * @see #setDomainAxisLocation(int, AxisLocation) */
Returns the location for a domain axis
getDomainAxisLocation
{ "repo_name": "oskopek/jfreechart-fse", "path": "src/main/java/org/jfree/chart/plot/CategoryPlot.java", "license": "lgpl-2.1", "size": 170549 }
[ "org.jfree.chart.axis.AxisLocation", "org.jfree.chart.event.PlotChangeEvent" ]
import org.jfree.chart.axis.AxisLocation; import org.jfree.chart.event.PlotChangeEvent;
import org.jfree.chart.axis.*; import org.jfree.chart.event.*;
[ "org.jfree.chart" ]
org.jfree.chart;
2,686,790
public E getFirst(){ if(this.sval==null || this.sval.size()==0){ return null; } if(this.sval instanceof List){ return ((List<E>)this.sval).get(0); } if(this.sval instanceof Set){ for(E elem : (Set<E>)this.sval){ return elem; } } return null; }
E function(){ if(this.sval==null this.sval.size()==0){ return null; } if(this.sval instanceof List){ return ((List<E>)this.sval).get(0); } if(this.sval instanceof Set){ for(E elem : (Set<E>)this.sval){ return elem; } } return null; }
/** * Returns the first value of the collection. * @return first value if there is one, null otherwise */
Returns the first value of the collection
getFirst
{ "repo_name": "vdmeer/skb-java-commons", "path": "src/main/java/de/vandermeer/skb/commons/collections/ComCollection.java", "license": "apache-2.0", "size": 6543 }
[ "java.util.List", "java.util.Set" ]
import java.util.List; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
996,622
public Executable getActiveScriptOrModule() { if (executable != DefaultExecutable.INSTANCE) { return executable; } ExecutionContext scriptContext = getRealm().getWorld().getScriptContext(); if (scriptContext != null && scriptContext.executable != DefaultExecutable.INSTANC...
Executable function() { if (executable != DefaultExecutable.INSTANCE) { return executable; } ExecutionContext scriptContext = getRealm().getWorld().getScriptContext(); if (scriptContext != null && scriptContext.executable != DefaultExecutable.INSTANCE) { return scriptContext.executable; } return null; }
/** * 8.3.1 GetActiveScriptOrModule ( ) * * @return the active executable or {@code null} if none found */
8.3.1 GetActiveScriptOrModule ( )
getActiveScriptOrModule
{ "repo_name": "anba/es6draft", "path": "src/main/java/com/github/anba/es6draft/runtime/ExecutionContext.java", "license": "mit", "size": 17730 }
[ "com.github.anba.es6draft.Executable" ]
import com.github.anba.es6draft.Executable;
import com.github.anba.es6draft.*;
[ "com.github.anba" ]
com.github.anba;
366,546
public SpoutDeclarer setSpout(String id, SerializableSupplier<?> supplier) throws IllegalArgumentException { return setSpout(id, supplier, null); }
SpoutDeclarer function(String id, SerializableSupplier<?> supplier) throws IllegalArgumentException { return setSpout(id, supplier, null); }
/** * Define a new spout in this topology. * * @param id the id of this component. This id is referenced by other components that want to consume this spout's outputs. * @param supplier lambda expression that implements tuple generating for this spout * @throws IllegalArgumentException if {@cod...
Define a new spout in this topology
setSpout
{ "repo_name": "0x726d77/storm", "path": "storm-client/src/jvm/org/apache/storm/topology/TopologyBuilder.java", "license": "apache-2.0", "size": 36445 }
[ "org.apache.storm.lambda.SerializableSupplier" ]
import org.apache.storm.lambda.SerializableSupplier;
import org.apache.storm.lambda.*;
[ "org.apache.storm" ]
org.apache.storm;
695,290
public void onActivityResult(int requestCode, int resultCode, Intent data) { _facebook.authorizeCallback(requestCode, resultCode, data); }
void function(int requestCode, int resultCode, Intent data) { _facebook.authorizeCallback(requestCode, resultCode, data); }
/** * Authorization for facebook */
Authorization for facebook
onActivityResult
{ "repo_name": "Pillowdrift/MegaDrillerMole", "path": "MegaDrillerMole/MDMWorkspace/DrillerGameAndroid/src/com/pillowdrift/drillergame/crossinterfaces/android/AndroidMDMFacebookAccessServiceApi.java", "license": "bsd-2-clause", "size": 4924 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
380,445
default CompletableFuture<Boolean> isEmpty() { return size().thenApply(s -> s == 0); }
default CompletableFuture<Boolean> isEmpty() { return size().thenApply(s -> s == 0); }
/** * Returns true if the map is empty. * * @return a future whose value will be true if map has no entries, false otherwise. */
Returns true if the map is empty
isEmpty
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "core/api/src/main/java/org/onosproject/store/service/AsyncConsistentMap.java", "license": "apache-2.0", "size": 15961 }
[ "java.util.concurrent.CompletableFuture" ]
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
211,588
protected Pair<List<RecordInfo>, List<PreparedTransactionInfo>> loadMessageJournal(Configuration config) throws Exception { JournalImpl messagesJournal = null; try { SequentialFileFactory messagesFF = new NIOSequentialFileFactory(new File(getJournalDir()), null, 1); messagesJournal = n...
Pair<List<RecordInfo>, List<PreparedTransactionInfo>> function(Configuration config) throws Exception { JournalImpl messagesJournal = null; try { SequentialFileFactory messagesFF = new NIOSequentialFileFactory(new File(getJournalDir()), null, 1); messagesJournal = new JournalImpl(config.getJournalFileSize(), config.get...
/** * Reads a journal system and returns a Map<Integer,AtomicInteger> of recordTypes and the number of records per type, * independent of being deleted or not * * @param config * @return * @throws Exception */
Reads a journal system and returns a Map of recordTypes and the number of records per type, independent of being deleted or not
loadMessageJournal
{ "repo_name": "tabish121/activemq-artemis", "path": "artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java", "license": "apache-2.0", "size": 98832 }
[ "java.io.File", "java.util.LinkedList", "java.util.List", "org.apache.activemq.artemis.api.core.Pair", "org.apache.activemq.artemis.core.config.Configuration", "org.apache.activemq.artemis.core.io.SequentialFileFactory", "org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory", "org.apache.a...
import java.io.File; import java.util.LinkedList; import java.util.List; import org.apache.activemq.artemis.api.core.Pair; import org.apache.activemq.artemis.core.config.Configuration; import org.apache.activemq.artemis.core.io.SequentialFileFactory; import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFacto...
import java.io.*; import java.util.*; import org.apache.activemq.artemis.api.core.*; import org.apache.activemq.artemis.core.config.*; import org.apache.activemq.artemis.core.io.*; import org.apache.activemq.artemis.core.io.nio.*; import org.apache.activemq.artemis.core.journal.*; import org.apache.activemq.artemis.cor...
[ "java.io", "java.util", "org.apache.activemq" ]
java.io; java.util; org.apache.activemq;
579,721
private IRegion caseReplace(String replacer, int index, boolean all) throws BadLocationException { IRegion result = null; IDocumentUndoManager undoer = DocumentUndoManagerRegistry.getDocumentUndoManager(getDocument()); try { if (!isReplaceAll() && undoer != null) { undoer.beginCompoundChange(); } ...
IRegion function(String replacer, int index, boolean all) throws BadLocationException { IRegion result = null; IDocumentUndoManager undoer = DocumentUndoManagerRegistry.getDocumentUndoManager(getDocument()); try { if (!isReplaceAll() && undoer != null) { undoer.beginCompoundChange(); } IFindReplaceTarget target = getTa...
/** * Case-based replacement - after the initial find has already happened * * @param replacer - the replacement string (may be regexp) * @param index - offset of find * @param all - all if true, else initial * @return - the replacement region * * @throws BadLocationException */
Case-based replacement - after the initial find has already happened
caseReplace
{ "repo_name": "MulgaSoft/e4macs", "path": "Emacs+/src/com/mulgasoft/emacsplus/minibuffer/SearchReplaceMinibuffer.java", "license": "epl-1.0", "size": 23274 }
[ "org.eclipse.jface.text.BadLocationException", "org.eclipse.jface.text.IFindReplaceTarget", "org.eclipse.jface.text.IFindReplaceTargetExtension3", "org.eclipse.jface.text.IRegion", "org.eclipse.text.undo.DocumentUndoManagerRegistry", "org.eclipse.text.undo.IDocumentUndoManager" ]
import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IFindReplaceTarget; import org.eclipse.jface.text.IFindReplaceTargetExtension3; import org.eclipse.jface.text.IRegion; import org.eclipse.text.undo.DocumentUndoManagerRegistry; import org.eclipse.text.undo.IDocumentUndoManager;
import org.eclipse.jface.text.*; import org.eclipse.text.undo.*;
[ "org.eclipse.jface", "org.eclipse.text" ]
org.eclipse.jface; org.eclipse.text;
331,269
public void unregister(SelectableChannel channel) { unregisterInternal(channel); }
void function(SelectableChannel channel) { unregisterInternal(channel); }
/** * Unregister a Channel for polling on the specified events. * * @param socket the Channel to be unregistered */
Unregister a Channel for polling on the specified events
unregister
{ "repo_name": "Shopify/jzmq", "path": "src/org/zeromq/ZMQ.java", "license": "gpl-3.0", "size": 63328 }
[ "java.nio.channels.SelectableChannel" ]
import java.nio.channels.SelectableChannel;
import java.nio.channels.*;
[ "java.nio" ]
java.nio;
2,207,742
private void validateOrderItem(SqlSelect select, SqlNode orderItem) { switch (orderItem.getKind()) { case DESCENDING: validateFeature( RESOURCE.sQLConformance_OrderByDesc(), orderItem.getParserPosition()); validateOrderItem(select, ((SqlCal...
void function(SqlSelect select, SqlNode orderItem) { switch (orderItem.getKind()) { case DESCENDING: validateFeature( RESOURCE.sQLConformance_OrderByDesc(), orderItem.getParserPosition()); validateOrderItem(select, ((SqlCall) orderItem).operand(0)); return; } final SqlValidatorScope orderScope = getOrderScope(select); ...
/** * Validates an item in the ORDER BY clause of a SELECT statement. * * @param select Select statement * @param orderItem ORDER BY clause item */
Validates an item in the ORDER BY clause of a SELECT statement
validateOrderItem
{ "repo_name": "clarkyzl/flink", "path": "flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java", "license": "apache-2.0", "size": 272849 }
[ "org.apache.calcite.sql.SqlCall", "org.apache.calcite.sql.SqlNode", "org.apache.calcite.sql.SqlSelect" ]
import org.apache.calcite.sql.SqlCall; import org.apache.calcite.sql.SqlNode; import org.apache.calcite.sql.SqlSelect;
import org.apache.calcite.sql.*;
[ "org.apache.calcite" ]
org.apache.calcite;
2,267,318
private static void waitForStreamState(AmazonKinesisClient kinesisClient, String streamName, @Nullable StreamStatus expectedStatus) { StreamStatus streamStatus = getStreamState(kinesisClient, streamName); long waitTime = System.currentTimeMillis() + TIMEOUT; while ...
static void function(AmazonKinesisClient kinesisClient, String streamName, @Nullable StreamStatus expectedStatus) { StreamStatus streamStatus = getStreamState(kinesisClient, streamName); long waitTime = System.currentTimeMillis() + TIMEOUT; while (streamStatus != expectedStatus && waitTime > System.currentTimeMillis())...
/** * waits for the stream to be in the expected state * * @param kinesisClient * @param streamName * @param expectedStatus * @throws IllegalStateException */
waits for the stream to be in the expected state
waitForStreamState
{ "repo_name": "romy-khetan/hydrator-plugins", "path": "core-plugins/src/main/java/co/cask/hydrator/plugin/common/KinesisUtil.java", "license": "apache-2.0", "size": 4760 }
[ "com.amazonaws.services.kinesis.AmazonKinesisClient", "com.amazonaws.services.kinesis.model.StreamStatus", "com.google.common.util.concurrent.Uninterruptibles", "java.util.concurrent.TimeUnit", "javax.annotation.Nullable" ]
import com.amazonaws.services.kinesis.AmazonKinesisClient; import com.amazonaws.services.kinesis.model.StreamStatus; import com.google.common.util.concurrent.Uninterruptibles; import java.util.concurrent.TimeUnit; import javax.annotation.Nullable;
import com.amazonaws.services.kinesis.*; import com.amazonaws.services.kinesis.model.*; import com.google.common.util.concurrent.*; import java.util.concurrent.*; import javax.annotation.*;
[ "com.amazonaws.services", "com.google.common", "java.util", "javax.annotation" ]
com.amazonaws.services; com.google.common; java.util; javax.annotation;
799,399
protected void populateContext(Collection context) { }
void function(Collection context) { }
/** * Populates the context collection with information representing * this connection (such as the client host). * * This method should be overridden by subclasses to implement the * desired behavior of the populateContext method for * InboundRequest instances generated for this connectio...
Populates the context collection with information representing this connection (such as the client host). This method should be overridden by subclasses to implement the desired behavior of the populateContext method for InboundRequest instances generated for this connection
populateContext
{ "repo_name": "pfirmstone/JGDMS", "path": "JGDMS/jgdms-jeri/src/main/java/org/apache/river/jeri/internal/mux/MuxServer.java", "license": "apache-2.0", "size": 8966 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
131,242
public static Config config(ConverterRule converterRule, RelBuilderFactory relBuilderFactory) { final RelOptRuleOperand operand = converterRule.getOperand(); assert operand.childPolicy == RelOptRuleOperandChildPolicy.ANY; return Config.EMPTY.withRelBuilderFactory(relBuilderFactory) .withDesc...
static Config function(ConverterRule converterRule, RelBuilderFactory relBuilderFactory) { final RelOptRuleOperand operand = converterRule.getOperand(); assert operand.childPolicy == RelOptRuleOperandChildPolicy.ANY; return Config.EMPTY.withRelBuilderFactory(relBuilderFactory) .withDescription(STR + converterRule) .wit...
/** * Creates a configuration for a TraitMatchingRule. * * @param converterRule Rule to be restricted; rule must take a single * operand expecting a single input * @param relBuilderFactory Builder for relational expressions */
Creates a configuration for a TraitMatchingRule
config
{ "repo_name": "datametica/calcite", "path": "core/src/main/java/org/apache/calcite/rel/convert/TraitMatchingRule.java", "license": "apache-2.0", "size": 4080 }
[ "org.apache.calcite.plan.RelOptRuleOperand", "org.apache.calcite.plan.RelOptRuleOperandChildPolicy", "org.apache.calcite.rel.RelNode", "org.apache.calcite.rel.core.RelFactories", "org.apache.calcite.tools.RelBuilderFactory" ]
import org.apache.calcite.plan.RelOptRuleOperand; import org.apache.calcite.plan.RelOptRuleOperandChildPolicy; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.core.RelFactories; import org.apache.calcite.tools.RelBuilderFactory;
import org.apache.calcite.plan.*; import org.apache.calcite.rel.*; import org.apache.calcite.rel.core.*; import org.apache.calcite.tools.*;
[ "org.apache.calcite" ]
org.apache.calcite;
219,409
public Set<Object> keySet() { return map.keySet(); }
Set<Object> function() { return map.keySet(); }
/** * Returns a Set view of the attribute names (keys) contained in this Map. */
Returns a Set view of the attribute names (keys) contained in this Map
keySet
{ "repo_name": "AdmireTheDistance/android_libcore", "path": "ojluni/src/main/java/java/util/jar/Attributes.java", "license": "gpl-2.0", "size": 24560 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,782,890
public synchronized boolean startUpgrade() throws IOException { if(!upgradeState) { initializeUpgrade(); if(!upgradeState) return false; // write new upgrade state into disk FSNamesystem.getFSNamesystem().getFSImage().writeAll(); } assert currentUpgrades != null : "currentUpgrades ...
synchronized boolean function() throws IOException { if(!upgradeState) { initializeUpgrade(); if(!upgradeState) return false; FSNamesystem.getFSNamesystem().getFSImage().writeAll(); } assert currentUpgrades != null : STR; this.broadcastCommand = currentUpgrades.first().startUpgrade(); NameNode.LOG.info(STR + getUpgrade...
/** * Start distributed upgrade. * Instantiates distributed upgrade objects. * * @return true if distributed upgrade is required or false otherwise * @throws IOException */
Start distributed upgrade. Instantiates distributed upgrade objects
startUpgrade
{ "repo_name": "hanhlh/hadoop-0.20.2_FatBTree", "path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/UpgradeManagerNamenode.java", "license": "apache-2.0", "size": 6034 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.protocol.FSConstants" ]
import java.io.IOException; import org.apache.hadoop.hdfs.protocol.FSConstants;
import java.io.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,005,076
public void openRegion(final HRegionInfo region) throws IOException;
void function(final HRegionInfo region) throws IOException;
/** * Opens the specified region. * @param region region to open * @throws IOException */
Opens the specified region
openRegion
{ "repo_name": "Shmuma/hbase", "path": "src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java", "license": "apache-2.0", "size": 13285 }
[ "java.io.IOException", "org.apache.hadoop.hbase.HRegionInfo" ]
import java.io.IOException; import org.apache.hadoop.hbase.HRegionInfo;
import java.io.*; import org.apache.hadoop.hbase.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,856,927
public ActionForward recalculateAmountToDraw(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ContractsGrantsLetterOfCreditReviewForm contractsGrantsLetterOfCreditReviewForm = (ContractsGrantsLetterOfCreditReviewForm) form; Contract...
ActionForward function(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ContractsGrantsLetterOfCreditReviewForm contractsGrantsLetterOfCreditReviewForm = (ContractsGrantsLetterOfCreditReviewForm) form; ContractsGrantsLetterOfCreditReviewDocument contra...
/** * To recalculate the amount to Draw for every contract control account * * @param mapping An ActionMapping * @param form An ActionForm * @param request The HttpServletRequest * @param response The HttpServletResponse * @return An ActionForward * @throws Exception *...
To recalculate the amount to Draw for every contract control account
recalculateAmountToDraw
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/document/web/struts/ContractsGrantsLetterOfCreditReviewAction.java", "license": "agpl-3.0", "size": 16714 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.struts.action.ActionForm", "org.apache.struts.action.ActionForward", "org.apache.struts.action.ActionMapping", "org.kuali.kfs.krad.util.GlobalVariables", "org.kuali.kfs.krad.util.ObjectUtils", "org.kuali.kfs...
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.kuali.kfs.krad.util.GlobalVariables; import org.kuali.kfs.krad.util.ObjectUtil...
import javax.servlet.http.*; import org.apache.struts.action.*; import org.kuali.kfs.krad.util.*; import org.kuali.kfs.module.ar.*; import org.kuali.kfs.module.ar.businessobject.*; import org.kuali.kfs.module.ar.document.*; import org.kuali.kfs.sys.*; import org.kuali.rice.core.api.util.type.*;
[ "javax.servlet", "org.apache.struts", "org.kuali.kfs", "org.kuali.rice" ]
javax.servlet; org.apache.struts; org.kuali.kfs; org.kuali.rice;
988,158
public static Double getSum( List<Double> values ) { Double sum = 0.0; for ( Double value : values ) { if ( value != null ) { sum += value; } } return sum; }
static Double function( List<Double> values ) { Double sum = 0.0; for ( Double value : values ) { if ( value != null ) { sum += value; } } return sum; }
/** * Returns the sum of the given values. * * @param values the values. * @return the sum. */
Returns the sum of the given values
getSum
{ "repo_name": "vietnguyen/dhis2-core", "path": "dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java", "license": "bsd-3-clause", "size": 24287 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,623,871
static JSONObject invalidFeatureNoGeometry() throws Exception { return new JSONObject( "{\n" + " \"type\": \"Feature\",\n" + " \"properties\": {\n" + " \"name\": \"Dinagat Islands\"\n" + " }...
static JSONObject invalidFeatureNoGeometry() throws Exception { return new JSONObject( "{\n" + STRtype\STRFeature\",\n" + STRproperties\STR + STRname\STRDinagat Islands\"\n" + STR + "}"); }
/** * Feature missing its geometry member, should be created with null geometry * * @return feature missing its geometry */
Feature missing its geometry member, should be created with null geometry
invalidFeatureNoGeometry
{ "repo_name": "googlemaps/android-maps-utils", "path": "library/src/test/java/com/google/maps/android/data/geojson/GeoJsonTestUtil.java", "license": "apache-2.0", "size": 25191 }
[ "org.json.JSONObject" ]
import org.json.JSONObject;
import org.json.*;
[ "org.json" ]
org.json;
583,286
@Test public void testPlus() { RoundedMoney m = RoundedMoney.of(100, "CHF"); assertEquals(RoundedMoney.of(100, "CHF"), m.plus()); m = RoundedMoney.of(123.234, "CHF"); assertEquals(RoundedMoney.of(123.234, "CHF"), m.plus()); } /** * Test method for * {@link Roun...
void function() { RoundedMoney m = RoundedMoney.of(100, "CHF"); assertEquals(RoundedMoney.of(100, "CHF"), m.plus()); m = RoundedMoney.of(123.234, "CHF"); assertEquals(RoundedMoney.of(123.234, "CHF"), m.plus()); } /** * Test method for * {@link RoundedMoney#subtract(javax.money.MonetaryAmount)}
/** * Test method for {@link RoundedMoney#plus()}. */
Test method for <code>RoundedMoney#plus()</code>
testPlus
{ "repo_name": "JavaMoney/jsr354-ri-bp", "path": "src/test/java/org/javamoney/moneta/RoundedMoneyTest.java", "license": "apache-2.0", "size": 52126 }
[ "javax.money.MonetaryAmount", "org.testng.Assert", "org.testng.annotations.Test" ]
import javax.money.MonetaryAmount; import org.testng.Assert; import org.testng.annotations.Test;
import javax.money.*; import org.testng.*; import org.testng.annotations.*;
[ "javax.money", "org.testng", "org.testng.annotations" ]
javax.money; org.testng; org.testng.annotations;
72,385
public static void applyTraversalRecursively(final Consumer<Traversal.Admin<?, ?>> consumer, final Traversal.Admin<?, ?> traversal) { consumer.accept(traversal); for (final Step<?, ?> step : traversal.getSteps()) { if (step instanceof TraversalParent) { for (final Travers...
static void function(final Consumer<Traversal.Admin<?, ?>> consumer, final Traversal.Admin<?, ?> traversal) { consumer.accept(traversal); for (final Step<?, ?> step : traversal.getSteps()) { if (step instanceof TraversalParent) { for (final Traversal.Admin<?, ?> local : ((TraversalParent) step).getLocalChildren()) { ap...
/** * Apply the provider {@link Consumer} function to the provided {@link Traversal} and all of its children. * * @param consumer the function to apply to the each traversal in the tree * @param traversal the root traversal to start application */
Apply the provider <code>Consumer</code> function to the provided <code>Traversal</code> and all of its children
applyTraversalRecursively
{ "repo_name": "jorgebay/tinkerpop", "path": "gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java", "license": "apache-2.0", "size": 33065 }
[ "java.util.function.Consumer", "org.apache.tinkerpop.gremlin.process.traversal.Step", "org.apache.tinkerpop.gremlin.process.traversal.Traversal", "org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent" ]
import java.util.function.Consumer; import org.apache.tinkerpop.gremlin.process.traversal.Step; import org.apache.tinkerpop.gremlin.process.traversal.Traversal; import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent;
import java.util.function.*; import org.apache.tinkerpop.gremlin.process.traversal.*; import org.apache.tinkerpop.gremlin.process.traversal.step.*;
[ "java.util", "org.apache.tinkerpop" ]
java.util; org.apache.tinkerpop;
1,056,851
private void addChangeEventHook(WebElement element) { if (!isFirefox) { return; } checkState(!isChangeEventHookAdded(), "The `%1$s` event hook can only be added once in the document.", CHANGE_EVENT); executeScript(ADD_CHANGE_E...
void function(WebElement element) { if (!isFirefox) { return; } checkState(!isChangeEventHookAdded(), STR, CHANGE_EVENT); executeScript(ADD_CHANGE_EVENT_HOOK, element, CHANGE_EVENT, HOOK_ATTRIBUTE); }
/** * Adds a {@value CHANGE_EVENT} event hook for the element. * The hook allows detection of the event required for {@link FirefoxChangeHandler#fireChangeEventIfNotFired}. * * @param element the element for which the hook will track whether the event is fired on the element ...
Adds a CHANGE_EVENT event hook for the element. The hook allows detection of the event required for <code>FirefoxChangeHandler#fireChangeEventIfNotFired</code>
addChangeEventHook
{ "repo_name": "xpdavid/teammates", "path": "src/e2e/java/teammates/e2e/pageobjects/AppPage.java", "license": "gpl-2.0", "size": 32036 }
[ "com.google.common.base.Preconditions", "org.openqa.selenium.WebElement" ]
import com.google.common.base.Preconditions; import org.openqa.selenium.WebElement;
import com.google.common.base.*; import org.openqa.selenium.*;
[ "com.google.common", "org.openqa.selenium" ]
com.google.common; org.openqa.selenium;
473,451
public void testAddDependencyJars() throws Exception { Job job = new Job(); TableMapReduceUtil.addDependencyJars(job); String tmpjars = job.getConfiguration().get("tmpjars"); System.err.println("tmpjars: " + tmpjars); assertTrue(tmpjars.contains("zookeeper")); assertFalse(tmpjars.contains("gu...
void function() throws Exception { Job job = new Job(); TableMapReduceUtil.addDependencyJars(job); String tmpjars = job.getConfiguration().get(STR); System.err.println(STR + tmpjars); assertTrue(tmpjars.contains(STR)); assertFalse(tmpjars.contains("guava")); System.err.println(STR); TableMapReduceUtil.addDependencyJars...
/** * Test that we add tmpjars correctly including the ZK jar. */
Test that we add tmpjars correctly including the ZK jar
testAddDependencyJars
{ "repo_name": "bcopeland/hbase-thrift", "path": "src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduce.java", "license": "apache-2.0", "size": 9936 }
[ "org.apache.hadoop.mapreduce.Job", "org.junit.Assert" ]
import org.apache.hadoop.mapreduce.Job; import org.junit.Assert;
import org.apache.hadoop.mapreduce.*; import org.junit.*;
[ "org.apache.hadoop", "org.junit" ]
org.apache.hadoop; org.junit;
1,725,223
private EnumOutline generateEnumDef(CEnumLeafInfo e) { JDefinedClass type; type = getClassFactory().createClass( getContainer(e.parent, EXPOSED), e.shortName, e.getLocator(), ClassType.ENUM); type.javadoc().append(e.javadoc); return new EnumOutline(e, type) {
EnumOutline function(CEnumLeafInfo e) { JDefinedClass type; type = getClassFactory().createClass( getContainer(e.parent, EXPOSED), e.shortName, e.getLocator(), ClassType.ENUM); type.javadoc().append(e.javadoc); return new EnumOutline(e, type) {
/** * Generates the minimum {@link JDefinedClass} skeleton * without filling in its body. */
Generates the minimum <code>JDefinedClass</code> skeleton without filling in its body
generateEnumDef
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/BeanGenerator.java", "license": "gpl-2.0", "size": 31882 }
[ "com.sun.codemodel.internal.ClassType", "com.sun.codemodel.internal.JDefinedClass", "com.sun.tools.internal.xjc.model.CEnumLeafInfo", "com.sun.tools.internal.xjc.outline.EnumOutline" ]
import com.sun.codemodel.internal.ClassType; import com.sun.codemodel.internal.JDefinedClass; import com.sun.tools.internal.xjc.model.CEnumLeafInfo; import com.sun.tools.internal.xjc.outline.EnumOutline;
import com.sun.codemodel.internal.*; import com.sun.tools.internal.xjc.model.*; import com.sun.tools.internal.xjc.outline.*;
[ "com.sun.codemodel", "com.sun.tools" ]
com.sun.codemodel; com.sun.tools;
1,740,310
public void paintEditorPaneBackground(SynthContext context, Graphics g, int x, int y, int w, int h) { paintBackground(context, g, x, y, w, h, null); }
void function(SynthContext context, Graphics g, int x, int y, int w, int h) { paintBackground(context, g, x, y, w, h, null); }
/** * Paints the background of an editor pane. * * @param context SynthContext identifying the <code>JComponent</code> and * <code>Region</code> to paint to * @param g <code>Graphics</code> to paint to * @param x X coordinate of the area to paint to * @param...
Paints the background of an editor pane
paintEditorPaneBackground
{ "repo_name": "anhtu1995ok/seaglass", "path": "src/main/java/com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java", "license": "apache-2.0", "size": 119406 }
[ "java.awt.Graphics", "javax.swing.plaf.synth.SynthContext" ]
import java.awt.Graphics; import javax.swing.plaf.synth.SynthContext;
import java.awt.*; import javax.swing.plaf.synth.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,401,351
public PersonalAddress storePersonalAddress(PersonalAddress personalAddress);
PersonalAddress function(PersonalAddress personalAddress);
/** * Store the given <code>PersonalAddress</code>. * * @param personalAddress */
Store the given <code>PersonalAddress</code>
storePersonalAddress
{ "repo_name": "iservport/helianto", "path": "helianto-classic/src/main/java/org/helianto/classic/IdentityMgr.java", "license": "apache-2.0", "size": 2095 }
[ "org.helianto.core.domain.PersonalAddress" ]
import org.helianto.core.domain.PersonalAddress;
import org.helianto.core.domain.*;
[ "org.helianto.core" ]
org.helianto.core;
1,534,329
@Authorized(PrivilegeConstants.SQL_LEVEL_ACCESS) public List<List<Object>> executeSQL(String sql, boolean selectOnly) throws APIException;
@Authorized(PrivilegeConstants.SQL_LEVEL_ACCESS) List<List<Object>> function(String sql, boolean selectOnly) throws APIException;
/** * Runs the <code>sql</code> on the database. If <code>selectOnly</code> is flagged then any * non-select sql statements will be rejected. * * @param sql * @param selectOnly * @return ResultSet * @throws APIException * @should execute sql containing group by */
Runs the <code>sql</code> on the database. If <code>selectOnly</code> is flagged then any non-select sql statements will be rejected
executeSQL
{ "repo_name": "Winbobob/openmrs-core", "path": "api/src/main/java/org/openmrs/api/AdministrationService.java", "license": "mpl-2.0", "size": 24849 }
[ "java.util.List", "org.openmrs.annotation.Authorized", "org.openmrs.util.PrivilegeConstants" ]
import java.util.List; import org.openmrs.annotation.Authorized; import org.openmrs.util.PrivilegeConstants;
import java.util.*; import org.openmrs.annotation.*; import org.openmrs.util.*;
[ "java.util", "org.openmrs.annotation", "org.openmrs.util" ]
java.util; org.openmrs.annotation; org.openmrs.util;
670,760
public void bind(final int port) { try { server = new ServerSocket(port); } catch (final Exception ex) { handleException(ex); } }
void function(final int port) { try { server = new ServerSocket(port); } catch (final Exception ex) { handleException(ex); } }
/** * Binds the server to the given port. * @param port The port the server should be bound to */
Binds the server to the given port
bind
{ "repo_name": "Sogomn/Sogomn-engine", "path": "src/de/sogomn/spjgl/net/TCPServer.java", "license": "apache-2.0", "size": 3889 }
[ "java.net.ServerSocket" ]
import java.net.ServerSocket;
import java.net.*;
[ "java.net" ]
java.net;
156,019