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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Test
public void testAppendBytesAsPrintFriendlyString() throws Exception {
StringBuilder builder = null;
try {
Hl7Util.appendBytesAsPrintFriendlyString(builder, null);
fail("Exception should be raised with null StringBuilder argument");
} catch (IllegalArgumentE... | void function() throws Exception { StringBuilder builder = null; try { Hl7Util.appendBytesAsPrintFriendlyString(builder, null); fail(STR); } catch (IllegalArgumentException ignoredEx) { } builder = new StringBuilder(); Hl7Util.appendBytesAsPrintFriendlyString(builder, (byte[]) null); assertEquals(Hl7Util.NULL_REPLACEME... | /**
* Description of test.
*
* @throws Exception in the event of a test error.
*/ | Description of test | testAppendBytesAsPrintFriendlyString | {
"repo_name": "rmarting/camel",
"path": "components/camel-mllp/src/test/java/org/apache/camel/component/mllp/internal/Hl7UtilTest.java",
"license": "apache-2.0",
"size": 34330
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,706,538 |
protected static String _getName(File file)
{
assert(file != null);
String filename = file.getName();
return filename.substring(0, filename.lastIndexOf('.'));
} | static String function(File file) { assert(file != null); String filename = file.getName(); return filename.substring(0, filename.lastIndexOf('.')); } | /**
*
* Utility method to get the filename of a file, without extension.
*
* @param file The file to get the filename of.
*
* @return The filename of the file, without extension.
*/ | Utility method to get the filename of a file, without extension | _getName | {
"repo_name": "goldsborough/capstone",
"path": "source/capstone/data/Data.java",
"license": "mit",
"size": 4897
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,742,626 |
StaticScope<ConcreteType> createInstanceScope(ObjectType instanceType); | StaticScope<ConcreteType> createInstanceScope(ObjectType instanceType); | /**
* Returns a scope for the given instance type, nested inside the given
* scope of the prototype. This will include slots for each of the
* properties on our type.
*/ | Returns a scope for the given instance type, nested inside the given scope of the prototype. This will include slots for each of the properties on our type | createInstanceScope | {
"repo_name": "johan/closure-compiler",
"path": "src/com/google/javascript/jscomp/ConcreteType.java",
"license": "apache-2.0",
"size": 25550
} | [
"com.google.javascript.rhino.jstype.ObjectType",
"com.google.javascript.rhino.jstype.StaticScope"
] | import com.google.javascript.rhino.jstype.ObjectType; import com.google.javascript.rhino.jstype.StaticScope; | import com.google.javascript.rhino.jstype.*; | [
"com.google.javascript"
] | com.google.javascript; | 454,975 |
private void processPingRequest() {
TcpDiscoveryPingResponse res = new TcpDiscoveryPingResponse(getLocalNodeId());
res.client(true);
sockWriter.sendMessage(res);
} | void function() { TcpDiscoveryPingResponse res = new TcpDiscoveryPingResponse(getLocalNodeId()); res.client(true); sockWriter.sendMessage(res); } | /**
* Router want to ping this client.
*/ | Router want to ping this client | processPingRequest | {
"repo_name": "vldpyatkov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java",
"license": "apache-2.0",
"size": 77618
} | [
"org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryPingResponse"
] | import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryPingResponse; | import org.apache.ignite.spi.discovery.tcp.messages.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,266,845 |
public void setFirefoxBinaryPath(String firefoxBinaryPath) {
Validate.notNull(firefoxBinaryPath, "Parameter firefoxBinaryPath must not be null.");
if (!this.firefoxBinaryPath.equals(firefoxBinaryPath)) {
this.firefoxBinaryPath = firefoxBinaryPath;
saveAndSetSystemProperty(
... | void function(String firefoxBinaryPath) { Validate.notNull(firefoxBinaryPath, STR); if (!this.firefoxBinaryPath.equals(firefoxBinaryPath)) { this.firefoxBinaryPath = firefoxBinaryPath; saveAndSetSystemProperty( FIREFOX_BINARY_KEY, FIREFOX_BINARY_SYSTEM_PROPERTY, firefoxBinaryPath); } } | /**
* Sets the path to Firefox binary.
*
* @param firefoxBinaryPath the path to Firefox binary, or empty if not known.
* @throws IllegalArgumentException if {@code firefoxBinaryPath} is {@code null}.
*/ | Sets the path to Firefox binary | setFirefoxBinaryPath | {
"repo_name": "kingthorin/zap-extensions",
"path": "addOns/selenium/src/main/java/org/zaproxy/zap/extension/selenium/SeleniumOptions.java",
"license": "apache-2.0",
"size": 16873
} | [
"org.apache.commons.lang.Validate"
] | import org.apache.commons.lang.Validate; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,194,863 |
public void showPlotProvider(PlotProvider displayPlotProvider) {
// If it is not a contour plot then plot the regular series
if (!displayPlotProvider.isContour()) {
// Get the time to show
List<Double> times = displayPlotProvider.getTimes();
double time = (times.isEmpty() ? 0.0 : times.get(0));
// ... | void function(PlotProvider displayPlotProvider) { if (!displayPlotProvider.isContour()) { List<Double> times = displayPlotProvider.getTimes(); double time = (times.isEmpty() ? 0.0 : times.get(0)); List<ISeries> seriesList = displayPlotProvider .getSeriesAtTime(time); ISeries indepSeries = displayPlotProvider.getIndepen... | /**
* This function sets up the SWT XYGraph
*
* @param displayPlotProvider
* The PlotProvider containing the information to create the plot
*/ | This function sets up the SWT XYGraph | showPlotProvider | {
"repo_name": "jarrah42/eavp",
"path": "org.eclipse.eavp.viz.service/src/org/eclipse/eavp/viz/service/csv/CSVPlotEditor.java",
"license": "epl-1.0",
"size": 31812
} | [
"java.util.ArrayList",
"java.util.List",
"org.eclipse.eavp.viz.service.ISeries",
"org.eclipse.eavp.viz.service.styles.BasicErrorStyle",
"org.eclipse.nebula.visualization.widgets.datadefinition.ColorMap",
"org.eclipse.nebula.visualization.widgets.figures.IntensityGraphFigure",
"org.eclipse.swt.layout.Gri... | import java.util.ArrayList; import java.util.List; import org.eclipse.eavp.viz.service.ISeries; import org.eclipse.eavp.viz.service.styles.BasicErrorStyle; import org.eclipse.nebula.visualization.widgets.datadefinition.ColorMap; import org.eclipse.nebula.visualization.widgets.figures.IntensityGraphFigure; import org.ec... | import java.util.*; import org.eclipse.eavp.viz.service.*; import org.eclipse.eavp.viz.service.styles.*; import org.eclipse.nebula.visualization.widgets.datadefinition.*; import org.eclipse.nebula.visualization.widgets.figures.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"java.util",
"org.eclipse.eavp",
"org.eclipse.nebula",
"org.eclipse.swt"
] | java.util; org.eclipse.eavp; org.eclipse.nebula; org.eclipse.swt; | 1,196,691 |
protected int countLineNumberUserFile() throws IOException {
return readContent(values.getUserFiles().get(0).getAbsolutePath()).size();
} | int function() throws IOException { return readContent(values.getUserFiles().get(0).getAbsolutePath()).size(); } | /**
* Count the number of lines in the users file.
*
* @return The number of lines in the file
* @throws IOException
*/ | Count the number of lines in the users file | countLineNumberUserFile | {
"repo_name": "JiriOndrusek/wildfly-core",
"path": "domain-management/src/test/java/org/jboss/as/domain/management/security/adduser/PropertyTestHelper.java",
"license": "lgpl-2.1",
"size": 10724
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 284,145 |
public static <R> void execOnAllV2Exprs(
SoyNode node,
AbstractExprNodeVisitor<R> exprNodeVisitor,
ErrorReporter errorReporter) {
execOnAllV2ExprsShortcircuitably(
node, exprNodeVisitor, null , errorReporter);
} | static <R> void function( SoyNode node, AbstractExprNodeVisitor<R> exprNodeVisitor, ErrorReporter errorReporter) { execOnAllV2ExprsShortcircuitably( node, exprNodeVisitor, null , errorReporter); } | /**
* Given a Soy node and a visitor for expression trees, traverses the subtree of the node and
* executes the visitor on all expressions held by nodes in the subtree.
*
* <p> Only processes expressions in V2 syntax. Ignores all expressions in V1 syntax.
*
* @param <R> The ExprNode visitor's return t... | Given a Soy node and a visitor for expression trees, traverses the subtree of the node and executes the visitor on all expressions held by nodes in the subtree. Only processes expressions in V2 syntax. Ignores all expressions in V1 syntax | execOnAllV2Exprs | {
"repo_name": "oujesky/closure-templates",
"path": "java/src/com/google/template/soy/soytree/SoytreeUtils.java",
"license": "apache-2.0",
"size": 14587
} | [
"com.google.template.soy.error.ErrorReporter",
"com.google.template.soy.exprtree.AbstractExprNodeVisitor"
] | import com.google.template.soy.error.ErrorReporter; import com.google.template.soy.exprtree.AbstractExprNodeVisitor; | import com.google.template.soy.error.*; import com.google.template.soy.exprtree.*; | [
"com.google.template"
] | com.google.template; | 2,135,347 |
private File directory() {
if (this.directory == null) {
return (null);
}
if (this.directoryFile != null) {
// NOTE: Race condition is harmless, so do not synchronize
return (this.directoryFile);
}
File file = new File(this.directory);
... | File function() { if (this.directory == null) { return (null); } if (this.directoryFile != null) { return (this.directoryFile); } File file = new File(this.directory); if (!file.isAbsolute()) { Container container = manager.getContainer(); if (container instanceof Context) { ServletContext servletContext = ((Context) c... | /**
* Return a File object representing the pathname to our
* session persistence directory, if any. The directory will be
* created if it does not already exist.
*/ | Return a File object representing the pathname to our session persistence directory, if any. The directory will be created if it does not already exist | directory | {
"repo_name": "plumer/codana",
"path": "tomcat_files/6.0.43/FileStore.java",
"license": "mit",
"size": 12715
} | [
"java.io.File",
"javax.servlet.ServletContext",
"org.apache.catalina.Container",
"org.apache.catalina.Context",
"org.apache.catalina.Globals"
] | import java.io.File; import javax.servlet.ServletContext; import org.apache.catalina.Container; import org.apache.catalina.Context; import org.apache.catalina.Globals; | import java.io.*; import javax.servlet.*; import org.apache.catalina.*; | [
"java.io",
"javax.servlet",
"org.apache.catalina"
] | java.io; javax.servlet; org.apache.catalina; | 2,318,055 |
public void testRangeQuery() throws Exception {
RangeQuery rq = new RangeQuery(
new Term("sorter", "b"), new Term("sorter", "d"), true);
Query filteredquery = new FilteredQuery(rq, filter);
Hits hits = searcher.search(filteredquery);
assertEquals(2, hits.length());
} | void function() throws Exception { RangeQuery rq = new RangeQuery( new Term(STR, "b"), new Term(STR, "d"), true); Query filteredquery = new FilteredQuery(rq, filter); Hits hits = searcher.search(filteredquery); assertEquals(2, hits.length()); } | /**
* This tests FilteredQuery's rewrite correctness
*/ | This tests FilteredQuery's rewrite correctness | testRangeQuery | {
"repo_name": "lpxz/grail-lucene358684",
"path": "src/test/org/apache/lucene/search/TestFilteredQuery.java",
"license": "apache-2.0",
"size": 4227
} | [
"org.apache.lucene.index.Term"
] | import org.apache.lucene.index.Term; | import org.apache.lucene.index.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 417,406 |
@Override
@SuppressWarnings("unchecked")
public <T> T[] toArray(T[] vec) {
int i = 0;
List<A> l = this;
Object[] dest = vec;
while (l.nonEmpty() && i < vec.length) {
dest[i] = l.head;
l = l.tail;
i++;
}
if (l.isEmpty()) {
if (i < vec.length)
vec[i] = null;
... | @SuppressWarnings(STR) <T> T[] function(T[] vec) { int i = 0; List<A> l = this; Object[] dest = vec; while (l.nonEmpty() && i < vec.length) { dest[i] = l.head; l = l.tail; i++; } if (l.isEmpty()) { if (i < vec.length) vec[i] = null; return vec; } vec = (T[]) Array.newInstance(vec.getClass().getComponentType(), size());... | /**
* Copy successive elements of this list into given vector until list is
* exhausted or end of vector is reached.
*/ | Copy successive elements of this list into given vector until list is exhausted or end of vector is reached | toArray | {
"repo_name": "w7cook/batch-javac",
"path": "src/share/classes/com/sun/tools/javac/util/List.java",
"license": "gpl-2.0",
"size": 13097
} | [
"java.lang.reflect.Array"
] | import java.lang.reflect.Array; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 872,172 |
public boolean addSourceDirs(Collection<String> sourceDirs) {
boolean isNew = false;
if (sourceDirs == null || sourceDirs.isEmpty()) {
return isNew;
}
for (String dirName : sourceDirs) {
for (String dir : makeAbsoluteCwdCandidates(dirName)) {
... | boolean function(Collection<String> sourceDirs) { boolean isNew = false; if (sourceDirs == null sourceDirs.isEmpty()) { return isNew; } for (String dirName : sourceDirs) { for (String dir : makeAbsoluteCwdCandidates(dirName)) { isNew = addToListInternal(srcDirList, dir) isNew; } } sourceFinder = new SourceFinder(this);... | /**
* Add source directories to the project.
*
* @param sourceDirs
* The source directories to add. These can be either absolute paths
* or relative to any of the working directories in this project object.
* @return true if a source directory was added or false if al... | Add source directories to the project | addSourceDirs | {
"repo_name": "KengoTODA/spotbugs",
"path": "spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java",
"license": "lgpl-2.1",
"size": 36040
} | [
"edu.umd.cs.findbugs.ba.SourceFinder",
"java.util.Collection"
] | import edu.umd.cs.findbugs.ba.SourceFinder; import java.util.Collection; | import edu.umd.cs.findbugs.ba.*; import java.util.*; | [
"edu.umd.cs",
"java.util"
] | edu.umd.cs; java.util; | 1,447,332 |
public static FeatureSpecAttribute lookupAttributeForFeatureName(List<FeatureSpecAttribute> attributes,
String mlFeatureName, String instanceType) {
FeatureSpecAttribute ret = null;
// these features are created by the LF and will not be present in the list of specifications.
// We create a new ... | static FeatureSpecAttribute function(List<FeatureSpecAttribute> attributes, String mlFeatureName, String instanceType) { FeatureSpecAttribute ret = null; if(mlFeatureName.endsWith(START_SYMBOL) mlFeatureName.endsWith(STOP_SYMBOL)) { } String attrName = attrName4MlFeature(mlFeatureName); if (attrName.contains(TYPESEP)) ... | /**
* Try and find the attribute that corresponds to the ML featureName.
*
* This requries the instance annotation type because the way how the ML feature is generated
* depends on the instance annotation type.
*
* @param attributes the list of feature attributes
* @param mlFeatureName ML feature n... | Try and find the attribute that corresponds to the ML featureName. This requries the instance annotation type because the way how the ML feature is generated depends on the instance annotation type | lookupAttributeForFeatureName | {
"repo_name": "GateNLP/gateplugin-LearningFramework",
"path": "src/main/java/gate/plugin/learningframework/features/FeatureExtractionMalletSparse.java",
"license": "lgpl-2.1",
"size": 65611
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 51,430 |
@SuppressWarnings({ "rawtypes", "unchecked" })
private void bindInterfaces(Class type, Class[] interfaces) {
for (Class implemented : interfaces) {
bind(implemented).to(type).in(Singleton.class);
bindInterfaces(type, implemented.getInterfaces());
}
} | @SuppressWarnings({ STR, STR }) void function(Class type, Class[] interfaces) { for (Class implemented : interfaces) { bind(implemented).to(type).in(Singleton.class); bindInterfaces(type, implemented.getInterfaces()); } } | /**
* Recurse and bind all the interfaces implemented by the given type.
*/ | Recurse and bind all the interfaces implemented by the given type | bindInterfaces | {
"repo_name": "walterDurin/stickycode",
"path": "net.stickycode.mockwire/sticky-mockwire-guice3/src/main/java/net/stickycode/mockwire/guice3/IsolatedTestModule.java",
"license": "apache-2.0",
"size": 3155
} | [
"com.google.inject.Singleton"
] | import com.google.inject.Singleton; | import com.google.inject.*; | [
"com.google.inject"
] | com.google.inject; | 896,540 |
private boolean areSubeditorOpened(INode node){
JasperReportsConfiguration jConfig = ((ANode)node).getJasperConfiguration();
if (jConfig != null) {
Object rawEditor = jConfig.get(AMultiEditor.THEEDITOR);
if (rawEditor != null && rawEditor instanceof JrxmlEditor){
JrxmlEditor editor = (JrxmlEditor)rawEd... | boolean function(INode node){ JasperReportsConfiguration jConfig = ((ANode)node).getJasperConfiguration(); if (jConfig != null) { Object rawEditor = jConfig.get(AMultiEditor.THEEDITOR); if (rawEditor != null && rawEditor instanceof JrxmlEditor){ JrxmlEditor editor = (JrxmlEditor)rawEditor; return editor.getReportContai... | /**
* Check if there are other subeditors opened. This is done to avoid
* the send the close editor event if there aren't editors opened,
* and do useless operation. If for some reason it is not possible to
* check it always return true
*
* @param node a not null node of the model
* @return true if the... | Check if there are other subeditors opened. This is done to avoid the send the close editor event if there aren't editors opened, and do useless operation. If for some reason it is not possible to check it always return true | areSubeditorOpened | {
"repo_name": "OpenSoftwareSolutions/PDFReporter-Studio",
"path": "com.jaspersoft.studio/src/com/jaspersoft/studio/model/command/CloseSubeditorsCommand.java",
"license": "lgpl-3.0",
"size": 5323
} | [
"com.jaspersoft.studio.editor.AMultiEditor",
"com.jaspersoft.studio.editor.JrxmlEditor",
"com.jaspersoft.studio.model.ANode",
"com.jaspersoft.studio.model.INode",
"com.jaspersoft.studio.utils.jasper.JasperReportsConfiguration"
] | import com.jaspersoft.studio.editor.AMultiEditor; import com.jaspersoft.studio.editor.JrxmlEditor; import com.jaspersoft.studio.model.ANode; import com.jaspersoft.studio.model.INode; import com.jaspersoft.studio.utils.jasper.JasperReportsConfiguration; | import com.jaspersoft.studio.editor.*; import com.jaspersoft.studio.model.*; import com.jaspersoft.studio.utils.jasper.*; | [
"com.jaspersoft.studio"
] | com.jaspersoft.studio; | 981,168 |
void add(User user); | void add(User user); | /**
* Adds user.
* @param user to add.
*/ | Adds user | add | {
"repo_name": "OleksandrProshak/Alexandr_Proshak",
"path": "Level_Junior/Part_004_Servlet_JSP/3_Servlet/src/main/java/ru/job4j/task1/persistent/Store.java",
"license": "apache-2.0",
"size": 818
} | [
"ru.job4j.task1.logic.entity.User"
] | import ru.job4j.task1.logic.entity.User; | import ru.job4j.task1.logic.entity.*; | [
"ru.job4j.task1"
] | ru.job4j.task1; | 2,101,606 |
@Override
public String hash(AffMatchOrganization organization) {
Preconditions.checkNotNull(organization);
List<String> orgNames = getOrgNamesFunction.apply(organization);
if (CollectionUtils.isEmpty(orgNames)) {
return null;
}
... | String function(AffMatchOrganization organization) { Preconditions.checkNotNull(organization); List<String> orgNames = getOrgNamesFunction.apply(organization); if (CollectionUtils.isEmpty(orgNames)) { return null; } return stringHasher.hash(orgNames.get(0)); } | /**
* Returns a hash of the passed organization. The hash is generated from the first name of the organization names returned
* by the function {@link #setGetOrgNamesFunction(Function)}.<br/>
* The method uses {@link BucketHasher#hash(String)} internally.<br/>
* Returns null if the function {@link #... | Returns a hash of the passed organization. The hash is generated from the first name of the organization names returned by the function <code>#setGetOrgNamesFunction(Function)</code>. The method uses <code>BucketHasher#hash(String)</code> internally. Returns null if the function <code>#setGetOrgNamesFunction(Function)<... | hash | {
"repo_name": "openaire/iis",
"path": "iis-wf/iis-wf-affmatching/src/main/java/eu/dnetlib/iis/wf/affmatching/bucket/OrganizationNameBucketHasher.java",
"license": "apache-2.0",
"size": 2423
} | [
"com.google.common.base.Preconditions",
"eu.dnetlib.iis.wf.affmatching.model.AffMatchOrganization",
"java.util.List",
"org.apache.commons.collections.CollectionUtils"
] | import com.google.common.base.Preconditions; import eu.dnetlib.iis.wf.affmatching.model.AffMatchOrganization; import java.util.List; import org.apache.commons.collections.CollectionUtils; | import com.google.common.base.*; import eu.dnetlib.iis.wf.affmatching.model.*; import java.util.*; import org.apache.commons.collections.*; | [
"com.google.common",
"eu.dnetlib.iis",
"java.util",
"org.apache.commons"
] | com.google.common; eu.dnetlib.iis; java.util; org.apache.commons; | 105,199 |
public RealMatrix getMeasurementJacobian() {
return measurementJacobian;
} | RealMatrix function() { return measurementJacobian; } | /** Get the Jacobian of the measurement with respect to the state (H matrix).
* @return Jacobian of the measurement with respect to the state (may be null for initial
* process estimate or if the measurement has been ignored)
* @since 1.4
*/ | Get the Jacobian of the measurement with respect to the state (H matrix) | getMeasurementJacobian | {
"repo_name": "sdinot/hipparchus",
"path": "hipparchus-filtering/src/main/java/org/hipparchus/filtering/kalman/ProcessEstimate.java",
"license": "apache-2.0",
"size": 5803
} | [
"org.hipparchus.linear.RealMatrix"
] | import org.hipparchus.linear.RealMatrix; | import org.hipparchus.linear.*; | [
"org.hipparchus.linear"
] | org.hipparchus.linear; | 656,767 |
EReference getBranchInfo_Head(); | EReference getBranchInfo_Head(); | /**
* Returns the meta object for the containment reference '
* {@link org.eclipse.emf.emfstore.internal.server.model.versioning.BranchInfo#getHead <em>Head</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return the meta object for the containment reference '<em>Head</em>'.
* @see org.eclipse.... | Returns the meta object for the containment reference ' <code>org.eclipse.emf.emfstore.internal.server.model.versioning.BranchInfo#getHead Head</code>'. | getBranchInfo_Head | {
"repo_name": "edgarmueller/emfstore-rest",
"path": "bundles/org.eclipse.emf.emfstore.server.model/src/org/eclipse/emf/emfstore/internal/server/model/versioning/VersioningPackage.java",
"license": "epl-1.0",
"size": 84798
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,308,526 |
return new NonConvertedTag(original);
}
private final Tag original;
private NonConvertedTag(Tag original) {
this.original = original;
} | return new NonConvertedTag(original); } private final Tag original; private NonConvertedTag(Tag original) { this.original = original; } | /**
* Create the tag from given original one.
*
* @param original The original one.
* @return The new tag.
*/ | Create the tag from given original one | of | {
"repo_name": "mjeanroy/exiftool",
"path": "src/main/java/com/thebuzzmedia/exiftool/core/NonConvertedTag.java",
"license": "apache-2.0",
"size": 2452
} | [
"com.thebuzzmedia.exiftool.Tag"
] | import com.thebuzzmedia.exiftool.Tag; | import com.thebuzzmedia.exiftool.*; | [
"com.thebuzzmedia.exiftool"
] | com.thebuzzmedia.exiftool; | 1,792,713 |
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listSinglePageAsync() {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
} | Observable<ServiceResponse<Page<NetworkInterfaceInner>>> function() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } | /**
* Gets all network interfaces in a subscription.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful.
*/ | Gets all network interfaces in a subscription | listSinglePageAsync | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesInner.java",
"license": "mit",
"size": 169944
} | [
"com.microsoft.azure.Page",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 1,359,281 |
public static edu.cmu.cs.stage3.alice.core.Property[] getAffectedProperties( edu.cmu.cs.stage3.alice.core.Response response ) {
edu.cmu.cs.stage3.alice.core.Property[] properties = null;
if( response instanceof edu.cmu.cs.stage3.alice.core.response.ResizeAnimation ) {
edu.cmu.cs.stage3.alice.core.Transfo... | static edu.cmu.cs.stage3.alice.core.Property[] function( edu.cmu.cs.stage3.alice.core.Response response ) { edu.cmu.cs.stage3.alice.core.Property[] properties = null; if( response instanceof edu.cmu.cs.stage3.alice.core.response.ResizeAnimation ) { edu.cmu.cs.stage3.alice.core.Transformable transformable = (edu.cmu.cs.... | /**
* this method only handles some cases. you cannot depend on it to return the correct Property array for all responses.
*/ | this method only handles some cases. you cannot depend on it to return the correct Property array for all responses | getAffectedProperties | {
"repo_name": "ai-ku/langvis",
"path": "src/edu/cmu/cs/stage3/alice/authoringtool/AuthoringToolResources.java",
"license": "mit",
"size": 123228
} | [
"edu.cmu.cs.stage3.alice.core.Element",
"edu.cmu.cs.stage3.alice.core.Property",
"edu.cmu.cs.stage3.alice.core.Response",
"edu.cmu.cs.stage3.alice.core.property.ObjectProperty"
] | import edu.cmu.cs.stage3.alice.core.Element; import edu.cmu.cs.stage3.alice.core.Property; import edu.cmu.cs.stage3.alice.core.Response; import edu.cmu.cs.stage3.alice.core.property.ObjectProperty; | import edu.cmu.cs.stage3.alice.core.*; import edu.cmu.cs.stage3.alice.core.property.*; | [
"edu.cmu.cs"
] | edu.cmu.cs; | 190,160 |
@SuppressWarnings("unchecked")
public Type setOutHeader(String name, Expression expression) {
SetOutHeaderDefinition answer = new SetOutHeaderDefinition(name, expression);
addOutput(answer);
return (Type) this;
}
| @SuppressWarnings(STR) Type function(String name, Expression expression) { SetOutHeaderDefinition answer = new SetOutHeaderDefinition(name, expression); addOutput(answer); return (Type) this; } | /**
* Adds a processor which sets the header on the OUT message
*
* @param name the header name
* @param expression the expression used to set the header
* @return the builder
*/ | Adds a processor which sets the header on the OUT message | setOutHeader | {
"repo_name": "everttigchelaar/camel-svn",
"path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java",
"license": "apache-2.0",
"size": 120346
} | [
"org.apache.camel.Expression"
] | import org.apache.camel.Expression; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 711,553 |
public List<Class> getJarClasses(URL url, boolean ignoreErrors)
throws IOException, ClassNotFoundException {
List<Class> classes = new ArrayList<>();
JarFile jarFile = new JarFile(url.getPath());
Enumeration<JarEntry> e = jarFile.entries();
while (e.hasMo... | List<Class> function(URL url, boolean ignoreErrors) throws IOException, ClassNotFoundException { List<Class> classes = new ArrayList<>(); JarFile jarFile = new JarFile(url.getPath()); Enumeration<JarEntry> e = jarFile.entries(); while (e.hasMoreElements()) { JarEntry entry = e.nextElement(); Class c = getClassFromJarEn... | /**
* Returns a list of classes inside a jar archive.
*
* @param url URL of the jar file.
* @param ignoreErrors If true, erroneous classes are ignored.
* @return List of classes inside the jar archive.
* @throws java.io.IOException Could not open file at URL.
... | Returns a list of classes inside a jar archive | getJarClasses | {
"repo_name": "tilastokeskus/Minotaurus",
"path": "Minotaurus/src/main/java/com/github/tilastokeskus/minotaurus/plugin/JarClassLoader.java",
"license": "mit",
"size": 6669
} | [
"com.github.tilastokeskus.minotaurus.util.ArrayList",
"java.io.IOException",
"java.util.Enumeration",
"java.util.List",
"java.util.jar.JarEntry",
"java.util.jar.JarFile"
] | import com.github.tilastokeskus.minotaurus.util.ArrayList; import java.io.IOException; import java.util.Enumeration; import java.util.List; import java.util.jar.JarEntry; import java.util.jar.JarFile; | import com.github.tilastokeskus.minotaurus.util.*; import java.io.*; import java.util.*; import java.util.jar.*; | [
"com.github.tilastokeskus",
"java.io",
"java.util"
] | com.github.tilastokeskus; java.io; java.util; | 1,893,946 |
public BillingPermissionsClient getBillingPermissions() {
return this.billingPermissions;
}
private final BillingSubscriptionsClient billingSubscriptions; | BillingPermissionsClient function() { return this.billingPermissions; } private final BillingSubscriptionsClient billingSubscriptions; | /**
* Gets the BillingPermissionsClient object to access its operations.
*
* @return the BillingPermissionsClient object.
*/ | Gets the BillingPermissionsClient object to access its operations | getBillingPermissions | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingManagementClientImpl.java",
"license": "mit",
"size": 19968
} | [
"com.azure.resourcemanager.billing.fluent.BillingPermissionsClient",
"com.azure.resourcemanager.billing.fluent.BillingSubscriptionsClient"
] | import com.azure.resourcemanager.billing.fluent.BillingPermissionsClient; import com.azure.resourcemanager.billing.fluent.BillingSubscriptionsClient; | import com.azure.resourcemanager.billing.fluent.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,225,376 |
private StatementRetVal run(AGraphStatement statement)
{
final String msg = "Graphs must be of the form 'Graph Y=f(x)' or 'Graph Y>=f(x)'. ";
// The graph is in the form
// Graph Y [op] f(X)
if (!statement.getVariableName().getText().equals("Y")) {
throw new CompileE... | StatementRetVal function(AGraphStatement statement) { final String msg = STR; if (!statement.getVariableName().getText().equals("Y")) { throw new CompileException(String.format( msg + STR, Printer.nodeToString(statement))); } String op = statement.getComparisonOp().getText(); GraphShading shadingMode; if (op.equals("="... | /**
* Draws a line or inequality graph.
* See Chapter 8 of CFX-9800G.pdf
*
* We currently only support rectangular graphs
* @return
*/ | Draws a line or inequality graph. See Chapter 8 of CFX-9800G.pdf We currently only support rectangular graphs | run | {
"repo_name": "RichardBradley/casio-cfx-9800g",
"path": "cfx-9800g-emulator/src/org/bradders/casiocfx9800g/StatementRunner.java",
"license": "gpl-3.0",
"size": 15259
} | [
"java.math.BigDecimal",
"org.bradders.casiocfx9800g.node.AGraphStatement",
"org.bradders.casiocfx9800g.ui.GraphShading",
"org.bradders.casiocfx9800g.util.Printer"
] | import java.math.BigDecimal; import org.bradders.casiocfx9800g.node.AGraphStatement; import org.bradders.casiocfx9800g.ui.GraphShading; import org.bradders.casiocfx9800g.util.Printer; | import java.math.*; import org.bradders.casiocfx9800g.node.*; import org.bradders.casiocfx9800g.ui.*; import org.bradders.casiocfx9800g.util.*; | [
"java.math",
"org.bradders.casiocfx9800g"
] | java.math; org.bradders.casiocfx9800g; | 1,757,289 |
public static void closeFileWriter() {
if (fileWriter != null) {
try {
fileWriter.flush();
} catch (IOException ignored) {
} finally {
closeSafely(fileWriter);
fileWriter = null;
}
}
} | static void function() { if (fileWriter != null) { try { fileWriter.flush(); } catch (IOException ignored) { } finally { closeSafely(fileWriter); fileWriter = null; } } } | /**
* Closes the file writer.
*/ | Closes the file writer | closeFileWriter | {
"repo_name": "AuthMe/AuthMeReloaded",
"path": "src/main/java/fr/xephi/authme/ConsoleLogger.java",
"license": "gpl-3.0",
"size": 8104
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 27,055 |
protected RegionScanner getWrappedScanner(final ObserverContext<RegionCoprocessorEnvironment> c,
final RegionScanner s, final int offset, final Scan scan,
final ColumnReference[] dataColumns, final TupleProjector tupleProjector,
final HRegion dataRegion, final IndexMaintainer ind... | RegionScanner function(final ObserverContext<RegionCoprocessorEnvironment> c, final RegionScanner s, final int offset, final Scan scan, final ColumnReference[] dataColumns, final TupleProjector tupleProjector, final HRegion dataRegion, final IndexMaintainer indexMaintainer, final byte[][] viewConstants, final TupleProj... | /**
* Return wrapped scanner that catches unexpected exceptions (i.e. Phoenix bugs) and
* re-throws as DoNotRetryIOException to prevent needless retrying hanging the query
* for 30 seconds. Unfortunately, until HBASE-7481 gets fixed, there's no way to do
* the same from a custom filter.
* @para... | Return wrapped scanner that catches unexpected exceptions (i.e. Phoenix bugs) and re-throws as DoNotRetryIOException to prevent needless retrying hanging the query for 30 seconds. Unfortunately, until HBASE-7481 gets fixed, there's no way to do the same from a custom filter | getWrappedScanner | {
"repo_name": "wangbin83-gmail-com/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/coprocessor/BaseScannerRegionObserver.java",
"license": "apache-2.0",
"size": 18889
} | [
"org.apache.hadoop.hbase.client.Scan",
"org.apache.hadoop.hbase.coprocessor.ObserverContext",
"org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment",
"org.apache.hadoop.hbase.io.ImmutableBytesWritable",
"org.apache.hadoop.hbase.regionserver.HRegion",
"org.apache.hadoop.hbase.regionserver.Regio... | import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.coprocessor.ObserverContext; import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment; import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.hadoop.hbase.regionserver.HRegion; import org.apache.hadoop.hbase.r... | import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.coprocessor.*; import org.apache.hadoop.hbase.io.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.phoenix.execute.*; import org.apache.phoenix.hbase.index.covered.update.*; import org.apache.phoenix.index.*; | [
"org.apache.hadoop",
"org.apache.phoenix"
] | org.apache.hadoop; org.apache.phoenix; | 115,657 |
int offset = -1;
try {
offset = textWidget.getOffsetAtLocation(pt);
}
catch (IllegalArgumentException e) {
// Check if the cursor is past the end of the line
Point startPt = new Point(0,pt.y);
return getLineStart(startPt);
}
return offset... | int offset = -1; try { offset = textWidget.getOffsetAtLocation(pt); } catch (IllegalArgumentException e) { Point startPt = new Point(0,pt.y); return getLineStart(startPt); } return offset; } | /**
* Gets the character offset of the point in widget co-ordinates
*
*
* @param pt - Point in wiget co-ordinates
* @return
*/ | Gets the character offset of the point in widget co-ordinates | getWidgetOffset | {
"repo_name": "cybersonic/org.cfeclipse.cfml",
"path": "src/org/cfeclipse/cfml/editors/dnd/WidgetPositionTracker.java",
"license": "mit",
"size": 4087
} | [
"org.eclipse.swt.graphics.Point"
] | import org.eclipse.swt.graphics.Point; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 135,233 |
private static FileHeader readHeader(File file) throws IOException {
InputStream is =null;
try {
is = new BufferedInputStream(new FileInputStream(file));
InputArchive ia=BinaryInputArchive.getArchive(is);
FileHeader hdr = new FileHeader();
hdr.deserial... | static FileHeader function(File file) throws IOException { InputStream is =null; try { is = new BufferedInputStream(new FileInputStream(file)); InputArchive ia=BinaryInputArchive.getArchive(is); FileHeader hdr = new FileHeader(); hdr.deserialize(ia, STR); return hdr; } finally { try { if (is != null) is.close(); } catc... | /**
* read the header of the transaction file
* @param file the transaction file to read
* @return header that was read fomr the file
* @throws IOException
*/ | read the header of the transaction file | readHeader | {
"repo_name": "sdw2330976/zookeeper-3.3.4-source",
"path": "zookeeper-release-3.4.3/src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java",
"license": "apache-2.0",
"size": 21776
} | [
"java.io.BufferedInputStream",
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream",
"org.apache.jute.BinaryInputArchive",
"org.apache.jute.InputArchive"
] | import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import org.apache.jute.BinaryInputArchive; import org.apache.jute.InputArchive; | import java.io.*; import org.apache.jute.*; | [
"java.io",
"org.apache.jute"
] | java.io; org.apache.jute; | 2,573,634 |
@Test(expected=NullPointerException.class)
public void testSendIPDataAsyncDataNull() throws TimeoutException, XBeeException {
ipv6Device.sendIPDataAsync(ipv6Address, PORT, PROTOCOL, null);
}
| @Test(expected=NullPointerException.class) void function() throws TimeoutException, XBeeException { ipv6Device.sendIPDataAsync(ipv6Address, PORT, PROTOCOL, null); } | /**
* Test method for {@link com.digi.xbee.api.IPv6Device#sendIPDataAsync(Inet6Address, int, com.digi.xbee.api.models.IPProtocol, byte[])}.
*
* <p>Verify that async. IPv6 data cannot be sent if the IPv6 data is {@code null}.</p>
*
* @throws XBeeException
* @throws TimeoutException
*/ | Test method for <code>com.digi.xbee.api.IPv6Device#sendIPDataAsync(Inet6Address, int, com.digi.xbee.api.models.IPProtocol, byte[])</code>. Verify that async. IPv6 data cannot be sent if the IPv6 data is null | testSendIPDataAsyncDataNull | {
"repo_name": "digidotcom/XBeeJavaLibrary",
"path": "library/src/test/java/com/digi/xbee/api/SendIPv6DataAsyncTest.java",
"license": "mpl-2.0",
"size": 11360
} | [
"com.digi.xbee.api.exceptions.TimeoutException",
"com.digi.xbee.api.exceptions.XBeeException",
"org.junit.Test"
] | import com.digi.xbee.api.exceptions.TimeoutException; import com.digi.xbee.api.exceptions.XBeeException; import org.junit.Test; | import com.digi.xbee.api.exceptions.*; import org.junit.*; | [
"com.digi.xbee",
"org.junit"
] | com.digi.xbee; org.junit; | 2,470,821 |
protected void addAttributeHistory(Item item, ItemAttribute attr, Date lastModified) {
LOGGER.debug("Add history for: {}, {}, {}, {}", new Object[]{attr.getAid(), attr.getLastModified(), attr.getAttrType(), attr.getAttrValue()});
HistItemAttribute histAttr = new HistItemAttribute(attr, lastModified);
item.get... | void function(Item item, ItemAttribute attr, Date lastModified) { LOGGER.debug(STR, new Object[]{attr.getAid(), attr.getLastModified(), attr.getAttrType(), attr.getAttrValue()}); HistItemAttribute histAttr = new HistItemAttribute(attr, lastModified); item.getHistItemAttributes().add(histAttr); } | /**
* Add a history row for the attribute
*
* @param item The item to add a history row to
* @param attr The attribute that needs to have a history row logged for
* @param lastModified The last modified date
*/ | Add a history row for the attribute | addAttributeHistory | {
"repo_name": "anu-doi/metadata-stores",
"path": "store/src/main/java/au/edu/anu/metadatastores/store/misc/AbstractItemService.java",
"license": "gpl-3.0",
"size": 9426
} | [
"au.edu.anu.metadatastores.datamodel.store.HistItemAttribute",
"au.edu.anu.metadatastores.datamodel.store.Item",
"au.edu.anu.metadatastores.datamodel.store.ItemAttribute",
"java.util.Date"
] | import au.edu.anu.metadatastores.datamodel.store.HistItemAttribute; import au.edu.anu.metadatastores.datamodel.store.Item; import au.edu.anu.metadatastores.datamodel.store.ItemAttribute; import java.util.Date; | import au.edu.anu.metadatastores.datamodel.store.*; import java.util.*; | [
"au.edu.anu",
"java.util"
] | au.edu.anu; java.util; | 2,441,532 |
public void setServiceClass(String type) throws ClassNotFoundException {
if (ObjectHelper.isEmpty(type)) {
throw new IllegalArgumentException("The serviceClass option can neither be null nor an empty String.");
}
serviceClass = ClassLoaderUtils.loadClass(resolvePropertyPlaceholde... | void function(String type) throws ClassNotFoundException { if (ObjectHelper.isEmpty(type)) { throw new IllegalArgumentException(STR); } serviceClass = ClassLoaderUtils.loadClass(resolvePropertyPlaceholders(type), getClass()); } | /**
* The class name of the SEI (Service Endpoint Interface) class which could have JSR181 annotation or not.
*/ | The class name of the SEI (Service Endpoint Interface) class which could have JSR181 annotation or not | setServiceClass | {
"repo_name": "pax95/camel",
"path": "components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java",
"license": "apache-2.0",
"size": 52446
} | [
"org.apache.camel.util.ObjectHelper",
"org.apache.cxf.common.classloader.ClassLoaderUtils"
] | import org.apache.camel.util.ObjectHelper; import org.apache.cxf.common.classloader.ClassLoaderUtils; | import org.apache.camel.util.*; import org.apache.cxf.common.classloader.*; | [
"org.apache.camel",
"org.apache.cxf"
] | org.apache.camel; org.apache.cxf; | 1,626,276 |
public Bitmap getTitleBitmap(Context context, String title) {
try {
boolean drawText = !TextUtils.isEmpty(title);
int textWidth =
drawText ? (int) Math.ceil(Layout.getDesiredWidth(title, mTextPaint)) : 0;
// Minimum 1 width bitmap to avoid createBitmap... | Bitmap function(Context context, String title) { try { boolean drawText = !TextUtils.isEmpty(title); int textWidth = drawText ? (int) Math.ceil(Layout.getDesiredWidth(title, mTextPaint)) : 0; Bitmap b = Bitmap.createBitmap(Math.max(Math.min(mMaxWidth, textWidth), 1), mViewHeight, Bitmap.Config.ARGB_8888); Canvas c = ne... | /**
* Generates the title bitmap.
*
* @param context Android's UI context.
* @param title The title of the tab.
* @return The Bitmap with the title.
*/ | Generates the title bitmap | getTitleBitmap | {
"repo_name": "danakj/chromium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/content/TitleBitmapFactory.java",
"license": "bsd-3-clause",
"size": 5796
} | [
"android.content.Context",
"android.graphics.Bitmap",
"android.graphics.Canvas",
"android.text.Layout",
"android.text.TextUtils",
"android.util.Log",
"android.view.InflateException"
] | import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.text.Layout; import android.text.TextUtils; import android.util.Log; import android.view.InflateException; | import android.content.*; import android.graphics.*; import android.text.*; import android.util.*; import android.view.*; | [
"android.content",
"android.graphics",
"android.text",
"android.util",
"android.view"
] | android.content; android.graphics; android.text; android.util; android.view; | 238,052 |
public static String getIssuerWithoutQualifier(String issuerWithQualifier) {
return StringUtils.substringBeforeLast(issuerWithQualifier, IdentityRegistryResources.QUALIFIER_ID);
} | static String function(String issuerWithQualifier) { return StringUtils.substringBeforeLast(issuerWithQualifier, IdentityRegistryResources.QUALIFIER_ID); } | /**
* Get the issuer value by removing the qualifier.
*
* @param issuerWithQualifier issuer value saved in the registry.
* @return issuer value given as 'issuer' when configuring SAML SP.
*/ | Get the issuer value by removing the qualifier | getIssuerWithoutQualifier | {
"repo_name": "wso2-extensions/identity-inbound-auth-saml",
"path": "components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/util/SAMLSSOUtil.java",
"license": "apache-2.0",
"size": 115944
} | [
"org.apache.commons.lang.StringUtils",
"org.wso2.carbon.identity.core.IdentityRegistryResources"
] | import org.apache.commons.lang.StringUtils; import org.wso2.carbon.identity.core.IdentityRegistryResources; | import org.apache.commons.lang.*; import org.wso2.carbon.identity.core.*; | [
"org.apache.commons",
"org.wso2.carbon"
] | org.apache.commons; org.wso2.carbon; | 2,234,145 |
private void buildUI(VCard vcard) {
fillUI(vcard);
// Set Avatar
byte[] bytes = vcard.getAvatar();
if (bytes != null && bytes.length > 0) {
ImageIcon icon = new ImageIcon(bytes);
// See if we should remove the Avatar tab in profile dialog
... | void function(VCard vcard) { fillUI(vcard); byte[] bytes = vcard.getAvatar(); if (bytes != null && bytes.length > 0) { ImageIcon icon = new ImageIcon(bytes); if (!Default.getBoolean(STR) && Enterprise.containsFeature(Enterprise.AVATAR_TAB_FEATURE)) { avatarPanel.setAvatar(icon); avatarPanel.setAvatarBytes(bytes); } if ... | /**
* Builds the UI based on a VCard.
*
* @param vcard
* the vcard used to build the UI.
*/ | Builds the UI based on a VCard | buildUI | {
"repo_name": "vipinraj/Spark",
"path": "core/src/main/java/org/jivesoftware/sparkimpl/profile/VCardEditor.java",
"license": "apache-2.0",
"size": 16539
} | [
"javax.swing.ImageIcon",
"org.jivesoftware.resource.Default",
"org.jivesoftware.smackx.vcardtemp.packet.VCard",
"org.jivesoftware.spark.util.GraphicUtils",
"org.jivesoftware.sparkimpl.plugin.manager.Enterprise"
] | import javax.swing.ImageIcon; import org.jivesoftware.resource.Default; import org.jivesoftware.smackx.vcardtemp.packet.VCard; import org.jivesoftware.spark.util.GraphicUtils; import org.jivesoftware.sparkimpl.plugin.manager.Enterprise; | import javax.swing.*; import org.jivesoftware.resource.*; import org.jivesoftware.smackx.vcardtemp.packet.*; import org.jivesoftware.spark.util.*; import org.jivesoftware.sparkimpl.plugin.manager.*; | [
"javax.swing",
"org.jivesoftware.resource",
"org.jivesoftware.smackx",
"org.jivesoftware.spark",
"org.jivesoftware.sparkimpl"
] | javax.swing; org.jivesoftware.resource; org.jivesoftware.smackx; org.jivesoftware.spark; org.jivesoftware.sparkimpl; | 2,542,016 |
// [TARGET publishAsync(String, Message, Message...)]
// [VARIABLE "my_topic_name"]
public List<String> publishMessagesAsync(String topicName)
throws ExecutionException, InterruptedException {
// [START publishMessagesAsync]
Message message1 = Message.of("payload1");
Message message2 = Message.o... | List<String> function(String topicName) throws ExecutionException, InterruptedException { Message message1 = Message.of(STR); Message message2 = Message.of(STR); Future<List<String>> future = pubsub.publishAsync(topicName, message1, message2); List<String> messageIds = future.get(); return messageIds; } | /**
* Example of asynchronously publishing some messages to a topic.
*/ | Example of asynchronously publishing some messages to a topic | publishMessagesAsync | {
"repo_name": "tangiel/google-cloud-java",
"path": "google-cloud-examples/src/main/java/com/google/cloud/examples/pubsub/snippets/PubSubSnippets.java",
"license": "apache-2.0",
"size": 35770
} | [
"com.google.cloud.pubsub.Message",
"java.util.List",
"java.util.concurrent.ExecutionException",
"java.util.concurrent.Future"
] | import com.google.cloud.pubsub.Message; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; | import com.google.cloud.pubsub.*; import java.util.*; import java.util.concurrent.*; | [
"com.google.cloud",
"java.util"
] | com.google.cloud; java.util; | 2,755,709 |
public static final MemberNotFoundException memberNotFoundException(String memberId) {
return new MemberNotFoundException(Messages.i18n.format("MemberDoesNotExist", memberId)); //$NON-NLS-1$
} | static final MemberNotFoundException function(String memberId) { return new MemberNotFoundException(Messages.i18n.format(STR, memberId)); } | /**
* Creates an exception from an member id.
* @param memberId the member id
* @return the exception
*/ | Creates an exception from an member id | memberNotFoundException | {
"repo_name": "KevinHorvatin/apiman",
"path": "manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/util/ExceptionFactory.java",
"license": "apache-2.0",
"size": 17897
} | [
"io.apiman.manager.api.rest.contract.exceptions.MemberNotFoundException",
"io.apiman.manager.api.rest.impl.i18n.Messages"
] | import io.apiman.manager.api.rest.contract.exceptions.MemberNotFoundException; import io.apiman.manager.api.rest.impl.i18n.Messages; | import io.apiman.manager.api.rest.contract.exceptions.*; import io.apiman.manager.api.rest.impl.i18n.*; | [
"io.apiman.manager"
] | io.apiman.manager; | 1,071,740 |
public static double mean(final List<Double> list) {
double sum = 0;
for (Double number : list) {
sum += number;
}
return sum / list.size();
}
| static double function(final List<Double> list) { double sum = 0; for (Double number : list) { sum += number; } return sum / list.size(); } | /**
* Gets the average from a list of numbers.
*
* @param list the list of numbers
*
* @return the average
*/ | Gets the average from a list of numbers | mean | {
"repo_name": "thejotta/CloudSimPlusModificado",
"path": "cloudsim-plus/src/main/java/org/cloudbus/cloudsim/util/MathUtil.java",
"license": "gpl-3.0",
"size": 10320
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,313,452 |
protected void loadIndex() throws IOException {
index = new HashMap<String, int[]>();
File idx = new File(db, FILE_INDEX);
BufferedReader reader = new BufferedReader(new FileReader(idx));
String line;
while ((line = reader.readLine()) != null) {
String[] fields = split(line, ",");
... | void function() throws IOException { index = new HashMap<String, int[]>(); File idx = new File(db, FILE_INDEX); BufferedReader reader = new BufferedReader(new FileReader(idx)); String line; while ((line = reader.readLine()) != null) { String[] fields = split(line, ","); index.put(fields[0], new int[]{Integer.parseInt(f... | /**
* Loads the index file from disk. The index file accelerates words lookup
* into the dictionary db file.
*/ | Loads the index file from disk. The index file accelerates words lookup into the dictionary db file | loadIndex | {
"repo_name": "Thecarisma/powertext",
"path": "Power Text Spell Checker/src/com/power/text/spell/engine/SpellDictionaryDisk.java",
"license": "gpl-3.0",
"size": 19655
} | [
"java.io.BufferedReader",
"java.io.File",
"java.io.FileReader",
"java.io.IOException",
"java.util.HashMap"
] | import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.HashMap; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,154,377 |
@Nonnull
public DeviceComplianceActionItemCollectionRequest count(final boolean value) {
addCountOption(value);
return this;
} | DeviceComplianceActionItemCollectionRequest function(final boolean value) { addCountOption(value); return this; } | /**
* Sets the count value for the request
*
* @param value whether or not to return the count of objects with the request
* @return the updated request
*/ | Sets the count value for the request | count | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/DeviceComplianceActionItemCollectionRequest.java",
"license": "mit",
"size": 6329
} | [
"com.microsoft.graph.requests.DeviceComplianceActionItemCollectionRequest"
] | import com.microsoft.graph.requests.DeviceComplianceActionItemCollectionRequest; | import com.microsoft.graph.requests.*; | [
"com.microsoft.graph"
] | com.microsoft.graph; | 2,018,997 |
setDefaultNameIfNone(StreamletNamePrefix.CONSUMER, stageNames);
bldr.setBolt(getName(), new ConsumerSink<>(consumer),
getNumPartitions()).shuffleGrouping(parent.getName(), parent.getStreamId());
return true;
} | setDefaultNameIfNone(StreamletNamePrefix.CONSUMER, stageNames); bldr.setBolt(getName(), new ConsumerSink<>(consumer), getNumPartitions()).shuffleGrouping(parent.getName(), parent.getStreamId()); return true; } | /**
* Connect this streamlet to TopologyBuilder.
* @param bldr The TopologyBuilder for the topology
* @param stageNames The existing stage names
* @return True if successful
*/ | Connect this streamlet to TopologyBuilder | doBuild | {
"repo_name": "twitter/heron",
"path": "heron/api/src/java/org/apache/heron/streamlet/impl/streamlets/ConsumerStreamlet.java",
"license": "apache-2.0",
"size": 2311
} | [
"org.apache.heron.streamlet.impl.sinks.ConsumerSink"
] | import org.apache.heron.streamlet.impl.sinks.ConsumerSink; | import org.apache.heron.streamlet.impl.sinks.*; | [
"org.apache.heron"
] | org.apache.heron; | 1,222,492 |
@Override
public void handleKeyboardInput() {
try {
super.handleKeyboardInput();
if (Keyboard.getEventKeyState()) {
int inventoryKey = 0;
if (this.mc.gameSettings.keyBindInventory.isPressed()) {
inventoryKey = this.mc.gameSetti... | void function() { try { super.handleKeyboardInput(); if (Keyboard.getEventKeyState()) { int inventoryKey = 0; if (this.mc.gameSettings.keyBindInventory.isPressed()) { inventoryKey = this.mc.gameSettings.keyBindInventory.getKeyCode(); } if (Keyboard.getEventKey() == inventoryKey Keyboard.getEventKey() == 28) { close(); ... | /**
* Handles keyboard input.<br>
* If inventory key is pressed or ESC, close the GUI.
*/ | Handles keyboard input. If inventory key is pressed or ESC, close the GUI | handleKeyboardInput | {
"repo_name": "SlimeVoid/WirelessRedstone",
"path": "src/main/java/net/slimevoid/wirelessredstone/client/presentation/gui/GuiRedstoneWirelessContainer.java",
"license": "lgpl-3.0",
"size": 8523
} | [
"net.slimevoid.wirelessredstone.data.LoggerRedstoneWireless",
"org.lwjgl.input.Keyboard"
] | import net.slimevoid.wirelessredstone.data.LoggerRedstoneWireless; import org.lwjgl.input.Keyboard; | import net.slimevoid.wirelessredstone.data.*; import org.lwjgl.input.*; | [
"net.slimevoid.wirelessredstone",
"org.lwjgl.input"
] | net.slimevoid.wirelessredstone; org.lwjgl.input; | 822,150 |
@Deprecated
default void postFlush(final ObserverContext<RegionCoprocessorEnvironment> c)
throws IOException {} | default void postFlush(final ObserverContext<RegionCoprocessorEnvironment> c) throws IOException {} | /**
* Called after the memstore is flushed to disk.
* @param c the environment provided by the region server
* @deprecated use {@link #preFlush(ObserverContext, Store, InternalScanner)} instead.
*/ | Called after the memstore is flushed to disk | postFlush | {
"repo_name": "gustavoanatoly/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java",
"license": "apache-2.0",
"size": 67737
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,521,533 |
public void mouseDragged(MouseEvent e){
modelrange.setValue((int)viewToModel(e.getY()-this.pressLocation));
this.repaint();
} | void function(MouseEvent e){ modelrange.setValue((int)viewToModel(e.getY()-this.pressLocation)); this.repaint(); } | /**
* Drag scroll bar by same drag distance as mouse drag
*/ | Drag scroll bar by same drag distance as mouse drag | mouseDragged | {
"repo_name": "boubre/BayouBot",
"path": "Workspace/src/codeblockutil/CGlassScrollPane.java",
"license": "mit",
"size": 21632
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,502,221 |
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_ASSET,
defaultValue = "")
@SimpleProperty(userVisible = false)
public void Icon(String name) {
// We don't actually need to do anything.
} | @DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_ASSET, defaultValue = "") @SimpleProperty(userVisible = false) void function(String name) { } | /**
* Specifies the name of the application icon.
*
* @param name the name of the application icon
*/ | Specifies the name of the application icon | Icon | {
"repo_name": "Klomi/appinventor-sources",
"path": "appinventor/components/src/com/google/appinventor/components/runtime/Form.java",
"license": "apache-2.0",
"size": 87303
} | [
"com.google.appinventor.components.annotations.DesignerProperty",
"com.google.appinventor.components.annotations.SimpleProperty",
"com.google.appinventor.components.common.PropertyTypeConstants"
] | import com.google.appinventor.components.annotations.DesignerProperty; import com.google.appinventor.components.annotations.SimpleProperty; import com.google.appinventor.components.common.PropertyTypeConstants; | import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.common.*; | [
"com.google.appinventor"
] | com.google.appinventor; | 2,113,584 |
@Override
public void close() {
try {
gCtx.cudaFreeHelper(outPointer, true);
} catch (DMLRuntimeException e) {
throw new RuntimeException(e);
}
} | void function() { try { gCtx.cudaFreeHelper(outPointer, true); } catch (DMLRuntimeException e) { throw new RuntimeException(e); } } | /**
* Deallocates temporary pointer
*/ | Deallocates temporary pointer | close | {
"repo_name": "nakul02/systemml",
"path": "src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNNInputRowFetcher.java",
"license": "apache-2.0",
"size": 3476
} | [
"org.apache.sysml.runtime.DMLRuntimeException"
] | import org.apache.sysml.runtime.DMLRuntimeException; | import org.apache.sysml.runtime.*; | [
"org.apache.sysml"
] | org.apache.sysml; | 196,339 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(
String resourceGroupName, String serviceName, ServiceResourceInner resource) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String serviceName, ServiceResourceInner resource) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { return ... | /**
* Create a new Service or update an exiting Service.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
* @para... | Create a new Service or update an exiting Service | createOrUpdateWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/ServicesClientImpl.java",
"license": "mit",
"size": 120453
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.appplatform.fluent.models.ServiceResourceInner",
"java.nio.ByteBuffer"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.appplatform.fluent.models.ServiceResourceInner; import java.nio.ByteBuffer; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appplatform.fluent.models.*; import java.nio.*; | [
"com.azure.core",
"com.azure.resourcemanager",
"java.nio"
] | com.azure.core; com.azure.resourcemanager; java.nio; | 2,624,464 |
private void setUpIcons(FolderListEntry entry, TextView textView) {
int iconId = 0;
if (entry.mType == FolderListEntry.TYPE_NORMAL) {
iconId = R.drawable.eb_folder;
} else if (entry.mType == FolderListEntry.TYPE_NEW_FOLDER) {
// For new folder,... | void function(FolderListEntry entry, TextView textView) { int iconId = 0; if (entry.mType == FolderListEntry.TYPE_NORMAL) { iconId = R.drawable.eb_folder; } else if (entry.mType == FolderListEntry.TYPE_NEW_FOLDER) { iconId = R.drawable.eb_add_folder; } Drawable drawableStart = TintedDrawable.constructTintedDrawable(tex... | /**
* Sets compound drawables (icons) for different kinds of list entries,
* i.e. New Folder, Normal and Selected.
*/ | Sets compound drawables (icons) for different kinds of list entries, i.e. New Folder, Normal and Selected | setUpIcons | {
"repo_name": "hujiajie/chromium-crosswalk",
"path": "chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkFolderSelectActivity.java",
"license": "bsd-3-clause",
"size": 14160
} | [
"android.graphics.drawable.Drawable",
"android.widget.TextView",
"org.chromium.base.ApiCompatibilityUtils",
"org.chromium.chrome.browser.widget.TintedDrawable"
] | import android.graphics.drawable.Drawable; import android.widget.TextView; import org.chromium.base.ApiCompatibilityUtils; import org.chromium.chrome.browser.widget.TintedDrawable; | import android.graphics.drawable.*; import android.widget.*; import org.chromium.base.*; import org.chromium.chrome.browser.widget.*; | [
"android.graphics",
"android.widget",
"org.chromium.base",
"org.chromium.chrome"
] | android.graphics; android.widget; org.chromium.base; org.chromium.chrome; | 1,573,189 |
Collection<String> getProfiles(); | Collection<String> getProfiles(); | /**
* Get the list of profiles associated with the given version.
*
* @return The collection of all profiles.
*/ | Get the list of profiles associated with the given version | getProfiles | {
"repo_name": "grgrzybek/karaf",
"path": "profile/src/main/java/org/apache/karaf/profile/ProfileService.java",
"license": "apache-2.0",
"size": 4400
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,941,234 |
public static byte[] toArray(ByteBuffer buffer, int offset, int size) {
byte[] dest = new byte[size];
if (buffer.hasArray()) {
System.arraycopy(buffer.array(), buffer.position() + buffer.arrayOffset() + offset, dest, 0, size);
} else {
int pos = buffer.position();
... | static byte[] function(ByteBuffer buffer, int offset, int size) { byte[] dest = new byte[size]; if (buffer.hasArray()) { System.arraycopy(buffer.array(), buffer.position() + buffer.arrayOffset() + offset, dest, 0, size); } else { int pos = buffer.position(); buffer.position(pos + offset); buffer.get(dest); buffer.posit... | /**
* Read a byte array from the given offset and size in the buffer
* @param buffer The buffer to read from
* @param offset The offset relative to the current position of the buffer
* @param size The number of bytes to read into the array
*/ | Read a byte array from the given offset and size in the buffer | toArray | {
"repo_name": "ollie314/kafka",
"path": "clients/src/main/java/org/apache/kafka/common/utils/Utils.java",
"license": "apache-2.0",
"size": 36102
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 1,010,168 |
public ItemStack getItemToBuy()
{
return this.itemToBuy;
} | ItemStack function() { return this.itemToBuy; } | /**
* Gets the itemToBuy.
*/ | Gets the itemToBuy | getItemToBuy | {
"repo_name": "tomtomtom09/CampCraft",
"path": "build/tmp/recompileMc/sources/net/minecraft/village/MerchantRecipe.java",
"license": "gpl-3.0",
"size": 4606
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 2,792,303 |
public void configure() throws IOException {
catalogXmlFile.getParentFile().mkdirs();
LOG.info("Writing catalog: " + catalogXmlFile);
printWriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(catalogXmlFile), "UTF-8"));
printWriter.println("<?xml version=\"1.0\" enco... | void function() throws IOException { catalogXmlFile.getParentFile().mkdirs(); LOG.info(STR + catalogXmlFile); printWriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(catalogXmlFile), "UTF-8")); printWriter.println(STR1.0\STRUTF-8\"?>\n" + STRhttp: indent + indent + STRhttp: indent + indent + STRhttp: ... | /**
* Starts generation of Archetype Catalog (see: http://maven.apache.org/xsd/archetype-catalog-1.0.0.xsd)
*
* @throws IOException
*/ | Starts generation of Archetype Catalog (see: HREF) | configure | {
"repo_name": "hekonsek/fabric8",
"path": "tooling/archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java",
"license": "apache-2.0",
"size": 34037
} | [
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.OutputStreamWriter",
"java.io.PrintWriter",
"java.io.StringReader",
"java.util.Map",
"org.apache.commons.io.FileUtils",
"org.w3c.dom.Document",
"org.w3c.dom.Element",
"org.w3c.dom.Node",
"org.w3c.dom.NodeList",
"org.xml.sax.InputSourc... | import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.StringReader; import java.util.Map; import org.apache.commons.io.FileUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.Node... | import java.io.*; import java.util.*; import org.apache.commons.io.*; import org.w3c.dom.*; import org.xml.sax.*; | [
"java.io",
"java.util",
"org.apache.commons",
"org.w3c.dom",
"org.xml.sax"
] | java.io; java.util; org.apache.commons; org.w3c.dom; org.xml.sax; | 1,447,449 |
@Override
public Request<RevokeClientVpnIngressRequest> getDryRunRequest() {
Request<RevokeClientVpnIngressRequest> request = new RevokeClientVpnIngressRequestMarshaller().marshall(this);
request.addParameter("DryRun", Boolean.toString(true));
return request;
} | Request<RevokeClientVpnIngressRequest> function() { Request<RevokeClientVpnIngressRequest> request = new RevokeClientVpnIngressRequestMarshaller().marshall(this); request.addParameter(STR, Boolean.toString(true)); return request; } | /**
* This method is intended for internal use only. Returns the marshaled request configured with additional
* parameters to enable operation dry-run.
*/ | This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run | getDryRunRequest | {
"repo_name": "aws/aws-sdk-java",
"path": "aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/RevokeClientVpnIngressRequest.java",
"license": "apache-2.0",
"size": 10347
} | [
"com.amazonaws.Request",
"com.amazonaws.services.ec2.model.transform.RevokeClientVpnIngressRequestMarshaller"
] | import com.amazonaws.Request; import com.amazonaws.services.ec2.model.transform.RevokeClientVpnIngressRequestMarshaller; | import com.amazonaws.*; import com.amazonaws.services.ec2.model.transform.*; | [
"com.amazonaws",
"com.amazonaws.services"
] | com.amazonaws; com.amazonaws.services; | 2,357,535 |
public void addExtraView() {
extraViewComposite = new Composite(sashForm, SWT.NONE);
FormLayout extraCompositeFormLayout = new FormLayout();
extraCompositeFormLayout.marginWidth = 2;
extraCompositeFormLayout.marginHeight = 2;
extraViewComposite.setLayout(extraCompositeFormLayout);
| void function() { extraViewComposite = new Composite(sashForm, SWT.NONE); FormLayout extraCompositeFormLayout = new FormLayout(); extraCompositeFormLayout.marginWidth = 2; extraCompositeFormLayout.marginHeight = 2; extraViewComposite.setLayout(extraCompositeFormLayout); | /**
* Add an extra view to the main composite SashForm
*/ | Add an extra view to the main composite SashForm | addExtraView | {
"repo_name": "jjeb/kettle-trunk",
"path": "ui/src/org/pentaho/di/ui/spoon/job/JobGraph.java",
"license": "apache-2.0",
"size": 126447
} | [
"org.eclipse.swt.layout.FormLayout",
"org.eclipse.swt.widgets.Composite"
] | import org.eclipse.swt.layout.FormLayout; import org.eclipse.swt.widgets.Composite; | import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 419,341 |
default String getName() {
return name();
}
}
interface ExceptionAttribute extends Attribute {
ExceptionAttribute EXCEPTION_INSTANCE = new ExceptionErrorAttribute("EXCEPTION_INSTANCE");
ExceptionAttribute... | default String getName() { return name(); } } interface ExceptionAttribute extends Attribute { ExceptionAttribute EXCEPTION_INSTANCE = new ExceptionErrorAttribute(STR); ExceptionAttribute EXCEPTION_CLASS = new ExceptionErrorAttribute(STR); } interface HttpAttribute extends Attribute { HttpAttribute HTTP_CODE = new Http... | /**
* Bean style accessor to name; This is required for framework like Jackson using bean convention for object
* serialization.
*
* @return attribute name
*/ | Bean style accessor to name; This is required for framework like Jackson using bean convention for object serialization | getName | {
"repo_name": "nikhilvibhav/camel",
"path": "core/camel-api/src/main/java/org/apache/camel/component/extension/ComponentVerifierExtension.java",
"license": "apache-2.0",
"size": 15350
} | [
"org.apache.camel.component.extension.ComponentVerifierExtensionHelper"
] | import org.apache.camel.component.extension.ComponentVerifierExtensionHelper; | import org.apache.camel.component.extension.*; | [
"org.apache.camel"
] | org.apache.camel; | 630,451 |
public static String getAttributeValue(BasicNode node, AttributeType type) {
NodeInfo nodeInfo = ModelUtil.createNodeInfo(node);
if (nodeInfo != null) {
return (String) nodeInfo.getAttribute(type);
} else {
return null;
}
}
| static String function(BasicNode node, AttributeType type) { NodeInfo nodeInfo = ModelUtil.createNodeInfo(node); if (nodeInfo != null) { return (String) nodeInfo.getAttribute(type); } else { return null; } } | /**
* Returns the attribute of node.
*
* @param node
* the node.
* @param type
* the attribute type.
* @return the attribute string.
*/ | Returns the attribute of node | getAttributeValue | {
"repo_name": "d-case/d-case_editor",
"path": "net.dependableos.dcase.diagram.editor/src/net/dependableos/dcase/diagram/editor/common/util/ModuleUtil.java",
"license": "epl-1.0",
"size": 37715
} | [
"net.dependableos.dcase.BasicNode",
"net.dependableos.dcase.diagram.common.model.AttributeType",
"net.dependableos.dcase.diagram.common.model.NodeInfo",
"net.dependableos.dcase.diagram.common.util.ModelUtil"
] | import net.dependableos.dcase.BasicNode; import net.dependableos.dcase.diagram.common.model.AttributeType; import net.dependableos.dcase.diagram.common.model.NodeInfo; import net.dependableos.dcase.diagram.common.util.ModelUtil; | import net.dependableos.dcase.*; import net.dependableos.dcase.diagram.common.model.*; import net.dependableos.dcase.diagram.common.util.*; | [
"net.dependableos.dcase"
] | net.dependableos.dcase; | 974,179 |
public List getWithPag(int page, int pageSize) throws Exception;
| List function(int page, int pageSize) throws Exception; | /**
* * Obtiene una lista de datos paginada con las opiones indicadas
*
* @param page
* numero de pagina
* @param pageSize
* tamaño de la pagina
* @return
* @throws Exception
*/ | Obtiene una lista de datos paginada con las opiones indicadas | getWithPag | {
"repo_name": "hangorn/myLibrary",
"path": "myLibrary-model/src/main/java/es/magDevs/myLibrary/model/dao/AbstractDao.java",
"license": "apache-2.0",
"size": 3230
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,750,892 |
public void setWeightingParam(Identifier i, double newValue) {
weightingParameters.put(i, newValue);
} | void function(Identifier i, double newValue) { weightingParameters.put(i, newValue); } | /**
* Replaces the weighting parameter at the specified position
* in the weighting array with a new value.
*
* @param i index of the value to be replaced
* @param newValue value that replaces the one at the specified position
* @throws ArrayIndexOutOfBoundsException if the index is... | Replaces the weighting parameter at the specified position in the weighting array with a new value | setWeightingParam | {
"repo_name": "maplesond/spectre",
"path": "core/src/main/java/uk/ac/uea/cmp/spectre/core/ds/split/circular/ordering/nm/weighting/Weighting.java",
"license": "gpl-3.0",
"size": 3612
} | [
"uk.ac.uea.cmp.spectre.core.ds.Identifier"
] | import uk.ac.uea.cmp.spectre.core.ds.Identifier; | import uk.ac.uea.cmp.spectre.core.ds.*; | [
"uk.ac.uea"
] | uk.ac.uea; | 1,299,567 |
@Override
public void deleteV2WikiPage(WikiPageKey key) throws SynapseException {
ValidateArgument.required(key, "key");
String uri = createV2WikiURL(key);
deleteUri(getRepoEndpoint(), uri);
}
| void function(WikiPageKey key) throws SynapseException { ValidateArgument.required(key, "key"); String uri = createV2WikiURL(key); deleteUri(getRepoEndpoint(), uri); } | /**
* Delete a V2 WikiPage
*
* @param key
* @throws SynapseException
*/ | Delete a V2 WikiPage | deleteV2WikiPage | {
"repo_name": "Sage-Bionetworks/Synapse-Repository-Services",
"path": "client/synapseJavaClient/src/main/java/org/sagebionetworks/client/SynapseClientImpl.java",
"license": "apache-2.0",
"size": 233910
} | [
"org.sagebionetworks.client.exceptions.SynapseException",
"org.sagebionetworks.repo.model.dao.WikiPageKey",
"org.sagebionetworks.util.ValidateArgument"
] | import org.sagebionetworks.client.exceptions.SynapseException; import org.sagebionetworks.repo.model.dao.WikiPageKey; import org.sagebionetworks.util.ValidateArgument; | import org.sagebionetworks.client.exceptions.*; import org.sagebionetworks.repo.model.dao.*; import org.sagebionetworks.util.*; | [
"org.sagebionetworks.client",
"org.sagebionetworks.repo",
"org.sagebionetworks.util"
] | org.sagebionetworks.client; org.sagebionetworks.repo; org.sagebionetworks.util; | 1,295,446 |
public NodeTransitionBuilder getBuilder(NodeState srcState) {
return nodeAMB.get(srcState);
} | NodeTransitionBuilder function(NodeState srcState) { return nodeAMB.get(srcState); } | /**
* Get the model builder for a given transition
*
* @param srcState the current node state
* @return the {@link NodeTransition} associated to the state transition. {@code null} if no transition is available
*/ | Get the model builder for a given transition | getBuilder | {
"repo_name": "btrplace/scheduler",
"path": "choco/src/main/java/org/btrplace/scheduler/choco/transition/TransitionFactory.java",
"license": "lgpl-3.0",
"size": 4558
} | [
"org.btrplace.model.NodeState"
] | import org.btrplace.model.NodeState; | import org.btrplace.model.*; | [
"org.btrplace.model"
] | org.btrplace.model; | 551,855 |
public Before<T> id(String id)
{
childNode.attribute("id", id);
return this;
} | Before<T> function(String id) { childNode.attribute("id", id); return this; } | /**
* Sets the <code>id</code> attribute
* @param id the value for the attribute <code>id</code>
* @return the current instance of <code>Before<T></code>
*/ | Sets the <code>id</code> attribute | id | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/facespartialresponse20/BeforeImpl.java",
"license": "epl-1.0",
"size": 2384
} | [
"org.jboss.shrinkwrap.descriptor.api.facespartialresponse20.Before"
] | import org.jboss.shrinkwrap.descriptor.api.facespartialresponse20.Before; | import org.jboss.shrinkwrap.descriptor.api.facespartialresponse20.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 708,703 |
public static <F> Extractor<F, Tuple> byName(String... fieldsOrProperties) {
return new ByNameMultipleExtractor<F>(fieldsOrProperties);
} | static <F> Extractor<F, Tuple> function(String... fieldsOrProperties) { return new ByNameMultipleExtractor<F>(fieldsOrProperties); } | /**
* Provides extractor for extracting multiple fields or properties from any object using reflection
*/ | Provides extractor for extracting multiple fields or properties from any object using reflection | byName | {
"repo_name": "yurloc/assertj-core",
"path": "src/main/java/org/assertj/core/extractor/Extractors.java",
"license": "apache-2.0",
"size": 1457
} | [
"org.assertj.core.api.iterable.Extractor",
"org.assertj.core.groups.Tuple"
] | import org.assertj.core.api.iterable.Extractor; import org.assertj.core.groups.Tuple; | import org.assertj.core.api.iterable.*; import org.assertj.core.groups.*; | [
"org.assertj.core"
] | org.assertj.core; | 1,562,334 |
@Override
protected void createDocument(KualiDocumentFormBase kualiDocumentFormBase) throws WorkflowException {
super.createDocument(kualiDocumentFormBase);
((CreditCardReceiptDocument) kualiDocumentFormBase.getDocument()).initiateDocument();
} | void function(KualiDocumentFormBase kualiDocumentFormBase) throws WorkflowException { super.createDocument(kualiDocumentFormBase); ((CreditCardReceiptDocument) kualiDocumentFormBase.getDocument()).initiateDocument(); } | /**
* Do initialization for a new credit card receipt
*
* @see org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase#createDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase)
*/ | Do initialization for a new credit card receipt | createDocument | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-core/src/main/java/org/kuali/kfs/fp/document/web/struts/CreditCardReceiptAction.java",
"license": "agpl-3.0",
"size": 5933
} | [
"org.kuali.kfs.fp.document.CreditCardReceiptDocument",
"org.kuali.rice.kew.api.exception.WorkflowException",
"org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase"
] | import org.kuali.kfs.fp.document.CreditCardReceiptDocument; import org.kuali.rice.kew.api.exception.WorkflowException; import org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase; | import org.kuali.kfs.fp.document.*; import org.kuali.rice.kew.api.exception.*; import org.kuali.rice.kns.web.struts.form.*; | [
"org.kuali.kfs",
"org.kuali.rice"
] | org.kuali.kfs; org.kuali.rice; | 573,185 |
private static String log4jLevelForTLogLevel(TLogLevel logLevel)
throws InternalException {
switch (logLevel) {
case INFO: return "INFO";
case WARN: return "WARN";
case ERROR: return "ERROR";
case FATAL: return "FATAL";
case VLOG:
case VLOG_2: return "DEBUG";
case V... | static String function(TLogLevel logLevel) throws InternalException { switch (logLevel) { case INFO: return "INFO"; case WARN: return "WARN"; case ERROR: return "ERROR"; case FATAL: return "FATAL"; case VLOG: case VLOG_2: return "DEBUG"; case VLOG_3: return "TRACE"; default: throw new InternalException(STR + logLevel);... | /**
* Returns a log4j level string corresponding to the Glog log level
*/ | Returns a log4j level string corresponding to the Glog log level | log4jLevelForTLogLevel | {
"repo_name": "cloudera/recordservice",
"path": "fe/src/main/java/com/cloudera/impala/util/GlogAppender.java",
"license": "apache-2.0",
"size": 5214
} | [
"com.cloudera.impala.common.InternalException",
"com.cloudera.impala.thrift.TLogLevel"
] | import com.cloudera.impala.common.InternalException; import com.cloudera.impala.thrift.TLogLevel; | import com.cloudera.impala.common.*; import com.cloudera.impala.thrift.*; | [
"com.cloudera.impala"
] | com.cloudera.impala; | 615,820 |
private static String getPID(final String fallback) {
// Note: may fail in some JVM implementations
// therefore fallback has to be provided
// something like '<pid>@<hostname>', at least in SUN / Oracle JVMs
final String jvmName = ManagementFactory.getRuntimeMXBean().getName();
... | static String function(final String fallback) { final String jvmName = ManagementFactory.getRuntimeMXBean().getName(); final int index = jvmName.indexOf('@'); if (index < 1) { return fallback; } try { return Long.toString(Long.parseLong(jvmName.substring(0, index))); } catch (NumberFormatException e) { } return fallbac... | /**
* Got this from http://stackoverflow.com/a/7690178
*/ | Got this from HREF | getPID | {
"repo_name": "jonboylailam/outOfMemory",
"path": "src/TestOutOfMemory.java",
"license": "mit",
"size": 2562
} | [
"java.lang.management.ManagementFactory"
] | import java.lang.management.ManagementFactory; | import java.lang.management.*; | [
"java.lang"
] | java.lang; | 1,896,086 |
void checkConnection() throws IOException {
if (null == socket || socket.isClosed() || !socket.isConnected()) {
if (socket == null) {
log.debug("checkConnection() - Socket is null - attempting to establish connection", socket);
} else if (socket.isClosed()) {
... | void checkConnection() throws IOException { if (null == socket socket.isClosed() !socket.isConnected()) { if (socket == null) { log.debug(STR, socket); } else if (socket.isClosed()) { log.info(STR, socket); } else if (!socket.isConnected()) { log.info(STR, socket); } Socket newSocket = new Socket(); if (getConfiguratio... | /**
* Validate the TCP Connection
*
* @return null if the connection is valid, otherwise the Exception encounted checking the connection
*/ | Validate the TCP Connection | checkConnection | {
"repo_name": "anoordover/camel",
"path": "components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpClientProducer.java",
"license": "apache-2.0",
"size": 26648
} | [
"java.io.IOException",
"java.net.InetSocketAddress",
"java.net.Socket",
"java.net.SocketAddress",
"java.util.concurrent.TimeUnit",
"org.apache.camel.component.mllp.internal.MllpSocketBuffer"
] | import java.io.IOException; import java.net.InetSocketAddress; import java.net.Socket; import java.net.SocketAddress; import java.util.concurrent.TimeUnit; import org.apache.camel.component.mllp.internal.MllpSocketBuffer; | import java.io.*; import java.net.*; import java.util.concurrent.*; import org.apache.camel.component.mllp.internal.*; | [
"java.io",
"java.net",
"java.util",
"org.apache.camel"
] | java.io; java.net; java.util; org.apache.camel; | 289,856 |
private void awaitAcks() throws IOException {
try {
igfsCtx.data().awaitAllAcksReceived(fileInfo.id());
}
catch (IgniteCheckedException e) {
throw new IOException("Failed to wait for flush acknowledge: " + fileInfo.id, e);
}
} | void function() throws IOException { try { igfsCtx.data().awaitAllAcksReceived(fileInfo.id()); } catch (IgniteCheckedException e) { throw new IOException(STR + fileInfo.id, e); } } | /**
* Await acknowledgments.
*
* @throws IOException If failed.
*/ | Await acknowledgments | awaitAcks | {
"repo_name": "SomeFire/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsOutputStreamImpl.java",
"license": "apache-2.0",
"size": 12518
} | [
"java.io.IOException",
"org.apache.ignite.IgniteCheckedException"
] | import java.io.IOException; import org.apache.ignite.IgniteCheckedException; | import java.io.*; import org.apache.ignite.*; | [
"java.io",
"org.apache.ignite"
] | java.io; org.apache.ignite; | 608,949 |
static void popContext()
{
if (DEBUG)
debug("popping context");
// Stack should never be null, nor should it be empty, if this method
// and its counterpart has been called properly.
LinkedList stack = (LinkedList) contexts.get();
if (stack != null)
{
stack.removeFirst();
... | static void popContext() { if (DEBUG) debug(STR); LinkedList stack = (LinkedList) contexts.get(); if (stack != null) { stack.removeFirst(); if (stack.isEmpty()) contexts.set(null); } else if (DEBUG) { debug(STR); } } | /**
* Removes the relation of a class to an {@link AccessControlContext}.
* This method is used by {@link AccessController} when exiting from a
* call to {@link
* AccessController#doPrivileged(java.security.PrivilegedAction,java.security.AccessControlContext)}.
*/ | Removes the relation of a class to an <code>AccessControlContext</code>. This method is used by <code>AccessController</code> when exiting from a call to <code>AccessController#doPrivileged(java.security.PrivilegedAction,java.security.AccessControlContext)</code> | popContext | {
"repo_name": "02N/kaffe",
"path": "libraries/javalib/vmspecific/java/security/VMAccessController.java",
"license": "lgpl-2.1",
"size": 10038
} | [
"java.util.LinkedList"
] | import java.util.LinkedList; | import java.util.*; | [
"java.util"
] | java.util; | 1,085,855 |
public static String encodeJRELibrary(String description, IClasspathEntry[] entries) {
return NewJavaProjectPreferencePage.encodeJRELibrary(description, entries);
} | static String function(String description, IClasspathEntry[] entries) { return NewJavaProjectPreferencePage.encodeJRELibrary(description, entries); } | /**
* Encodes a JRE library to be used in the named preference <code>NEWPROJECT_JRELIBRARY_LIST</code>.
*
* @param description a string value describing the JRE library. The description is used
* to identify the JDR library in the UI
* @param entries an array of classpath entries to be encoded
*
* @return... | Encodes a JRE library to be used in the named preference <code>NEWPROJECT_JRELIBRARY_LIST</code> | encodeJRELibrary | {
"repo_name": "brunyuriy/quick-fix-scout",
"path": "org.eclipse.jdt.ui_3.7.1.r371_v20110824-0800/src/org/eclipse/jdt/ui/PreferenceConstants.java",
"license": "mit",
"size": 151574
} | [
"org.eclipse.jdt.core.IClasspathEntry",
"org.eclipse.jdt.internal.ui.preferences.NewJavaProjectPreferencePage"
] | import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.internal.ui.preferences.NewJavaProjectPreferencePage; | import org.eclipse.jdt.core.*; import org.eclipse.jdt.internal.ui.preferences.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 1,580,257 |
synchronized public void reset() {
if (userConnection != null) {
// userConnection is already closed in normal use
try {
userConnection.close();
} catch (SQLException e) {
// check connection problems
}
}
try... | synchronized void function() { if (userConnection != null) { try { userConnection.close(); } catch (SQLException e) { } } try { connection.reset(); } catch (SQLException e) { } isInUse = false; } | /**
* Force close the userConnection, no close event is fired.
*/ | Force close the userConnection, no close event is fired | reset | {
"repo_name": "Julien35/dev-courses",
"path": "tutoriel-spring-mvc/lib/hsqldb/src/org/hsqldb/jdbc/pool/JDBCPooledConnection.java",
"license": "mit",
"size": 6365
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,293,638 |
private void _List2JSON(HttpServletResponse response,HttpServletRequest request,List<Admin> adminList,int resultMaxCount)
{
Map<String, Object> jsonMap = new HashMap<String, Object>();
jsonMap.put("totalProperty", resultMaxCount);
jsonMap.put("root", adminList);
PrintWriter out;
try
{
... | void function(HttpServletResponse response,HttpServletRequest request,List<Admin> adminList,int resultMaxCount) { Map<String, Object> jsonMap = new HashMap<String, Object>(); jsonMap.put(STR, resultMaxCount); jsonMap.put("root", adminList); PrintWriter out; try { out = response.getWriter(); out.println(JSONObject.fromO... | /**
* Change the list to JSON format.
* @param response the response.
* @param request the request.
* @param adminList the adminList.
* @param resultMaxCount the resultMaxCount.
*/ | Change the list to JSON format | _List2JSON | {
"repo_name": "jethan/extjsdemo",
"path": "src/com/demo/action/AdminServlet.java",
"license": "epl-1.0",
"size": 8636
} | [
"com.demo.model.Admin",
"java.io.IOException",
"java.io.PrintWriter",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"net.sf.json.JSONObject"
] | import com.demo.model.Admin; import java.io.IOException; import java.io.PrintWriter; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.sf.json.JSONObject; | import com.demo.model.*; import java.io.*; import java.util.*; import javax.servlet.http.*; import net.sf.json.*; | [
"com.demo.model",
"java.io",
"java.util",
"javax.servlet",
"net.sf.json"
] | com.demo.model; java.io; java.util; javax.servlet; net.sf.json; | 672,977 |
public void perform()
{
IritgoEngine.instance().shutdown();
System.exit(0);
} | void function() { IritgoEngine.instance().shutdown(); System.exit(0); } | /**
* Perform the action.
*/ | Perform the action | perform | {
"repo_name": "iritgo/iritgo-aktario",
"path": "aktario-framework/src/main/java/de/iritgo/aktario/framework/user/action/UserKickAction.java",
"license": "apache-2.0",
"size": 1153
} | [
"de.iritgo.aktario.framework.IritgoEngine"
] | import de.iritgo.aktario.framework.IritgoEngine; | import de.iritgo.aktario.framework.*; | [
"de.iritgo.aktario"
] | de.iritgo.aktario; | 657,194 |
public void addVersionFiles(final VersionInfo versionInfo,
final LinkType linkType,
final File outputFile,
final boolean isDebug,
final File objDir,
final TargetMatcher matcher) throws IOException {
if (versionInfo == null) {
throw new NullPointerException("versionInfo");
}
if (linkType == nu... | void function(final VersionInfo versionInfo, final LinkType linkType, final File outputFile, final boolean isDebug, final File objDir, final TargetMatcher matcher) throws IOException { if (versionInfo == null) { throw new NullPointerException(STR); } if (linkType == null) { throw new NullPointerException(STR); } if (ou... | /**
* Adds source or object files to the bidded fileset to
* support version information.
*
* @param versionInfo version information
* @param linkType link type
* @param isDebug true if debug build
* @param outputFile name of generated executable
* @param objDir directory for ge... | Adds source or object files to the bidded fileset to support version information | addVersionFiles | {
"repo_name": "maven-nar/cpptasks-parallel",
"path": "src/main/java/com/github/maven_nar/cpptasks/compiler/AbstractLinker.java",
"license": "apache-2.0",
"size": 4132
} | [
"com.github.maven_nar.cpptasks.TargetMatcher",
"com.github.maven_nar.cpptasks.VersionInfo",
"java.io.File",
"java.io.IOException"
] | import com.github.maven_nar.cpptasks.TargetMatcher; import com.github.maven_nar.cpptasks.VersionInfo; import java.io.File; import java.io.IOException; | import com.github.maven_nar.cpptasks.*; import java.io.*; | [
"com.github.maven_nar",
"java.io"
] | com.github.maven_nar; java.io; | 1,463,752 |
public Tomcat getTomcat() {
return this.tomcat;
} | Tomcat function() { return this.tomcat; } | /**
* Returns access to the underlying Tomcat server.
* @return the Tomcat server
*/ | Returns access to the underlying Tomcat server | getTomcat | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/spring-boot-master/spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainer.java",
"license": "mit",
"size": 8186
} | [
"org.apache.catalina.startup.Tomcat"
] | import org.apache.catalina.startup.Tomcat; | import org.apache.catalina.startup.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 2,488,947 |
return ObjectHelper.isEmpty(namespaceURI) || namespaceURI.equals(expectedNamespace);
} | return ObjectHelper.isEmpty(namespaceURI) namespaceURI.equals(expectedNamespace); } | /**
* Returns true if the given namespaceURI is empty or if it matches the
* given expected namespace
*/ | Returns true if the given namespaceURI is empty or if it matches the given expected namespace | isMatchingNamespaceOrEmptyNamespace | {
"repo_name": "punkhorn/camel-upstream",
"path": "core/camel-core/src/main/java/org/apache/camel/builder/xml/Namespaces.java",
"license": "apache-2.0",
"size": 3807
} | [
"org.apache.camel.util.ObjectHelper"
] | import org.apache.camel.util.ObjectHelper; | import org.apache.camel.util.*; | [
"org.apache.camel"
] | org.apache.camel; | 189,079 |
public static void setAcidOperationalProperties(
Configuration conf, boolean isTxnTable, AcidOperationalProperties properties) {
if (isTxnTable) {
HiveConf.setBoolVar(conf, ConfVars.HIVE_TRANSACTIONAL_TABLE_SCAN, isTxnTable);
if (properties != null) {
HiveConf.setIntVar(conf, ConfVars.HI... | static void function( Configuration conf, boolean isTxnTable, AcidOperationalProperties properties) { if (isTxnTable) { HiveConf.setBoolVar(conf, ConfVars.HIVE_TRANSACTIONAL_TABLE_SCAN, isTxnTable); if (properties != null) { HiveConf.setIntVar(conf, ConfVars.HIVE_TXN_OPERATIONAL_PROPERTIES, properties.toInt()); } } els... | /**
* Sets the acidOperationalProperties in the configuration object argument.
* @param conf Mutable configuration object
* @param properties An acidOperationalProperties object to initialize from. If this is null,
* we assume this is a full transactional table.
*/ | Sets the acidOperationalProperties in the configuration object argument | setAcidOperationalProperties | {
"repo_name": "sankarh/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java",
"license": "apache-2.0",
"size": 132988
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hive.conf.HiveConf"
] | import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.conf.HiveConf; | import org.apache.hadoop.conf.*; import org.apache.hadoop.hive.conf.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 422,310 |
public RiaNodeMemory createMemory(final RuleBaseConfiguration config, InternalWorkingMemory wm) {
RiaNodeMemory rianMem = new RiaNodeMemory();
RiaPathMemory pmem = new RiaPathMemory(this, wm);
AbstractTerminalNode.initPathMemory(pmem, getStartTupleSource(), wm, null);
rianMem.setRia... | RiaNodeMemory function(final RuleBaseConfiguration config, InternalWorkingMemory wm) { RiaNodeMemory rianMem = new RiaNodeMemory(); RiaPathMemory pmem = new RiaPathMemory(this, wm); AbstractTerminalNode.initPathMemory(pmem, getStartTupleSource(), wm, null); rianMem.setRiaPathMemory(pmem); return rianMem; } | /**
* Creates and return the node memory
*/ | Creates and return the node memory | createMemory | {
"repo_name": "mdproctor/drools",
"path": "drools-core/src/main/java/org/drools/core/reteoo/RightInputAdapterNode.java",
"license": "apache-2.0",
"size": 16763
} | [
"org.drools.core.RuleBaseConfiguration",
"org.drools.core.common.InternalWorkingMemory"
] | import org.drools.core.RuleBaseConfiguration; import org.drools.core.common.InternalWorkingMemory; | import org.drools.core.*; import org.drools.core.common.*; | [
"org.drools.core"
] | org.drools.core; | 2,601,245 |
@Operation(httpMethods = "POST", bodyParam = "entity")
public Future<?> modify(SocialRequestItem request) throws ProtocolException {
Set<UserId> userIds = request.getUsers();
String msgCollId = request.getParameter("msgCollId");
List<String> messageIds = request.getListParameter("messag... | @Operation(httpMethods = "POST", bodyParam = STR) Future<?> function(SocialRequestItem request) throws ProtocolException { Set<UserId> userIds = request.getUsers(); String msgCollId = request.getParameter(STR); List<String> messageIds = request.getListParameter(STR); HandlerPreconditions.requireNotEmpty(userIds, STR); ... | /**
* Creates a new message collection or message
*/ | Creates a new message collection or message | modify | {
"repo_name": "maheshika/carbon-analytics",
"path": "components/dashboard/org.wso2.carbon.dashboard.social/src/main/java/org/wso2/carbon/dashboard/social/handlers/GSMessageHandler.java",
"license": "apache-2.0",
"size": 7107
} | [
"java.util.List",
"java.util.Set",
"java.util.concurrent.Future",
"org.apache.shindig.protocol.HandlerPreconditions",
"org.apache.shindig.protocol.Operation",
"org.apache.shindig.protocol.ProtocolException",
"org.apache.shindig.social.opensocial.model.Message",
"org.apache.shindig.social.opensocial.mo... | import java.util.List; import java.util.Set; import java.util.concurrent.Future; import org.apache.shindig.protocol.HandlerPreconditions; import org.apache.shindig.protocol.Operation; import org.apache.shindig.protocol.ProtocolException; import org.apache.shindig.social.opensocial.model.Message; import org.apache.shind... | import java.util.*; import java.util.concurrent.*; import org.apache.shindig.protocol.*; import org.apache.shindig.social.opensocial.model.*; import org.apache.shindig.social.opensocial.service.*; import org.apache.shindig.social.opensocial.spi.*; | [
"java.util",
"org.apache.shindig"
] | java.util; org.apache.shindig; | 1,072,580 |
public void addTabsListener(SelectionListener listener){
tabsList.addSelectionListener(listener);
} | void function(SelectionListener listener){ tabsList.addSelectionListener(listener); } | /**
* This method adds a listener to the tabs.
*
* @param listener a selection listener to gets the selection
* events
*/ | This method adds a listener to the tabs | addTabsListener | {
"repo_name": "angelorohit/lwuitstripped",
"path": "src/com/sun/lwuit/TabbedPane.java",
"license": "gpl-2.0",
"size": 21262
} | [
"com.sun.lwuit.events.SelectionListener"
] | import com.sun.lwuit.events.SelectionListener; | import com.sun.lwuit.events.*; | [
"com.sun.lwuit"
] | com.sun.lwuit; | 1,778,307 |
protected void _fireTreeNodesInserted(Object parent, int[] itemIndexes, Object[] items)
{
Object[] path = this.getPath(parent);
TreeModelEvent event = new TreeModelEvent(this, path, itemIndexes, items);
for (TreeModelListener listener : this._listeners)
listener.treeNodesInserted(event);
... | void function(Object parent, int[] itemIndexes, Object[] items) { Object[] path = this.getPath(parent); TreeModelEvent event = new TreeModelEvent(this, path, itemIndexes, items); for (TreeModelListener listener : this._listeners) listener.treeNodesInserted(event); } | /**
* Fires a 'tree nodes inserted' event for any
* interested listeners.
*
* @param parent The parent of the inserted nodes
* @param itemIndexes An array of indices indicating
* where the items were inserted
* @param items An array of inserted items
*/ | Fires a 'tree nodes inserted' event for any interested listeners | _fireTreeNodesInserted | {
"repo_name": "goc9000/UniArchive",
"path": "src/uniarchive/widgets/ArchiveGroupsView.java",
"license": "gpl-3.0",
"size": 55106
} | [
"javax.swing.event.TreeModelEvent",
"javax.swing.event.TreeModelListener"
] | import javax.swing.event.TreeModelEvent; import javax.swing.event.TreeModelListener; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 502,399 |
@Deprecated
protected void postProcessTaskStates(@SuppressWarnings("unused") List<TaskState> taskStates) {
// Do nothing
} | void function(@SuppressWarnings(STR) List<TaskState> taskStates) { } | /**
* Subclasses can override this method to do whatever processing on the {@link TaskState}s,
* e.g., aggregate task-level metrics into job-level metrics.
*
* @deprecated Use {@link #postProcessJobState(JobState)
*/ | Subclasses can override this method to do whatever processing on the <code>TaskState</code>s, e.g., aggregate task-level metrics into job-level metrics | postProcessTaskStates | {
"repo_name": "aditya1105/gobblin",
"path": "gobblin-runtime/src/main/java/org/apache/gobblin/runtime/AbstractJobLauncher.java",
"license": "apache-2.0",
"size": 40039
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,358,475 |
@Override
public void updateNull(int columnIndex) throws SQLException {
try {
debugCodeCall("updateNull", columnIndex);
update(columnIndex, ValueNull.INSTANCE);
} catch (Exception e) {
throw logAndConvert(e);
}
} | void function(int columnIndex) throws SQLException { try { debugCodeCall(STR, columnIndex); update(columnIndex, ValueNull.INSTANCE); } catch (Exception e) { throw logAndConvert(e); } } | /**
* Updates a column in the current or insert row.
*
* @param columnIndex (1,2,...)
* @throws SQLException if the result set is closed or not updatable
*/ | Updates a column in the current or insert row | updateNull | {
"repo_name": "wizardofos/Protozoo",
"path": "extra/h2/src/main/java/org/h2/jdbc/JdbcResultSet.java",
"license": "mit",
"size": 120208
} | [
"java.sql.SQLException",
"org.h2.value.ValueNull"
] | import java.sql.SQLException; import org.h2.value.ValueNull; | import java.sql.*; import org.h2.value.*; | [
"java.sql",
"org.h2.value"
] | java.sql; org.h2.value; | 1,839,182 |
QuorumPeerMain main = new QuorumPeerMain();
try {
main.initializeAndRun(args);
} catch (IllegalArgumentException e) {
LOG.error("Invalid arguments, exiting abnormally", e);
LOG.info(USAGE);
System.err.println(USAGE);
System.exit(2);
} c... | QuorumPeerMain main = new QuorumPeerMain(); try { main.initializeAndRun(args); } catch (IllegalArgumentException e) { LOG.error(STR, e); LOG.info(USAGE); System.err.println(USAGE); System.exit(2); } catch (ConfigException e) { LOG.error(STR, e); System.err.println(STR); System.exit(2); } catch (Exception e) { LOG.error... | /**
* To start the replicated server specify the configuration file name on
* the command line.
* @param args path to the configfile
*/ | To start the replicated server specify the configuration file name on the command line | main | {
"repo_name": "panpap/LoadBalanced_zk",
"path": "src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerMain.java",
"license": "apache-2.0",
"size": 6600
} | [
"org.apache.zookeeper.server.quorum.QuorumPeerConfig"
] | import org.apache.zookeeper.server.quorum.QuorumPeerConfig; | import org.apache.zookeeper.server.quorum.*; | [
"org.apache.zookeeper"
] | org.apache.zookeeper; | 2,161,732 |
public ListTenantsPage listTenants(@Nullable String pageToken) throws FirebaseAuthException {
return listTenants(pageToken, FirebaseTenantClient.MAX_LIST_TENANTS_RESULTS);
} | ListTenantsPage function(@Nullable String pageToken) throws FirebaseAuthException { return listTenants(pageToken, FirebaseTenantClient.MAX_LIST_TENANTS_RESULTS); } | /**
* Gets a page of tenants starting from the specified {@code pageToken}. Page size will be limited
* to 1000 tenants.
*
* @param pageToken A non-empty page token string, or null to retrieve the first page of tenants.
* @return A {@link ListTenantsPage} instance.
* @throws IllegalArgumentException I... | Gets a page of tenants starting from the specified pageToken. Page size will be limited to 1000 tenants | listTenants | {
"repo_name": "firebase/firebase-admin-java",
"path": "src/main/java/com/google/firebase/auth/multitenancy/TenantManager.java",
"license": "apache-2.0",
"size": 12609
} | [
"com.google.firebase.auth.FirebaseAuthException",
"com.google.firebase.internal.Nullable"
] | import com.google.firebase.auth.FirebaseAuthException; import com.google.firebase.internal.Nullable; | import com.google.firebase.auth.*; import com.google.firebase.internal.*; | [
"com.google.firebase"
] | com.google.firebase; | 2,887,721 |
public final Property<String> middleName() {
return metaBean().middleName().createProperty(this);
} | final Property<String> function() { return metaBean().middleName().createProperty(this); } | /**
* Gets the the {@code middleName} property.
* @return the property, not null
*/ | Gets the the middleName property | middleName | {
"repo_name": "fengshao0907/joda-beans",
"path": "src/test/java/org/joda/beans/gen/SimpleSubPersonWithBuilderNonFinal.java",
"license": "apache-2.0",
"size": 11011
} | [
"org.joda.beans.Property"
] | import org.joda.beans.Property; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 2,706,329 |
public void forEachMatch(final OpaqueBehavior pMe, final IMatchProcessor<? super MethodNotPublicMatch> processor) {
rawForEachMatch(new Object[]{pMe}, processor);
}
| void function(final OpaqueBehavior pMe, final IMatchProcessor<? super MethodNotPublicMatch> processor) { rawForEachMatch(new Object[]{pMe}, processor); } | /**
* Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
* @param pMe the fixed value of pattern parameter me, or null if not bound.
* @param processor the action that will process each pattern match.
*
*/ | Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters | forEachMatch | {
"repo_name": "ELTE-Soft/xUML-RT-Executor",
"path": "plugins/hu.eltesoft.modelexecution.validation/src-gen/hu/eltesoft/modelexecution/validation/MethodNotPublicMatcher.java",
"license": "epl-1.0",
"size": 10247
} | [
"hu.eltesoft.modelexecution.validation.MethodNotPublicMatch",
"org.eclipse.incquery.runtime.api.IMatchProcessor",
"org.eclipse.uml2.uml.OpaqueBehavior"
] | import hu.eltesoft.modelexecution.validation.MethodNotPublicMatch; import org.eclipse.incquery.runtime.api.IMatchProcessor; import org.eclipse.uml2.uml.OpaqueBehavior; | import hu.eltesoft.modelexecution.validation.*; import org.eclipse.incquery.runtime.api.*; import org.eclipse.uml2.uml.*; | [
"hu.eltesoft.modelexecution",
"org.eclipse.incquery",
"org.eclipse.uml2"
] | hu.eltesoft.modelexecution; org.eclipse.incquery; org.eclipse.uml2; | 1,939,514 |
@Override
public int validateEmail(String email) {
int result = 0;
if(!(Patterns.EMAIL_ADDRESS.matcher(email).matches()))
result = Error.INVALID_MAIL;
return result;
} | int function(String email) { int result = 0; if(!(Patterns.EMAIL_ADDRESS.matcher(email).matches())) result = Error.INVALID_MAIL; return result; } | /**
* Test email syntax failures.
* Use the android Email Pattern
* @param email Email String
* @return 0 if correct. ERRCode if invalid.
*/ | Test email syntax failures. Use the android Email Pattern | validateEmail | {
"repo_name": "AmadorFernandez/ManageProduct_DataBase",
"path": "app/src/main/java/com/afg/MngProductDatabase/Presenter/SignUpPresenter.java",
"license": "gpl-3.0",
"size": 5047
} | [
"android.util.Patterns",
"com.afg.MngProductDatabase"
] | import android.util.Patterns; import com.afg.MngProductDatabase; | import android.util.*; import com.afg.*; | [
"android.util",
"com.afg"
] | android.util; com.afg; | 2,458,725 |
public void onFlowMirrorPointDelete(String flowId, String flowMirrorPointId) {
Map<String, String> data = new HashMap<>();
data.put(DASHBOARD, "flow-mirror-point-delete");
data.put(TAG, "flow-mirror-point-delete");
data.put(FLOW_ID, flowId);
data.put(EVENT_TYPE, FLOW_MIRROR_P... | void function(String flowId, String flowMirrorPointId) { Map<String, String> data = new HashMap<>(); data.put(DASHBOARD, STR); data.put(TAG, STR); data.put(FLOW_ID, flowId); data.put(EVENT_TYPE, FLOW_MIRROR_POINT_DELETE_EVENT); invokeLogger(Level.INFO, String.format(STR, flowMirrorPointId, flowId), data); } | /**
* Log a flow-mirror-point-delete event.
*/ | Log a flow-mirror-point-delete event | onFlowMirrorPointDelete | {
"repo_name": "telstra/open-kilda",
"path": "src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/logger/FlowOperationsDashboardLogger.java",
"license": "apache-2.0",
"size": 26173
} | [
"java.util.HashMap",
"java.util.Map",
"org.slf4j.event.Level"
] | import java.util.HashMap; import java.util.Map; import org.slf4j.event.Level; | import java.util.*; import org.slf4j.event.*; | [
"java.util",
"org.slf4j.event"
] | java.util; org.slf4j.event; | 525,635 |
@Override
public Range getDomainBounds(boolean includeInterval) {
List keys = this.values.getRowKeys();
if (keys.isEmpty()) {
return null;
}
TimePeriod first = (TimePeriod) keys.get(0);
TimePeriod last = (TimePeriod) keys.get(keys.size() - 1);
... | Range function(boolean includeInterval) { List keys = this.values.getRowKeys(); if (keys.isEmpty()) { return null; } TimePeriod first = (TimePeriod) keys.get(0); TimePeriod last = (TimePeriod) keys.get(keys.size() - 1); if (!includeInterval this.domainIsPointsInTime) { return new Range(getXValue(first), getXValue(last)... | /**
* Returns the range of the values in this dataset's domain.
*
* @param includeInterval a flag that controls whether or not the
* x-intervals are taken into account.
*
* @return The range.
*/ | Returns the range of the values in this dataset's domain | getDomainBounds | {
"repo_name": "jfree/jfreechart",
"path": "src/main/java/org/jfree/data/time/TimeTableXYDataset.java",
"license": "lgpl-2.1",
"size": 19999
} | [
"java.util.List",
"org.jfree.data.Range"
] | import java.util.List; import org.jfree.data.Range; | import java.util.*; import org.jfree.data.*; | [
"java.util",
"org.jfree.data"
] | java.util; org.jfree.data; | 2,489,626 |
private boolean calculateConditions(Rule rule) {
List<Condition> conditions = ((RuntimeRule) rule).getConditions();
if (conditions == null || conditions.size() == 0) {
return true;
}
for (Iterator<Condition> it = conditions.iterator(); it.hasNext();) {
Runtime... | boolean function(Rule rule) { List<Condition> conditions = ((RuntimeRule) rule).getConditions(); if (conditions == null conditions.size() == 0) { return true; } for (Iterator<Condition> it = conditions.iterator(); it.hasNext();) { RuntimeCondition c = (RuntimeCondition) it.next(); ConditionHandler tHandler = c.getModul... | /**
* This method checks if all rule's condition are satisfied or not.
*
* @param rule the checked rule
* @return true when all conditions of the rule are satisfied, false otherwise.
*/ | This method checks if all rule's condition are satisfied or not | calculateConditions | {
"repo_name": "markusmazurczak/smarthome",
"path": "bundles/automation/org.eclipse.smarthome.automation.core/src/main/java/org/eclipse/smarthome/automation/core/internal/RuleEngine.java",
"license": "epl-1.0",
"size": 51399
} | [
"java.util.Iterator",
"java.util.List",
"java.util.Map",
"org.eclipse.smarthome.automation.Condition",
"org.eclipse.smarthome.automation.Rule",
"org.eclipse.smarthome.automation.handler.ConditionHandler"
] | import java.util.Iterator; import java.util.List; import java.util.Map; import org.eclipse.smarthome.automation.Condition; import org.eclipse.smarthome.automation.Rule; import org.eclipse.smarthome.automation.handler.ConditionHandler; | import java.util.*; import org.eclipse.smarthome.automation.*; import org.eclipse.smarthome.automation.handler.*; | [
"java.util",
"org.eclipse.smarthome"
] | java.util; org.eclipse.smarthome; | 2,265,714 |
public static boolean createFileWithSizes(MultipartFile multipartFile, File directory, String filenameNew, String filenameOld, PhotoSize[] photoSizeArray) {
boolean isSavedSuccessfully = true;
// Check the arguments.
if (multipartFile == null || multipartFile.isEmpty()) {
logger... | static boolean function(MultipartFile multipartFile, File directory, String filenameNew, String filenameOld, PhotoSize[] photoSizeArray) { boolean isSavedSuccessfully = true; if (multipartFile == null multipartFile.isEmpty()) { logger.error(STR); return false; } if (!directory.isDirectory()) { logger.error(STR + direct... | /**
* Method to use when you would like to create photo with multiple instances
* and you would like to delete the old one.
*
* @param multipartFile
* @param directory
* @param filenameNew
* @param filenameOld
* @param extension
* @param photoSizeArray
* @return
*/ | Method to use when you would like to create photo with multiple instances and you would like to delete the old one | createFileWithSizes | {
"repo_name": "siggouroglou/ergasia_restServerSide_java",
"path": "src/main/java/gr/softaware/lib/io/PhotoManager.java",
"license": "gpl-2.0",
"size": 9746
} | [
"java.awt.image.BufferedImage",
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"javax.imageio.ImageIO",
"org.apache.commons.io.FileUtils",
"org.imgscalr.Scalr",
"org.springframework.web.multipart.MultipartFile"
] | import java.awt.image.BufferedImage; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import javax.imageio.ImageIO; import org.apache.commons.io.FileUtils; import org.imgscalr.Scalr; import org.springframework.web.multipart.MultipartFile; | import java.awt.image.*; import java.io.*; import javax.imageio.*; import org.apache.commons.io.*; import org.imgscalr.*; import org.springframework.web.multipart.*; | [
"java.awt",
"java.io",
"javax.imageio",
"org.apache.commons",
"org.imgscalr",
"org.springframework.web"
] | java.awt; java.io; javax.imageio; org.apache.commons; org.imgscalr; org.springframework.web; | 601,091 |
protected Element createElement(String tagName, Map<String, String> attributes) {
Element element = new Element(tagName);
for (Map.Entry<String, String> attribute : attributes.entrySet()) {
element.setAttribute(attribute.getKey(), attribute.getValue());
}
return element;
}
/**
* {@inheri... | Element function(String tagName, Map<String, String> attributes) { Element element = new Element(tagName); for (Map.Entry<String, String> attribute : attributes.entrySet()) { element.setAttribute(attribute.getKey(), attribute.getValue()); } return element; } /** * {@inheritDoc} | /**
* Creates an element.
* This factory method is the only place where elements get created.
*
* @param tagName
* @param attributes
* @return the new element
*/ | Creates an element. This factory method is the only place where elements get created | createElement | {
"repo_name": "gburd/wave",
"path": "src/org/waveprotocol/wave/model/document/raw/impl/RawDocumentImpl.java",
"license": "apache-2.0",
"size": 7366
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 684,269 |
static Result calc_cov(JavaRDD<Element> matrix, Integer[] mean, Integer[][] cov) {
int i, j, k;
int sum = 0;
mean = (Integer[]) matrix.mapToPair(e -> new Tuple2<Integer,Integer>(e.row, e.val)).reduceByKey((a, b) -> a+b).sortByKey(true).map(e -> (e._2/num_rows)).collect().toArray();
... | static Result calc_cov(JavaRDD<Element> matrix, Integer[] mean, Integer[][] cov) { int i, j, k; int sum = 0; mean = (Integer[]) matrix.mapToPair(e -> new Tuple2<Integer,Integer>(e.row, e.val)).reduceByKey((a, b) -> a+b).sortByKey(true).map(e -> (e._2/num_rows)).collect().toArray(); for (i = 0; i < num_rows; i++) { for ... | /**
* calc_cov() Calculate the covariance
*/ | calc_cov() Calculate the covariance | calc_cov | {
"repo_name": "uwplse/Casper",
"path": "bin/benchmarks/manual/phoenix/PcaJava.java",
"license": "bsd-3-clause",
"size": 4538
} | [
"org.apache.spark.api.java.JavaRDD"
] | import org.apache.spark.api.java.JavaRDD; | import org.apache.spark.api.java.*; | [
"org.apache.spark"
] | org.apache.spark; | 2,186,007 |
// If no stop specified then can't determine next predicted vehicle
if (stopId == null)
return null;
// Determine the first IpcPrediction for the stop
List<IpcPredictionsForRouteStopDest> predsList =
PredictionDataCache.getInstance().getPredictions(dbRoute.getShortName(), stopId);
if (predsList.isE... | if (stopId == null) return null; List<IpcPredictionsForRouteStopDest> predsList = PredictionDataCache.getInstance().getPredictions(dbRoute.getShortName(), stopId); if (predsList.isEmpty()) return null; List<IpcPrediction> ipcPreds = predsList.get(0).getPredictionsForRouteStop(); if (ipcPreds.isEmpty()) return null; Str... | /**
* If stop specified then returns the location of the next predicted vehicle
* for that stop. Returns null if stop not specified or no predictions for
* stop.
*
* @param dbRoute
* @param stopId
* @return
*/ | If stop specified then returns the location of the next predicted vehicle for that stop. Returns null if stop not specified or no predictions for stop | getLocationOfNextPredictedVehicle | {
"repo_name": "edsfocci/Transitime_core",
"path": "transitime/src/main/java/org/transitime/ipc/data/IpcRoute.java",
"license": "gpl-3.0",
"size": 11735
} | [
"java.util.List",
"org.transitime.core.dataCache.PredictionDataCache",
"org.transitime.core.dataCache.VehicleDataCache",
"org.transitime.db.structs.Location"
] | import java.util.List; import org.transitime.core.dataCache.PredictionDataCache; import org.transitime.core.dataCache.VehicleDataCache; import org.transitime.db.structs.Location; | import java.util.*; import org.transitime.core.*; import org.transitime.db.structs.*; | [
"java.util",
"org.transitime.core",
"org.transitime.db"
] | java.util; org.transitime.core; org.transitime.db; | 2,529,457 |
default AdvancedAtomixValueEndpointBuilder resourceConfigs(
Map<String, Properties> resourceConfigs) {
doSetProperty("resourceConfigs", resourceConfigs);
return this;
} | default AdvancedAtomixValueEndpointBuilder resourceConfigs( Map<String, Properties> resourceConfigs) { doSetProperty(STR, resourceConfigs); return this; } | /**
* Cluster wide resources configuration.
*
* The option is a: <code>java.util.Map<java.lang.String,
* java.util.Properties></code> type.
*
* Group: advanced
*/ | Cluster wide resources configuration. The option is a: <code>java.util.Map<java.lang.String, java.util.Properties></code> type. Group: advanced | resourceConfigs | {
"repo_name": "nicolaferraro/camel",
"path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AtomixValueEndpointBuilderFactory.java",
"license": "apache-2.0",
"size": 45173
} | [
"java.util.Map",
"java.util.Properties"
] | import java.util.Map; import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 2,185,532 |
protected void inGameParser(final String message) {
controller.sendDebug(message);
boolean needInput=true;
String output=null;
StringTokenizer StringT = new StringTokenizer( message );
final String Addr = StringT.nextToken();
// ERROR is not related to the game... | void function(final String message) { controller.sendDebug(message); boolean needInput=true; String output=null; StringTokenizer StringT = new StringTokenizer( message ); final String Addr = StringT.nextToken(); if (!Addr.equals("ERROR")) { game.addCommand(message); } if (Addr.equals("ERROR")) { String Pname = StringT.... | /**
* This parses the string, calls the relavant method and displays the correct error messages
* @param mem The string needed for parsing
*/ | This parses the string, calls the relavant method and displays the correct error messages | inGameParser | {
"repo_name": "hernol/ConuWar",
"path": "ConuWar/src/net/yura/domination/engine/Risk.java",
"license": "gpl-3.0",
"size": 123837
} | [
"java.util.List",
"java.util.StringTokenizer",
"net.yura.conuwar.engine.core.Country",
"net.yura.conuwar.engine.core.Player",
"net.yura.conuwar.engine.core.RiskGame"
] | import java.util.List; import java.util.StringTokenizer; import net.yura.conuwar.engine.core.Country; import net.yura.conuwar.engine.core.Player; import net.yura.conuwar.engine.core.RiskGame; | import java.util.*; import net.yura.conuwar.engine.core.*; | [
"java.util",
"net.yura.conuwar"
] | java.util; net.yura.conuwar; | 1,245,231 |
public static INDArrayIndex[] resolve(INDArrayIndex[] allIndex, INDArrayIndex... intendedIndexes) {
int numNewAxes = numNewAxis(intendedIndexes);
INDArrayIndex[] all = new INDArrayIndex[allIndex.length + numNewAxes];
Arrays.fill(all, NDArrayIndex.all());
for (int i = 0; i < allIndex... | static INDArrayIndex[] function(INDArrayIndex[] allIndex, INDArrayIndex... intendedIndexes) { int numNewAxes = numNewAxis(intendedIndexes); INDArrayIndex[] all = new INDArrayIndex[allIndex.length + numNewAxes]; Arrays.fill(all, NDArrayIndex.all()); for (int i = 0; i < allIndex.length; i++) { if (i >= intendedIndexes.le... | /**
* Given an all index and
* the intended indexes, return an
* index array containing a combination of all elements
* for slicing and overriding particular indexes where necessary
* @param allIndex the index containing all elements
* @param intendedIndexes the indexes specified by the us... | Given an all index and the intended indexes, return an index array containing a combination of all elements for slicing and overriding particular indexes where necessary | resolve | {
"repo_name": "RobAltena/deeplearning4j",
"path": "nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/indexing/NDArrayIndex.java",
"license": "apache-2.0",
"size": 23155
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 360,471 |
public Map<AAction, Transition> getTransitions(); | Map<AAction, Transition> function(); | /**
* Returns a (readonly) map that maps <code>AAction</code> instances
* to corresponding specific <code>Transition</code> instances for
* this source.
*
* @return the mapping of Action-to-Transition for this source
* @author mlh
*/ | Returns a (readonly) map that maps <code>AAction</code> instances to corresponding specific <code>Transition</code> instances for this source | getTransitions | {
"repo_name": "cogtool/cogtool",
"path": "java/edu/cmu/cs/hcii/cogtool/model/TransitionSource.java",
"license": "lgpl-2.1",
"size": 11405
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,773,735 |
public void paintProgressBarBackground(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 a progress bar.
*
* @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 a progress bar | paintProgressBarBackground | {
"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,379 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.