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 void testZeroZero() {
byte aBytes[] = {0};
byte bBytes[] = {0};
int aSign = 0;
int bSign = 0;
byte rBytes[] = {0};
BigInteger aNumber = new BigInteger(aSign, aBytes);
BigInteger bNumber = new BigInteger(bSign, bBytes);
BigInteger result ... | void function() { byte aBytes[] = {0}; byte bBytes[] = {0}; int aSign = 0; int bSign = 0; byte rBytes[] = {0}; BigInteger aNumber = new BigInteger(aSign, aBytes); BigInteger bNumber = new BigInteger(bSign, bBytes); BigInteger result = aNumber.or(bNumber); byte resBytes[] = new byte[rBytes.length]; resBytes = result.toB... | /**
* Or for zero and zero
*/ | Or for zero and zero | testZeroZero | {
"repo_name": "JSDemos/android-sdk-20",
"path": "src/org/apache/harmony/tests/java/math/BigIntegerOrTest.java",
"license": "apache-2.0",
"size": 17130
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,556,247 |
EList<Double> getOffsetDistances();
| EList<Double> getOffsetDistances(); | /**
* Returns the value of the '<em><b>Offset Distances</b></em>' attribute list.
* The list contents are of type {@link java.lang.Double}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Offset Distances</em>' attribute list isn't clear,
* there really should be more of a description her... | Returns the value of the 'Offset Distances' attribute list. The list contents are of type <code>java.lang.Double</code>. If the meaning of the 'Offset Distances' attribute list isn't clear, there really should be more of a description here... | getOffsetDistances | {
"repo_name": "opensourceBIM/BIMserver",
"path": "PluginBase/generated/org/bimserver/models/ifc4/IfcVirtualGridIntersection.java",
"license": "agpl-3.0",
"size": 4839
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,122,691 |
Options options = new Options();
List<Field> fields = new ArrayList<Field>();
for (Class<?> settings : flagSettings) {
fields.addAll(Arrays.asList(settings.getDeclaredFields()));
}
// Reflect on flagSettings class and absorb flags
final Map<Flag, Field> flags = new LinkedHashMap<Flag, Field>... | Options options = new Options(); List<Field> fields = new ArrayList<Field>(); for (Class<?> settings : flagSettings) { fields.addAll(Arrays.asList(settings.getDeclaredFields())); } final Map<Flag, Field> flags = new LinkedHashMap<Flag, Field>(); for (Field field : fields) { if (!field.isAnnotationPresent(Flag.class)) {... | /**
* Parse command line arguments.
*
* @param args argv from command line
* @return a Guice module configured with flag support.
* @throws ParseException on bad command line args
*/ | Parse command line arguments | parseFlags | {
"repo_name": "jkatzer/jkatzer-wave",
"path": "src/org/waveprotocol/wave/examples/fedone/FlagBinder.java",
"license": "apache-2.0",
"size": 6391
} | [
"com.google.inject.AbstractModule",
"java.lang.reflect.Field",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.LinkedHashMap",
"java.util.List",
"java.util.Map",
"org.apache.commons.cli.CommandLine",
"org.apache.commons.cli.CommandLineParser",
"org.apache.commons.cli.OptionBuilder",
"org.a... | import com.google.inject.AbstractModule; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons... | import com.google.inject.*; import java.lang.reflect.*; import java.util.*; import org.apache.commons.cli.*; | [
"com.google.inject",
"java.lang",
"java.util",
"org.apache.commons"
] | com.google.inject; java.lang; java.util; org.apache.commons; | 2,860,998 |
public PDFObject getCharSet() {
return this.charSet;
}
| PDFObject function() { return this.charSet; } | /** Getter for property charSet.
* @return Value of property charSet.
*
*/ | Getter for property charSet | getCharSet | {
"repo_name": "denisfalqueto/PDFrenderer",
"path": "src/main/java/com/sun/pdfview/font/PDFFontDescriptor.java",
"license": "lgpl-2.1",
"size": 15111
} | [
"com.sun.pdfview.PDFObject"
] | import com.sun.pdfview.PDFObject; | import com.sun.pdfview.*; | [
"com.sun.pdfview"
] | com.sun.pdfview; | 2,677,561 |
protected Filter getFilter() {
return this.filter;
} | Filter function() { return this.filter; } | /**
* Returns the filter being registered.
* @return the filter
*/ | Returns the filter being registered | getFilter | {
"repo_name": "wwadge/spring-boot",
"path": "spring-boot/src/main/java/org/springframework/boot/context/embedded/FilterRegistrationBean.java",
"license": "apache-2.0",
"size": 10805
} | [
"javax.servlet.Filter"
] | import javax.servlet.Filter; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 2,899,181 |
protected void preOnBlockActivated(CbTileEntity cbTileEntity, EntityPlayer entityPlayer, EnumFacing facing, float hitX, float hitY, float hitZ, ActionResult actionResult) {} | protected void preOnBlockActivated(CbTileEntity cbTileEntity, EntityPlayer entityPlayer, EnumFacing facing, float hitX, float hitY, float hitZ, ActionResult actionResult) {} | /**
* Called before click event alters block features such
* as cover, overlay, or dye color.
*
* @param cbTileEntity the Carpenter's Block tile entity
* @param entityPlayer the player
* @param actionResult stores action parameters
*/ | Called before click event alters block features such as cover, overlay, or dye color | preOnBlockClicked | {
"repo_name": "burpingdog1/carpentersblocks",
"path": "src/main/java/com/carpentersblocks/block/types/BlockFlowerpot.java",
"license": "lgpl-2.1",
"size": 58766
} | [
"com.carpentersblocks.block.types.BlockCoverable",
"com.carpentersblocks.tileentity.CbTileEntity",
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.util.EnumFacing"
] | import com.carpentersblocks.block.types.BlockCoverable; import com.carpentersblocks.tileentity.CbTileEntity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.EnumFacing; | import com.carpentersblocks.block.types.*; import com.carpentersblocks.tileentity.*; import net.minecraft.entity.player.*; import net.minecraft.util.*; | [
"com.carpentersblocks.block",
"com.carpentersblocks.tileentity",
"net.minecraft.entity",
"net.minecraft.util"
] | com.carpentersblocks.block; com.carpentersblocks.tileentity; net.minecraft.entity; net.minecraft.util; | 932,787 |
protected PlatformListenable readAndListenFuture(BinaryRawReader reader, IgniteFuture fut,
PlatformFutureUtils.Writer writer)
throws IgniteCheckedException {
long futId = reader.readLong();
int futTyp = reader.readInt();
retur... | PlatformListenable function(BinaryRawReader reader, IgniteFuture fut, PlatformFutureUtils.Writer writer) throws IgniteCheckedException { long futId = reader.readLong(); int futTyp = reader.readInt(); return PlatformFutureUtils.listen(platformCtx, fut, futId, futTyp, writer, this); } | /**
* Reads future information and listens.
*
* @param reader Reader.
* @param fut Future.
* @param writer Writer.
* @throws IgniteCheckedException In case of error.
*/ | Reads future information and listens | readAndListenFuture | {
"repo_name": "vldpyatkov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractTarget.java",
"license": "apache-2.0",
"size": 7558
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.binary.BinaryRawReader",
"org.apache.ignite.internal.processors.platform.utils.PlatformFutureUtils",
"org.apache.ignite.internal.processors.platform.utils.PlatformListenable",
"org.apache.ignite.lang.IgniteFuture"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.binary.BinaryRawReader; import org.apache.ignite.internal.processors.platform.utils.PlatformFutureUtils; import org.apache.ignite.internal.processors.platform.utils.PlatformListenable; import org.apache.ignite.lang.IgniteFuture; | import org.apache.ignite.*; import org.apache.ignite.binary.*; import org.apache.ignite.internal.processors.platform.utils.*; import org.apache.ignite.lang.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,898,227 |
public void onViewCaptured(View capturedChild, int activePointerId) {} | public void onViewCaptured(View capturedChild, int activePointerId) {} | /**
* Called when the captured view's position changes as the result of a drag or settle.
*
* @param changedView View whose position changed
* @param left New X coordinate of the left edge of the view
* @param top New Y coordinate of the top edge of the view
* @para... | Called when the captured view's position changes as the result of a drag or settle | onViewPositionChanged | {
"repo_name": "10045125/AndroidSlidingUpPanel",
"path": "library/src/com/sothree/slidinguppanel/ViewDragHelper.java",
"license": "apache-2.0",
"size": 59990
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 884,948 |
public static <T> Expression mandatoryBodyExpression(final Class<T> type) {
return mandatoryBodyExpression(type, false);
} | static <T> Expression function(final Class<T> type) { return mandatoryBodyExpression(type, false); } | /**
* Returns the expression for the exchanges inbound message body converted
* to the given type.
* <p/>
* Does <b>not</b> allow null bodies.
*/ | Returns the expression for the exchanges inbound message body converted to the given type. Does not allow null bodies | mandatoryBodyExpression | {
"repo_name": "arnaud-deprez/camel",
"path": "camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java",
"license": "apache-2.0",
"size": 79321
} | [
"org.apache.camel.Expression"
] | import org.apache.camel.Expression; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,948,078 |
public PageImpl<T> setItems(List<T> items) {
this.items = items;
return this;
} | PageImpl<T> function(List<T> items) { this.items = items; return this; } | /**
* Sets the list of items.
*
* @param items the list of items in {@link List}.
* @return this Page object itself.
*/ | Sets the list of items | setItems | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/containerinstance/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/containerinstance/v2018_10_01/implementation/PageImpl.java",
"license": "mit",
"size": 1767
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,494,948 |
private static void invokeOperatorUnregisteredListener(OperatorDescription description) {
List<WeakReference<OperatorServiceListener>> listenersCopy = new LinkedList<>(listeners);
for (WeakReference<OperatorServiceListener> listenerRef : listenersCopy) {
OperatorServiceListener operatorServiceListener = liste... | static void function(OperatorDescription description) { List<WeakReference<OperatorServiceListener>> listenersCopy = new LinkedList<>(listeners); for (WeakReference<OperatorServiceListener> listenerRef : listenersCopy) { OperatorServiceListener operatorServiceListener = listenerRef.get(); if (operatorServiceListener !=... | /**
* This method will inform all listeners of a change in the available operators.
*/ | This method will inform all listeners of a change in the available operators | invokeOperatorUnregisteredListener | {
"repo_name": "aborg0/rapidminer-studio",
"path": "src/main/java/com/rapidminer/tools/OperatorService.java",
"license": "agpl-3.0",
"size": 36825
} | [
"com.rapidminer.operator.OperatorDescription",
"java.lang.ref.WeakReference",
"java.util.Iterator",
"java.util.LinkedList",
"java.util.List"
] | import com.rapidminer.operator.OperatorDescription; import java.lang.ref.WeakReference; import java.util.Iterator; import java.util.LinkedList; import java.util.List; | import com.rapidminer.operator.*; import java.lang.ref.*; import java.util.*; | [
"com.rapidminer.operator",
"java.lang",
"java.util"
] | com.rapidminer.operator; java.lang; java.util; | 2,679,722 |
public Node makeNode(DTMAxisIterator iter) {
return makeNode(iter.next());
} | Node function(DTMAxisIterator iter) { return makeNode(iter.next()); } | /**
* Create an org.w3c.dom.Node from a node in an iterator
* The iterator most be started before this method is called
*/ | Create an org.w3c.dom.Node from a node in an iterator The iterator most be started before this method is called | makeNode | {
"repo_name": "FauxFaux/jdk9-jaxp",
"path": "src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SAXImpl.java",
"license": "gpl-2.0",
"size": 61188
} | [
"com.sun.org.apache.xml.internal.dtm.DTMAxisIterator",
"org.w3c.dom.Node"
] | import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator; import org.w3c.dom.Node; | import com.sun.org.apache.xml.internal.dtm.*; import org.w3c.dom.*; | [
"com.sun.org",
"org.w3c.dom"
] | com.sun.org; org.w3c.dom; | 2,023,142 |
public void A_B_Action(final NonRootModelElement columnInstance, final NonRootModelElement rowInstance) {
if(debugTests && !shouldRunTest()) {
return;
}
// disable parse on paste, otherwise the compare will
// show differences from any elements that were not previously
// pars... | void function(final NonRootModelElement columnInstance, final NonRootModelElement rowInstance) { if(debugTests && !shouldRunTest()) { return; } ModelStreamProcessor.setParseDisabled(true); NonRootModelElement editorColumnInstance = getActualElement(columnInstance, true); NonRootModelElement editorRowInstance = getActua... | /**
* This routine performs the action associated with a matrix cell.
* The parameters represent model instances aquired based on the specifed
* column instance and row instance.
*
* @param columnInstance Model instance from the column
* @param rowInstance Model instance from the ro... | This routine performs the action associated with a matrix cell. The parameters represent model instances aquired based on the specifed column instance and row instance | A_B_Action | {
"repo_name": "john-tornblom/bridgepoint",
"path": "src/org.xtuml.bp.core.test/src/org/xtuml/bp/core/test/cpts/CopyPasteSourceDestinationTests.java",
"license": "apache-2.0",
"size": 36567
} | [
"org.eclipse.ui.PlatformUI",
"org.xtuml.bp.core.common.ModelStreamProcessor",
"org.xtuml.bp.core.common.NonRootModelElement",
"org.xtuml.bp.core.ui.Selection",
"org.xtuml.bp.test.common.UITestingUtilities",
"org.xtuml.bp.ui.graphics.editor.GraphicalEditor"
] | import org.eclipse.ui.PlatformUI; import org.xtuml.bp.core.common.ModelStreamProcessor; import org.xtuml.bp.core.common.NonRootModelElement; import org.xtuml.bp.core.ui.Selection; import org.xtuml.bp.test.common.UITestingUtilities; import org.xtuml.bp.ui.graphics.editor.GraphicalEditor; | import org.eclipse.ui.*; import org.xtuml.bp.core.common.*; import org.xtuml.bp.core.ui.*; import org.xtuml.bp.test.common.*; import org.xtuml.bp.ui.graphics.editor.*; | [
"org.eclipse.ui",
"org.xtuml.bp"
] | org.eclipse.ui; org.xtuml.bp; | 1,090,130 |
public static String getMD5(String input) {
MessageDigest m = null;
try {
m = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
m.reset();
m.update(input.getBytes());
byte[] digest = m.dige... | static String function(String input) { MessageDigest m = null; try { m = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } m.reset(); m.update(input.getBytes()); byte[] digest = m.digest(); BigInteger bigInt = new BigInteger(1, digest); String hashtext = bigInt.toString(16)... | /**
* generates MD5 of input string
*
* @param input string to be hashed
* @return MD5 hash of string
*/ | generates MD5 of input string | getMD5 | {
"repo_name": "ir2pid/MarvelCharacterLibrary",
"path": "app/src/main/java/noisyninja/com/marvelcharacterlibrary/utils/NoisyUtils.java",
"license": "apache-2.0",
"size": 16508
} | [
"java.math.BigInteger",
"java.security.MessageDigest",
"java.security.NoSuchAlgorithmException"
] | import java.math.BigInteger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; | import java.math.*; import java.security.*; | [
"java.math",
"java.security"
] | java.math; java.security; | 2,386,328 |
public Collection<String> getParticipantNodes() throws Exception
{
return LockInternals.getParticipantNodes(internals.getClient(), basePath, internals.getLockName(), internals.getDriver());
} | Collection<String> function() throws Exception { return LockInternals.getParticipantNodes(internals.getClient(), basePath, internals.getLockName(), internals.getDriver()); } | /**
* Return a sorted list of all current nodes participating in the lock
*
* @return list of nodes
* @throws Exception ZK errors, interruptions, etc.
*/ | Return a sorted list of all current nodes participating in the lock | getParticipantNodes | {
"repo_name": "cjnolet/curator-sandbox",
"path": "curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessMutex.java",
"license": "apache-2.0",
"size": 7539
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,547,512 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<CsmOperationDescriptionInner>> listOperationsSinglePageAsync(Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<CsmOperationDescriptionInner>> function(Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String accept = STR; context = this.client.mergeContext(context); return service .listOperat... | /**
* Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws DefaultErrorResponseErrorException t... | Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider | listOperationsSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/DomainRegistrationProvidersClientImpl.java",
"license": "mit",
"size": 13306
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.Context",
"com.azure.resourcemanager.appservice.fluent.models.CsmOperationDescriptionInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.appservice.fluent.models.CsmOperationDescriptionInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appservice.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,339,828 |
private boolean hasUnfiltered(Collection<? extends TMObjectIF> collection) {
Iterator<? extends TMObjectIF> it = collection.iterator();
while (it.hasNext())
if (filterOk(it.next()))
return true;
return false;
} | boolean function(Collection<? extends TMObjectIF> collection) { Iterator<? extends TMObjectIF> it = collection.iterator(); while (it.hasNext()) if (filterOk(it.next())) return true; return false; } | /**
* Determines whether collection contains at least one element that is
* accepted by 'filter'.
* @param collection The collection to search.
* @return true iff 'collectino' contains at least one element that is
* accepted by filter.
*/ | Determines whether collection contains at least one element that is accepted by 'filter' | hasUnfiltered | {
"repo_name": "ontopia/ontopia",
"path": "ontopia-engine/src/main/java/net/ontopia/topicmaps/utils/ltm/LTMTopicMapWriter.java",
"license": "apache-2.0",
"size": 64241
} | [
"java.util.Collection",
"java.util.Iterator",
"net.ontopia.topicmaps.core.TMObjectIF"
] | import java.util.Collection; import java.util.Iterator; import net.ontopia.topicmaps.core.TMObjectIF; | import java.util.*; import net.ontopia.topicmaps.core.*; | [
"java.util",
"net.ontopia.topicmaps"
] | java.util; net.ontopia.topicmaps; | 2,033,623 |
PagedIterable<EventSubscription> list(String filter, Integer top, Context context); | PagedIterable<EventSubscription> list(String filter, Integer top, Context context); | /**
* List all aggregated global event subscriptions under a specific Azure subscription.
*
* @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the
* 'name' property only and with limited number of OData operations. These operations are: the ... | List all aggregated global event subscriptions under a specific Azure subscription | list | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptions.java",
"license": "mit",
"size": 37641
} | [
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context"
] | import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; | import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 283,578 |
private SQLDatabase getDatabase() {
return SQLPowerUtils.getAncestor(CubeEditPanel.this.cube, OLAPSession.class).getDatabase();
} | SQLDatabase function() { return SQLPowerUtils.getAncestor(CubeEditPanel.this.cube, OLAPSession.class).getDatabase(); } | /**
* This is the database that is being used in the session. The
* cube can be made from tables in this database.
*/ | This is the database that is being used in the session. The cube can be made from tables in this database | getDatabase | {
"repo_name": "amitkr/power-architect",
"path": "src/main/java/ca/sqlpower/architect/swingui/olap/CubeEditPanel.java",
"license": "gpl-3.0",
"size": 11070
} | [
"ca.sqlpower.architect.olap.OLAPSession",
"ca.sqlpower.sqlobject.SQLDatabase",
"ca.sqlpower.util.SQLPowerUtils"
] | import ca.sqlpower.architect.olap.OLAPSession; import ca.sqlpower.sqlobject.SQLDatabase; import ca.sqlpower.util.SQLPowerUtils; | import ca.sqlpower.architect.olap.*; import ca.sqlpower.sqlobject.*; import ca.sqlpower.util.*; | [
"ca.sqlpower.architect",
"ca.sqlpower.sqlobject",
"ca.sqlpower.util"
] | ca.sqlpower.architect; ca.sqlpower.sqlobject; ca.sqlpower.util; | 1,190,529 |
void beforeReconnect(ActiveMQException exception); | void beforeReconnect(ActiveMQException exception); | /**
* Notifies that a connection has failed due to the specified exception.
* <br>
* This method is called <em>before the session attempts to reconnect/failover</em>.
*
* @param exception exception which has caused the connection to fail
*/ | Notifies that a connection has failed due to the specified exception. This method is called before the session attempts to reconnect/failover | beforeReconnect | {
"repo_name": "ryanemerson/activemq-artemis",
"path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/SessionFailureListener.java",
"license": "apache-2.0",
"size": 1470
} | [
"org.apache.activemq.artemis.api.core.ActiveMQException"
] | import org.apache.activemq.artemis.api.core.ActiveMQException; | import org.apache.activemq.artemis.api.core.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 253,704 |
TransmitLinktraceOutput transmitLinktrace(TransmitLinktraceInput inputVar,
NetconfSession session) throws NetconfException;
public enum DmEntryParts {
ALL_PARTS,
CURRENT_ONLY,
HISTORY_ONLY;
} | TransmitLinktraceOutput transmitLinktrace(TransmitLinktraceInput inputVar, NetconfSession session) throws NetconfException; public enum DmEntryParts { ALL_PARTS, CURRENT_ONLY, HISTORY_ONLY; } | /**
* Service interface of transmitLinktrace.
*
* @param inputVar input of service interface transmitLinktrace
* @param session An active NETCONF session
* @return transmitLinktraceOutput output of service interface transmitLinktrace
* @throws NetconfException if the session has any error
... | Service interface of transmitLinktrace | transmitLinktrace | {
"repo_name": "kuujo/onos",
"path": "drivers/microsemi/ea1000/src/main/java/org/onosproject/drivers/microsemi/yang/MseaCfmNetconfService.java",
"license": "apache-2.0",
"size": 9092
} | [
"org.onosproject.netconf.NetconfException",
"org.onosproject.netconf.NetconfSession",
"org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.transmitlinktrace.TransmitLinktraceInput",
"org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.transmitlinktrace.TransmitLinktraceOutput"
] | import org.onosproject.netconf.NetconfException; import org.onosproject.netconf.NetconfSession; import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.transmitlinktrace.TransmitLinktraceInput; import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.transmitlinktrace.TransmitLinktraceOutput; | import org.onosproject.netconf.*; import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.transmitlinktrace.*; | [
"org.onosproject.netconf",
"org.onosproject.yang"
] | org.onosproject.netconf; org.onosproject.yang; | 410,726 |
private byte[] getPhotoFromMessage(Message message, Document messageXml)
{
Element root = messageXml.getDocumentElement();
String photoFileName = Utils.getXmlElementString(root, "picture");
try
{
if (message.getContent() instanceof Multipart) // hopefully prevents
// nullpointer (if... | byte[] function(Message message, Document messageXml) { Element root = messageXml.getDocumentElement(); String photoFileName = Utils.getXmlElementString(root, STR); try { if (message.getContent() instanceof Multipart) { Multipart multipart = (Multipart) message.getContent(); for (int i = 0, n = multipart.getCount(); i ... | /**
* Extracts the contact photo from the given message if one exists and
* returns it as byte array.
*
* @param message
* The message whose contact photo is to be returned.
* @return A byte array of the contact photo of the given message or null if
* no photo exists.
*/ | Extracts the contact photo from the given message if one exists and returns it as byte array | getPhotoFromMessage | {
"repo_name": "arthurzaczek/kolab-android",
"path": "src/at/dasz/KolabDroid/ContactsContract/SyncContactsHandler.java",
"license": "gpl-3.0",
"size": 19205
} | [
"android.util.Log",
"at.dasz.KolabDroid",
"java.io.IOException",
"javax.mail.Message",
"javax.mail.MessagingException",
"javax.mail.Multipart",
"javax.mail.Part",
"org.w3c.dom.Document",
"org.w3c.dom.Element"
] | import android.util.Log; import at.dasz.KolabDroid; import java.io.IOException; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Multipart; import javax.mail.Part; import org.w3c.dom.Document; import org.w3c.dom.Element; | import android.util.*; import at.dasz.*; import java.io.*; import javax.mail.*; import org.w3c.dom.*; | [
"android.util",
"at.dasz",
"java.io",
"javax.mail",
"org.w3c.dom"
] | android.util; at.dasz; java.io; javax.mail; org.w3c.dom; | 1,776,428 |
public static boolean isInternetAvailable(Context context) {
ConnectivityManager connectivityManager = (ConnectivityManager) context.getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo wifi = connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
N... | static boolean function(Context context) { ConnectivityManager connectivityManager = (ConnectivityManager) context.getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo wifi = connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); NetworkInfo mobile = connectivityManager.getNet... | /**
* Check for an internet connection.
* @param context current context.
* @return whether or not there is a valid internet connection
*/ | Check for an internet connection | isInternetAvailable | {
"repo_name": "seema-at-box/box-android-sdk",
"path": "box-content-sdk/src/main/java/com/box/androidsdk/content/utils/SdkUtils.java",
"license": "apache-2.0",
"size": 29044
} | [
"android.content.Context",
"android.net.ConnectivityManager",
"android.net.NetworkInfo"
] | import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; | import android.content.*; import android.net.*; | [
"android.content",
"android.net"
] | android.content; android.net; | 638,913 |
public void addMonetizationUsagePublishInfo(MonetizationUsagePublishInfo monetizationUsagePublishInfo)
throws APIManagementException {
Connection conn = null;
ResultSet rs = null;
PreparedStatement ps = null;
try {
conn = APIMgtDBUtil.getConnection();
... | void function(MonetizationUsagePublishInfo monetizationUsagePublishInfo) throws APIManagementException { Connection conn = null; ResultSet rs = null; PreparedStatement ps = null; try { conn = APIMgtDBUtil.getConnection(); conn.setAutoCommit(false); String query = SQLConstants.ADD_MONETIZATION_USAGE_PUBLISH_INFO; ps = c... | /**
* Add info about monetization usage publish job
*
* @throws APIManagementException
*/ | Add info about monetization usage publish job | addMonetizationUsagePublishInfo | {
"repo_name": "fazlan-nazeem/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java",
"license": "apache-2.0",
"size": 821235
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.model.MonetizationUsagePublishInfo",
"org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants",
"org.wso2.carbon.apimgt.im... | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.MonetizationUsagePublishInfo; import org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants; import or... | import java.sql.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.dao.constants.*; import org.wso2.carbon.apimgt.impl.utils.*; | [
"java.sql",
"org.wso2.carbon"
] | java.sql; org.wso2.carbon; | 1,115,752 |
public static Map<String, Object> getSubProperties(PropertySources propertySources,
String keyPrefix) {
return PropertySourceUtils.getSubProperties(propertySources, null, keyPrefix);
} | static Map<String, Object> function(PropertySources propertySources, String keyPrefix) { return PropertySourceUtils.getSubProperties(propertySources, null, keyPrefix); } | /**
* Return a Map of all values from the specified {@link PropertySources} that start
* with a particular key.
* @param propertySources the property sources to scan
* @param keyPrefix the key prefixes to test
* @return a map of all sub properties starting with the specified key prefixes.
* @see PropertySou... | Return a Map of all values from the specified <code>PropertySources</code> that start with a particular key | getSubProperties | {
"repo_name": "Azilen/Spring-Actuator",
"path": "springactuator/src/main/java/com/azilen/spring/common/configure/condition/PropertySourceUtils.java",
"license": "apache-2.0",
"size": 3323
} | [
"java.util.Map",
"org.springframework.core.env.PropertySources"
] | import java.util.Map; import org.springframework.core.env.PropertySources; | import java.util.*; import org.springframework.core.env.*; | [
"java.util",
"org.springframework.core"
] | java.util; org.springframework.core; | 854,850 |
private BrickCanvasManager getBrickCanvasManager() {
if (this.brickCanvasManager == null) {
this.brickCanvasManager = new BrickCanvasManager();
}
return this.brickCanvasManager;
} | BrickCanvasManager function() { if (this.brickCanvasManager == null) { this.brickCanvasManager = new BrickCanvasManager(); } return this.brickCanvasManager; } | /**
* This method initializes brickCanvasManager
*
* @return com.stoneworks.gui.BrickCanvasManager
*/ | This method initializes brickCanvasManager | getBrickCanvasManager | {
"repo_name": "clintjhill/saguaro",
"path": "src/com/Application.java",
"license": "bsd-3-clause",
"size": 14581
} | [
"com.stoneworks.gui.BrickCanvasManager"
] | import com.stoneworks.gui.BrickCanvasManager; | import com.stoneworks.gui.*; | [
"com.stoneworks.gui"
] | com.stoneworks.gui; | 2,234,302 |
@Generated
@Selector("stringForObjectValue:")
public native String stringForObjectValue(@Mapped(ObjCObjectMapper.class) Object obj); | @Selector(STR) native String function(@Mapped(ObjCObjectMapper.class) Object obj); | /**
* Inherited from NSFormatter. `obj` must be an instance of NSArray. Returns nil if `obj` is nil, not an instance of NSArray, or if the list formatter cannot generate a string representation for all objects in the array.
*/ | Inherited from NSFormatter. `obj` must be an instance of NSArray. Returns nil if `obj` is nil, not an instance of NSArray, or if the list formatter cannot generate a string representation for all objects in the array | stringForObjectValue | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/foundation/NSListFormatter.java",
"license": "apache-2.0",
"size": 7441
} | [
"org.moe.natj.general.ann.Mapped",
"org.moe.natj.objc.ann.Selector",
"org.moe.natj.objc.map.ObjCObjectMapper"
] | import org.moe.natj.general.ann.Mapped; import org.moe.natj.objc.ann.Selector; import org.moe.natj.objc.map.ObjCObjectMapper; | import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*; import org.moe.natj.objc.map.*; | [
"org.moe.natj"
] | org.moe.natj; | 1,143 |
public List<InterceptorFactory> getAroundConstructInterceptors() {
List<List<InterceptorFactory>> sortedItems = aroundConstructInterceptors.getSortedItems();
List<InterceptorFactory> interceptorFactories = new ArrayList<>();
for(List<InterceptorFactory> i : sortedItems) {
interce... | List<InterceptorFactory> function() { List<List<InterceptorFactory>> sortedItems = aroundConstructInterceptors.getSortedItems(); List<InterceptorFactory> interceptorFactories = new ArrayList<>(); for(List<InterceptorFactory> i : sortedItems) { interceptorFactories.addAll(i); } return interceptorFactories; } | /**
* Get the around-construct interceptors.
* <p/>
* This method should only be called after all interceptors have been added
*
* @return the sorted interceptors
*/ | Get the around-construct interceptors. This method should only be called after all interceptors have been added | getAroundConstructInterceptors | {
"repo_name": "99sono/wildfly",
"path": "ee/src/main/java/org/jboss/as/ee/component/ComponentConfiguration.java",
"license": "lgpl-2.1",
"size": 22115
} | [
"java.util.ArrayList",
"java.util.List",
"org.jboss.invocation.InterceptorFactory"
] | import java.util.ArrayList; import java.util.List; import org.jboss.invocation.InterceptorFactory; | import java.util.*; import org.jboss.invocation.*; | [
"java.util",
"org.jboss.invocation"
] | java.util; org.jboss.invocation; | 2,778,358 |
public static void copyFile(@NonNull String pathFrom, @NonNull String pathTo) throws IOException {
if (pathFrom.equalsIgnoreCase(pathTo)) {
L.m("File paths are the same");
return;
}
try {
File inFile = new File(pathFrom);
File outFile = new File(pathTo);
FileUtilities.copyFile(inFile, outFile);
... | static void function(@NonNull String pathFrom, @NonNull String pathTo) throws IOException { if (pathFrom.equalsIgnoreCase(pathTo)) { L.m(STR); return; } try { File inFile = new File(pathFrom); File outFile = new File(pathTo); FileUtilities.copyFile(inFile, outFile); } catch (IOException e) { } } | /**
* Copy a file (Overloaded). Takes in String paths to use instead of files
*
* @param pathFrom From file path being copied
* @param pathTo To File path being copied to
* @throws IOException NOTE, if file paths are the same, it will not run
*/ | Copy a file (Overloaded). Takes in String paths to use instead of files | copyFile | {
"repo_name": "PGMacDesign/PGMacUtilities",
"path": "library/src/main/java/com/pgmacdesign/pgmactips/utilities/FileUtilities.java",
"license": "apache-2.0",
"size": 66064
} | [
"androidx.annotation.NonNull",
"java.io.File",
"java.io.IOException"
] | import androidx.annotation.NonNull; import java.io.File; import java.io.IOException; | import androidx.annotation.*; import java.io.*; | [
"androidx.annotation",
"java.io"
] | androidx.annotation; java.io; | 1,247,580 |
public Container withEnv(List<EnvironmentVar> env) {
this.env = env;
return this;
} | Container function(List<EnvironmentVar> env) { this.env = env; return this; } | /**
* Set the env property: Container environment variables.
*
* @param env the env value to set.
* @return the Container object itself.
*/ | Set the env property: Container environment variables | withEnv | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/models/Container.java",
"license": "mit",
"size": 4447
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,750,132 |
@Test
public void whenThreeArgsSecondLessThirdLessFirst() {
Max maxim = new Max();
int result = maxim.max(3, 1, 2);
assertThat(result, is(3));
} | void function() { Max maxim = new Max(); int result = maxim.max(3, 1, 2); assertThat(result, is(3)); } | /**.
* test 3, 1 and 2
*/ | . test 3, 1 and 2 | whenThreeArgsSecondLessThirdLessFirst | {
"repo_name": "agolovatjuk/alexander4j",
"path": "chapter_001/src/test/java/ru/job4j/max/MaxTest.java",
"license": "apache-2.0",
"size": 1277
} | [
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import org.hamcrest.core.Is; import org.junit.Assert; | import org.hamcrest.core.*; import org.junit.*; | [
"org.hamcrest.core",
"org.junit"
] | org.hamcrest.core; org.junit; | 962,864 |
protected final int getInteger(int resid){
return getResources().getInteger(resid);
}
/**
* Gets a {@link Drawable}.
*
* @param resid the id of teh {@link Drawable} | final int function(int resid){ return getResources().getInteger(resid); } /** * Gets a {@link Drawable}. * * @param resid the id of teh {@link Drawable} | /**
* Gets an integer value.
*
* @param resid the id of the value
* @return the integer for the id
*/ | Gets an integer value | getInteger | {
"repo_name": "ganddev/MAPH",
"path": "Android/src/de/htwberlin/liar/activities/LiarActivity.java",
"license": "mit",
"size": 1115
} | [
"android.graphics.drawable.Drawable"
] | import android.graphics.drawable.Drawable; | import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 914,723 |
@Test
public void testOneParticle() {
for (int z = 1; z <= 57; z += 8) {
for (int y = 0; y < 56; y += 8) {
for (int x = 0; x < 56; x += 8) {
final ImagePlus imp = brick(64, 64, 64, 8, 8, 8, x, y, z);
ImagePlus purifiedImp = Purify.purify(imp);
ConnectedComponents cc = new ConnectedComponents... | void function() { for (int z = 1; z <= 57; z += 8) { for (int y = 0; y < 56; y += 8) { for (int x = 0; x < 56; x += 8) { final ImagePlus imp = brick(64, 64, 64, 8, 8, 8, x, y, z); ImagePlus purifiedImp = Purify.purify(imp); ConnectedComponents cc = new ConnectedComponents(); cc.run(purifiedImp, ConnectedComponents.FORE... | /**
* Check that the correct number of particles (1) is returned regardless of
* position of the particle. One particle (ID = 0) is background
* and we draw one particle so the correct number of particles is two.
*/ | Check that the correct number of particles (1) is returned regardless of position of the particle. One particle (ID = 0) is background and we draw one particle so the correct number of particles is two | testOneParticle | {
"repo_name": "bonej-org/BoneJ2",
"path": "Legacy/bonej/src/test/java/org/bonej/plugins/PurifyTest.java",
"license": "bsd-2-clause",
"size": 5223
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,818,739 |
EClass getEntity(); | EClass getEntity(); | /**
* Returns the meta object for class '{@link org.eclipse.vorto.core.api.model.datatype.Entity <em>Entity</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Entity</em>'.
* @see org.eclipse.vorto.core.api.model.datatype.Entity
* @generated
*/ | Returns the meta object for class '<code>org.eclipse.vorto.core.api.model.datatype.Entity Entity</code>'. | getEntity | {
"repo_name": "nagavijays/vorto",
"path": "bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/datatype/DatatypePackage.java",
"license": "epl-1.0",
"size": 49779
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,928,713 |
public void setNameNodeNameSystemLeasePeriod(final int soft, final int hard)
throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
// TODO: If 0.20 hadoop do one thing, if 0.21 hadoop do another.
// Not available in 0.20 hdfs. Use reflection to make it happen.
... | void function(final int soft, final int hard) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Field field = this.dfsCluster.getClass().getDeclaredField(STR); field.setAccessible(true); NameNode nn = (NameNode)field.get(this.dfsCluster); nn.namesystem.leaseManager.setLe... | /**
* Set soft and hard limits in namenode.
* You'll get a NPE if you call before you've started a minidfscluster.
* @param soft Soft limit
* @param hard Hard limit
* @throws NoSuchFieldException
* @throws SecurityException
* @throws IllegalAccessException
* @throws IllegalArgumentException
*... | Set soft and hard limits in namenode. You'll get a NPE if you call before you've started a minidfscluster | setNameNodeNameSystemLeasePeriod | {
"repo_name": "abaranau/hbase",
"path": "src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java",
"license": "apache-2.0",
"size": 40327
} | [
"java.lang.reflect.Field",
"org.apache.hadoop.hdfs.server.namenode.NameNode"
] | import java.lang.reflect.Field; import org.apache.hadoop.hdfs.server.namenode.NameNode; | import java.lang.reflect.*; import org.apache.hadoop.hdfs.server.namenode.*; | [
"java.lang",
"org.apache.hadoop"
] | java.lang; org.apache.hadoop; | 2,767,231 |
public FindAndReplaceOperation<T> projection(final BsonDocument projection) {
this.projection = projection;
return this;
} | FindAndReplaceOperation<T> function(final BsonDocument projection) { this.projection = projection; return this; } | /**
* Sets a document describing the fields to return for all matching documents.
*
* @param projection the project document, which may be null.
* @return this
* @mongodb.driver.manual reference/method/db.collection.find/ Projection
*/ | Sets a document describing the fields to return for all matching documents | projection | {
"repo_name": "kay-kim/mongo-java-driver",
"path": "driver-core/src/main/com/mongodb/operation/FindAndReplaceOperation.java",
"license": "apache-2.0",
"size": 9332
} | [
"org.bson.BsonDocument"
] | import org.bson.BsonDocument; | import org.bson.*; | [
"org.bson"
] | org.bson; | 616,644 |
public void updateLockBatch(Object batchId, DLockBatch newBatch) throws InterruptedException {
final boolean isTraceEnabled_DLS = logger.isTraceEnabled(LogMarker.DLS_VERBOSE);
if (isTraceEnabled_DLS) {
logger.trace(LogMarker.DLS_VERBOSE, "[DLockGrantor.updateLockBatch] enter: {}", batchId);
}
wa... | void function(Object batchId, DLockBatch newBatch) throws InterruptedException { final boolean isTraceEnabled_DLS = logger.isTraceEnabled(LogMarker.DLS_VERBOSE); if (isTraceEnabled_DLS) { logger.trace(LogMarker.DLS_VERBOSE, STR, batchId); } waitWhileInitializing(); if (acquireDestroyReadLock(0)) { try { synchronized (b... | /**
* Update the batch for the given batch. This operation was added as part of the solution to bug
* 32999.
* <p>
* Acquires destroy read lock before synchronizing on {@link #batchLocks}.
* If read lock not acquired, wait for the Grantor to be destroyed.
* <p>
* see org.apache.geode.internal.cache... | Update the batch for the given batch. This operation was added as part of the solution to bug 32999. Acquires destroy read lock before synchronizing on <code>#batchLocks</code>. If read lock not acquired, wait for the Grantor to be destroyed. see org.apache.geode.internal.cache.locks.TXCommitMessage#updateLockMembers() | updateLockBatch | {
"repo_name": "jdeppe-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockGrantor.java",
"license": "apache-2.0",
"size": 125739
} | [
"org.apache.geode.internal.logging.log4j.LogMarker"
] | import org.apache.geode.internal.logging.log4j.LogMarker; | import org.apache.geode.internal.logging.log4j.*; | [
"org.apache.geode"
] | org.apache.geode; | 510,631 |
public void setChannelConfigurations(List<ChannelConfiguration> channelConfigurations) {
this.channelConfigurations = channelConfigurations;
} | void function(List<ChannelConfiguration> channelConfigurations) { this.channelConfigurations = channelConfigurations; } | /**
* Set the list of channel configurations
* @param channelConfigurations the list of channel configurations
*/ | Set the list of channel configurations | setChannelConfigurations | {
"repo_name": "csjx/realtime-data",
"path": "src/main/java/edu/hawaii/soest/pacioos/text/configure/Configuration.java",
"license": "gpl-2.0",
"size": 27529
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,844,719 |
public Map<Tenor, CurveInstrumentProvider> getCalendarSwapNodeIds() {
if (_calendarSwapNodeIds != null) {
return Collections.unmodifiableMap(_calendarSwapNodeIds);
}
return null;
} | Map<Tenor, CurveInstrumentProvider> function() { if (_calendarSwapNodeIds != null) { return Collections.unmodifiableMap(_calendarSwapNodeIds); } return null; } | /**
* Gets the calendar swap node ids.
*
* @return The calendar swap node ids
*/ | Gets the calendar swap node ids | getCalendarSwapNodeIds | {
"repo_name": "McLeodMoores/starling",
"path": "projects/financial/src/main/java/com/opengamma/financial/analytics/curve/CurveNodeIdMapper.java",
"license": "apache-2.0",
"size": 64900
} | [
"com.opengamma.financial.analytics.ircurve.CurveInstrumentProvider",
"com.opengamma.util.time.Tenor",
"java.util.Collections",
"java.util.Map"
] | import com.opengamma.financial.analytics.ircurve.CurveInstrumentProvider; import com.opengamma.util.time.Tenor; import java.util.Collections; import java.util.Map; | import com.opengamma.financial.analytics.ircurve.*; import com.opengamma.util.time.*; import java.util.*; | [
"com.opengamma.financial",
"com.opengamma.util",
"java.util"
] | com.opengamma.financial; com.opengamma.util; java.util; | 1,720,459 |
public void clear() {
theImage = null;
renderType = RenderType.TILED;
displayed = Displayed.ALWAYS;
renderSpace = RenderSpace.WITHIN_BORDER;
_toString = null;
}
| void function() { theImage = null; renderType = RenderType.TILED; displayed = Displayed.ALWAYS; renderSpace = RenderSpace.WITHIN_BORDER; _toString = null; } | /**
* Clears the contents of the painter
*/ | Clears the contents of the painter | clear | {
"repo_name": "appnativa/rare",
"path": "source/rare/core/com/appnativa/rare/ui/painter/aUIImagePainter.java",
"license": "gpl-3.0",
"size": 15958
} | [
"com.appnativa.rare.ui.Displayed",
"com.appnativa.rare.ui.RenderType"
] | import com.appnativa.rare.ui.Displayed; import com.appnativa.rare.ui.RenderType; | import com.appnativa.rare.ui.*; | [
"com.appnativa.rare"
] | com.appnativa.rare; | 213,380 |
Long installEgressTablePassThroughDefaultRule(final DatapathId dpid) throws SwitchOperationException; | Long installEgressTablePassThroughDefaultRule(final DatapathId dpid) throws SwitchOperationException; | /**
* Install default pass through rule for pre egress table.
*
* @param dpid datapathId of the switch
* @return cookie id
* @throws SwitchOperationException Switch not found
*/ | Install default pass through rule for pre egress table | installEgressTablePassThroughDefaultRule | {
"repo_name": "jonvestal/open-kilda",
"path": "src-java/floodlight-service/floodlight-modules/src/main/java/org/openkilda/floodlight/switchmanager/ISwitchManager.java",
"license": "apache-2.0",
"size": 31727
} | [
"org.openkilda.floodlight.error.SwitchOperationException",
"org.projectfloodlight.openflow.types.DatapathId"
] | import org.openkilda.floodlight.error.SwitchOperationException; import org.projectfloodlight.openflow.types.DatapathId; | import org.openkilda.floodlight.error.*; import org.projectfloodlight.openflow.types.*; | [
"org.openkilda.floodlight",
"org.projectfloodlight.openflow"
] | org.openkilda.floodlight; org.projectfloodlight.openflow; | 171,204 |
EList<Script> getScript(); | EList<Script> getScript(); | /**
* Returns the value of the '<em><b>Script</b></em>' containment reference list.
* The list contents are of type {@link org.casa.dsltesting.Qt48Xmlschema.Script}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Script</em>' containment reference list isn't clear,
* there really should be mor... | Returns the value of the 'Script' containment reference list. The list contents are of type <code>org.casa.dsltesting.Qt48Xmlschema.Script</code>. If the meaning of the 'Script' containment reference list isn't clear, there really should be more of a description here... | getScript | {
"repo_name": "pedromateo/tug_qt_unit_testing_fw",
"path": "qt48_model/src/org/casa/dsltesting/Qt48Xmlschema/Widget.java",
"license": "gpl-3.0",
"size": 15687
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,973,606 |
private boolean inlineGlobalAliasIfPossible(
Name name, Ref alias, GlobalNamespace namespace) {
// Ensure that the alias is assigned to global name at that the
// declaration.
Node aliasParent = alias.node.getParent();
if ((aliasParent.isAssign() || aliasParent.isName())
&& NodeUtil.isEx... | boolean function( Name name, Ref alias, GlobalNamespace namespace) { Node aliasParent = alias.node.getParent(); if ((aliasParent.isAssign() aliasParent.isName()) && NodeUtil.isExecutedExactlyOnce(aliasParent) aliasParent.isName() && name.isConstructor()) { Node lvalue = aliasParent.isName() ? aliasParent : aliasParent.... | /**
* Attempt to inline an global alias of a global name. This requires that
* the name is well defined: assigned unconditionally, assigned exactly once.
* It is assumed that, the name for which it is an alias must already
* meet these same requirements.
*
* @param alias The alias to inline
* @retu... | Attempt to inline an global alias of a global name. This requires that the name is well defined: assigned unconditionally, assigned exactly once. It is assumed that, the name for which it is an alias must already meet these same requirements | inlineGlobalAliasIfPossible | {
"repo_name": "lgeorgieff/closure-compiler",
"path": "src/com/google/javascript/jscomp/CollapseProperties.java",
"license": "apache-2.0",
"size": 41540
} | [
"com.google.javascript.jscomp.GlobalNamespace",
"com.google.javascript.rhino.IR",
"com.google.javascript.rhino.Node",
"java.util.ArrayList",
"java.util.LinkedHashSet",
"java.util.List",
"java.util.Set"
] | import com.google.javascript.jscomp.GlobalNamespace; import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node; import java.util.ArrayList; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; | import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; import java.util.*; | [
"com.google.javascript",
"java.util"
] | com.google.javascript; java.util; | 2,536,785 |
public void testGet() throws Exception
{
try {
Computer searchObject = new Computer();
Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.onetomany.bidirectional.Computer",searchObject );
String id = "";
if(results != null && results.size() > 0)
{
... | void function() throws Exception { try { Computer searchObject = new Computer(); Collection results = getApplicationService().search(STR,searchObject ); String id = STRSTR/rest/Computer/STRapplication/xmlSTRapplication/xmlSTRresponseSTRresponseSTRFailed : HTTP error code : STRComputer"+"XML.xmlSTRwriting data to file S... | /**
* Uses Nested Search Criteria for search
* Verifies that the results are returned
* Verifies size of the result set
* Verifies that none of the attributes are null
*
* @throws Exception
*/ | Uses Nested Search Criteria for search Verifies that the results are returned Verifies size of the result set Verifies that none of the attributes are null | testGet | {
"repo_name": "NCIP/cacore-sdk",
"path": "sdk-toolkit/example-project/junit/src/test/gov/nih/nci/cacoresdk/domain/onetomany/bidirectional/ComputerResourceTest.java",
"license": "bsd-3-clause",
"size": 14759
} | [
"gov.nih.nci.cacoresdk.domain.onetomany.bidirectional.Computer",
"java.util.Collection"
] | import gov.nih.nci.cacoresdk.domain.onetomany.bidirectional.Computer; import java.util.Collection; | import gov.nih.nci.cacoresdk.domain.onetomany.bidirectional.*; import java.util.*; | [
"gov.nih.nci",
"java.util"
] | gov.nih.nci; java.util; | 1,772 |
public void removeGame(int id) {
final Iterator<Game> it = games.iterator();
while (it.hasNext()) {
if (it.next().getId() == id) {
it.remove();
break;
}
}
commitChanges();
onGameMetaDataChanged();
} | void function(int id) { final Iterator<Game> it = games.iterator(); while (it.hasNext()) { if (it.next().getId() == id) { it.remove(); break; } } commitChanges(); onGameMetaDataChanged(); } | /**
* Remove game from list synchronously.
* @param id game_id
*/ | Remove game from list synchronously | removeGame | {
"repo_name": "tran-khoa/ANNO1404-Warenrechner-App",
"path": "app/src/main/java/de/ktran/anno1404warenrechner/data/DataManager.java",
"license": "mit",
"size": 8077
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 785,729 |
public List<ArrayList<String>> getCacheDataFromMethod(String CacheName, String MethodName); | List<ArrayList<String>> function(String CacheName, String MethodName); | /**
* Use this delimiter to delimit key for a cacheable object
* if it is formed with multiple attributes.
*
* @param CacheName The cache name we are loading for
* @param MethodName The name of the method to use
* @return The recovered data from the method
*/ | Use this delimiter to delimit key for a cacheable object if it is formed with multiple attributes | getCacheDataFromMethod | {
"repo_name": "isparkes/OpenRate",
"path": "src/main/java/OpenRate/cache/ICacheDataMethod.java",
"license": "apache-2.0",
"size": 754
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,019,184 |
public OutputStream newOutputStream(int index) throws IOException {
synchronized (DiskLruCache.this) {
if (entry.currentEditor != this) {
throw new IllegalStateException();
}
return new FaultHidingOutputStream(new FileOutputStream(entry.getDirtyFile(index)));
}
} | OutputStream function(int index) throws IOException { synchronized (DiskLruCache.this) { if (entry.currentEditor != this) { throw new IllegalStateException(); } return new FaultHidingOutputStream(new FileOutputStream(entry.getDirtyFile(index))); } } | /**
* Returns a new unbuffered output stream to write the value at {@code index}. If the underlying output stream encounters errors when writing to the filesystem, this edit will be aborted when {@link #commit} is called. The returned output stream does not throw IOExceptions.
*/ | Returns a new unbuffered output stream to write the value at index. If the underlying output stream encounters errors when writing to the filesystem, this edit will be aborted when <code>#commit</code> is called. The returned output stream does not throw IOExceptions | newOutputStream | {
"repo_name": "armstrongli/XCamera",
"path": "src/com/xxboy/common/DiskLruCache.java",
"license": "gpl-2.0",
"size": 28357
} | [
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,860,468 |
private String getFormData()
{
Element form = getFormElement();
StringBuilder b = new StringBuilder();
if (form != null)
{
ElementIterator i = new ElementIterator(form);
Element next;
while ((next = i.next()) != null)
{
if (next.isLeaf())
... | String function() { Element form = getFormElement(); StringBuilder b = new StringBuilder(); if (form != null) { ElementIterator i = new ElementIterator(form); Element next; while ((next = i.next()) != null) { if (next.isLeaf()) { AttributeSet atts = next.getAttributes(); String type = (String) atts.getAttribute(HTML.At... | /**
* Determines the form data that is about to be submitted.
*
* @return the form data
*/ | Determines the form data that is about to be submitted | getFormData | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/javax/swing/text/html/FormView.java",
"license": "gpl-2.0",
"size": 26752
} | [
"javax.swing.text.AttributeSet",
"javax.swing.text.Element",
"javax.swing.text.ElementIterator"
] | import javax.swing.text.AttributeSet; import javax.swing.text.Element; import javax.swing.text.ElementIterator; | import javax.swing.text.*; | [
"javax.swing"
] | javax.swing; | 697,537 |
public void testDynamicCompositeId() {
EntityManager em = createDynamicPUEntityManager();
JPADynamicHelper helper = new JPADynamicHelper(em);
try {
beginTransaction(em);
DynamicEntity walker = helper.newDynamicEntity("DynamicWalker");
... | void function() { EntityManager em = createDynamicPUEntityManager(); JPADynamicHelper helper = new JPADynamicHelper(em); try { beginTransaction(em); DynamicEntity walker = helper.newDynamicEntity(STR); walker.set("name", "Sam"); walker.set("style", "Speed"); em.persist(walker); commitTransaction(em); clearDynamicPUCach... | /**
* Test create and read of dynamic entity using an embedded id.
*/ | Test create and read of dynamic entity using an embedded id | testDynamicCompositeId | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/xml/advanced/EntityMappingsDynamicAdvancedJUnitTestCase.java",
"license": "epl-1.0",
"size": 43156
} | [
"javax.persistence.EntityManager",
"org.eclipse.persistence.dynamic.DynamicEntity",
"org.eclipse.persistence.jpa.dynamic.JPADynamicHelper",
"org.eclipse.persistence.testing.models.jpa.xml.advanced.dynamic.DynamicWalkerPK"
] | import javax.persistence.EntityManager; import org.eclipse.persistence.dynamic.DynamicEntity; import org.eclipse.persistence.jpa.dynamic.JPADynamicHelper; import org.eclipse.persistence.testing.models.jpa.xml.advanced.dynamic.DynamicWalkerPK; | import javax.persistence.*; import org.eclipse.persistence.dynamic.*; import org.eclipse.persistence.jpa.dynamic.*; import org.eclipse.persistence.testing.models.jpa.xml.advanced.dynamic.*; | [
"javax.persistence",
"org.eclipse.persistence"
] | javax.persistence; org.eclipse.persistence; | 2,750,273 |
public JSONArray names() {
JSONArray ja = new JSONArray();
Iterator keys = keys();
while (keys.hasNext()) {
ja.put(keys.next());
}
return ja.length() == 0 ? null : ja;
} | JSONArray function() { JSONArray ja = new JSONArray(); Iterator keys = keys(); while (keys.hasNext()) { ja.put(keys.next()); } return ja.length() == 0 ? null : ja; } | /**
* Produce a JSONArray containing the names of the elements of this
* JSONObject.
* @return A JSONArray containing the key strings, or null if the JSONObject
* is empty.
*/ | Produce a JSONArray containing the names of the elements of this JSONObject | names | {
"repo_name": "LuckyStars/nbc",
"path": "function-cardmanage/src/main/com/nbcedu/function/cardmanage/core/util/jsons/JSONObject.java",
"license": "gpl-2.0",
"size": 53212
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 413,942 |
@Override
public synchronized void rollback() throws SailException {
// @see #1021 (Add critical section protection to AbstractJournal.abort() and BigdataSailConnection.rollback())
boolean success = false;
try {
assertWritableConn();
if (txLog.isInf... | synchronized void function() throws SailException { boolean success = false; try { assertWritableConn(); if (txLog.isInfoEnabled()) txLog.info(STR + this); if(changeLog != null) { changeLog.transactionPrepare(); } clearBuffers(); database.abort(); if (changeLog != null) { changeLog.transactionAborted(); } dirty = false... | /**
* Note: The semantics depend on the {@link Options#STORE_CLASS}. See
* {@link ITripleStore#abort()}.
*/ | Note: The semantics depend on the <code>Options#STORE_CLASS</code>. See <code>ITripleStore#abort()</code> | rollback | {
"repo_name": "blazegraph/database",
"path": "bigdata-core/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java",
"license": "gpl-2.0",
"size": 195147
} | [
"org.openrdf.sail.SailException"
] | import org.openrdf.sail.SailException; | import org.openrdf.sail.*; | [
"org.openrdf.sail"
] | org.openrdf.sail; | 955,729 |
@Bean(destroyMethod = "close")
public DataSource dataSource() {
return FhirServerConfigCommon.getDataSource(env);
} | @Bean(destroyMethod = "close") DataSource function() { return FhirServerConfigCommon.getDataSource(env); } | /**
* The following bean configures the database connection. The 'url' property value of "jdbc:derby:directory:jpaserver_derby_files;create=true" indicates that the server should save resources in a
* directory called "jpaserver_derby_files".
*
* A URL to a remote database could also be placed here, along with... | The following bean configures the database connection. The 'url' property value of "jdbc:derby:directory:jpaserver_derby_files;create=true" indicates that the server should save resources in a directory called "jpaserver_derby_files". A URL to a remote database could also be placed here, along with login credentials an... | dataSource | {
"repo_name": "SingingTree/hapi-fhir",
"path": "example-projects/hapi-fhir-jpaserver-dynamic/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java",
"license": "apache-2.0",
"size": 4977
} | [
"javax.sql.DataSource",
"org.springframework.context.annotation.Bean"
] | import javax.sql.DataSource; import org.springframework.context.annotation.Bean; | import javax.sql.*; import org.springframework.context.annotation.*; | [
"javax.sql",
"org.springframework.context"
] | javax.sql; org.springframework.context; | 2,765,566 |
public void msync(@NonNull Pointer addr, long len, int flags) throws LastErrorException {
libc.msync(addr, new NativeLong(len), flags);
} | void function(@NonNull Pointer addr, long len, int flags) throws LastErrorException { libc.msync(addr, new NativeLong(len), flags); } | /**
* Synchronize mapped memory region.
*
* @param addr Mapped address.
* @param len Region length.
* @param flags Synchronization flags
* @throws LastErrorException when operations fails
*/ | Synchronize mapped memory region | msync | {
"repo_name": "jabrena/ev3dev-lang-java",
"path": "src/main/java/ev3dev/utils/io/NativeFile.java",
"license": "mit",
"size": 9209
} | [
"com.sun.jna.LastErrorException",
"com.sun.jna.NativeLong",
"com.sun.jna.Pointer"
] | import com.sun.jna.LastErrorException; import com.sun.jna.NativeLong; import com.sun.jna.Pointer; | import com.sun.jna.*; | [
"com.sun.jna"
] | com.sun.jna; | 2,500,241 |
public static JPanel HomeMenuBannerPanel(String username) {
JPanel panel = new JPanel();
panel.setLayout(new FlowLayout(FlowLayout.CENTER, 20, 10));
JLabel banner = new JLabel(username); // Banner
panel.add(banner);
banner.setFont(new Font(null, 0, 24));
//banner.setForeground(JComponentStyle.wh... | static JPanel function(String username) { JPanel panel = new JPanel(); panel.setLayout(new FlowLayout(FlowLayout.CENTER, 20, 10)); JLabel banner = new JLabel(username); panel.add(banner); banner.setFont(new Font(null, 0, 24)); banner.setForeground(Color.white); panel.setBackground(JComponentStyle.gray_concrete); panel.... | /** Creates the Home Menu banner panel
* @param activity takes in the activity, either heart, steps, sleep, or temperature
* @param color takes in the color
* @return JPanel
*/ | Creates the Home Menu banner panel | HomeMenuBannerPanel | {
"repo_name": "sdmunozsierra/activifit",
"path": "gui_package/CustomJPanels.java",
"license": "gpl-3.0",
"size": 7587
} | [
"java.awt.Color",
"java.awt.Dimension",
"java.awt.FlowLayout",
"java.awt.Font",
"javax.swing.JLabel",
"javax.swing.JPanel"
] | import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import javax.swing.JLabel; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 864,033 |
public void forward(View view){
int currentPosition = player.getCurrentPosition();
// Check if forward seek time is smaller than the song duration
if(currentPosition + seekForwardTime <= player.getDuration()){
// Forward song
player.seekTo(currentPosition + seekForwardTime);
}
else{
// forward... | void function(View view){ int currentPosition = player.getCurrentPosition(); if(currentPosition + seekForwardTime <= player.getDuration()){ player.seekTo(currentPosition + seekForwardTime); } else{ player.seekTo(player.getDuration()); } } | /**
* Forward button click event
*/ | Forward button click event | forward | {
"repo_name": "anirudha-banerjee/Music",
"path": "src/com/example/music/MainActivity.java",
"license": "gpl-3.0",
"size": 10431
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,601,699 |
private String generateRDFModel(ContextualEvent event) {
//prefixes
final String ec = "http://purl.oclc.org/NET/UNIS/sao/ec#";
final String sao = "http://purl.oclc.org/NET/UNIS/sao/sao#";
final String xsn = "http://www.w3.org/2001/XMLSchema#";
final String geo = "http://www.w3.org/2003/01/geo/wgs8... | String function(ContextualEvent event) { final String ec = STRhttp: final String xsn = STRhttp: final String tl = STRhttp: final Model model = ModelFactory.createDefaultModel(); model.setNsPrefix("ec", ec); model.setNsPrefix("xsd", xsn); model.setNsPrefix("sao", sao); model.setNsPrefix("geo", geo); model.setNsPrefix("p... | /**
* Method used to generate a RDF string for the event detected
*
* @param event is a ContextualEvent object containing information of the detected event
* @return returns a string representing the RDf equivalent of the ContextualEvent object
*/ | Method used to generate a RDF string for the event detected | generateRDFModel | {
"repo_name": "CityPulse/Event-Detector",
"path": "src/main/java/com/siemens/ct/citypulse/event/detection/api/EventDetectionNodeAggregated.java",
"license": "mit",
"size": 6863
} | [
"java.io.StringWriter",
"java.util.Calendar",
"java.util.TimeZone",
"org.apache.jena.datatypes.xsd.XSDDateTime",
"org.apache.jena.rdf.model.Model",
"org.apache.jena.rdf.model.ModelFactory",
"org.apache.jena.rdf.model.Property",
"org.apache.jena.rdf.model.Resource"
] | import java.io.StringWriter; import java.util.Calendar; import java.util.TimeZone; import org.apache.jena.datatypes.xsd.XSDDateTime; import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.ModelFactory; import org.apache.jena.rdf.model.Property; import org.apache.jena.rdf.model.Resource; | import java.io.*; import java.util.*; import org.apache.jena.datatypes.xsd.*; import org.apache.jena.rdf.model.*; | [
"java.io",
"java.util",
"org.apache.jena"
] | java.io; java.util; org.apache.jena; | 1,695,695 |
@Override
public Object getTargetObject(RegionEntry entry) {
if (indexOnValues) {
Object o = entry.getValue((LocalRegion) this.region);
try {
if (o == Token.INVALID) {
return null;
}
if (o instanceof CachedDeserializable) {
return ((CachedDeserializable) o... | Object function(RegionEntry entry) { if (indexOnValues) { Object o = entry.getValue((LocalRegion) this.region); try { if (o == Token.INVALID) { return null; } if (o instanceof CachedDeserializable) { return ((CachedDeserializable) o).getDeserializedValue(this.region, entry); } } catch (EntryDestroyedException ignore) {... | /**
* Get the object of interest from the region entry. For now it always gets the deserialized
* value.
*/ | Get the object of interest from the region entry. For now it always gets the deserialized value | getTargetObject | {
"repo_name": "davinash/geode",
"path": "geode-core/src/main/java/org/apache/geode/cache/query/internal/index/MemoryIndexStore.java",
"license": "apache-2.0",
"size": 31410
} | [
"org.apache.geode.cache.EntryDestroyedException",
"org.apache.geode.internal.cache.CachedDeserializable",
"org.apache.geode.internal.cache.LocalRegion",
"org.apache.geode.internal.cache.NonTXEntry",
"org.apache.geode.internal.cache.RegionEntry",
"org.apache.geode.internal.cache.Token"
] | import org.apache.geode.cache.EntryDestroyedException; import org.apache.geode.internal.cache.CachedDeserializable; import org.apache.geode.internal.cache.LocalRegion; import org.apache.geode.internal.cache.NonTXEntry; import org.apache.geode.internal.cache.RegionEntry; import org.apache.geode.internal.cache.Token; | import org.apache.geode.cache.*; import org.apache.geode.internal.cache.*; | [
"org.apache.geode"
] | org.apache.geode; | 2,515,368 |
public boolean isOsWindows() {
return SystemUtils.IS_OS_WINDOWS;
} | boolean function() { return SystemUtils.IS_OS_WINDOWS; } | /**
* True if this is MS Windows.
*/ | True if this is MS Windows | isOsWindows | {
"repo_name": "julien-sobczak/sonarqube",
"path": "sonar-plugin-api/src/main/java/org/sonar/api/utils/System2.java",
"license": "lgpl-3.0",
"size": 3754
} | [
"org.apache.commons.lang.SystemUtils"
] | import org.apache.commons.lang.SystemUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 925,244 |
private float handleReplacement(ReplacementSpan replacement, TextPaint wp,
int start, int limit, boolean runIsRtl, Canvas c,
float x, int top, int y, int bottom, FontMetricsInt fmi,
boolean needWidth) {
float ret = 0;
int textStart = mStart + start;
int ... | float function(ReplacementSpan replacement, TextPaint wp, int start, int limit, boolean runIsRtl, Canvas c, float x, int top, int y, int bottom, FontMetricsInt fmi, boolean needWidth) { float ret = 0; int textStart = mStart + start; int textLimit = mStart + limit; if (needWidth (c != null && runIsRtl)) { int previousTo... | /**
* Utility function for measuring and rendering a replacement.
*
*
* @param replacement the replacement
* @param wp the work paint
* @param start the start of the run
* @param limit the limit of the run
* @param runIsRtl true if the run is right-to-left
* @param c the can... | Utility function for measuring and rendering a replacement | handleReplacement | {
"repo_name": "OmniEvo/android_frameworks_base",
"path": "core/java/android/text/TextLine.java",
"license": "gpl-3.0",
"size": 40813
} | [
"android.graphics.Canvas",
"android.graphics.Paint",
"android.text.style.ReplacementSpan"
] | import android.graphics.Canvas; import android.graphics.Paint; import android.text.style.ReplacementSpan; | import android.graphics.*; import android.text.style.*; | [
"android.graphics",
"android.text"
] | android.graphics; android.text; | 2,331,919 |
public Builder addMarkers(Set<Marker> markers)
{
addMarkers.addAll(markers);
return this;
} | Builder function(Set<Marker> markers) { addMarkers.addAll(markers); return this; } | /**
* Add markers to the message
* @param markers
* @return
*/ | Add markers to the message | addMarkers | {
"repo_name": "elasticinbox/elasticinbox",
"path": "modules/core/src/main/java/com/elasticinbox/core/MessageModification.java",
"license": "bsd-3-clause",
"size": 3906
} | [
"com.elasticinbox.core.model.Marker",
"java.util.Set"
] | import com.elasticinbox.core.model.Marker; import java.util.Set; | import com.elasticinbox.core.model.*; import java.util.*; | [
"com.elasticinbox.core",
"java.util"
] | com.elasticinbox.core; java.util; | 2,573,711 |
public void deleteFile() throws IOException {
close();
if(file.exists()) {
final boolean deleteResult = file.delete();
if(! deleteResult) {
throw new IOException("Unable to delete: " + file);
}
}
} | void function() throws IOException { close(); if(file.exists()) { final boolean deleteResult = file.delete(); if(! deleteResult) { throw new IOException(STR + file); } } } | /**
* Delete the base file
* @throws IOException
*/ | Delete the base file | deleteFile | {
"repo_name": "jnidzwetzki/bboxdb",
"path": "bboxdb-server/src/main/java/org/bboxdb/storage/wal/WriteAheadLogWriter.java",
"license": "apache-2.0",
"size": 2586
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,212,330 |
public int getFlattrQueueSize() {
int res = 0;
Cursor c = db.rawQuery(String.format("SELECT count(*) FROM %s WHERE %s=%s",
TABLE_NAME_FEEDS, KEY_FLATTR_STATUS, String.valueOf(FlattrStatus.STATUS_QUEUE)), null);
if (c.moveToFirst()) {
res = c.getInt(0);
... | int function() { int res = 0; Cursor c = db.rawQuery(String.format(STR, TABLE_NAME_FEEDS, KEY_FLATTR_STATUS, String.valueOf(FlattrStatus.STATUS_QUEUE)), null); if (c.moveToFirst()) { res = c.getInt(0); c.close(); } else { Log.e(TAG, STR); } c = db.rawQuery(String.format(STR, TABLE_NAME_FEED_ITEMS, KEY_FLATTR_STATUS, St... | /**
* Counts feeds and feed items in the flattr queue
*/ | Counts feeds and feed items in the flattr queue | getFlattrQueueSize | {
"repo_name": "domingos86/AntennaPod",
"path": "core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java",
"license": "mit",
"size": 89050
} | [
"android.database.Cursor",
"android.util.Log",
"de.danoeh.antennapod.core.util.flattr.FlattrStatus"
] | import android.database.Cursor; import android.util.Log; import de.danoeh.antennapod.core.util.flattr.FlattrStatus; | import android.database.*; import android.util.*; import de.danoeh.antennapod.core.util.flattr.*; | [
"android.database",
"android.util",
"de.danoeh.antennapod"
] | android.database; android.util; de.danoeh.antennapod; | 623,637 |
@Test
public void testAsyncErrorRethrownOnInvoke() throws Throwable {
final DummyFlinkKafkaProducer<String> producer = new DummyFlinkKafkaProducer<>(
FakeStandardProducerConfig.get(), new KeyedSerializationSchemaWrapper<>(new SimpleStringSchema()), null);
OneInputStreamOperatorTestHarness<String, Object> te... | void function() throws Throwable { final DummyFlinkKafkaProducer<String> producer = new DummyFlinkKafkaProducer<>( FakeStandardProducerConfig.get(), new KeyedSerializationSchemaWrapper<>(new SimpleStringSchema()), null); OneInputStreamOperatorTestHarness<String, Object> testHarness = new OneInputStreamOperatorTestHarne... | /**
* Test ensuring that if an invoke call happens right after an async exception is caught, it should be rethrown.
*/ | Test ensuring that if an invoke call happens right after an async exception is caught, it should be rethrown | testAsyncErrorRethrownOnInvoke | {
"repo_name": "greghogan/flink",
"path": "flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducerBaseTest.java",
"license": "apache-2.0",
"size": 16898
} | [
"org.apache.flink.api.common.serialization.SimpleStringSchema",
"org.apache.flink.streaming.api.operators.StreamSink",
"org.apache.flink.streaming.connectors.kafka.internals.KeyedSerializationSchemaWrapper",
"org.apache.flink.streaming.connectors.kafka.testutils.FakeStandardProducerConfig",
"org.apache.flin... | import org.apache.flink.api.common.serialization.SimpleStringSchema; import org.apache.flink.streaming.api.operators.StreamSink; import org.apache.flink.streaming.connectors.kafka.internals.KeyedSerializationSchemaWrapper; import org.apache.flink.streaming.connectors.kafka.testutils.FakeStandardProducerConfig; import o... | import org.apache.flink.api.common.serialization.*; import org.apache.flink.streaming.api.operators.*; import org.apache.flink.streaming.connectors.kafka.internals.*; import org.apache.flink.streaming.connectors.kafka.testutils.*; import org.apache.flink.streaming.runtime.streamrecord.*; import org.apache.flink.streami... | [
"org.apache.flink",
"org.junit"
] | org.apache.flink; org.junit; | 2,624,298 |
List<T> findByNamedQuery(String queryName, Map<String, Object> queryParams); | List<T> findByNamedQuery(String queryName, Map<String, Object> queryParams); | /**
* Find a list of records by using a named query
* @param queryName query name of the named query
* @param queryParams a map of the query names and the values
* @return a list of the records found
*/ | Find a list of records by using a named query | findByNamedQuery | {
"repo_name": "yyitsz/myjavastudio",
"path": "studyappfuse2/core/src/main/java/org/yy/dao/GenericDao.java",
"license": "apache-2.0",
"size": 2229
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,636,807 |
public void setFacing(Facing facing) {
if( !facing.equals(Facing.NONE)) {
this.facing = facing;
}
}
| void function(Facing facing) { if( !facing.equals(Facing.NONE)) { this.facing = facing; } } | /** Change component's orientation
* @param facing LEFT or RIGHT */ | Change component's orientation | setFacing | {
"repo_name": "studiokeywi/the-island",
"path": "core/src/dev/studiokeywi/theisland/components/PositionComponent.java",
"license": "apache-2.0",
"size": 2781
} | [
"dev.studiokeywi.theisland.locations.Room"
] | import dev.studiokeywi.theisland.locations.Room; | import dev.studiokeywi.theisland.locations.*; | [
"dev.studiokeywi.theisland"
] | dev.studiokeywi.theisland; | 2,473,264 |
public void setFeature(String featureId, boolean state)
throws XMLConfigurationException {
super.setFeature(featureId, state);
// Xerces properties
if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
final int suffixLength = featureId.length() - Constants.XERCES_FE... | void function(String featureId, boolean state) throws XMLConfigurationException { super.setFeature(featureId, state); if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) { final int suffixLength = featureId.length() - Constants.XERCES_FEATURE_PREFIX.length(); if (suffixLength == Constants.LOAD_EXTERNAL_DTD_FEATU... | /**
* Sets the state of a feature. This method is called by the component
* manager any time after reset when a feature changes state.
* <p>
* <strong>Note:</strong> Components should silently ignore features
* that do not affect the operation of the component.
*
* @param featureId Th... | Sets the state of a feature. This method is called by the component manager any time after reset when a feature changes state. Note: Components should silently ignore features that do not affect the operation of the component | setFeature | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java",
"license": "apache-2.0",
"size": 59160
} | [
"com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException"
] | import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException; | import com.sun.org.apache.xerces.internal.xni.parser.*; | [
"com.sun.org"
] | com.sun.org; | 269,399 |
public Job getParentJob() {
return parentJob;
} | Job function() { return parentJob; } | /**
* Gets the parent job.
*
* @return the parent job
*/ | Gets the parent job | getParentJob | {
"repo_name": "lgrill-pentaho/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/job/entry/JobEntryBase.java",
"license": "apache-2.0",
"size": 44649
} | [
"org.pentaho.di.job.Job"
] | import org.pentaho.di.job.Job; | import org.pentaho.di.job.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,494,226 |
public final boolean isOrEnclosedByPrivateType() {
if (isLocalType()) return true; // catch all local types
ReferenceBinding type = this;
while (type != null) {
if ((type.modifiers & ClassFileConstants.AccPrivate) != 0)
return true;
type = type.enclosingType();
}
return false;
} | final boolean function() { if (isLocalType()) return true; ReferenceBinding type = this; while (type != null) { if ((type.modifiers & ClassFileConstants.AccPrivate) != 0) return true; type = type.enclosingType(); } return false; } | /**
* Answer true if the receiver or any of its enclosing types have private visibility
*/ | Answer true if the receiver or any of its enclosing types have private visibility | isOrEnclosedByPrivateType | {
"repo_name": "trylimits/Eclipse-Postfix-Code-Completion",
"path": "luna/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java",
"license": "epl-1.0",
"size": 77009
} | [
"org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants"
] | import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; | import org.eclipse.jdt.internal.compiler.classfmt.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 25,653 |
public void testAddInheritedMixin() throws RepositoryException {
Session session = testRootNode.getSession();
Node node = testRootNode.addNode(nodeName1, testNodeType);
session.save();
NodeType nt = node.getPrimaryNodeType();
NodeType[] superTypes = nt.getSupertypes();
... | void function() throws RepositoryException { Session session = testRootNode.getSession(); Node node = testRootNode.addNode(nodeName1, testNodeType); session.save(); NodeType nt = node.getPrimaryNodeType(); NodeType[] superTypes = nt.getSupertypes(); for (int i = 0; i < superTypes.length; i++) { if (superTypes[i].isMixi... | /**
* Test if an inherited mixin could be added.
*
* @throws RepositoryException
* @since JCR 2.0
*/ | Test if an inherited mixin could be added | testAddInheritedMixin | {
"repo_name": "sdmcraft/jackrabbit",
"path": "jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/NodeCanAddMixinTest.java",
"license": "apache-2.0",
"size": 6809
} | [
"javax.jcr.Node",
"javax.jcr.RepositoryException",
"javax.jcr.Session",
"javax.jcr.nodetype.NodeType"
] | import javax.jcr.Node; import javax.jcr.RepositoryException; import javax.jcr.Session; import javax.jcr.nodetype.NodeType; | import javax.jcr.*; import javax.jcr.nodetype.*; | [
"javax.jcr"
] | javax.jcr; | 68,794 |
private void download(final String source, final String target, JSONArray args, CallbackContext callbackContext) throws JSONException {
Log.d(LOG_TAG, "download " + source + " to " + target);
final CordovaResourceApi resourceApi = webView.getResourceApi();
final boolean trustEveryone = ar... | void function(final String source, final String target, JSONArray args, CallbackContext callbackContext) throws JSONException { Log.d(LOG_TAG, STR + source + STR + target); final CordovaResourceApi resourceApi = webView.getResourceApi(); final boolean trustEveryone = args.optBoolean(2); final String objectId = args.get... | /**
* Downloads a file form a given URL and saves it to the specified directory.
*
* @param source URL of the server to receive the file
* @param target Full path of the file on the file system
*/ | Downloads a file form a given URL and saves it to the specified directory | download | {
"repo_name": "tonyjames3212/yuexiangappwww",
"path": "www/plugins/cordova-plugin-file-transfer/src/android/FileTransfer.java",
"license": "unlicense",
"size": 46616
} | [
"android.net.Uri",
"android.util.Log",
"java.io.File",
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.Method",
"org.apache.cordova.CallbackContext",
"org.apache.cordova.CordovaResourceApi",
"org.apache.cordova.PluginManager",
"org.apache.cordova.PluginResult",
"org.apache.cordov... | import android.net.Uri; import android.util.Log; import java.io.File; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import org.apache.cordova.CallbackContext; import org.apache.cordova.CordovaResourceApi; import org.apache.cordova.PluginManager; import org.apache.cordova.PluginRes... | import android.net.*; import android.util.*; import java.io.*; import java.lang.reflect.*; import org.apache.cordova.*; import org.json.*; | [
"android.net",
"android.util",
"java.io",
"java.lang",
"org.apache.cordova",
"org.json"
] | android.net; android.util; java.io; java.lang; org.apache.cordova; org.json; | 2,436,081 |
private static boolean isMailboxRow(Cursor cursor) {
return !(isAccountRow(cursor) || isHeaderRow(cursor));
} | static boolean function(Cursor cursor) { return !(isAccountRow(cursor) isHeaderRow(cursor)); } | /**
* Returns {@code true} if the current row is a mailbox.
* ({@link #ROW_TYPE_MAILBOX}, {@link #ROW_TYPE_CURMAILBOX} and {@link #ROW_TYPE_SUBMAILBOX})
*/ | Returns true if the current row is a mailbox. (<code>#ROW_TYPE_MAILBOX</code>, <code>#ROW_TYPE_CURMAILBOX</code> and <code>#ROW_TYPE_SUBMAILBOX</code>) | isMailboxRow | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "packages/apps/Email/src/com/android/email/activity/MailboxFragmentAdapter.java",
"license": "gpl-2.0",
"size": 32513
} | [
"android.database.Cursor"
] | import android.database.Cursor; | import android.database.*; | [
"android.database"
] | android.database; | 1,186,588 |
public HttpsRedirect httpsRedirect() {
return this.httpsRedirect;
} | HttpsRedirect function() { return this.httpsRedirect; } | /**
* Get the httpsRedirect property: Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this
* is a easy way to set up this rule and it will be the first rule that gets executed.
*
* @return the httpsRedirect value.
*/ | Get the httpsRedirect property: Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed | httpsRedirect | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RouteUpdatePropertiesParameters.java",
"license": "mit",
"size": 12049
} | [
"com.azure.resourcemanager.cdn.models.HttpsRedirect"
] | import com.azure.resourcemanager.cdn.models.HttpsRedirect; | import com.azure.resourcemanager.cdn.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,642,408 |
@Override
public Adapter adapt(Notifier notifier, Object type) {
return super.adapt(notifier, this);
} | Adapter function(Notifier notifier, Object type) { return super.adapt(notifier, this); } | /**
* This implementation substitutes the factory itself as the key for the adapter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This implementation substitutes the factory itself as the key for the adapter. | adapt | {
"repo_name": "vzmaru/spring-batch-design",
"path": "com.vm.tools.sbd.model.edit/src/sbd/provider/SbdItemProviderAdapterFactory.java",
"license": "bsd-3-clause",
"size": 6213
} | [
"org.eclipse.emf.common.notify.Adapter",
"org.eclipse.emf.common.notify.Notifier"
] | import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,474,034 |
LexicalUnit parsePropertyValue(InputSource source) throws CSSException, IOException; | LexicalUnit parsePropertyValue(InputSource source) throws CSSException, IOException; | /**
* Parse a CSS property value.
*
* @param source source to be parsed
* @return a lexical unit
* @exception CSSException Any CSS exception, possibly
* wrapping another exception.
* @exception java.io.IOException An IO exception from the parser,
* possibly ... | Parse a CSS property value | parsePropertyValue | {
"repo_name": "oswetto/LoboEvolution",
"path": "LoboParser/src/main/java/com/gargoylesoftware/css/parser/CSSParser.java",
"license": "gpl-3.0",
"size": 7228
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,203,056 |
public Set<DisruptorProducer> getProducers() {
return Collections.unmodifiableSet(producers);
} | Set<DisruptorProducer> function() { return Collections.unmodifiableSet(producers); } | /**
* Returns the current active producers on this endpoint
*/ | Returns the current active producers on this endpoint | getProducers | {
"repo_name": "curso007/camel",
"path": "components/camel-disruptor/src/main/java/org/apache/camel/component/disruptor/DisruptorEndpoint.java",
"license": "apache-2.0",
"size": 14235
} | [
"java.util.Collections",
"java.util.Set"
] | import java.util.Collections; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,907,818 |
private static void runFetchImage(DFSAdmin dfsAdmin, MiniDFSCluster cluster)
throws Exception {
int retVal = dfsAdmin.run(new String[]{"-fetchImage",
FETCHED_IMAGE_FILE.getPath() });
assertEquals(0, retVal);
File highestImageOnNn = getHighestFsImageOnCluster(cluster);
MD5Hash e... | static void function(DFSAdmin dfsAdmin, MiniDFSCluster cluster) throws Exception { int retVal = dfsAdmin.run(new String[]{STR, FETCHED_IMAGE_FILE.getPath() }); assertEquals(0, retVal); File highestImageOnNn = getHighestFsImageOnCluster(cluster); MD5Hash expected = MD5FileUtils.computeMd5ForFile(highestImageOnNn); MD5Ha... | /**
* Run `hdfs dfsadmin -fetchImage ...' and verify that the downloaded image is
* correct.
*/ | Run `hdfs dfsadmin -fetchImage ...' and verify that the downloaded image is correct | runFetchImage | {
"repo_name": "ict-carch/hadoop-plus",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFetchImage.java",
"license": "apache-2.0",
"size": 4041
} | [
"java.io.File",
"org.apache.hadoop.hdfs.tools.DFSAdmin",
"org.apache.hadoop.hdfs.util.MD5FileUtils",
"org.apache.hadoop.io.MD5Hash",
"org.junit.Assert"
] | import java.io.File; import org.apache.hadoop.hdfs.tools.DFSAdmin; import org.apache.hadoop.hdfs.util.MD5FileUtils; import org.apache.hadoop.io.MD5Hash; import org.junit.Assert; | import java.io.*; import org.apache.hadoop.hdfs.tools.*; import org.apache.hadoop.hdfs.util.*; import org.apache.hadoop.io.*; import org.junit.*; | [
"java.io",
"org.apache.hadoop",
"org.junit"
] | java.io; org.apache.hadoop; org.junit; | 2,124,735 |
void setFileOverviewJSDocInfo(JSDocInfo fileOverviewJSDocInfo) {
this.fileOverviewJSDocInfo = fileOverviewJSDocInfo;
} | void setFileOverviewJSDocInfo(JSDocInfo fileOverviewJSDocInfo) { this.fileOverviewJSDocInfo = fileOverviewJSDocInfo; } | /**
* Sets the file overview JSDocInfo, in order to warn about multiple uses of
* the @fileoverview tag in a file.
*/ | Sets the file overview JSDocInfo, in order to warn about multiple uses of the @fileoverview tag in a file | setFileOverviewJSDocInfo | {
"repo_name": "mprobst/closure-compiler",
"path": "src/com/google/javascript/jscomp/parsing/JsDocInfoParser.java",
"license": "apache-2.0",
"size": 86678
} | [
"com.google.javascript.rhino.JSDocInfo"
] | import com.google.javascript.rhino.JSDocInfo; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 2,435,537 |
protected static Condition parse(final String expression, final HttpIdentifierConverter converter)
throws InvalidConditionExpressionException {
final Condition condition = Condition.fromExpression(expression);
if (condition.getField().equals(Condition.Field.FEDORA_ID)) {
//co... | static Condition function(final String expression, final HttpIdentifierConverter converter) throws InvalidConditionExpressionException { final Condition condition = Condition.fromExpression(expression); if (condition.getField().equals(Condition.Field.FEDORA_ID)) { final var object = condition.getObject(); final var fie... | /**
* Parses the url decoded value of a single parameter passed by the
* http layer into a {@link Condition}.
*
* @param expression The url decoded value of the condition parameter.
* @return the parsed {@link Condition} object.
*/ | Parses the url decoded value of a single parameter passed by the http layer into a <code>Condition</code> | parse | {
"repo_name": "whikloj/fcrepo4",
"path": "fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraSearch.java",
"license": "apache-2.0",
"size": 7826
} | [
"org.fcrepo.http.commons.api.rdf.HttpIdentifierConverter",
"org.fcrepo.search.api.Condition",
"org.fcrepo.search.api.InvalidConditionExpressionException"
] | import org.fcrepo.http.commons.api.rdf.HttpIdentifierConverter; import org.fcrepo.search.api.Condition; import org.fcrepo.search.api.InvalidConditionExpressionException; | import org.fcrepo.http.commons.api.rdf.*; import org.fcrepo.search.api.*; | [
"org.fcrepo.http",
"org.fcrepo.search"
] | org.fcrepo.http; org.fcrepo.search; | 446,814 |
public static String getFilteredTrace(Throwable t) {
StringWriter stringWriter= new StringWriter();
PrintWriter writer= new PrintWriter(stringWriter);
t.printStackTrace(writer);
StringBuffer buffer= stringWriter.getBuffer();
String trace= buffer.toString();
return BaseTestRunner.getFilteredTrace(trace);
... | static String function(Throwable t) { StringWriter stringWriter= new StringWriter(); PrintWriter writer= new PrintWriter(stringWriter); t.printStackTrace(writer); StringBuffer buffer= stringWriter.getBuffer(); String trace= buffer.toString(); return BaseTestRunner.getFilteredTrace(trace); } | /**
* Returns a filtered stack trace
*/ | Returns a filtered stack trace | getFilteredTrace | {
"repo_name": "mashuai/Open-Source-Research",
"path": "JUnit/src/junit/runner/BaseTestRunner.java",
"license": "apache-2.0",
"size": 8324
} | [
"java.io.PrintWriter",
"java.io.StringWriter"
] | import java.io.PrintWriter; import java.io.StringWriter; | import java.io.*; | [
"java.io"
] | java.io; | 2,486,523 |
public void setPosition(int position) {
switch (position) {
case Simapi.POS_DOWN_LEFT:
case Simapi.POS_DOWN_RIGHT:
case Simapi.POS_STRAIGHT_DOWN:
case Simapi.POS_STRAIGHT_LEFT:
case Simapi.POS_STRAIGHT_RIGHT:
case Simapi.POS_STRAIGHT_U... | void function(int position) { switch (position) { case Simapi.POS_DOWN_LEFT: case Simapi.POS_DOWN_RIGHT: case Simapi.POS_STRAIGHT_DOWN: case Simapi.POS_STRAIGHT_LEFT: case Simapi.POS_STRAIGHT_RIGHT: case Simapi.POS_STRAIGHT_UP: case Simapi.POS_UP_LEFT: case Simapi.POS_UP_RIGHT: m_position = position; break; default: m_... | /**
* Sets the scale position.<p>
*
* @param position the position to set
*/ | Sets the scale position | setPosition | {
"repo_name": "alkacon/opencms-core",
"path": "src/org/opencms/loader/CmsImageScaler.java",
"license": "lgpl-2.1",
"size": 65718
} | [
"com.alkacon.simapi.Simapi"
] | import com.alkacon.simapi.Simapi; | import com.alkacon.simapi.*; | [
"com.alkacon.simapi"
] | com.alkacon.simapi; | 2,834,115 |
public int indexOf(AnyObjectId id) {
if (size > 0) {
int dirIdx = (id.hashCode() >>> BLOCK_BITS) % hashTable.length;
Commit[] block = hashTable[dirIdx];
int blkIdx = id.hashCode() & BLOCK_MASK;
while (block[blkIdx] != null) {
if (ObjectId.equal... | int function(AnyObjectId id) { if (size > 0) { int dirIdx = (id.hashCode() >>> BLOCK_BITS) % hashTable.length; Commit[] block = hashTable[dirIdx]; int blkIdx = id.hashCode() & BLOCK_MASK; while (block[blkIdx] != null) { if (ObjectId.equals(block[blkIdx], id)) { return block[blkIdx].getIndex(); } blkIdx = ++blkIdx & BLO... | /**
* Get index of a commit by the specified id.
*
* @param id A commit id.
* @return The commit index in this list,
* or -1 if id is not found in this list.
*/ | Get index of a commit by the specified id | indexOf | {
"repo_name": "aradzie/git-roadmap",
"path": "src/main/java/roadmap/graph/CommitList.java",
"license": "gpl-2.0",
"size": 27881
} | [
"org.eclipse.jgit.lib.AnyObjectId",
"org.eclipse.jgit.lib.ObjectId"
] | import org.eclipse.jgit.lib.AnyObjectId; import org.eclipse.jgit.lib.ObjectId; | import org.eclipse.jgit.lib.*; | [
"org.eclipse.jgit"
] | org.eclipse.jgit; | 2,477,834 |
private void butUpdateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butUpdateActionPerformed
this.updateEmployee();
JOptionPane.showMessageDialog(this, "Updated record!", "Update record",
JOptionPane.INFORMATION_MESSAGE);
}//GEN-LAST:event_butUpdateActionPerf... | void function(java.awt.event.ActionEvent evt) { this.updateEmployee(); JOptionPane.showMessageDialog(this, STR, STR, JOptionPane.INFORMATION_MESSAGE); } | /**
* Update employee record
* @param evt Event
*/ | Update employee record | butUpdateActionPerformed | {
"repo_name": "jfmendozam/BillApp",
"path": "BillApp/src/billapp/view/FraEmployee.java",
"license": "apache-2.0",
"size": 38363
} | [
"javax.swing.JOptionPane"
] | import javax.swing.JOptionPane; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 327,193 |
@Test
public void ruleExtraActionsDontHideAspectExtraActions() throws Exception {
useConfiguration("--experimental_action_listener=//pkg:listener");
scratch.file(
"x/BUILD",
"load(':extension.bzl', 'injecting_rule', 'action_rule')",
"injecting_rule(name='a', deps=[':b'])",
"... | void function() throws Exception { useConfiguration(STRx/BUILDSTRload(':extension.bzl', 'injecting_rule', 'action_rule')STRinjecting_rule(name='a', deps=[':b'])STRaction_rule(name='b')STRx/extension.bzlSTRdef _aspect1_impl(target, ctx):STR ctx.actions.do_nothing(mnemonic='Mnemonic')STR return []STRaspect1 = aspect(_asp... | /**
* Here, injecting_rule injects an aspect which acts on a action_rule() and registers an action.
* The action_rule() registers another action of its own.
*
* <p>This test asserts that both actions are reported.
*/ | Here, injecting_rule injects an aspect which acts on a action_rule() and registers an action. The action_rule() registers another action of its own. This test asserts that both actions are reported | ruleExtraActionsDontHideAspectExtraActions | {
"repo_name": "akira-baruah/bazel",
"path": "src/test/java/com/google/devtools/build/lib/analysis/BuildViewTest.java",
"license": "apache-2.0",
"size": 58801
} | [
"com.google.common.truth.Truth",
"com.google.devtools.build.lib.actions.Artifact",
"java.util.ArrayList",
"java.util.List"
] | import com.google.common.truth.Truth; import com.google.devtools.build.lib.actions.Artifact; import java.util.ArrayList; import java.util.List; | import com.google.common.truth.*; import com.google.devtools.build.lib.actions.*; import java.util.*; | [
"com.google.common",
"com.google.devtools",
"java.util"
] | com.google.common; com.google.devtools; java.util; | 2,163,345 |
public void setActivateOnItemClick(boolean activateOnItemClick) {
// When setting CHOICE_MODE_SINGLE, ListView will automatically
// give items the 'activated' state when touched.
getListView().setChoiceMode(
activateOnItemClick ? ListView.CHOICE_MODE_SINGLE
: ListView.CHOICE_MODE_NONE);
}
| void function(boolean activateOnItemClick) { getListView().setChoiceMode( activateOnItemClick ? ListView.CHOICE_MODE_SINGLE : ListView.CHOICE_MODE_NONE); } | /**
* Turns on activate-on-click mode. When this mode is on, list items will be
* given the 'activated' state when touched.
*/ | Turns on activate-on-click mode. When this mode is on, list items will be given the 'activated' state when touched | setActivateOnItemClick | {
"repo_name": "flugblatt/options",
"path": "src/com/example/options/offers/OfferListFragment.java",
"license": "gpl-2.0",
"size": 4655
} | [
"android.widget.ListView"
] | import android.widget.ListView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 1,771,652 |
public static final List<HibernateNotBlankTestBean> getWrongtoSmallTestBeans() {
final List<HibernateNotBlankTestBean> wrongCases = new ArrayList<HibernateNotBlankTestBean>();
wrongCases.add(new HibernateNotBlankTestBean(null));
wrongCases.add(new HibernateNotBlankTestBean(""));
wrongCases.add(new Hib... | static final List<HibernateNotBlankTestBean> function() { final List<HibernateNotBlankTestBean> wrongCases = new ArrayList<HibernateNotBlankTestBean>(); wrongCases.add(new HibernateNotBlankTestBean(null)); wrongCases.add(new HibernateNotBlankTestBean(STR STR\tSTR\n")); return wrongCases; } | /**
* get wrong test beans.
*
* @return wrong test beans
*/ | get wrong test beans | getWrongtoSmallTestBeans | {
"repo_name": "ManfredTremmel/gwt-bean-validators",
"path": "gwt-bean-validators/src/test/java/de/knightsoftnet/validators/shared/testcases/HibernateNotBlankTestCases.java",
"license": "apache-2.0",
"size": 2216
} | [
"de.knightsoftnet.validators.shared.beans.HibernateNotBlankTestBean",
"java.util.ArrayList",
"java.util.List"
] | import de.knightsoftnet.validators.shared.beans.HibernateNotBlankTestBean; import java.util.ArrayList; import java.util.List; | import de.knightsoftnet.validators.shared.beans.*; import java.util.*; | [
"de.knightsoftnet.validators",
"java.util"
] | de.knightsoftnet.validators; java.util; | 2,820,517 |
public CsvReader readCsvFile(String filePath) {
return new CsvReader(filePath, this);
}
// ------------------------------------ File Input Format ----------------------------------------- | CsvReader function(String filePath) { return new CsvReader(filePath, this); } | /**
* Creates a CSV reader to read a comma separated value (CSV) file. The reader has options to
* define parameters and field types and will eventually produce the DataSet that corresponds to
* the read and parsed CSV input.
*
* @param filePath The path of the CSV file.
* @return A CsvReader that can be us... | Creates a CSV reader to read a comma separated value (CSV) file. The reader has options to define parameters and field types and will eventually produce the DataSet that corresponds to the read and parsed CSV input | readCsvFile | {
"repo_name": "bowenli86/flink",
"path": "flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java",
"license": "apache-2.0",
"size": 60087
} | [
"org.apache.flink.api.java.io.CsvReader"
] | import org.apache.flink.api.java.io.CsvReader; | import org.apache.flink.api.java.io.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,116,155 |
@Auditable(parameters = {"sourceNodeRef", "targetParentRef", "newName"})
public FileInfo copy(NodeRef sourceNodeRef, NodeRef targetParentRef, String newName)
throws FileExistsException, FileNotFoundException;
/**
* Create a file or folder; or any valid node of type derived from file o... | @Auditable(parameters = {STR, STR, STR}) FileInfo function(NodeRef sourceNodeRef, NodeRef targetParentRef, String newName) throws FileExistsException, FileNotFoundException; /** * Create a file or folder; or any valid node of type derived from file or folder. * <p> * The association QName for the patch defaults to <b>c... | /**
* Copy a source file or folder. The source can be optionally renamed and optionally moved into another folder.
* <p>
* If both the parent folder and name remain the same, then nothing is done.
*
* @param sourceNodeRef the file or folder to copy
* @param targetParentRef the new p... | Copy a source file or folder. The source can be optionally renamed and optionally moved into another folder. If both the parent folder and name remain the same, then nothing is done | copy | {
"repo_name": "daniel-he/community-edition",
"path": "projects/repository/source/java/org/alfresco/service/cmr/model/FileFolderService.java",
"license": "lgpl-3.0",
"size": 21841
} | [
"org.alfresco.service.Auditable",
"org.alfresco.service.cmr.repository.NodeRef",
"org.alfresco.service.namespace.QName"
] | import org.alfresco.service.Auditable; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; | import org.alfresco.service.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 838,651 |
public static Path getBenchmarkRoot() {
String value = System.getProperty(ROOT_PROPERTY_NAME);
return value == null ? null : new Path(value);
} | static Path function() { String value = System.getProperty(ROOT_PROPERTY_NAME); return value == null ? null : new Path(value); } | /**
* Get the benchmark data root in the child jvm.
* @return the path to the benchmark data or null if it wasn't found
*/ | Get the benchmark data root in the child jvm | getBenchmarkRoot | {
"repo_name": "omalley/orc",
"path": "java/bench/core/src/java/org/apache/orc/bench/core/Utilities.java",
"license": "apache-2.0",
"size": 4344
} | [
"org.apache.hadoop.fs.Path"
] | import org.apache.hadoop.fs.Path; | import org.apache.hadoop.fs.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 992,405 |
private boolean lockLiveAndCheckLiveState() throws ActiveMQLockAcquisitionTimeoutException, InterruptedException {
try {
lock(this.scheduledLiveLock.lock());
//check if the state is live
while (true) {
try {
final SharedStateManager.State stateWhileLocked =... | boolean function() throws ActiveMQLockAcquisitionTimeoutException, InterruptedException { try { lock(this.scheduledLiveLock.lock()); while (true) { try { final SharedStateManager.State stateWhileLocked = readSharedState(); final long localExpirationTime = this.scheduledLiveLock.lock().localExpirationTime(); if (System.... | /**
* Lock live node and check for a live state, taking care to renew it (if needed) or releasing it otherwise
*/ | Lock live node and check for a live state, taking care to renew it (if needed) or releasing it otherwise | lockLiveAndCheckLiveState | {
"repo_name": "kjniemi/activemq-artemis",
"path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/jdbc/JdbcNodeManager.java",
"license": "apache-2.0",
"size": 24124
} | [
"org.apache.activemq.artemis.core.server.ActiveMQLockAcquisitionTimeoutException"
] | import org.apache.activemq.artemis.core.server.ActiveMQLockAcquisitionTimeoutException; | import org.apache.activemq.artemis.core.server.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 2,065,757 |
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } | /**
* Handles the HTTP <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Handles the HTTP <code>GET</code> method | doGet | {
"repo_name": "jbblois/Sucradom",
"path": "SucradomWEB/src/java/sucradom/controle/Connexion.java",
"license": "apache-2.0",
"size": 5045
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 2,444,371 |
public static JSONObject getObjectObject(JSONObject object, String key,
JSONObject defaultJsonObject) {
Object jsonObject = getObjectValue(object, key, defaultJsonObject);
return ((jsonObject instanceof JSONObject) ? ((JSONObject) jsonObject)
... | static JSONObject function(JSONObject object, String key, JSONObject defaultJsonObject) { Object jsonObject = getObjectValue(object, key, defaultJsonObject); return ((jsonObject instanceof JSONObject) ? ((JSONObject) jsonObject) : (defaultJsonObject)); } | /**
* Returns JSONObject with given key from JSONObject. Default value will be
* returned in case of failure or null JSONObject input.
*
* @param object
* JSONObject instance holding data.
* @param key
* JSONObject key for value.
* @param defaultJsonObject
... | Returns JSONObject with given key from JSONObject. Default value will be returned in case of failure or null JSONObject input | getObjectObject | {
"repo_name": "gokhanbarisaker/JSONUtilities",
"path": "lib/src/main/java/com/gokhanbarisaker/utilities/JSONUtilities.java",
"license": "apache-2.0",
"size": 13924
} | [
"org.json.JSONObject"
] | import org.json.JSONObject; | import org.json.*; | [
"org.json"
] | org.json; | 1,369,806 |
@SuppressWarnings("unchecked")
public <E extends Enum<E>> void setImmediateAction(
RelationType<E> rParam,
E... rAllowedValues)
{
setInteractive(rParam, null, ListStyle.IMMEDIATE, rAllowedValues);
} | @SuppressWarnings(STR) <E extends Enum<E>> void function( RelationType<E> rParam, E... rAllowedValues) { setInteractive(rParam, null, ListStyle.IMMEDIATE, rAllowedValues); } | /***************************************
* Shortcut method to initialize an enum parameter for an immediate action.
* The enum will be displayed as buttons with {@link ListStyle#IMMEDIATE}.
*
* @param rParam The enum action parameter
* @param rAllowedValues The allowed values
*
* @see #setIntera... | Shortcut method to initialize an enum parameter for an immediate action. The enum will be displayed as buttons with <code>ListStyle#IMMEDIATE</code> | setImmediateAction | {
"repo_name": "esoco/esoco-business",
"path": "src/main/java/de/esoco/process/ProcessFragment.java",
"license": "apache-2.0",
"size": 95053
} | [
"de.esoco.lib.property.ListStyle",
"org.obrel.core.RelationType"
] | import de.esoco.lib.property.ListStyle; import org.obrel.core.RelationType; | import de.esoco.lib.property.*; import org.obrel.core.*; | [
"de.esoco.lib",
"org.obrel.core"
] | de.esoco.lib; org.obrel.core; | 848,402 |
@NotNull NodeFormatter create(@NotNull DataHolder options); | @NotNull NodeFormatter create(@NotNull DataHolder options); | /**
* Create a new node renderer for the specified rendering context.
*
* @param options the context for rendering (normally passed on to the node renderer)
* @return a node renderer
*/ | Create a new node renderer for the specified rendering context | create | {
"repo_name": "vsch/commonmark-java",
"path": "flexmark/src/main/java/com/vladsch/flexmark/formatter/NodeFormatterFactory.java",
"license": "bsd-2-clause",
"size": 1508
} | [
"com.vladsch.flexmark.util.data.DataHolder",
"org.jetbrains.annotations.NotNull"
] | import com.vladsch.flexmark.util.data.DataHolder; import org.jetbrains.annotations.NotNull; | import com.vladsch.flexmark.util.data.*; import org.jetbrains.annotations.*; | [
"com.vladsch.flexmark",
"org.jetbrains.annotations"
] | com.vladsch.flexmark; org.jetbrains.annotations; | 1,861,278 |
public int getInt(INotifiableManager manager, String method) {
return getInt(manager, method, "");
}
| int function(INotifiableManager manager, String method) { return getInt(manager, method, ""); } | /**
* Executes an HTTP API method without parameter and returns the result as
* integer.
* @param method Name of the method to run
* @return Result
*/ | Executes an HTTP API method without parameter and returns the result as integer | getInt | {
"repo_name": "murat8505/android-xbmcremote-1",
"path": "src/org/xbmc/httpapi/Connection.java",
"license": "gpl-2.0",
"size": 16849
} | [
"org.xbmc.api.business.INotifiableManager"
] | import org.xbmc.api.business.INotifiableManager; | import org.xbmc.api.business.*; | [
"org.xbmc.api"
] | org.xbmc.api; | 2,680,866 |
protected int getNavigationLeftKey() {
return KeyCodes.KEY_LEFT;
} | int function() { return KeyCodes.KEY_LEFT; } | /**
* Get the key that scrolls to the left in the table. By default it is the
* left arrow key but by overriding this you can change the key to whatever
* you want.
*
* @return The keycode of the key
*/ | Get the key that scrolls to the left in the table. By default it is the left arrow key but by overriding this you can change the key to whatever you want | getNavigationLeftKey | {
"repo_name": "Softhouse/orchid",
"path": "se.softhouse.garden.orchid.vaadin/addon/src/main/java/se/softhouse/garden/orchid/vaadin/widgetset/client/ui/VOrchidScrollTable.java",
"license": "mit",
"size": 221302
} | [
"com.google.gwt.event.dom.client.KeyCodes"
] | import com.google.gwt.event.dom.client.KeyCodes; | import com.google.gwt.event.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,282,020 |
EList<AddColumnType> getAddColumn();
| EList<AddColumnType> getAddColumn(); | /**
* Returns the value of the '<em><b>Add Column</b></em>' containment reference list.
* The list contents are of type {@link org.liquibase.xml.ns.dbchangelog.AddColumnType}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Add Column</em>' containment reference list.
... | Returns the value of the 'Add Column' containment reference list. The list contents are of type <code>org.liquibase.xml.ns.dbchangelog.AddColumnType</code>. | getAddColumn | {
"repo_name": "Treehopper/EclipseAugments",
"path": "liquibase-editor/eu.hohenegger.xsd.liquibase/src-gen/org/liquibase/xml/ns/dbchangelog/ChangeSetType.java",
"license": "epl-1.0",
"size": 63387
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,719,641 |
@NotNull
S readSkip(long bytesToSkip)
throws BufferUnderflowException, IllegalStateException; | S readSkip(long bytesToSkip) throws BufferUnderflowException, IllegalStateException; | /**
* Skip a number of bytes by moving the readPosition. Must be less than or equal to the readLimit.
*
* @param bytesToSkip bytes to skip.
* @return this
* @throws BufferUnderflowException if the offset is outside the limits of the Bytes
*/ | Skip a number of bytes by moving the readPosition. Must be less than or equal to the readLimit | readSkip | {
"repo_name": "OpenHFT/Chronicle-Bytes",
"path": "src/main/java/net/openhft/chronicle/bytes/StreamingDataInput.java",
"license": "apache-2.0",
"size": 19214
} | [
"java.nio.BufferUnderflowException"
] | import java.nio.BufferUnderflowException; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,790,920 |
ExtendedQueryRequest queryRequest = new ExtendedQueryRequest();
queryRequest.setService(info.newService());
queryRequest.setCredentials(info.newCredentials());
queryRequest.setBBox(criteria!=null? criteria.getBBox(): null);
queryRequest.setSpatialOperator(criteria!=null? convertBBoxOptions(criteria.... | ExtendedQueryRequest queryRequest = new ExtendedQueryRequest(); queryRequest.setService(info.newService()); queryRequest.setCredentials(info.newCredentials()); queryRequest.setBBox(criteria!=null? criteria.getBBox(): null); queryRequest.setSpatialOperator(criteria!=null? convertBBoxOptions(criteria.getBBoxOption()): nu... | /**
* Gets query request based on the criteria.
* @param criteria criteria
* @return query request
*/ | Gets query request based on the criteria | getQueryRequest | {
"repo_name": "usgin/usgin-geoportal",
"path": "src/com/esri/gpt/control/webharvest/client/arcims/ArcImsProxy.java",
"license": "apache-2.0",
"size": 6441
} | [
"com.esri.gpt.catalog.arcims.ExtendedQueryRequest"
] | import com.esri.gpt.catalog.arcims.ExtendedQueryRequest; | import com.esri.gpt.catalog.arcims.*; | [
"com.esri.gpt"
] | com.esri.gpt; | 2,492,620 |
Set<String> getVariableNames(); | Set<String> getVariableNames(); | /**
* Returns all variable names in this scope.
*
* @return a set that contains the names of all variables in this scope (may be empty but not {@code null})
*/ | Returns all variable names in this scope | getVariableNames | {
"repo_name": "levi-h/aluminumproject",
"path": "core/src/main/java/com/googlecode/aluminumproject/context/Scope.java",
"license": "apache-2.0",
"size": 1974
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 337,556 |
@SuppressWarnings("unchecked")
public static <D> D executeQueryResult(Query query, List<Object> params)
throws Exception {
final StringBuffer queryTrace = new StringBuffer(query.toString());
int index = 1;
if (params != null) {
for (final Object object : params) {
queryTrace.append("Param ").append... | @SuppressWarnings(STR) static <D> D function(Query query, List<Object> params) throws Exception { final StringBuffer queryTrace = new StringBuffer(query.toString()); int index = 1; if (params != null) { for (final Object object : params) { queryTrace.append(STR).append(index).append(STR) .append(object); query.setParam... | /**
* get object from process query with List param values, in jpa params are
* ?1, ?9 etc example select c from entity c where c.columname1 = ?1 and
* c.columname2 = ?2
*
* */ | get object from process query with List param values, in jpa params are ?1, ?9 etc example select c from entity c where c.columname1 = ?1 and c.columname2 = ?2 | executeQueryResult | {
"repo_name": "ramsodev/DitaManagement",
"path": "framework/src/net/ramso/utils/PersistanceManager.java",
"license": "gpl-3.0",
"size": 7983
} | [
"java.util.List",
"javax.persistence.Query"
] | import java.util.List; import javax.persistence.Query; | import java.util.*; import javax.persistence.*; | [
"java.util",
"javax.persistence"
] | java.util; javax.persistence; | 2,831,696 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.