method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static String mapToQueryString(Map<String, String> fields) {
StringBuilder sb = new StringBuilder();
boolean first = true;
for (Entry<String, String> entry : fields.entrySet()) {
if (first) {
first = false;
} else {
sb.append('&');
}
sb.append(NetworkUtils.urlEncode(entry.getKey()));... | static String function(Map<String, String> fields) { StringBuilder sb = new StringBuilder(); boolean first = true; for (Entry<String, String> entry : fields.entrySet()) { if (first) { first = false; } else { sb.append('&'); } sb.append(NetworkUtils.urlEncode(entry.getKey())); sb.append('='); sb.append(NetworkUtils.urlE... | /**
* Creates a query string from a field name to value mapping, without ?
* prefix.
*
* @param fields
* field name to value mapping
* @return query string
*/ | Creates a query string from a field name to value mapping, without ? prefix | mapToQueryString | {
"repo_name": "JochemKuijpers/Network",
"path": "src/nl/jochemkuijpers/network/NetworkUtils.java",
"license": "mit",
"size": 2569
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,027,983 |
public static void verifyClearRecursively(FinishedTriggers finishedSet) {
ExecutableTriggerStateMachine trigger =
ExecutableTriggerStateMachine.create(
AfterAllStateMachine.of(
AfterFirstStateMachine.of(
AfterPaneStateMachine.elementCountAtLeast(3),
... | static void function(FinishedTriggers finishedSet) { ExecutableTriggerStateMachine trigger = ExecutableTriggerStateMachine.create( AfterAllStateMachine.of( AfterFirstStateMachine.of( AfterPaneStateMachine.elementCountAtLeast(3), AfterWatermarkStateMachine.pastEndOfWindow()), AfterAllStateMachine.of( AfterPaneStateMachi... | /**
* Tests that clearing a trigger recursively clears all of that triggers subTriggers, but no
* others.
*/ | Tests that clearing a trigger recursively clears all of that triggers subTriggers, but no others | verifyClearRecursively | {
"repo_name": "rangadi/incubator-beam",
"path": "runners/core-java/src/test/java/org/apache/beam/runners/core/triggers/FinishedTriggersProperties.java",
"license": "apache-2.0",
"size": 5085
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 427,577 |
public static <T> NTuple of(@NonNull List<T> items) {
return new NTuple(items.toArray());
} | static <T> NTuple function(@NonNull List<T> items) { return new NTuple(items.toArray()); } | /**
* Of n tuple.
*
* @param <T> the type parameter
* @param items the items
* @return the n tuple
*/ | Of n tuple | of | {
"repo_name": "dbracewell/mango",
"path": "src/main/java/com/davidbracewell/tuple/NTuple.java",
"license": "apache-2.0",
"size": 1733
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,641,037 |
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
return this;
} | Builder function( ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } | /**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/ | Applies the given settings updater function to all of the unary API methods in this service. Note: This method does not support applying settings to streaming methods | applyToAllUnaryMethods | {
"repo_name": "mbrukman/gcloud-java",
"path": "google-cloud-trace/src/main/java/com/google/cloud/trace/v2/stub/TraceServiceStubSettings.java",
"license": "apache-2.0",
"size": 11536
} | [
"com.google.api.core.ApiFunction",
"com.google.api.gax.rpc.UnaryCallSettings"
] | import com.google.api.core.ApiFunction; import com.google.api.gax.rpc.UnaryCallSettings; | import com.google.api.core.*; import com.google.api.gax.rpc.*; | [
"com.google.api"
] | com.google.api; | 408,343 |
public static void dropTestTypes(Database database, String... typeNames) {
for (String typeName : typeNames) {
try {
String correctCaseTypeName = database.toCorrectCaseIdentifier(typeName);
database.dropType(database.getDefaultSchemaName(), correctCaseTypeName... | static void function(Database database, String... typeNames) { for (String typeName : typeNames) { try { String correctCaseTypeName = database.toCorrectCaseIdentifier(typeName); database.dropType(database.getDefaultSchemaName(), correctCaseTypeName); } catch (DbMaintainException e) { } } } | /**
* Drops the test types
*
* @param database The database, not null
* @param typeNames The types to drop
*/ | Drops the test types | dropTestTypes | {
"repo_name": "intouchfollowup/dbmaintain",
"path": "dbmaintain/src/test/java/org/dbmaintain/util/SQLTestUtils.java",
"license": "apache-2.0",
"size": 10960
} | [
"org.dbmaintain.database.Database"
] | import org.dbmaintain.database.Database; | import org.dbmaintain.database.*; | [
"org.dbmaintain.database"
] | org.dbmaintain.database; | 2,044,455 |
public void testCloning() {
Stroke stroke = new BasicStroke(2.0f);
XYLineAnnotation a1 = new XYLineAnnotation(10.0, 20.0, 100.0, 200.0,
stroke, Color.blue);
XYLineAnnotation a2 = null;
try {
a2 = (XYLineAnnotation) a1.clone();
}
catch (Clon... | void function() { Stroke stroke = new BasicStroke(2.0f); XYLineAnnotation a1 = new XYLineAnnotation(10.0, 20.0, 100.0, 200.0, stroke, Color.blue); XYLineAnnotation a2 = null; try { a2 = (XYLineAnnotation) a1.clone(); } catch (CloneNotSupportedException e) { System.err.println(STR); } assertTrue(a1 != a2); assertTrue(a1... | /**
* Confirm that cloning works.
*/ | Confirm that cloning works | testCloning | {
"repo_name": "JSansalone/JFreeChart",
"path": "tests/org/jfree/chart/annotations/junit/XYLineAnnotationTests.java",
"license": "lgpl-2.1",
"size": 7113
} | [
"java.awt.BasicStroke",
"java.awt.Color",
"java.awt.Stroke",
"org.jfree.chart.annotations.XYLineAnnotation"
] | import java.awt.BasicStroke; import java.awt.Color; import java.awt.Stroke; import org.jfree.chart.annotations.XYLineAnnotation; | import java.awt.*; import org.jfree.chart.annotations.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 445,440 |
public String getBaseName(String site) {
File path = new File(this.getPath(site));
return path.getName();
} | String function(String site) { File path = new File(this.getPath(site)); return path.getName(); } | /**
* returns the basename of the path to the local credential
*
* @param site the site handle
*/ | returns the basename of the path to the local credential | getBaseName | {
"repo_name": "pegasus-isi/pegasus",
"path": "src/edu/isi/pegasus/common/credential/impl/Irods.java",
"license": "apache-2.0",
"size": 6745
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,689,239 |
protected final void setMultipartFiles(MultiValueMap<String, MultipartFile> multipartFiles) {
this.multipartFiles =
new LinkedMultiValueMap<String, MultipartFile>(Collections.unmodifiableMap(multipartFiles));
} | final void function(MultiValueMap<String, MultipartFile> multipartFiles) { this.multipartFiles = new LinkedMultiValueMap<String, MultipartFile>(Collections.unmodifiableMap(multipartFiles)); } | /**
* Set a Map with parameter names as keys and list of MultipartFile objects as values.
* To be invoked by subclasses on initialization.
*/ | Set a Map with parameter names as keys and list of MultipartFile objects as values. To be invoked by subclasses on initialization | setMultipartFiles | {
"repo_name": "kingtang/spring-learn",
"path": "spring-web/src/main/java/org/springframework/web/multipart/support/AbstractMultipartHttpServletRequest.java",
"license": "gpl-3.0",
"size": 3941
} | [
"java.util.Collections",
"org.springframework.util.LinkedMultiValueMap",
"org.springframework.util.MultiValueMap",
"org.springframework.web.multipart.MultipartFile"
] | import java.util.Collections; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.multipart.MultipartFile; | import java.util.*; import org.springframework.util.*; import org.springframework.web.multipart.*; | [
"java.util",
"org.springframework.util",
"org.springframework.web"
] | java.util; org.springframework.util; org.springframework.web; | 1,619,130 |
protected void fall(float par1)
{
if (par1 > 1.0F)
{
this.playSound("mob.horse.land", 0.4F, 1.0F);
}
int i = MathHelper.ceiling_float_int(par1 * 0.5F - 3.0F);
if (i > 0)
{
this.attackEntityFrom(DamageSource.fall, (float)i);
i... | void function(float par1) { if (par1 > 1.0F) { this.playSound(STR, 0.4F, 1.0F); } int i = MathHelper.ceiling_float_int(par1 * 0.5F - 3.0F); if (i > 0) { this.attackEntityFrom(DamageSource.fall, (float)i); if (this.riddenByEntity != null) { this.riddenByEntity.attackEntityFrom(DamageSource.fall, (float)i); } int j = thi... | /**
* Called when the mob is falling. Calculates and applies fall damage.
*/ | Called when the mob is falling. Calculates and applies fall damage | fall | {
"repo_name": "HATB0T/RuneCraftery",
"path": "forge/mcp/src/minecraft/net/minecraft/entity/passive/EntityHorse.java",
"license": "lgpl-3.0",
"size": 54333
} | [
"net.minecraft.block.Block",
"net.minecraft.block.StepSound",
"net.minecraft.util.DamageSource",
"net.minecraft.util.MathHelper"
] | import net.minecraft.block.Block; import net.minecraft.block.StepSound; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; | import net.minecraft.block.*; import net.minecraft.util.*; | [
"net.minecraft.block",
"net.minecraft.util"
] | net.minecraft.block; net.minecraft.util; | 1,229,816 |
@Override
public void addArtifact(CorrelationAttribute eamArtifact) throws EamDbException {
if(eamArtifact == null) {
throw new EamDbException("CorrelationAttribute is null");
}
if(eamArtifact.getCorrelationType() == null) {
throw new EamDbException("Correlation t... | void function(CorrelationAttribute eamArtifact) throws EamDbException { if(eamArtifact == null) { throw new EamDbException(STR); } if(eamArtifact.getCorrelationType() == null) { throw new EamDbException(STR); } if(eamArtifact.getCorrelationValue() == null) { throw new EamDbException(STR); } Connection conn = connect();... | /**
* Inserts new Artifact(s) into the database. Should add associated Case and
* Data Source first.
*
* @param eamArtifact The artifact to add
*/ | Inserts new Artifact(s) into the database. Should add associated Case and Data Source first | addArtifact | {
"repo_name": "APriestman/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java",
"license": "apache-2.0",
"size": 98929
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.util.List"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.util.List; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 2,165,926 |
public double evaluate(double x, double epsilon) throws MathException {
return evaluate(x, epsilon, Integer.MAX_VALUE);
} | double function(double x, double epsilon) throws MathException { return evaluate(x, epsilon, Integer.MAX_VALUE); } | /**
* Evaluates the continued fraction at the value x.
* @param x the evaluation point.
* @param epsilon maximum error allowed.
* @return the value of the continued fraction evaluated at x.
* @throws MathException if the algorithm fails to converge.
*/ | Evaluates the continued fraction at the value x | evaluate | {
"repo_name": "SpoonLabs/astor",
"path": "examples/math_63/src/main/java/org/apache/commons/math/util/ContinuedFraction.java",
"license": "gpl-2.0",
"size": 7677
} | [
"org.apache.commons.math.MathException"
] | import org.apache.commons.math.MathException; | import org.apache.commons.math.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,492,724 |
@Nullable
WordsScanner getWordsScanner(); | WordsScanner getWordsScanner(); | /**
* Gets the word scanner for building a word index for the specified language.
*
* @return the word scanner implementation, or null if {@link com.intellij.lang.cacheBuilder.SimpleWordsScanner} is OK.
*/ | Gets the word scanner for building a word index for the specified language | getWordsScanner | {
"repo_name": "jexp/idea2",
"path": "platform/lang-api/src/com/intellij/lang/findUsages/FindUsagesProvider.java",
"license": "apache-2.0",
"size": 3193
} | [
"com.intellij.lang.cacheBuilder.WordsScanner"
] | import com.intellij.lang.cacheBuilder.WordsScanner; | import com.intellij.lang.*; | [
"com.intellij.lang"
] | com.intellij.lang; | 2,879,334 |
public List<Double> getLineWidths() {
// gets array from native object
ArrayDouble array = getArrayValue(Property.LINE_WIDTHS);
// returns list
return ArrayListHelper.unmodifiableList(array);
} | List<Double> function() { ArrayDouble array = getArrayValue(Property.LINE_WIDTHS); return ArrayListHelper.unmodifiableList(array); } | /**
* Returns the list of line widths.
*
* @return the list of line widths.
*/ | Returns the list of line widths | getLineWidths | {
"repo_name": "pepstock-org/Charba",
"path": "src/org/pepstock/charba/client/items/LegendNode.java",
"license": "apache-2.0",
"size": 4674
} | [
"java.util.List",
"org.pepstock.charba.client.commons.ArrayDouble",
"org.pepstock.charba.client.commons.ArrayListHelper"
] | import java.util.List; import org.pepstock.charba.client.commons.ArrayDouble; import org.pepstock.charba.client.commons.ArrayListHelper; | import java.util.*; import org.pepstock.charba.client.commons.*; | [
"java.util",
"org.pepstock.charba"
] | java.util; org.pepstock.charba; | 300,057 |
@Test
public void testHasExtensionStringStringArray_TestTXTFile_TxtExtension() {
assertTrue(FileUtils.hasExtension("test.TXT", new String[] { "txt" }));
} | void function() { assertTrue(FileUtils.hasExtension(STR, new String[] { "txt" })); } | /**
* File "test.TXT" has a "txt" extension.
*/ | File "test.TXT" has a "txt" extension | testHasExtensionStringStringArray_TestTXTFile_TxtExtension | {
"repo_name": "zendtech/eclipse-diff",
"path": "src/test/java/com/zend/php/releng/eclipsediff/utils/HasExtensionStringStringArrayTest.java",
"license": "isc",
"size": 3325
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 688,871 |
public FacesConfigLifecycleType<WebFacesConfigDescriptor> getOrCreateLifecycle()
{
List<Node> nodeList = model.get("lifecycle");
if (nodeList != null && nodeList.size() > 0)
{
return new FacesConfigLifecycleTypeImpl<WebFacesConfigDescriptor>(this, "lifecycle", model, nodeList.get(0));
... | FacesConfigLifecycleType<WebFacesConfigDescriptor> function() { List<Node> nodeList = model.get(STR); if (nodeList != null && nodeList.size() > 0) { return new FacesConfigLifecycleTypeImpl<WebFacesConfigDescriptor>(this, STR, model, nodeList.get(0)); } return createLifecycle(); } | /**
* If not already created, a new <code>lifecycle</code> element will be created and returned.
* Otherwise, the first existing <code>lifecycle</code> element will be returned.
* @return the instance defined for the element <code>lifecycle</code>
*/ | If not already created, a new <code>lifecycle</code> element will be created and returned. Otherwise, the first existing <code>lifecycle</code> element will be returned | getOrCreateLifecycle | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/facesconfig20/WebFacesConfigDescriptorImpl.java",
"license": "epl-1.0",
"size": 44350
} | [
"java.util.List",
"org.jboss.shrinkwrap.descriptor.api.facesconfig20.FacesConfigLifecycleType",
"org.jboss.shrinkwrap.descriptor.api.facesconfig20.WebFacesConfigDescriptor",
"org.jboss.shrinkwrap.descriptor.spi.node.Node"
] | import java.util.List; import org.jboss.shrinkwrap.descriptor.api.facesconfig20.FacesConfigLifecycleType; import org.jboss.shrinkwrap.descriptor.api.facesconfig20.WebFacesConfigDescriptor; import org.jboss.shrinkwrap.descriptor.spi.node.Node; | import java.util.*; import org.jboss.shrinkwrap.descriptor.api.facesconfig20.*; import org.jboss.shrinkwrap.descriptor.spi.node.*; | [
"java.util",
"org.jboss.shrinkwrap"
] | java.util; org.jboss.shrinkwrap; | 1,225,483 |
@Test
@Feature({"NFCTest"})
public void testWatchNotFormattedTag() throws IOException, FormatException {
TestNfcImpl nfc = new TestNfcImpl(mContext, mDelegate);
mDelegate.invokeCallback();
nfc.setClient(mNfcClient);
int watchId = mNextWatchId++;
Watch_Response mockWat... | @Feature({STR}) void function() throws IOException, FormatException { TestNfcImpl nfc = new TestNfcImpl(mContext, mDelegate); mDelegate.invokeCallback(); nfc.setClient(mNfcClient); int watchId = mNextWatchId++; Watch_Response mockWatchCallback = mock(Watch_Response.class); nfc.watch(watchId, mockWatchCallback); verify(... | /**
* Test that Nfc.watch() notifies client when tag is not formatted.
*/ | Test that Nfc.watch() notifies client when tag is not formatted | testWatchNotFormattedTag | {
"repo_name": "scheib/chromium",
"path": "services/device/nfc/android/junit/src/org/chromium/device/nfc/NFCTest.java",
"license": "bsd-3-clause",
"size": 85355
} | [
"android.nfc.FormatException",
"java.io.IOException",
"org.chromium.base.test.util.Feature",
"org.chromium.device.mojom.NdefMessage",
"org.junit.Assert",
"org.mockito.ArgumentMatchers",
"org.mockito.Mockito"
] | import android.nfc.FormatException; import java.io.IOException; import org.chromium.base.test.util.Feature; import org.chromium.device.mojom.NdefMessage; import org.junit.Assert; import org.mockito.ArgumentMatchers; import org.mockito.Mockito; | import android.nfc.*; import java.io.*; import org.chromium.base.test.util.*; import org.chromium.device.mojom.*; import org.junit.*; import org.mockito.*; | [
"android.nfc",
"java.io",
"org.chromium.base",
"org.chromium.device",
"org.junit",
"org.mockito"
] | android.nfc; java.io; org.chromium.base; org.chromium.device; org.junit; org.mockito; | 2,293,272 |
public String diag()
throws StandardException
{
return("D_T_DiagTestClass1: " + ((T_DiagTestClass1) diag_object).state);
} | String function() throws StandardException { return(STR + ((T_DiagTestClass1) diag_object).state); } | /**
* Default implementation of diagnostic on the object.
* <p>
* This routine returns a string with whatever diagnostic information
* you would like to provide about this object.
* <p>
* This routine should be overriden by a real implementation of the
* diagnostic information you wou... | Default implementation of diagnostic on the object. This routine returns a string with whatever diagnostic information you would like to provide about this object. This routine should be overriden by a real implementation of the diagnostic information you would like to provide. | diag | {
"repo_name": "apache/derby",
"path": "java/org.apache.derby.tests/org/apache/derbyTesting/unitTests/services/D_T_DiagTestClass1.java",
"license": "apache-2.0",
"size": 2100
} | [
"org.apache.derby.shared.common.error.StandardException"
] | import org.apache.derby.shared.common.error.StandardException; | import org.apache.derby.shared.common.error.*; | [
"org.apache.derby"
] | org.apache.derby; | 284,959 |
public void betInGame() {
ArrayList allowedCallerClasses = new ArrayList();
allowedCallerClasses.add("net.sourceforge.pokerapp.PokerGame");
String callingClass = StartPoker.getCallerClassName();
if (allowedCallerClasses.contains(callingClass)) {
prevBet.add(bet.amount());
setBet(0.0f);
} else {
Sy... | void function() { ArrayList allowedCallerClasses = new ArrayList(); allowedCallerClasses.add(STR); String callingClass = StartPoker.getCallerClassName(); if (allowedCallerClasses.contains(callingClass)) { prevBet.add(bet.amount()); setBet(0.0f); } else { System.out .println(STR + name); } } | /***********************
* When betInGame() is called, the current bet is saved as the previous bet
* and then zeroed out
**/ | When betInGame() is called, the current bet is saved as the previous bet and then zeroed out | betInGame | {
"repo_name": "Pragmatists/smelly-code-app",
"path": "src/main/java/net/sourceforge/pokerapp/Player.java",
"license": "gpl-3.0",
"size": 13560
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,729,259 |
public Collection<Abstraction> propagateReturnFlow(
Collection<Abstraction> callerD1s, Abstraction source,
Stmt stmt, Stmt retSite, Stmt callSite,
ByReferenceBoolean killAll);
| Collection<Abstraction> function( Collection<Abstraction> callerD1s, Abstraction source, Stmt stmt, Stmt retSite, Stmt callSite, ByReferenceBoolean killAll); | /**
* Propagates a flow along a the return edge
* @param callerD1s The context abstraction at the caller side
* @param source The abstraction to propagate over the statement
* @param stmt The statement at which to propagate the abstraction
* @param callSite The call site of the call from which we return
* @... | Propagates a flow along a the return edge | propagateReturnFlow | {
"repo_name": "thomasbrueggemann/automated-privacy-risk-mhealth",
"path": "analyze/tools/flowdroid/soot-infoflow-develop/src/soot/jimple/infoflow/problems/rules/ITaintPropagationRule.java",
"license": "mit",
"size": 3301
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 714,090 |
public INaviView getView(final Integer viewId) {
Preconditions.checkNotNull(viewId, "Error: viewId argument can not be null");
Preconditions.checkArgument(viewId > 0, "Error: only saved views can be querried by id");
return viewIdView.get(viewId);
} | INaviView function(final Integer viewId) { Preconditions.checkNotNull(viewId, STR); Preconditions.checkArgument(viewId > 0, STR); return viewIdView.get(viewId); } | /**
* Returns the {@link INaviView view} with the given {@link Integer viewId} if present.
*
* @param viewId The id of the {@link INaviView view}.
*
* @return The {@link INaviView view} with the given id if present.
*/ | Returns the <code>INaviView view</code> with the given <code>Integer viewId</code> if present | getView | {
"repo_name": "mayl8822/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/disassembly/Modules/CViewContainer.java",
"license": "apache-2.0",
"size": 15202
} | [
"com.google.common.base.Preconditions",
"com.google.security.zynamics.binnavi.disassembly.views.INaviView"
] | import com.google.common.base.Preconditions; import com.google.security.zynamics.binnavi.disassembly.views.INaviView; | import com.google.common.base.*; import com.google.security.zynamics.binnavi.disassembly.views.*; | [
"com.google.common",
"com.google.security"
] | com.google.common; com.google.security; | 144,710 |
@Override
@SuppressWarnings("unchecked")
public IStructuredSelection findSelection(IEditorInput anInput) {
if (!(anInput instanceof IURIEditorInput)) {
return null;
}
URI uri = ((IURIEditorInput) anInput).getURI();
if (!uri.getScheme().equals("file")) //$NON-NLS-1$
return null;
File file = new F... | @SuppressWarnings(STR) IStructuredSelection function(IEditorInput anInput) { if (!(anInput instanceof IURIEditorInput)) { return null; } URI uri = ((IURIEditorInput) anInput).getURI(); if (!uri.getScheme().equals("file")) return null; File file = new File(uri.getPath()); if (!file.exists()) return null; RepositoryUtil ... | /**
* TODO javadoc missing
*/ | TODO javadoc missing | findSelection | {
"repo_name": "SmithAndr/egit",
"path": "org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/LinkHelper.java",
"license": "epl-1.0",
"size": 4183
} | [
"java.io.File",
"java.io.IOException",
"java.util.List",
"org.eclipse.core.runtime.IPath",
"org.eclipse.core.runtime.Path",
"org.eclipse.egit.core.RepositoryUtil",
"org.eclipse.egit.ui.Activator",
"org.eclipse.egit.ui.internal.repository.RepositoriesViewContentProvider",
"org.eclipse.jface.viewers.I... | import java.io.File; import java.io.IOException; import java.util.List; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.egit.core.RepositoryUtil; import org.eclipse.egit.ui.Activator; import org.eclipse.egit.ui.internal.repository.RepositoriesViewContentProvider; import o... | import java.io.*; import java.util.*; import org.eclipse.core.runtime.*; import org.eclipse.egit.core.*; import org.eclipse.egit.ui.*; import org.eclipse.egit.ui.internal.repository.*; import org.eclipse.jface.viewers.*; import org.eclipse.jgit.lib.*; import org.eclipse.jgit.storage.file.*; import org.eclipse.ui.*; | [
"java.io",
"java.util",
"org.eclipse.core",
"org.eclipse.egit",
"org.eclipse.jface",
"org.eclipse.jgit",
"org.eclipse.ui"
] | java.io; java.util; org.eclipse.core; org.eclipse.egit; org.eclipse.jface; org.eclipse.jgit; org.eclipse.ui; | 1,753,800 |
List<AuthorDTO> getAllAuthors(); | List<AuthorDTO> getAllAuthors(); | /**
* Method returns all Authors stored inside database. To fetch all authors
* without any filtering might be high cost operation due to number of
* entries.
*
* @return List of all authors, or empty list if there are no authors yet
*/ | Method returns all Authors stored inside database. To fetch all authors without any filtering might be high cost operation due to number of entries | getAllAuthors | {
"repo_name": "empt-ak/bis",
"path": "bis-api/src/main/java/cz/muni/ics/phil/bis/api/AuthorService.java",
"license": "apache-2.0",
"size": 7534
} | [
"cz.muni.ics.phil.bis.api.domain.AuthorDTO",
"java.util.List"
] | import cz.muni.ics.phil.bis.api.domain.AuthorDTO; import java.util.List; | import cz.muni.ics.phil.bis.api.domain.*; import java.util.*; | [
"cz.muni.ics",
"java.util"
] | cz.muni.ics; java.util; | 1,130,947 |
Name getLabel(); | Name getLabel(); | /**
* Returns the label for this {@code continue} statement.
* @return the label
*/ | Returns the label for this continue statement | getLabel | {
"repo_name": "shelan/jdk9-mirror",
"path": "langtools/src/jdk.compiler/share/classes/com/sun/source/tree/ContinueTree.java",
"license": "gpl-2.0",
"size": 1724
} | [
"javax.lang.model.element.Name"
] | import javax.lang.model.element.Name; | import javax.lang.model.element.*; | [
"javax.lang"
] | javax.lang; | 2,532,888 |
public void setWidget(Widget widget) {
this.content = widget;
this.type = GridStaticCellType.WIDGET;
section.requestSectionRefresh();
} | void function(Widget widget) { this.content = widget; this.type = GridStaticCellType.WIDGET; section.requestSectionRefresh(); } | /**
* Set widget as the content of the cell. The type of the cell
* becomes {@link GridStaticCellType#WIDGET}. All previous content
* is discarded.
*
* @param widget
* The widget to add to the cell. Should not be
* ... | Set widget as the content of the cell. The type of the cell becomes <code>GridStaticCellType#WIDGET</code>. All previous content is discarded | setWidget | {
"repo_name": "magi42/vaadin",
"path": "client/src/com/vaadin/client/widgets/Grid.java",
"license": "apache-2.0",
"size": 300856
} | [
"com.google.gwt.user.client.ui.Widget",
"com.vaadin.shared.ui.grid.GridStaticCellType"
] | import com.google.gwt.user.client.ui.Widget; import com.vaadin.shared.ui.grid.GridStaticCellType; | import com.google.gwt.user.client.ui.*; import com.vaadin.shared.ui.grid.*; | [
"com.google.gwt",
"com.vaadin.shared"
] | com.google.gwt; com.vaadin.shared; | 1,377,259 |
EAttribute getDisplay_Line(); | EAttribute getDisplay_Line(); | /**
* Returns the meta object for the attribute '{@link robotG.robot.Display#getLine <em>Line</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Line</em>'.
* @see robotG.robot.Display#getLine()
* @see #getDisplay()
* @generated
*/ | Returns the meta object for the attribute '<code>robotG.robot.Display#getLine Line</code>'. | getDisplay_Line | {
"repo_name": "bseznec/TP4INFO",
"path": "IDM/IDM/src/robotG/robot/RobotPackage.java",
"license": "gpl-3.0",
"size": 24851
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 71,105 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<String>> supportedVpnDevicesWithResponseAsync(
String resourceGroupName, String virtualNetworkGatewayName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalAr... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<String>> function( String resourceGroupName, String virtualNetworkGatewayName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException(... | /**
* Gets a xml format representation for supported vpn devices.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayName The name of the virtual network gateway.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ... | Gets a xml format representation for supported vpn devices | supportedVpnDevicesWithResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkGatewaysClientImpl.java",
"license": "mit",
"size": 322151
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil"
] | 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.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 2,797,359 |
public static InputStream getResourceAsStream(String name) {
InputStream stream = null;
try {
stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(name);
}
catch (SecurityException e) {
LOG.info("Unable to access context classloader, using default. " + e.getMessage());
}
if (... | static InputStream function(String name) { InputStream stream = null; try { stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(name); } catch (SecurityException e) { LOG.info(STR + e.getMessage()); } if (stream == null) { stream = ResourceLoader.class.getResourceAsStream("/" + name); } return s... | /**
* Load a resource via the thread context classloader. If security permissions don't allow
* this fallback to loading via current classloader.
* @param name a resource name
* @return an {@link InputStream} or null if resource is not found
*/ | Load a resource via the thread context classloader. If security permissions don't allow this fallback to loading via current classloader | getResourceAsStream | {
"repo_name": "benfortuna/ical4j",
"path": "src/main/java/net/fortuna/ical4j/util/ResourceLoader.java",
"license": "bsd-3-clause",
"size": 3202
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,687,631 |
public void addImplication(Aliasing ant, Implication impl) {
if( this.knownImplications.containsKey(ant) ) {
ConsList<Implication> new_val = cons(impl, this.knownImplications.get(ant));
this.knownImplications.put(ant, new_val);
}
else {
this.knownImplications.put(ant, ConsList.singleton(impl));... | void function(Aliasing ant, Implication impl) { if( this.knownImplications.containsKey(ant) ) { ConsList<Implication> new_val = cons(impl, this.knownImplications.get(ant)); this.knownImplications.put(ant, new_val); } else { this.knownImplications.put(ant, ConsList.singleton(impl)); } } | /**
* Adds a new implication to the set where the given object location is
* the target of the antecedent.
*/ | Adds a new implication to the set where the given object location is the target of the antecedent | addImplication | {
"repo_name": "plaidgroup/plural",
"path": "Plural/src/edu/cmu/cs/plural/concrete/DynamicStateLogic.java",
"license": "gpl-2.0",
"size": 26879
} | [
"edu.cmu.cs.crystal.analysis.alias.Aliasing",
"edu.cmu.cs.crystal.util.ConsList"
] | import edu.cmu.cs.crystal.analysis.alias.Aliasing; import edu.cmu.cs.crystal.util.ConsList; | import edu.cmu.cs.crystal.analysis.alias.*; import edu.cmu.cs.crystal.util.*; | [
"edu.cmu.cs"
] | edu.cmu.cs; | 1,968,211 |
static public Automaton concatenate(List<Automaton> l) {
return BasicOperations.concatenate(l);
} | static Automaton function(List<Automaton> l) { return BasicOperations.concatenate(l); } | /**
* See {@link BasicOperations#concatenate(List)}.
*/ | See <code>BasicOperations#concatenate(List)</code> | concatenate | {
"repo_name": "zhouzusheng/automation",
"path": "src/dk/brics/automaton/Automaton.java",
"license": "apache-2.0",
"size": 31084
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 639,291 |
public void testByteHalfword() {
StructureMappingUnit unit = new StructureMappingUnit(
getPLIDataItem("dcl 1 A char(1);"),
getPLIDataItem("dcl 1 B bin fixed(15);"));
assertEquals(AlignmentRequirement.HALFWORD, unit.getAlignmentRequirement());
assertEquals... | void function() { StructureMappingUnit unit = new StructureMappingUnit( getPLIDataItem(STR), getPLIDataItem(STR)); assertEquals(AlignmentRequirement.HALFWORD, unit.getAlignmentRequirement()); assertEquals(3, unit.getByteLength()); assertEquals(0, unit.getPadding()); assertEquals(1, unit.getOffset()); } | /**
* Pair a byte aligned and a halfword aligned item.
*/ | Pair a byte aligned and a halfword aligned item | testByteHalfword | {
"repo_name": "DengGary/legstar-pli2cob",
"path": "src/test/java/com/legstar/pli2cob/smap/StructureMappintUnitTest.java",
"license": "lgpl-2.1",
"size": 12631
} | [
"com.legstar.pli2cob.model.PLIDataItem"
] | import com.legstar.pli2cob.model.PLIDataItem; | import com.legstar.pli2cob.model.*; | [
"com.legstar.pli2cob"
] | com.legstar.pli2cob; | 367,183 |
public static Connection getConnection() throws SQLException {
if (dataSource != null) {
return dataSource.getConnection();
}
throw new SQLException("Data source is not configured properly.");
} | static Connection function() throws SQLException { if (dataSource != null) { return dataSource.getConnection(); } throw new SQLException(STR); } | /**
* Utility method to get a new database connection
*
* @return Connection
* @throws java.sql.SQLException if failed to get Connection
*/ | Utility method to get a new database connection | getConnection | {
"repo_name": "maheshika/carbon-appmgt",
"path": "components/appmgt/org.wso2.carbon.appmgt.impl/src/main/java/org/wso2/carbon/appmgt/impl/utils/APIMgtDBUtil.java",
"license": "apache-2.0",
"size": 8045
} | [
"java.sql.Connection",
"java.sql.SQLException"
] | import java.sql.Connection; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,198,618 |
public static String formatDate(Date datePossiblyWithTime) {
if (datePossiblyWithTime == null) {
return "";
}
Calendar c = Calendar.getInstance();
c.setTime(datePossiblyWithTime);
if (c.get(Calendar.MILLISECOND) > 0 || c.get(Calendar.SECOND) > 0
|| c.get(Calendar.MINUTE) > 0
|| c.get(Calendar.H... | static String function(Date datePossiblyWithTime) { if (datePossiblyWithTime == null) { return ""; } Calendar c = Calendar.getInstance(); c.setTime(datePossiblyWithTime); if (c.get(Calendar.MILLISECOND) > 0 c.get(Calendar.SECOND) > 0 c.get(Calendar.MINUTE) > 0 c.get(Calendar.HOUR_OF_DAY) > 0) { return DateUtility.dateT... | /***
* format date into server-date format yyyy-mm-dd. If the date ihas time
* components, HH:MM:SS.SSS also added.
*
* @param datePossiblyWithTime
* @return "" if it is null, date-time format otherwise
*/ | format date into server-date format yyyy-mm-dd. If the date ihas time | formatDate | {
"repo_name": "ExilantTechnologies/ExilityCore-5.0.0",
"path": "utils/com/exilant/exility/core/DateUtility.java",
"license": "mit",
"size": 8475
} | [
"java.util.Calendar",
"java.util.Date"
] | import java.util.Calendar; import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,463,754 |
protected void paint3DRectLighting(Graphics2D g2, int x, int y,
int width, int height)
{
g2.setColor(Color.white);
g2.drawLine(x+1,y+1,x+1,y+height-1);
g2.drawLine(x+1,y+1,x+width-1,y+1);
g2.setColor(Color.gray);
g2.drawLine(x+1,y+he... | void function(Graphics2D g2, int x, int y, int width, int height) { g2.setColor(Color.white); g2.drawLine(x+1,y+1,x+1,y+height-1); g2.drawLine(x+1,y+1,x+width-1,y+1); g2.setColor(Color.gray); g2.drawLine(x+1,y+height-1,x+width-1,y+height-1); g2.drawLine(x+width-1,y+1,x+width-1,y+height-1); g2.setColor(Color.darkGray); ... | /**
* Adds Windows2K type 3D lighting effects
*/ | Adds Windows2K type 3D lighting effects | paint3DRectLighting | {
"repo_name": "hagenw/ltfat",
"path": "blockproc/java/net/sourceforge/ltfat/thirdparty/JRangeSlider.java",
"license": "gpl-3.0",
"size": 31518
} | [
"java.awt.Color",
"java.awt.Graphics2D"
] | import java.awt.Color; import java.awt.Graphics2D; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,181,486 |
public static CmsTreeOpenState getVfsTreeState(HttpServletRequest request, String treeToken) {
return (CmsTreeOpenState)request.getSession().getAttribute(
getTreeOpenStateAttributeName(I_CmsGalleryProviderConstants.TREE_VFS, treeToken));
} | static CmsTreeOpenState function(HttpServletRequest request, String treeToken) { return (CmsTreeOpenState)request.getSession().getAttribute( getTreeOpenStateAttributeName(I_CmsGalleryProviderConstants.TREE_VFS, treeToken)); } | /**
* Convenience method for reading the saved VFS tree state from the session.<p>
*
* @param request the current request
* @param treeToken the tree token (may be null)
*
* @return the saved tree open state (may be null)
*/ | Convenience method for reading the saved VFS tree state from the session | getVfsTreeState | {
"repo_name": "gallardo/opencms-core",
"path": "src/org/opencms/ade/galleries/CmsGalleryService.java",
"license": "lgpl-2.1",
"size": 125777
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 1,502,745 |
private void mergePackage( final Package pkg,
final Package newPkg ) {
// Merge imports
final Map<String, ImportDeclaration> imports = pkg.getImports();
imports.putAll( newPkg.getImports() );
String lastType = null;
try {
// merge globals
... | void function( final Package pkg, final Package newPkg ) { final Map<String, ImportDeclaration> imports = pkg.getImports(); imports.putAll( newPkg.getImports() ); String lastType = null; try { if (newPkg.getGlobals() != null && newPkg.getGlobals() != Collections.EMPTY_MAP) { Map<String, String> globals = pkg.getGlobals... | /**
* Merge a new package with an existing package. Most of the work is done by
* the concrete implementations, but this class does some work (including
* combining imports, compilation data, globals, and the actual Rule objects
* into the package).
*/ | Merge a new package with an existing package. Most of the work is done by the concrete implementations, but this class does some work (including combining imports, compilation data, globals, and the actual Rule objects into the package) | mergePackage | {
"repo_name": "yurloc/drools",
"path": "drools-compiler/src/main/java/org/drools/compiler/PackageBuilder.java",
"license": "apache-2.0",
"size": 156973
} | [
"java.util.Collections",
"java.util.Map",
"org.drools.PackageIntegrationException",
"org.drools.RuntimeDroolsException",
"org.drools.rule.ImportDeclaration",
"org.drools.rule.Package",
"org.drools.rule.Rule",
"org.drools.rule.TypeDeclaration",
"org.kie.definition.process.Process"
] | import java.util.Collections; import java.util.Map; import org.drools.PackageIntegrationException; import org.drools.RuntimeDroolsException; import org.drools.rule.ImportDeclaration; import org.drools.rule.Package; import org.drools.rule.Rule; import org.drools.rule.TypeDeclaration; import org.kie.definition.process.Pr... | import java.util.*; import org.drools.*; import org.drools.rule.*; import org.kie.definition.process.*; | [
"java.util",
"org.drools",
"org.drools.rule",
"org.kie.definition"
] | java.util; org.drools; org.drools.rule; org.kie.definition; | 1,593,038 |
@Test
public final void testIterator() {
String testName = new String("CollectionListe<String>.iterator()");
System.out.println(testName);
// Itérateur sur liste vide
Iterator<String> result = collection.iterator();
assertNotNull(testName + " iterator non null", result);
assertFalse(testName + " itera... | final void function() { String testName = new String(STR); System.out.println(testName); Iterator<String> result = collection.iterator(); assertNotNull(testName + STR, result); assertFalse(testName + STR, result.hasNext()); remplissage(collection); result = collection.iterator(); assertNotNull(testName + STR, result); ... | /**
* Test method for {@link listes.CollectionListe#iterator()}.
*/ | Test method for <code>listes.CollectionListe#iterator()</code> | testIterator | {
"repo_name": "rpereira-dev/ENSIIE",
"path": "UE/S2/ILO/TP Listes & Figures/src/tests/CollectionListeTest.java",
"license": "gpl-3.0",
"size": 22104
} | [
"java.util.Iterator",
"org.junit.Assert"
] | import java.util.Iterator; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 366,913 |
public static Logger makeNew(Container c)
{
//NB: this can't be called outside of container b/c agents have no refs
//to the singleton container. So we can be sure this method is going to
//create services just once.
if (c == null) return null;
//If logging is off, then we return the no-op adapter.
R... | static Logger function(Container c) { if (c == null) return null; Registry reg = c.getRegistry(); Boolean isLoggingOn = (Boolean) reg.lookup(LookupNames.LOG_ON); if (!isLoggingOn.booleanValue()) return makeNoOpLogger(); String relPathName = c.getConfigFileRelative(LOG_CONFIG_FILE); File configFile = new File(relPathNam... | /**
* Creates a new {@link Logger}.
*
* @param c Reference to the container.
* @return See above.
*/ | Creates a new <code>Logger</code> | makeNew | {
"repo_name": "dominikl/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/log/LoggerFactory.java",
"license": "gpl-2.0",
"size": 4652
} | [
"java.io.File",
"org.openmicroscopy.shoola.env.Container",
"org.openmicroscopy.shoola.env.LookupNames",
"org.openmicroscopy.shoola.env.config.Registry"
] | import java.io.File; import org.openmicroscopy.shoola.env.Container; import org.openmicroscopy.shoola.env.LookupNames; import org.openmicroscopy.shoola.env.config.Registry; | import java.io.*; import org.openmicroscopy.shoola.env.*; import org.openmicroscopy.shoola.env.config.*; | [
"java.io",
"org.openmicroscopy.shoola"
] | java.io; org.openmicroscopy.shoola; | 978,200 |
if (!commandHelpInitialized && action != null) {
StringBuilder stringBuilder = new StringBuilder();
String commandIdsAsString = action.getCommandIdentifiersAsString();
stringBuilder.append(action.getBriefHelp());
stringBuilder.append("\n");
try {
stringBuilder.append(
... | if (!commandHelpInitialized && action != null) { StringBuilder stringBuilder = new StringBuilder(); String commandIdsAsString = action.getCommandIdentifiersAsString(); stringBuilder.append(action.getBriefHelp()); stringBuilder.append("\n"); try { stringBuilder.append( ResourceUtils.getMessage(COMMAND_HELP_KEY, commandI... | /**
* Construct the static command help.
*
* @param action the action reference
*
* @return the static command help.
*/ | Construct the static command help | getHelp | {
"repo_name": "madmath03/MidiPlayer",
"path": "src/main/java/midiplayer/frame/action/StopAction.java",
"license": "mit",
"size": 7605
} | [
"java.util.MissingResourceException",
"java.util.logging.Level"
] | import java.util.MissingResourceException; import java.util.logging.Level; | import java.util.*; import java.util.logging.*; | [
"java.util"
] | java.util; | 1,506,800 |
private DateFormat getKCDateFormat() {
return new SimpleDateFormat("MM/dd/yyyy");
} | DateFormat function() { return new SimpleDateFormat(STR); } | /**
* DateFormats are not thread safe. Creating a new instance for use each time.
* @return a date format
*/ | DateFormats are not thread safe. Creating a new instance for use each time | getKCDateFormat | {
"repo_name": "jwillia/kc-old1",
"path": "coeus-impl/src/main/java/org/kuali/coeus/common/framework/person/KcPerson.java",
"license": "agpl-3.0",
"size": 38632
} | [
"java.text.DateFormat",
"java.text.SimpleDateFormat"
] | import java.text.DateFormat; import java.text.SimpleDateFormat; | import java.text.*; | [
"java.text"
] | java.text; | 1,885,500 |
private void open(Object object, Object parameters, JComponent source)
{
if (!(object instanceof FileAnnotationData ||
object instanceof OriginalFile)) return;
Environment env = (Environment) registry.lookup(LookupNames.ENV);
int index = -1;
long id = -1;
String name = "";
OriginalFile of = null;
i... | void function(Object object, Object parameters, JComponent source) { if (!(object instanceof FileAnnotationData object instanceof OriginalFile)) return; Environment env = (Environment) registry.lookup(LookupNames.ENV); int index = -1; long id = -1; String name = STRAnnotation_STRFile_STRFile_"+id; } } String path = env... | /**
* Opens the passed object. Downloads it first.
*
* @param object The object to open.
* @param parameters Either Analysis parameters or Application data.
* @param source The source triggering the operation.
*/ | Opens the passed object. Downloads it first | open | {
"repo_name": "rleigh-dundee/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/ui/ActivityComponent.java",
"license": "gpl-2.0",
"size": 28001
} | [
"java.io.File",
"javax.swing.JComponent",
"org.openmicroscopy.shoola.env.Environment",
"org.openmicroscopy.shoola.env.LookupNames",
"org.openmicroscopy.shoola.env.data.model.ApplicationData",
"org.openmicroscopy.shoola.env.data.model.DownloadAndLaunchActivityParam"
] | import java.io.File; import javax.swing.JComponent; import org.openmicroscopy.shoola.env.Environment; import org.openmicroscopy.shoola.env.LookupNames; import org.openmicroscopy.shoola.env.data.model.ApplicationData; import org.openmicroscopy.shoola.env.data.model.DownloadAndLaunchActivityParam; | import java.io.*; import javax.swing.*; import org.openmicroscopy.shoola.env.*; import org.openmicroscopy.shoola.env.data.model.*; | [
"java.io",
"javax.swing",
"org.openmicroscopy.shoola"
] | java.io; javax.swing; org.openmicroscopy.shoola; | 2,051,192 |
public static void checkScope(String scope, Node n, ErrorDispatcher err)
throws JasperException {
if (scope != null && !scope.equals("page") && !scope.equals("request")
&& !scope.equals("session") && !scope.equals("application")) {
err.jspError(n.getStart(), MESSAGES.invalidScope(sco... | static void function(String scope, Node n, ErrorDispatcher err) throws JasperException { if (scope != null && !scope.equals("page") && !scope.equals(STR) && !scope.equals(STR) && !scope.equals(STR)) { err.jspError(n.getStart(), MESSAGES.invalidScope(scope)); } } | /**
* Checks to see if the given scope is valid.
*
* @param scope The scope to be checked
* @param n The Node containing the 'scope' attribute whose value is to be
* checked
* @param err error dispatcher
*
* @throws JasperException if scope is not null and different from
* &... | Checks to see if the given scope is valid | checkScope | {
"repo_name": "johnaoahra80/JBOSSWEB_7_5_0_FINAL",
"path": "src/main/java/org/apache/jasper/compiler/JspUtil.java",
"license": "apache-2.0",
"size": 38658
} | [
"org.apache.jasper.JasperException",
"org.jboss.web.JasperMessages"
] | import org.apache.jasper.JasperException; import org.jboss.web.JasperMessages; | import org.apache.jasper.*; import org.jboss.web.*; | [
"org.apache.jasper",
"org.jboss.web"
] | org.apache.jasper; org.jboss.web; | 111,362 |
public void addPropertyChangeListener( final PropertyChangeListener listener ) {
propertyChangeSupport.addPropertyChangeListener( listener );
} | void function( final PropertyChangeListener listener ) { propertyChangeSupport.addPropertyChangeListener( listener ); } | /**
* Register a listener for the PropertyChange event. When a PropertyEditor changes its value it should fire a
* PropertyChange event on all registered PropertyChangeListeners, specifying the null value for the property name and
* itself as the source.
*
* @param listener
* An object to be ... | Register a listener for the PropertyChange event. When a PropertyEditor changes its value it should fire a PropertyChange event on all registered PropertyChangeListeners, specifying the null value for the property name and itself as the source | addPropertyChangeListener | {
"repo_name": "mbatchelor/pentaho-reporting",
"path": "engine/core/src/main/java/org/pentaho/reporting/engine/classic/core/metadata/propertyeditors/VerticalAlignmentPropertyEditor.java",
"license": "lgpl-2.1",
"size": 9236
} | [
"java.beans.PropertyChangeListener"
] | import java.beans.PropertyChangeListener; | import java.beans.*; | [
"java.beans"
] | java.beans; | 506,875 |
@Test
public void testAddingOfDefaultHeadersWorks() {
Result result = Results.json();
// just a new object as dummy...
result.render(new Object());
// make sure the stuff is not set by default json method (just in
// case...)
assertNull(result.getHeaders().get(R... | void function() { Result result = Results.json(); result.render(new Object()); assertNull(result.getHeaders().get(Result.CACHE_CONTROL)); assertNull(result.getHeaders().get(Result.DATE)); assertNull(result.getHeaders().get(Result.EXPIRES)); resultHandler.handleResult(result, context); assertEquals(Result.CACHE_CONTROL_... | /**
* If Cache-Control is not set the no-cache strategy has to be applied.
*
* We expect Cache-Control: ... Date: ... Expires: ...
*/ | If Cache-Control is not set the no-cache strategy has to be applied. We expect Cache-Control: ... Date: ... Expires: .. | testAddingOfDefaultHeadersWorks | {
"repo_name": "jlannoy/ninja",
"path": "ninja-core/src/test/java/ninja/utils/ResultHandlerTest.java",
"license": "apache-2.0",
"size": 6528
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 426,731 |
public static void forceDump(Object object, String format, Object... args) {
DebugConfig config = getConfig();
if (config != null) {
String message = String.format(format, args);
for (DebugDumpHandler dumpHandler : config.dumpHandlers()) {
dumpHandler.dump(obj... | static void function(Object object, String format, Object... args) { DebugConfig config = getConfig(); if (config != null) { String message = String.format(format, args); for (DebugDumpHandler dumpHandler : config.dumpHandlers()) { dumpHandler.dump(object, message); } } else { TTY.println(STR); } } | /**
* This method exists mainly to allow a debugger (e.g., Eclipse) to force dump a graph.
*/ | This method exists mainly to allow a debugger (e.g., Eclipse) to force dump a graph | forceDump | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugScope.java",
"license": "gpl-2.0",
"size": 20094
} | [
"org.graalvm.compiler.debug.DebugConfig",
"org.graalvm.compiler.debug.DebugDumpHandler",
"org.graalvm.compiler.debug.TTY"
] | import org.graalvm.compiler.debug.DebugConfig; import org.graalvm.compiler.debug.DebugDumpHandler; import org.graalvm.compiler.debug.TTY; | import org.graalvm.compiler.debug.*; | [
"org.graalvm.compiler"
] | org.graalvm.compiler; | 968,818 |
EAttribute getJoint_IsStart(); | EAttribute getJoint_IsStart(); | /**
* Returns the meta object for the attribute '{@link uk.ac.kcl.inf.robotics.rigidBodies.Joint#isIsStart <em>Is Start</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Is Start</em>'.
* @see uk.ac.kcl.inf.robotics.rigidBodies.Joint#isIsStart()
... | Returns the meta object for the attribute '<code>uk.ac.kcl.inf.robotics.rigidBodies.Joint#isIsStart Is Start</code>'. | getJoint_IsStart | {
"repo_name": "szschaler/RigidBodies",
"path": "uk.ac.kcl.inf.robotics.rigid_bodies/src-gen/uk/ac/kcl/inf/robotics/rigidBodies/RigidBodiesPackage.java",
"license": "mit",
"size": 163741
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 842,693 |
private void runL2CacheTestForPMF(PersistenceManagerFactory cachePMF)
{
try
{
// Create a PM and add an object
Object id = null;
PersistenceManager pm = cachePMF.getPersistenceManager();
Transaction tx = pm.currentTransaction();
try
... | void function(PersistenceManagerFactory cachePMF) { try { Object id = null; PersistenceManager pm = cachePMF.getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { tx.begin(); Employee empl = new Employee(101, "Clint", STR, STR, 1000000, STR); pm.makePersistent(empl); id = pm.getObjectId(empl); tx.com... | /**
* Method to perform a basic test of L2 Caching for the specified PMF.
* @param cachePMF The PMF to use
*/ | Method to perform a basic test of L2 Caching for the specified PMF | runL2CacheTestForPMF | {
"repo_name": "hopecee/texsts",
"path": "jdo/general/src/test/org/datanucleus/tests/CacheTest.java",
"license": "apache-2.0",
"size": 56796
} | [
"javax.jdo.PersistenceManager",
"javax.jdo.PersistenceManagerFactory",
"javax.jdo.Transaction",
"org.jpox.samples.models.company.Employee"
] | import javax.jdo.PersistenceManager; import javax.jdo.PersistenceManagerFactory; import javax.jdo.Transaction; import org.jpox.samples.models.company.Employee; | import javax.jdo.*; import org.jpox.samples.models.company.*; | [
"javax.jdo",
"org.jpox.samples"
] | javax.jdo; org.jpox.samples; | 2,321,199 |
public Map<String, Record> getValue(long timestamp) {
// Returns a record which lays within the interval [timestamp, timestamp +
// loggingInterval]
// The interval is necessary for a requested time stamp which lays between the
// time stamps of two logged values
// e.g.: t_... | Map<String, Record> function(long timestamp) { Map<String, List<Record>> recordsMap = getValues(timestamp, timestamp); Map<String, Record> recordMap = new HashMap<>(); for (Entry<String, List<Record>> entries : recordsMap.entrySet()) { List<Record> recordList = entries.getValue(); Record record; if (recordList == null ... | /**
* get a single record from single channel of time stamp
*
* @param timestamp
* time stamp
* @return Record on success, otherwise null
*/ | get a single record from single channel of time stamp | getValue | {
"repo_name": "isc-konstanz/OpenMUC",
"path": "projects/datalogger/ascii/src/main/java/org/openmuc/framework/datalogger/ascii/LogFileReader.java",
"license": "gpl-3.0",
"size": 15161
} | [
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.openmuc.framework.data.Flag",
"org.openmuc.framework.data.Record"
] | import java.util.HashMap; import java.util.List; import java.util.Map; import org.openmuc.framework.data.Flag; import org.openmuc.framework.data.Record; | import java.util.*; import org.openmuc.framework.data.*; | [
"java.util",
"org.openmuc.framework"
] | java.util; org.openmuc.framework; | 2,338,150 |
protected void fulfillCompositeAggregatorExtraInfo()
{
Map<Set<String>, Integer> keysToCombinationId = getKeysToCombinationId();
final int timeBucketSize = customTimeBuckets.size();
for (int index = 0; index < dimensionsDescriptorIDToCompositeAggregatorToAggregateDescriptor.size(); ++index) {
Map... | void function() { Map<Set<String>, Integer> keysToCombinationId = getKeysToCombinationId(); final int timeBucketSize = customTimeBuckets.size(); for (int index = 0; index < dimensionsDescriptorIDToCompositeAggregatorToAggregateDescriptor.size(); ++index) { Map<String, FieldsDescriptor> compositeAggregatorNameToDescript... | /**
* fulfill the embed ddids of composite aggregators
* get the dimensional descriptor of composite aggregator; genereate field keys of embed aggregator
*/ | fulfill the embed ddids of composite aggregators get the dimensional descriptor of composite aggregator; genereate field keys of embed aggregator | fulfillCompositeAggregatorExtraInfo | {
"repo_name": "ananthc/apex-malhar",
"path": "library/src/main/java/org/apache/apex/malhar/lib/appdata/schemas/DimensionalConfigurationSchema.java",
"license": "apache-2.0",
"size": 108286
} | [
"com.google.common.collect.Sets",
"java.util.Map",
"java.util.Set",
"org.apache.apex.malhar.lib.dimensions.DimensionsDescriptor",
"org.apache.apex.malhar.lib.dimensions.aggregator.AbstractTopBottomAggregator"
] | import com.google.common.collect.Sets; import java.util.Map; import java.util.Set; import org.apache.apex.malhar.lib.dimensions.DimensionsDescriptor; import org.apache.apex.malhar.lib.dimensions.aggregator.AbstractTopBottomAggregator; | import com.google.common.collect.*; import java.util.*; import org.apache.apex.malhar.lib.dimensions.*; import org.apache.apex.malhar.lib.dimensions.aggregator.*; | [
"com.google.common",
"java.util",
"org.apache.apex"
] | com.google.common; java.util; org.apache.apex; | 522,219 |
@Test
public void testRemove() {
log.debug("testRemove");
final MockResourcePool testResourcePool = new MockResourcePool();
assertEquals(0, testResourcePool.countFree());
assertEquals(0, testResourcePool.countUsed());
testResourcePool.add(true);
testResourc... | void function() { log.debug(STR); final MockResourcePool testResourcePool = new MockResourcePool(); assertEquals(0, testResourcePool.countFree()); assertEquals(0, testResourcePool.countUsed()); testResourcePool.add(true); testResourcePool.add(false); assertEquals(2, testResourcePool.countFree()); assertEquals(0, testRe... | /**
* Test remove abstract resource pool.
*/ | Test remove abstract resource pool | testRemove | {
"repo_name": "Martin-Spamer/java-coaching",
"path": "src/test/java/coaching/pool/AbstractResourcePoolTest.java",
"license": "gpl-3.0",
"size": 6012
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,037,810 |
static IgniteIdGenEndpointBuilder igniteIdgen(String path) {
class IgniteIdGenEndpointBuilderImpl extends AbstractEndpointBuilder implements IgniteIdGenEndpointBuilder, AdvancedIgniteIdGenEndpointBuilder {
public IgniteIdGenEndpointBuilderImpl(String path) {
super("ignite-idgen",... | static IgniteIdGenEndpointBuilder igniteIdgen(String path) { class IgniteIdGenEndpointBuilderImpl extends AbstractEndpointBuilder implements IgniteIdGenEndpointBuilder, AdvancedIgniteIdGenEndpointBuilder { public IgniteIdGenEndpointBuilderImpl(String path) { super(STR, path); } } return new IgniteIdGenEndpointBuilderIm... | /**
* Ignite ID Generator (camel-ignite)
* The Ignite ID Generator endpoint is one of camel-ignite endpoints which
* allows you to interact with Ignite Atomic Sequences and ID Generators.
*
* Category: nosql,cache,compute
* Since: 2.17
* Maven coordinates: org.apache.camel:camel-igni... | Ignite ID Generator (camel-ignite) The Ignite ID Generator endpoint is one of camel-ignite endpoints which allows you to interact with Ignite Atomic Sequences and ID Generators. Category: nosql,cache,compute Since: 2.17 Maven coordinates: org.apache.camel:camel-ignite Syntax: <code>ignite-idgen:name</code> Path paramet... | igniteIdgen | {
"repo_name": "CodeSmell/camel",
"path": "core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/IgniteIdGenEndpointBuilderFactory.java",
"license": "apache-2.0",
"size": 13100
} | [
"org.apache.camel.builder.endpoint.AbstractEndpointBuilder"
] | import org.apache.camel.builder.endpoint.AbstractEndpointBuilder; | import org.apache.camel.builder.endpoint.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,229,010 |
public IndexContext getContext() {
return this.context;
}
| IndexContext function() { return this.context; } | /**
* The index content.
*
* @return the IndexContext.
*/ | The index content | getContext | {
"repo_name": "NABUCCO/org.nabucco.framework.base",
"path": "org.nabucco.framework.base.facade.message/src/main/gen/org/nabucco/framework/base/facade/message/search/IndexRequestMsg.java",
"license": "epl-1.0",
"size": 7013
} | [
"org.nabucco.framework.base.facade.datatype.search.index.IndexContext"
] | import org.nabucco.framework.base.facade.datatype.search.index.IndexContext; | import org.nabucco.framework.base.facade.datatype.search.index.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 2,487,172 |
public void animateView(final DragView view, final Rect from, final Rect to,
final float finalAlpha, final float initScaleX, final float initScaleY,
final float finalScaleX, final float finalScaleY, int duration,
final Interpolator motionInterpolator, final Interpolator alphaInte... | void function(final DragView view, final Rect from, final Rect to, final float finalAlpha, final float initScaleX, final float initScaleY, final float finalScaleX, final float finalScaleY, int duration, final Interpolator motionInterpolator, final Interpolator alphaInterpolator, final Runnable onCompleteRunnable, final... | /**
* This method animates a view at the end of a drag and drop animation.
*
* @param view The view to be animated. This view is drawn directly into DragLayer, and so
* doesn't need to be a child of DragLayer.
* @param from The initial location of the view. Only the left and top paramete... | This method animates a view at the end of a drag and drop animation | animateView | {
"repo_name": "trangnt57/Nhom7_CacVanDeHienDaiCNTT",
"path": "BlueSkyLauncher/launcher3/src/main/java/g7/bluesky/launcher3/DragLayer.java",
"license": "apache-2.0",
"size": 37887
} | [
"android.animation.TimeInterpolator",
"android.content.res.Resources",
"android.graphics.Rect",
"android.view.View",
"android.view.animation.Interpolator"
] | import android.animation.TimeInterpolator; import android.content.res.Resources; import android.graphics.Rect; import android.view.View; import android.view.animation.Interpolator; | import android.animation.*; import android.content.res.*; import android.graphics.*; import android.view.*; import android.view.animation.*; | [
"android.animation",
"android.content",
"android.graphics",
"android.view"
] | android.animation; android.content; android.graphics; android.view; | 1,098,649 |
@Override
public void onLoadCleared(Drawable placeholder) {
// Do nothing.
} | void function(Drawable placeholder) { } | /**
* A callback that should never be invoked directly.
*/ | A callback that should never be invoked directly | onLoadCleared | {
"repo_name": "weiwenqiang/GitHub",
"path": "expert/glide/library/src/main/java/com/bumptech/glide/request/RequestFutureTarget.java",
"license": "apache-2.0",
"size": 8167
} | [
"android.graphics.drawable.Drawable"
] | import android.graphics.drawable.Drawable; | import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 884,138 |
public String getXML() {
StringBuffer retval = new StringBuffer(300);
if (m_stats != null) {
for (int i = 0; i < m_stats.length; i++) {
retval.append(" ").
append(m_stats[i].getXML()).append(Const.CR);
}
}
return retval.toString();
} | String function() { StringBuffer retval = new StringBuffer(300); if (m_stats != null) { for (int i = 0; i < m_stats.length; i++) { retval.append(" "). append(m_stats[i].getXML()).append(Const.CR); } } return retval.toString(); } | /**
* Return the XML describing this (configured) step
*
* @return a <code>String</code> containing the XML
*/ | Return the XML describing this (configured) step | getXML | {
"repo_name": "dianhu/Kettle-Research",
"path": "src/org/pentaho/di/trans/steps/univariatestats/UnivariateStatsMeta.java",
"license": "lgpl-2.1",
"size": 13462
} | [
"org.pentaho.di.core.Const"
] | import org.pentaho.di.core.Const; | import org.pentaho.di.core.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 216,974 |
private Map<QName, Serializable> getPropertiesImpl(Pair<Long, NodeRef> nodePair) throws InvalidNodeRefException
{
Long nodeId = nodePair.getFirst();
Map<QName, Serializable> nodeProperties = nodeDAO.getNodeProperties(nodeId);
// done
return nodeProperties;
}
| Map<QName, Serializable> function(Pair<Long, NodeRef> nodePair) throws InvalidNodeRefException { Long nodeId = nodePair.getFirst(); Map<QName, Serializable> nodeProperties = nodeDAO.getNodeProperties(nodeId); return nodeProperties; } | /**
* Gets, converts and adds the intrinsic properties to the current node's properties
*/ | Gets, converts and adds the intrinsic properties to the current node's properties | getPropertiesImpl | {
"repo_name": "Alfresco/community-edition",
"path": "projects/repository/source/java/org/alfresco/repo/node/db/DbNodeServiceImpl.java",
"license": "lgpl-3.0",
"size": 141832
} | [
"java.io.Serializable",
"java.util.Map",
"org.alfresco.service.cmr.repository.InvalidNodeRefException",
"org.alfresco.service.cmr.repository.NodeRef",
"org.alfresco.service.namespace.QName",
"org.alfresco.util.Pair"
] | import java.io.Serializable; import java.util.Map; import org.alfresco.service.cmr.repository.InvalidNodeRefException; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; import org.alfresco.util.Pair; | import java.io.*; import java.util.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*; import org.alfresco.util.*; | [
"java.io",
"java.util",
"org.alfresco.service",
"org.alfresco.util"
] | java.io; java.util; org.alfresco.service; org.alfresco.util; | 869,679 |
public void actionPerformed(ActionEvent e)
{
String command = e.getActionCommand();
if(command.equals(SELECT_IMAGE))
{
// use a selectedFile chooser to load an image
loadImage(width, height);
}
else if(command.equals(RESET_METRIC_LABEL))
{
// resets the random metric
createRando... | void function(ActionEvent e) { String command = e.getActionCommand(); if(command.equals(SELECT_IMAGE)) { loadImage(width, height); } else if(command.equals(RESET_METRIC_LABEL)) { createRandomMetric(); } } | /**
* Reacts to buttons.
*/ | Reacts to buttons | actionPerformed | {
"repo_name": "KEOpenSource/CAExplorer",
"path": "cellularAutomata/analysis/TargetValueAnalysis.java",
"license": "apache-2.0",
"size": 59490
} | [
"java.awt.event.ActionEvent"
] | import java.awt.event.ActionEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 824,791 |
public boolean existsCoveragestore(String workspace, String csName){
return existsCoveragestore(workspace, csName, Util.DEFAULT_QUIET_ON_NOT_FOUND);
}
//==========================================================================
//=== COVERAGES
//=============================================... | boolean function(String workspace, String csName){ return existsCoveragestore(workspace, csName, Util.DEFAULT_QUIET_ON_NOT_FOUND); } /** * Get list of coverages (usually only one). * * @param workspace The name of the workspace * @param csName The name of the CoverageStore * @return Coverages list as a {@link RESTCover... | /**
* Checks if the selected Coverage store is present.
*
* @param workspace workspace of the coveragestore
* @param dsName name of the coveragestore
* @return boolean indicating if the coveragestore exists
*/ | Checks if the selected Coverage store is present | existsCoveragestore | {
"repo_name": "wumpz/geoserver-manager",
"path": "src/main/java/it/geosolutions/geoserver/rest/GeoServerRESTReader.java",
"license": "mit",
"size": 46791
} | [
"it.geosolutions.geoserver.rest.decoder.RESTCoverageList"
] | import it.geosolutions.geoserver.rest.decoder.RESTCoverageList; | import it.geosolutions.geoserver.rest.decoder.*; | [
"it.geosolutions.geoserver"
] | it.geosolutions.geoserver; | 1,965,115 |
private IPermission[] primGetPermissionsForPrincipal(IAuthorizationPrincipal principal)
throws AuthorizationException {
if (!this.cachePermissions) {
return getUncachedPermissionsForPrincipal(principal, null, null, null);
}
IPermissionSet ps = null;
// Check ... | IPermission[] function(IAuthorizationPrincipal principal) throws AuthorizationException { if (!this.cachePermissions) { return getUncachedPermissionsForPrincipal(principal, null, null, null); } IPermissionSet ps = null; ps = cacheGet(principal); if (ps == null) synchronized (principal) { ps = cacheGet(principal); if (p... | /**
* Returns permissions for a principal. First check the entity caching service, and if the
* permissions have not been cached, retrieve and cache them.
*
* @return IPermission[]
* @param principal org.apereo.portal.security.IAuthorizationPrincipal
*/ | Returns permissions for a principal. First check the entity caching service, and if the permissions have not been cached, retrieve and cache them | primGetPermissionsForPrincipal | {
"repo_name": "stalele/uPortal",
"path": "uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/security/provider/AuthorizationImpl.java",
"license": "apache-2.0",
"size": 48081
} | [
"org.apereo.portal.AuthorizationException",
"org.apereo.portal.security.IAuthorizationPrincipal",
"org.apereo.portal.security.IPermission",
"org.apereo.portal.security.IPermissionSet"
] | import org.apereo.portal.AuthorizationException; import org.apereo.portal.security.IAuthorizationPrincipal; import org.apereo.portal.security.IPermission; import org.apereo.portal.security.IPermissionSet; | import org.apereo.portal.*; import org.apereo.portal.security.*; | [
"org.apereo.portal"
] | org.apereo.portal; | 2,638,636 |
static public Color getMarkerColor(int index) {
Color color = markerColors.get(index);
if(color==null) { // create and store a new color
color = getLineColor(index).brighter().brighter();
markerColors.put(index, color);
}
return color;
}
}
/*
* Open Source Physics software is free sof... | static Color function(int index) { Color color = markerColors.get(index); if(color==null) { color = getLineColor(index).brighter().brighter(); markerColors.put(index, color); } return color; } } /* * Open Source Physics software is free software; you can redistribute * it and/or modify it under the terms of the GNU Gen... | /**
* Gets a marker color that matches the index.
* @param index int
* @return Color
*/ | Gets a marker color that matches the index | getMarkerColor | {
"repo_name": "dobrown/tracker-mvn",
"path": "src/main/java/org/opensourcephysics/display/DisplayColors.java",
"license": "gpl-3.0",
"size": 5503
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,795,270 |
public void processAnnotations(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
Elements eltUtils = processingEnv.getElementUtils();
TypeElement elementLookup = eltUtils.getTypeElement(Producers.class.getCanonicalName());
Set<? extends Element> elements = roundEnv.getEle... | void function(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { Elements eltUtils = processingEnv.getElementUtils(); TypeElement elementLookup = eltUtils.getTypeElement(Producers.class.getCanonicalName()); Set<? extends Element> elements = roundEnv.getElementsAnnotatedWith(elementLookup); for (Elemen... | /**
* Process the annotations.
*
* @param annotations The annotation types requested to be processed
* @param roundEnv Environment for information about the current and prior round
*/ | Process the annotations | processAnnotations | {
"repo_name": "alternet/alternet.ml",
"path": "tools/src/main/java/ml/alternet/discover/gen/LookupKeyProducerGenerator.java",
"license": "mit",
"size": 8196
} | [
"java.util.Set",
"javax.annotation.processing.RoundEnvironment",
"javax.lang.model.element.Element",
"javax.lang.model.element.TypeElement",
"javax.lang.model.util.Elements",
"ml.alternet.discover.Injection"
] | import java.util.Set; import javax.annotation.processing.RoundEnvironment; import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement; import javax.lang.model.util.Elements; import ml.alternet.discover.Injection; | import java.util.*; import javax.annotation.processing.*; import javax.lang.model.element.*; import javax.lang.model.util.*; import ml.alternet.discover.*; | [
"java.util",
"javax.annotation",
"javax.lang",
"ml.alternet.discover"
] | java.util; javax.annotation; javax.lang; ml.alternet.discover; | 9,405 |
protected static Class<?>[] getClasses(String packageName) throws IOException,
ClassNotFoundException
{
// list all the classes in org.mrgeo.core.mrsimage.reader
// ClassLoader cl = ClassLoader.getSystemClassLoader();
ClassLoader cl = Thread.currentThread().getContextClassLoader();
String pkgP = packageNa... | static Class<?>[] function(String packageName) throws IOException, ClassNotFoundException { ClassLoader cl = Thread.currentThread().getContextClassLoader(); String pkgP = packageName.replace('.', '/'); Enumeration<URL> resources = cl.getResources(pkgP); List<File> dirs = new ArrayList<>(); while (resources.hasMoreEleme... | /**
* This will pull in a list of classes under the package name given.
*
* @param packageName where to look in the java space
* @return an array of classes found
*/ | This will pull in a list of classes under the package name given | getClasses | {
"repo_name": "ngageoint/mrgeo",
"path": "mrgeo-core/src/main/java/org/mrgeo/data/image/MrsImageReader.java",
"license": "apache-2.0",
"size": 4463
} | [
"java.io.File",
"java.io.IOException",
"java.util.ArrayList",
"java.util.Enumeration",
"java.util.List"
] | import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 44,496 |
public SolrQuery addFacetQuery(String f) {
this.add(FacetParams.FACET_QUERY, f);
this.set(FacetParams.FACET, true);
return this;
} | SolrQuery function(String f) { this.add(FacetParams.FACET_QUERY, f); this.set(FacetParams.FACET, true); return this; } | /** add a faceting query
*
* @param f facet query
*/ | add a faceting query | addFacetQuery | {
"repo_name": "visouza/solr-5.0.0",
"path": "solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java",
"license": "apache-2.0",
"size": 30920
} | [
"org.apache.solr.common.params.FacetParams"
] | import org.apache.solr.common.params.FacetParams; | import org.apache.solr.common.params.*; | [
"org.apache.solr"
] | org.apache.solr; | 1,488,999 |
public Object getObject() throws SAXException {
return dataFactory;
} | Object function() throws SAXException { return dataFactory; } | /**
* Returns the object for this element or null, if this element does not create an object.
*
* @return the object.
* @throws SAXException if an parser error occured.
*/ | Returns the object for this element or null, if this element does not create an object | getObject | {
"repo_name": "EgorZhuk/pentaho-reporting",
"path": "engine/extensions-xpath/src/main/java/org/pentaho/reporting/engine/classic/extensions/datasources/xpath/parser/XPathDataSourceReadHandler.java",
"license": "lgpl-2.1",
"size": 3741
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 500,500 |
public void insertEntity(WorkingAgreement workingAgreement) {
workingAgreementDAO.insert(workingAgreement);
} | void function(WorkingAgreement workingAgreement) { workingAgreementDAO.insert(workingAgreement); } | /**
* Insert workingAgreement.
*/ | Insert workingAgreement | insertEntity | {
"repo_name": "terrex/tntconcept-materials-testing",
"path": "src/main/java/com/autentia/intra/manager/admin/WorkingAgreementManager.java",
"license": "gpl-2.0",
"size": 3649
} | [
"com.autentia.intra.businessobject.WorkingAgreement"
] | import com.autentia.intra.businessobject.WorkingAgreement; | import com.autentia.intra.businessobject.*; | [
"com.autentia.intra"
] | com.autentia.intra; | 1,985,455 |
@Operation(desc = "Closes all the connections for the given IP Address", impact = MBeanOperationInfo.INFO)
boolean closeConnectionsForAddress(@Parameter(desc = "an IP address", name = "ipAddress") String ipAddress) throws Exception; | @Operation(desc = STR, impact = MBeanOperationInfo.INFO) boolean closeConnectionsForAddress(@Parameter(desc = STR, name = STR) String ipAddress) throws Exception; | /**
* Closes all the connections of clients connected to this server which matches the specified IP address.
*/ | Closes all the connections of clients connected to this server which matches the specified IP address | closeConnectionsForAddress | {
"repo_name": "graben/activemq-artemis",
"path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java",
"license": "apache-2.0",
"size": 137910
} | [
"javax.management.MBeanOperationInfo"
] | import javax.management.MBeanOperationInfo; | import javax.management.*; | [
"javax.management"
] | javax.management; | 2,219,071 |
public final void setIncident_Carrier(IContext context, myfirstmodule.proxies.Carrier incident_carrier)
{
if (incident_carrier == null)
getMendixObject().setValue(context, MemberNames.Incident_Carrier.toString(), null);
else
getMendixObject().setValue(context, MemberNames.Incident_Carrier.toString(), inci... | final void function(IContext context, myfirstmodule.proxies.Carrier incident_carrier) { if (incident_carrier == null) getMendixObject().setValue(context, MemberNames.Incident_Carrier.toString(), null); else getMendixObject().setValue(context, MemberNames.Incident_Carrier.toString(), incident_carrier.getMendixObject().g... | /**
* Set value of Incident_Carrier
* @param context
* @param incident_carrier
*/ | Set value of Incident_Carrier | setIncident_Carrier | {
"repo_name": "synobsys/mendix-PivotTableWidget",
"path": "test/javasource/myfirstmodule/proxies/Incident.java",
"license": "apache-2.0",
"size": 11553
} | [
"com.mendix.systemwideinterfaces.core.IContext"
] | import com.mendix.systemwideinterfaces.core.IContext; | import com.mendix.systemwideinterfaces.core.*; | [
"com.mendix.systemwideinterfaces"
] | com.mendix.systemwideinterfaces; | 1,735,359 |
public void delete(String ruleName) throws ForbiddenUserException,
FailedRequestException; | void function(String ruleName) throws ForbiddenUserException, FailedRequestException; | /**
* Removes a rule from the server.
*
* @param ruleName Name of rule on REST server.
*/ | Removes a rule from the server | delete | {
"repo_name": "grechaw/java-client-api",
"path": "src/main/java/com/marklogic/client/alerting/RuleManager.java",
"license": "apache-2.0",
"size": 11167
} | [
"com.marklogic.client.FailedRequestException",
"com.marklogic.client.ForbiddenUserException"
] | import com.marklogic.client.FailedRequestException; import com.marklogic.client.ForbiddenUserException; | import com.marklogic.client.*; | [
"com.marklogic.client"
] | com.marklogic.client; | 2,064,812 |
public JobStatus[] getAllJobs() throws IOException, InterruptedException; | JobStatus[] function() throws IOException, InterruptedException; | /**
* Get all the jobs submitted.
* @return array of JobStatus for the submitted jobs
*/ | Get all the jobs submitted | getAllJobs | {
"repo_name": "apache/hadoop-mapreduce",
"path": "src/java/org/apache/hadoop/mapreduce/protocol/ClientProtocol.java",
"license": "apache-2.0",
"size": 10375
} | [
"java.io.IOException",
"org.apache.hadoop.mapreduce.JobStatus"
] | import java.io.IOException; import org.apache.hadoop.mapreduce.JobStatus; | import java.io.*; import org.apache.hadoop.mapreduce.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,095,506 |
public static int getFontSizeIntValue( DesignElementHandle handle )
{
if ( !( handle instanceof ReportItemHandle ) )
{
if ( handle instanceof ModuleHandle )
{
// return 10.
String size = (String) DesignerConstants.fontMap.get( DesignChoiceConstants.FONT_SIZE_MEDIUM );
return Integer.parseInt( ... | static int function( DesignElementHandle handle ) { if ( !( handle instanceof ReportItemHandle ) ) { if ( handle instanceof ModuleHandle ) { String size = (String) DesignerConstants.fontMap.get( DesignChoiceConstants.FONT_SIZE_MEDIUM ); return Integer.parseInt( size ); } if ( handle instanceof GroupHandle ) { handle = ... | /**
* Get the handle's font size int value. if the font size is relative,
* calculate the actual size according to its parent.
*
* @param handle
* The style handle to work with the style properties of this
* element.
* @return The font size int value
*/ | Get the handle's font size int value. if the font size is relative, calculate the actual size according to its parent | getFontSizeIntValue | {
"repo_name": "sguan-actuate/birt",
"path": "UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/util/DEUtil.java",
"license": "epl-1.0",
"size": 91152
} | [
"org.eclipse.birt.report.designer.core.DesignerConstants",
"org.eclipse.birt.report.model.api.DesignElementHandle",
"org.eclipse.birt.report.model.api.GroupHandle",
"org.eclipse.birt.report.model.api.ModuleHandle",
"org.eclipse.birt.report.model.api.ReportItemHandle",
"org.eclipse.birt.report.model.api.el... | import org.eclipse.birt.report.designer.core.DesignerConstants; import org.eclipse.birt.report.model.api.DesignElementHandle; import org.eclipse.birt.report.model.api.GroupHandle; import org.eclipse.birt.report.model.api.ModuleHandle; import org.eclipse.birt.report.model.api.ReportItemHandle; import org.eclipse.birt.re... | import org.eclipse.birt.report.designer.core.*; import org.eclipse.birt.report.model.api.*; import org.eclipse.birt.report.model.api.elements.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 1,870,406 |
@JsonProperty
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public String getValue()
{
return (getAttribute().getConfidential() ? this.getEncryptedValue() : this.getPlainValue());
}
| @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) String function() { return (getAttribute().getConfidential() ? this.getEncryptedValue() : this.getPlainValue()); } | /**
* Returns the encrypted or the plain-text value based on the confidential
* state of the attribute.
*
* @return String with value, either plain-text or decrypted.
*/ | Returns the encrypted or the plain-text value based on the confidential state of the attribute | getValue | {
"repo_name": "mortenoh/dhis2-core",
"path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValue.java",
"license": "bsd-3-clause",
"size": 10486
} | [
"com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty",
"org.hisp.dhis.common.DxfNamespaces"
] | import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import org.hisp.dhis.common.DxfNamespaces; | import com.fasterxml.jackson.dataformat.xml.annotation.*; import org.hisp.dhis.common.*; | [
"com.fasterxml.jackson",
"org.hisp.dhis"
] | com.fasterxml.jackson; org.hisp.dhis; | 632,341 |
public static String generateWorkspaceID() {
return RandomStringUtils.random(16, true, true).toLowerCase();
}
/**
* Converts a String into a suitable name for an openshift container.
* Kubernetes names are limited to 63 chars and must match the regex
* {@code [a-z0-9]([-a-z0-9]*[a-z0... | static String function() { return RandomStringUtils.random(16, true, true).toLowerCase(); } /** * Converts a String into a suitable name for an openshift container. * Kubernetes names are limited to 63 chars and must match the regex * {@code [a-z0-9]([-a-z0-9]*[a-z0-9])?} | /**
* Che workspace id is used as OpenShift service / deployment config name
* and must match the regex [a-z]([-a-z0-9]*[a-z0-9]) e.g. "q5iuhkwjvw1w9emg"
*
* @return randomly generated workspace id
*/ | Che workspace id is used as OpenShift service / deployment config name and must match the regex [a-z]([-a-z0-9]*[a-z0-9]) e.g. "q5iuhkwjvw1w9emg" | generateWorkspaceID | {
"repo_name": "snjeza/che",
"path": "plugins/plugin-docker/che-plugin-openshift-client/src/main/java/org/eclipse/che/plugin/openshift/client/kubernetes/KubernetesStringUtils.java",
"license": "epl-1.0",
"size": 6873
} | [
"org.apache.commons.lang.RandomStringUtils"
] | import org.apache.commons.lang.RandomStringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 298,922 |
public List getTemplates()
{
List retval = null;
COSArray array = (COSArray)page.getDictionaryObject( "Templates" );
if( array != null )
{
List objects = new ArrayList();
for( int i=0; i<array.size(); i++ )
{
objects.add( new FD... | List function() { List retval = null; COSArray array = (COSArray)page.getDictionaryObject( STR ); if( array != null ) { List objects = new ArrayList(); for( int i=0; i<array.size(); i++ ) { objects.add( new FDFTemplate( (COSDictionary)array.getObject( i ) ) ); } retval = new COSArrayList( objects, array ); } return ret... | /**
* This will get a list of FDFTemplage objects that describe the named pages
* that serve as templates.
*
* @return A list of templates.
*/ | This will get a list of FDFTemplage objects that describe the named pages that serve as templates | getTemplates | {
"repo_name": "myrridin/qz-print",
"path": "pdfbox_1.8.4_qz/src/org/apache/pdfbox/pdmodel/fdf/FDFPage.java",
"license": "lgpl-2.1",
"size": 3576
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.pdfbox.cos.COSArray",
"org.apache.pdfbox.cos.COSDictionary",
"org.apache.pdfbox.pdmodel.common.COSArrayList"
] | import java.util.ArrayList; import java.util.List; import org.apache.pdfbox.cos.COSArray; import org.apache.pdfbox.cos.COSDictionary; import org.apache.pdfbox.pdmodel.common.COSArrayList; | import java.util.*; import org.apache.pdfbox.cos.*; import org.apache.pdfbox.pdmodel.common.*; | [
"java.util",
"org.apache.pdfbox"
] | java.util; org.apache.pdfbox; | 1,155,628 |
@Override
public String getText(Object object) {
String label = ((MultiGeometryType)object).getId();
return label == null || label.length() == 0 ?
getString("_UI_MultiGeometryType_type") :
getString("_UI_MultiGeometryType_type") + " " + label;
} | String function(Object object) { String label = ((MultiGeometryType)object).getId(); return label == null label.length() == 0 ? getString(STR) : getString(STR) + " " + label; } | /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the label text for the adapted class. | getText | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/gml/provider/MultiGeometryTypeItemProvider.java",
"license": "apache-2.0",
"size": 6793
} | [
"net.opengis.gml.MultiGeometryType"
] | import net.opengis.gml.MultiGeometryType; | import net.opengis.gml.*; | [
"net.opengis.gml"
] | net.opengis.gml; | 749,587 |
public void setTest(Expression test) {
this.test = test;
}
| void function(Expression test) { this.test = test; } | /**
* Sets the boolean expression to evaluate. If this expression returns true
* then the test succeeds otherwise if it returns false then the text will
* fail with the content of the tag being the error message.
*/ | Sets the boolean expression to evaluate. If this expression returns true then the test succeeds otherwise if it returns false then the text will fail with the content of the tag being the error message | setTest | {
"repo_name": "hudson3-plugins/commons-jelly",
"path": "jelly-tags/junit/src/java/org/apache/commons/jelly/tags/junit/AssertTag.java",
"license": "apache-2.0",
"size": 3326
} | [
"org.apache.commons.jelly.expression.Expression"
] | import org.apache.commons.jelly.expression.Expression; | import org.apache.commons.jelly.expression.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,953,116 |
public boolean addOutputCluster(ZclCluster cluster) {
if (outputClusters.containsKey(cluster.getClusterId())
&& !(outputClusters.get(cluster.getClusterId()) instanceof ZclCustomCluster)) {
return false;
}
cluster.setClient();
outputClusters.put(cluster.ge... | boolean function(ZclCluster cluster) { if (outputClusters.containsKey(cluster.getClusterId()) && !(outputClusters.get(cluster.getClusterId()) instanceof ZclCustomCluster)) { return false; } cluster.setClient(); outputClusters.put(cluster.getClusterId(), cluster); return true; } /** * Gets a cluster from the input or ou... | /**
* Adds a specific {@link ZclCluster} to the output clusters in this endpoint.
*
* @param cluster the {@link ZclCluster} to add
* @return true if the cluster was added, false if there was an error (eg the cluster was already included in the
* endpoint)
*/ | Adds a specific <code>ZclCluster</code> to the output clusters in this endpoint | addOutputCluster | {
"repo_name": "zsmartsystems/com.zsmartsystems.zigbee",
"path": "com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/ZigBeeEndpoint.java",
"license": "epl-1.0",
"size": 23228
} | [
"com.zsmartsystems.zigbee.zcl.ZclCluster",
"com.zsmartsystems.zigbee.zcl.clusters.ZclCustomCluster",
"com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection"
] | import com.zsmartsystems.zigbee.zcl.ZclCluster; import com.zsmartsystems.zigbee.zcl.clusters.ZclCustomCluster; import com.zsmartsystems.zigbee.zcl.protocol.ZclCommandDirection; | import com.zsmartsystems.zigbee.zcl.*; import com.zsmartsystems.zigbee.zcl.clusters.*; import com.zsmartsystems.zigbee.zcl.protocol.*; | [
"com.zsmartsystems.zigbee"
] | com.zsmartsystems.zigbee; | 2,577,169 |
public Set<ImageNode> getVisibleImageNodes()
{
return visibleImageNodes;
}
public Set<DataObject> getVisibleImages() { return visibleImages; } | Set<ImageNode> function() { return visibleImageNodes; } public Set<DataObject> getVisibleImages() { return visibleImages; } | /**
* Returns the set of {@link ImageNode}s displayed.
*
* @return See above.
*/ | Returns the set of <code>ImageNode</code>s displayed | getVisibleImageNodes | {
"repo_name": "tp81/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/browser/ImageFinder.java",
"license": "gpl-2.0",
"size": 4932
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 703,890 |
@ApiModelProperty(example = "null", value = "Forbidden message")
public String getError() {
return error;
} | @ApiModelProperty(example = "null", value = STR) String function() { return error; } | /**
* Forbidden message
* @return error
**/ | Forbidden message | getError | {
"repo_name": "Tmin10/EVE-Security-Service",
"path": "server-api/src/main/java/ru/tmin10/EVESecurityService/serverApi/model/PutFleetsFleetIdSquadsSquadIdForbidden.java",
"license": "gpl-3.0",
"size": 2191
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 181,290 |
public NavMissionItem getNavMissionItemOnIndex(int index) {
if (index >= 0 && index < mNavMissionItems.size())
return mNavMissionItems.get(index);
else
return null;
}
| NavMissionItem function(int index) { if (index >= 0 && index < mNavMissionItems.size()) return mNavMissionItems.get(index); else return null; } | /**
* Gets the navigation mission item on specific position of navigation mission items list.
*
* @param index the index to the navigation mission items list
* @return index of the navigation mission item in a list
*/ | Gets the navigation mission item on specific position of navigation mission items list | getNavMissionItemOnIndex | {
"repo_name": "bocekm/SkyControl",
"path": "SkyControl/SkyControl/src/com/bocekm/skycontrol/mission/MissionItemList.java",
"license": "apache-2.0",
"size": 7275
} | [
"com.bocekm.skycontrol.mission.item.NavMissionItem"
] | import com.bocekm.skycontrol.mission.item.NavMissionItem; | import com.bocekm.skycontrol.mission.item.*; | [
"com.bocekm.skycontrol"
] | com.bocekm.skycontrol; | 2,219,663 |
public List<String> clusterVersions() {
return this.clusterVersions;
} | List<String> function() { return this.clusterVersions; } | /**
* Get the list of cluster versions.
*
* @return the clusterVersions value
*/ | Get the list of cluster versions | clusterVersions | {
"repo_name": "hovsepm/azure-sdk-for-java",
"path": "hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/VmSizeCompatibilityFilter.java",
"license": "mit",
"size": 4248
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 515,847 |
public ArrayList<Event> purgeBufferAll() {
// get the snapshot tracker
Map <String, Tracker> target = getEventIDTrack();
return purgeBuffer(target);
}
| ArrayList<Event> function() { Map <String, Tracker> target = getEventIDTrack(); return purgeBuffer(target); } | /**
* Purges all Events from buffer, adds them to the history, and
* return them back to forward to FLAME Adaptor
*
* @return List of Events to forward to FLAME Adaptor
*/ | Purges all Events from buffer, adds them to the history, and return them back to forward to FLAME Adaptor | purgeBufferAll | {
"repo_name": "ronia/flame",
"path": "src/flame/EventStorage.java",
"license": "mit",
"size": 18866
} | [
"java.util.ArrayList",
"java.util.Map"
] | import java.util.ArrayList; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 608,073 |
@Test
@Documented
public void add_a_WKT_geometry_to_a_layer() throws Exception
{
data.get();
String geom = "geom";
String response = post(Status.OK,"{\"layer\":\""+geom+"\", \"format\":\"WKT\",\"nodePropertyName\":\"wkt\"}", ENDPOINT + "/graphdb/addEditableLayer");
String... | void function() throws Exception { data.get(); String geom = "geom"; String response = post(Status.OK,"{\"layer\":\"STR\STRformat\":\"WKT\",\"nodePropertyName\":\"wkt\"}", ENDPOINT + STR); String wkt = STR; response = post(Status.OK,"{\"layer\":\"STR\STRgeometry\":\"STR\"}", ENDPOINT+ STR); assertTrue(response.contains... | /**
* Add a geometry, encoded in WKT, to a
* layer.
*/ | Add a geometry, encoded in WKT, to a layer | add_a_WKT_geometry_to_a_layer | {
"repo_name": "1manStartup/spatial",
"path": "src/test/java/org/neo4j/gis/spatial/SpatialPluginFunctionalTest.java",
"license": "agpl-3.0",
"size": 20868
} | [
"javax.ws.rs.core.Response",
"org.junit.Assert"
] | import javax.ws.rs.core.Response; import org.junit.Assert; | import javax.ws.rs.core.*; import org.junit.*; | [
"javax.ws",
"org.junit"
] | javax.ws; org.junit; | 870,658 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ReservationSummaryInner> listByReservationOrderAndReservation(
String reservationOrderId, String reservationId, Datagrain grain, String filter, Context context) {
return new PagedIterable<>(
listByReservationOrderAn... | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ReservationSummaryInner> function( String reservationOrderId, String reservationId, Datagrain grain, String filter, Context context) { return new PagedIterable<>( listByReservationOrderAndReservationAsync(reservationOrderId, reservationId, grain, filter, con... | /**
* Lists the reservations summaries for daily or monthly grain.
*
* @param reservationOrderId Order Id of the reservation.
* @param reservationId Id of the reservation.
* @param grain Can be daily or monthly.
* @param filter Required only for daily grain. The properties/UsageDate for st... | Lists the reservations summaries for daily or monthly grain | listByReservationOrderAndReservation | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationsSummariesClientImpl.java",
"license": "mit",
"size": 53960
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.resourcemanager.consumption.fluent.models.ReservationSummaryInner",
"com.azure.resourcemanager.consumption.models.Datagrain"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.consumption.fluent.models.ReservationSummaryInner; import com.azure.resourcemanager.consumption.models.Datagrai... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.consumption.fluent.models.*; import com.azure.resourcemanager.consumption.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 589,486 |
public static String hintingSize(Font font) {
int instrSize = 0;
LocaTable locaTable = FontUtils.getLocaTable(font);
GlyphTable glyfTable = FontUtils.getGlyphTable(font);
// Get hinting information from each glyph
for (int i = 0; i < locaTable.numGlyphs(); i++) {
Glyph glyph = glyfTable.gl... | static String function(Font font) { int instrSize = 0; LocaTable locaTable = FontUtils.getLocaTable(font); GlyphTable glyfTable = FontUtils.getGlyphTable(font); for (int i = 0; i < locaTable.numGlyphs(); i++) { Glyph glyph = glyfTable.glyph(locaTable.glyphOffset(i), locaTable.glyphLength(i)); instrSize += glyph.instruc... | /**
* Gets the size of hinting instructions in the glyph table, both in bytes and
* as a fraction of the glyph table size.
*
* @param font
* the source font
* @return the amount of hinting that is contained in the font
*/ | Gets the size of hinting instructions in the glyph table, both in bytes and as a fraction of the glyph table size | hintingSize | {
"repo_name": "witwall/sfntly-java",
"path": "src/main/java/com/google/typography/font/tools/fontinfo/FontInfo.java",
"license": "apache-2.0",
"size": 24681
} | [
"com.google.typography.font.sfntly.Font",
"com.google.typography.font.sfntly.table.truetype.Glyph",
"com.google.typography.font.sfntly.table.truetype.GlyphTable",
"com.google.typography.font.sfntly.table.truetype.LocaTable"
] | import com.google.typography.font.sfntly.Font; import com.google.typography.font.sfntly.table.truetype.Glyph; import com.google.typography.font.sfntly.table.truetype.GlyphTable; import com.google.typography.font.sfntly.table.truetype.LocaTable; | import com.google.typography.font.sfntly.*; import com.google.typography.font.sfntly.table.truetype.*; | [
"com.google.typography"
] | com.google.typography; | 2,451,212 |
public void testOnDemandNotNeeded() {
QuoteOnDemandDTO obj = new QuoteOnDemandDTO();
obj.fieldA = "the field A";
obj.fieldB = obj.fieldA;
CsvConfiguration config = createConfig(EscapeMode.DOUBLING);
String serializationResult = JSefaTestUtil.serialize(CSV, config, obj);
... | void function() { QuoteOnDemandDTO obj = new QuoteOnDemandDTO(); obj.fieldA = STR; obj.fieldB = obj.fieldA; CsvConfiguration config = createConfig(EscapeMode.DOUBLING); String serializationResult = JSefaTestUtil.serialize(CSV, config, obj); assertFalse(serializationResult.charAt(0) == config.getQuoteCharacter()); JSefa... | /**
* Test with mode "on demand" for the case the quotes are not needed.
*/ | Test with mode "on demand" for the case the quotes are not needed | testOnDemandNotNeeded | {
"repo_name": "Manmay/JSefa",
"path": "standard/src/test/java/org/jsefa/test/csv/QuoteModeTest.java",
"license": "apache-2.0",
"size": 12281
} | [
"org.jsefa.csv.config.CsvConfiguration",
"org.jsefa.csv.lowlevel.config.EscapeMode",
"org.jsefa.test.common.JSefaTestUtil"
] | import org.jsefa.csv.config.CsvConfiguration; import org.jsefa.csv.lowlevel.config.EscapeMode; import org.jsefa.test.common.JSefaTestUtil; | import org.jsefa.csv.config.*; import org.jsefa.csv.lowlevel.config.*; import org.jsefa.test.common.*; | [
"org.jsefa.csv",
"org.jsefa.test"
] | org.jsefa.csv; org.jsefa.test; | 1,269,680 |
public void testOpenFileOrDefaultResourceOpensDefaultResource() throws Exception
{
final File fileThatDoesNotExist = new File("/does/not/exist.properties");
assertFalse("Test must not exist", fileThatDoesNotExist.exists());
final String defaultResource = "org/apache/qpid/util/de... | void function() throws Exception { final File fileThatDoesNotExist = new File(STR); assertFalse(STR, fileThatDoesNotExist.exists()); final String defaultResource = STR; final InputStream is = FileUtils.openFileOrDefaultResource(fileThatDoesNotExist.getCanonicalPath(), defaultResource, this.getClass().getClassLoader());... | /**
* Tests that openFileOrDefaultResource returns the default resource when file cannot be found.
*/ | Tests that openFileOrDefaultResource returns the default resource when file cannot be found | testOpenFileOrDefaultResourceOpensDefaultResource | {
"repo_name": "hastef88/andes",
"path": "modules/andes-core/common/src/test/java/org/wso2/andes/util/FileUtilsTest.java",
"license": "apache-2.0",
"size": 24790
} | [
"java.io.File",
"java.io.InputStream",
"java.util.Properties"
] | import java.io.File; import java.io.InputStream; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,211,622 |
public void createNewProject(File newProject) throws IOException;
| void function(File newProject) throws IOException; | /**
* Create a new project.
*
* @param newProject
* The new project.
* @throws IOException
* If data can't be written.
*/ | Create a new project | createNewProject | {
"repo_name": "LoicDelorme/Polytech-Slides-Software",
"path": "src/com/delormeloic/generator/model/IModel.java",
"license": "mit",
"size": 2111
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,427,491 |
@SuppressWarnings("unchecked")
public <T extends Object> T instanceOf(Class<T> clazz) {
Bean<?> bean = injector.manager.getBeans(clazz).iterator().next();
return (T) injector.manager.getReference(bean, clazz, injector.manager.createCreationalContext(bean));
} | @SuppressWarnings(STR) <T extends Object> T function(Class<T> clazz) { Bean<?> bean = injector.manager.getBeans(clazz).iterator().next(); return (T) injector.manager.getReference(bean, clazz, injector.manager.createCreationalContext(bean)); } | /**
* convenience method, good for mocking and whoever holds a direct instance of Injector in hand.<br>
* after all its a jdk "bug" to call a static method on an instance.<br>
*{@link Injector#get(Class)} should supply the same behavior exactly
* @param clazz
* @param <T>
* @return instanc... | convenience method, good for mocking and whoever holds a direct instance of Injector in hand. after all its a jdk "bug" to call a static method on an instance. <code>Injector#get(Class)</code> should supply the same behavior exactly | instanceOf | {
"repo_name": "jtux270/translate",
"path": "ovirt/3.6_source/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/di/Injector.java",
"license": "gpl-3.0",
"size": 3149
} | [
"javax.enterprise.inject.spi.Bean"
] | import javax.enterprise.inject.spi.Bean; | import javax.enterprise.inject.spi.*; | [
"javax.enterprise"
] | javax.enterprise; | 1,961,982 |
void shutdown() throws IOException; | void shutdown() throws IOException; | /**
* Force-closes this connection.
* This is the only method of a connection which may be called
* from a different thread to terminate the connection.
* This method will not attempt to flush the transmitter's
* internal buffer prior to closing the underlying socket.
*/ | Force-closes this connection. This is the only method of a connection which may be called from a different thread to terminate the connection. This method will not attempt to flush the transmitter's internal buffer prior to closing the underlying socket | shutdown | {
"repo_name": "mcomella/FirefoxAccounts-android",
"path": "thirdparty/src/main/java/ch/boye/httpclientandroidlib/HttpConnection.java",
"license": "mpl-2.0",
"size": 3675
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 934,826 |
@IgniteSpiConfiguration(optional = true)
public TcpCommunicationSpi setReconnectCount(int reconCnt) {
this.reconCnt = reconCnt;
failureDetectionTimeoutEnabled(false);
return this;
} | @IgniteSpiConfiguration(optional = true) TcpCommunicationSpi function(int reconCnt) { this.reconCnt = reconCnt; failureDetectionTimeoutEnabled(false); return this; } | /**
* Sets maximum number of reconnect attempts used when establishing connection
* with remote nodes.
* <p>
* If not provided, default value is {@link #DFLT_RECONNECT_CNT}.
* <p>
* When this property is explicitly set {@link IgniteConfiguration#getFailureDetectionTimeout()} is ignored.
... | Sets maximum number of reconnect attempts used when establishing connection with remote nodes. If not provided, default value is <code>#DFLT_RECONNECT_CNT</code>. When this property is explicitly set <code>IgniteConfiguration#getFailureDetectionTimeout()</code> is ignored | setReconnectCount | {
"repo_name": "a1vanov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java",
"license": "apache-2.0",
"size": 175997
} | [
"org.apache.ignite.spi.IgniteSpiConfiguration"
] | import org.apache.ignite.spi.IgniteSpiConfiguration; | import org.apache.ignite.spi.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,297,074 |
public static String toString(final URL url, final String encoding) throws IOException {
return toString(url, Charsets.toCharset(encoding));
} | static String function(final URL url, final String encoding) throws IOException { return toString(url, Charsets.toCharset(encoding)); } | /**
* Gets the contents at the given URL.
*
* @param url
* The URL source.
* @param encoding
* The encoding name for the URL contents.
* @return The contents of the URL as a String.
* @throws IOException
* if an I/O exception occurs.
* @throws java.nio.charset.UnsupportedCharse... | Gets the contents at the given URL | toString | {
"repo_name": "jaredrummler/TrueTypeParser",
"path": "lib-truetypeparser/src/main/java/com/jaredrummler/fontreader/io/IOUtils.java",
"license": "apache-2.0",
"size": 119152
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 124,047 |
EAttribute getImage_Step(); | EAttribute getImage_Step(); | /**
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.sensor_datatypes.Image#getStep <em>Step</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Step</em>'.
* @see org.eclipse.... | Returns the meta object for the attribute '<code>org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.sensor_datatypes.Image#getStep Step</code>'. | getImage_Step | {
"repo_name": "RobotML/RobotML-SDK-Juno",
"path": "plugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/sensor_datatypes/Sensor_datatypesPackage.java",
"license": "epl-1.0",
"size": 152447
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 640,612 |
public void finalizeRecovery() {
recoveryState().setStage(RecoveryState.Stage.FINALIZE);
Engine engine = getEngine();
engine.refresh("recovery_finalization");
engine.config().setEnableGcDeletes(true);
} | void function() { recoveryState().setStage(RecoveryState.Stage.FINALIZE); Engine engine = getEngine(); engine.refresh(STR); engine.config().setEnableGcDeletes(true); } | /**
* perform the last stages of recovery once all translog operations are done.
* note that you should still call {@link #postRecovery(String)}.
*/ | perform the last stages of recovery once all translog operations are done. note that you should still call <code>#postRecovery(String)</code> | finalizeRecovery | {
"repo_name": "scorpionvicky/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/shard/IndexShard.java",
"license": "apache-2.0",
"size": 175161
} | [
"org.elasticsearch.index.engine.Engine",
"org.elasticsearch.indices.recovery.RecoveryState"
] | import org.elasticsearch.index.engine.Engine; import org.elasticsearch.indices.recovery.RecoveryState; | import org.elasticsearch.index.engine.*; import org.elasticsearch.indices.recovery.*; | [
"org.elasticsearch.index",
"org.elasticsearch.indices"
] | org.elasticsearch.index; org.elasticsearch.indices; | 720,798 |
public void storeToFile() throws Exception {
// appends state of operator set to state file
File aFile = new File(stateFileName);
PrintStream out = new PrintStream(new BufferedOutputStream(new FileOutputStream(aFile, true)));
// Depracateded style of storing operator information:
// ... | void function() throws Exception { File aFile = new File(stateFileName); PrintStream out = new PrintStream(new BufferedOutputStream(new FileOutputStream(aFile, true))); out.println("<!--"); out.println(STR); int k = 0; for (Operator operator: operators) { operator.storeToFile(out); if (k++ < operators.size() - 1) { out... | /**
* store operator optimisation specific information to file *
* @throws Exception
*/ | store operator optimisation specific information to file | storeToFile | {
"repo_name": "learking/beast2-2.1.3",
"path": "src/beast/core/OperatorSchedule.java",
"license": "lgpl-2.1",
"size": 9484
} | [
"java.io.BufferedOutputStream",
"java.io.File",
"java.io.FileOutputStream",
"java.io.PrintStream"
] | import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.PrintStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,672,878 |
public static Account getSyncAccount(Context context) {
// Get an instance of the Android account manager
AccountManager accountManager =
(AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);
// Create the account type and default account
Account newAcc... | static Account function(Context context) { AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE); Account newAccount = new Account( context.getString(R.string.app_name), context.getString(R.string.sync_account_type)); if (null == accountManager.getPassword(newAccount)) { if ... | /**
* Helper method to get the fake account to be used with SyncAdapter, or make a new one
* if the fake account doesn't exist yet. If we make a new account, we call the
* onAccountCreated method so we can initialize things.
*
* @param context The context used to access the account service
... | Helper method to get the fake account to be used with SyncAdapter, or make a new one if the fake account doesn't exist yet. If we make a new account, we call the onAccountCreated method so we can initialize things | getSyncAccount | {
"repo_name": "sharecirclelabs/movies",
"path": "app/src/main/java/net/uraganov/rubric/sync/RubricSyncAdapter.java",
"license": "mit",
"size": 5522
} | [
"android.accounts.Account",
"android.accounts.AccountManager",
"android.content.Context"
] | import android.accounts.Account; import android.accounts.AccountManager; import android.content.Context; | import android.accounts.*; import android.content.*; | [
"android.accounts",
"android.content"
] | android.accounts; android.content; | 927,800 |
EClass getLEntity(); | EClass getLEntity(); | /**
* Returns the meta object for class '{@link org.lunifera.dsl.semantic.entity.LEntity <em>LEntity</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>LEntity</em>'.
* @see org.lunifera.dsl.semantic.entity.LEntity
* @generated
*/ | Returns the meta object for class '<code>org.lunifera.dsl.semantic.entity.LEntity LEntity</code>'. | getLEntity | {
"repo_name": "lunifera/lunifera-dsl",
"path": "org.lunifera.dsl.semantic.entity/emf-gen/org/lunifera/dsl/semantic/entity/LunEntityPackage.java",
"license": "epl-1.0",
"size": 119334
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,025,700 |
List<Long> processIds = getProcessIds();
if (processIds.isEmpty()) {
// we must be on a platform that the PID list doesn't work like windows
return true;
}
return processIds.contains(pid);
} | List<Long> processIds = getProcessIds(); if (processIds.isEmpty()) { return true; } return processIds.contains(pid); } | /**
* Returns true if the given PID is still alive
*/ | Returns true if the given PID is still alive | isProcessAlive | {
"repo_name": "dhirajsb/fabric8",
"path": "components/fabric8-utils/src/main/java/io/fabric8/utils/Processes.java",
"license": "apache-2.0",
"size": 13327
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,702,946 |
public void setInverseViewMatrix(Matrix4 inverseViewMatrix) {
mInverseViewMatrix = inverseViewMatrix.getFloatValues();
mVertexShader.setInverseViewMatrix(mInverseViewMatrix);
} | void function(Matrix4 inverseViewMatrix) { mInverseViewMatrix = inverseViewMatrix.getFloatValues(); mVertexShader.setInverseViewMatrix(mInverseViewMatrix); } | /**
* Sets the inverse view matrix. The inverse view matrix is used to transform reflections
*
* @param inverseViewMatrix
*/ | Sets the inverse view matrix. The inverse view matrix is used to transform reflections | setInverseViewMatrix | {
"repo_name": "paoloach/zdomus",
"path": "temperature_monitor/opengl/src/main/java/it/achdjian/paolo/opengl/materials/Material.java",
"license": "gpl-2.0",
"size": 50323
} | [
"it.achdjian.paolo.opengl.math.Matrix4"
] | import it.achdjian.paolo.opengl.math.Matrix4; | import it.achdjian.paolo.opengl.math.*; | [
"it.achdjian.paolo"
] | it.achdjian.paolo; | 1,740,907 |
String completedLine = "";
if (autoCompleteLists.size() > 0) {
final int stop = findStopPosition(line, caretPosition);
final int start = findStartPosition(line, caretPosition);
final String word = line.substring(start, stop);
if (word.trim().length() > 0) {
... | String completedLine = STR"; if (continueLastSearch) { checkword = lastWord; } else { checkword = word; } final AutoCompleteList autoCompleteList = getAutoCompleteList(checkword); if (autoCompleteList != null) { final List<String> suggestions = getAutoCompleteSuggestions( autoCompleteList.getWordList(), checkword); if ... | /**
* Extracts the word at the given position from the line,
* and looks for suggestions for autocompleting the word.
* <br><br>
* The previous search is saved, so if there are more than one
* suggestion, repeated calls to this method will give the next
* result in the suggestion list.
... | Extracts the word at the given position from the line, and looks for suggestions for autocompleting the word. The previous search is saved, so if there are more than one suggestion, repeated calls to this method will give the next result in the suggestion list | completeWord | {
"repo_name": "yuchaosydney/kouchat",
"path": "src/main/java/net/usikkert/kouchat/autocomplete/AutoCompleter.java",
"license": "gpl-3.0",
"size": 10706
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,686,641 |
ListenableFuture<Boolean> forceFlush(long id) throws InterruptedException; | ListenableFuture<Boolean> forceFlush(long id) throws InterruptedException; | /**
* Forces the flush of all the partitions that contains non persisted data within the
* specified segment.
*
* @param id the segment id
* @return a listenable future
* @throws InterruptedException if the thread is interrupted
*/ | Forces the flush of all the partitions that contains non persisted data within the specified segment | forceFlush | {
"repo_name": "blerer/horizondb",
"path": "src/main/java/io/horizondb/db/series/TimeSeriesPartitionManager.java",
"license": "apache-2.0",
"size": 4579
} | [
"com.google.common.util.concurrent.ListenableFuture"
] | import com.google.common.util.concurrent.ListenableFuture; | import com.google.common.util.concurrent.*; | [
"com.google.common"
] | com.google.common; | 288,674 |
protected static ArrayList<Integer> getNeighboringPartitions(
AllPartitions<OverlappingPartition, OverlappingAuxData> all,
OverlappingAuxData auxAdd, OverlappingAuxData auxRemove, Node n1,
Node n2) {
ArrayList<Integer> neighboring = new ArrayList<Integer>(
all.getPartitionCount());
for (int i = 0; i... | static ArrayList<Integer> function( AllPartitions<OverlappingPartition, OverlappingAuxData> all, OverlappingAuxData auxAdd, OverlappingAuxData auxRemove, Node n1, Node n2) { ArrayList<Integer> neighboring = new ArrayList<Integer>( all.getPartitionCount()); for (int i = 0; i < all.partitions.length; i++) { if (((all.aux... | /**
*
* generates a list of the indexes of partitions that have both given nodes
* as neighbors (it is contained either in all.auxData or auxAdd but NOT in
* auxRemove)
*
* @param all
* @param auxAdd
* @param auxRemove
* @param n
* @return list of partition indexes that have the given node as neig... | generates a list of the indexes of partitions that have both given nodes as neighbors (it is contained either in all.auxData or auxAdd but NOT in auxRemove) | getNeighboringPartitions | {
"repo_name": "Rwilmes/DNA",
"path": "src/dna/parallel/partition/OverlappingPartition.java",
"license": "gpl-3.0",
"size": 18004
} | [
"dna.graph.nodes.Node",
"dna.parallel.auxData.OverlappingAuxData",
"java.util.ArrayList"
] | import dna.graph.nodes.Node; import dna.parallel.auxData.OverlappingAuxData; import java.util.ArrayList; | import dna.graph.nodes.*; import dna.parallel.*; import java.util.*; | [
"dna.graph.nodes",
"dna.parallel",
"java.util"
] | dna.graph.nodes; dna.parallel; java.util; | 2,166,273 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.