method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
private boolean isValidRememberMeSession(SessionContextCacheKey key, SessionContextCacheEntry cacheEntry) { String contextId = key.getContextId(); if (cacheEntry == null) { return false; } if (!cacheEntry.getContext().isRememberMe()) { return false; ...
boolean function(SessionContextCacheKey key, SessionContextCacheEntry cacheEntry) { String contextId = key.getContextId(); if (cacheEntry == null) { return false; } if (!cacheEntry.getContext().isRememberMe()) { return false; } String tenantDomain = CarbonContext.getThreadLocalCarbonContext().getTenantDomain(); long re...
/** * Check whether the given session context is valid according to remember me session timeout restrictions. * * @param key SessionContextCacheKey * @param cacheEntry SessionContextCacheEntry * @return true if the session context is valid as per remember me session configs; false otherw...
Check whether the given session context is valid according to remember me session timeout restrictions
isValidRememberMeSession
{ "repo_name": "nuwandi-is/identity-framework", "path": "components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/cache/SessionContextCache.java", "license": "apache-2.0", "size": 8132 }
[ "java.util.concurrent.TimeUnit", "org.wso2.carbon.context.CarbonContext", "org.wso2.carbon.identity.application.authentication.framework.util.FrameworkConstants", "org.wso2.carbon.idp.mgt.util.IdPManagementUtil" ]
import java.util.concurrent.TimeUnit; import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.identity.application.authentication.framework.util.FrameworkConstants; import org.wso2.carbon.idp.mgt.util.IdPManagementUtil;
import java.util.concurrent.*; import org.wso2.carbon.context.*; import org.wso2.carbon.identity.application.authentication.framework.util.*; import org.wso2.carbon.idp.mgt.util.*;
[ "java.util", "org.wso2.carbon" ]
java.util; org.wso2.carbon;
2,070,253
Injector getInjector();
Injector getInjector();
/** * Return Guice Injector behind this InjectorWithContext. */
Return Guice Injector behind this InjectorWithContext
getInjector
{ "repo_name": "Sivaramvt/Slice", "path": "slice-core-api/src/main/java/com/cognifide/slice/api/injector/InjectorWithContext.java", "license": "apache-2.0", "size": 2192 }
[ "com.google.inject.Injector" ]
import com.google.inject.Injector;
import com.google.inject.*;
[ "com.google.inject" ]
com.google.inject;
1,529,984
public static synchronized void updateToken(Token token) { IPartitioner p = StorageService.getPartitioner(); ColumnFamily cf = ColumnFamily.create(Table.SYSTEM_TABLE, STATUS_CF); cf.addColumn(new Column(SystemTable.TOKEN, p.getTokenFactory().toByteArray(token), System.currentTimeMillis()...
static synchronized void function(Token token) { IPartitioner p = StorageService.getPartitioner(); ColumnFamily cf = ColumnFamily.create(Table.SYSTEM_TABLE, STATUS_CF); cf.addColumn(new Column(SystemTable.TOKEN, p.getTokenFactory().toByteArray(token), System.currentTimeMillis())); RowMutation rm = new RowMutation(Table...
/** * This method is used to update the System Table with the new token for this node */
This method is used to update the System Table with the new token for this node
updateToken
{ "repo_name": "mklew/mmp", "path": "src/java/org/apache/cassandra/db/SystemTable.java", "license": "apache-2.0", "size": 19732 }
[ "java.io.IOError", "java.io.IOException", "org.apache.cassandra.dht.IPartitioner", "org.apache.cassandra.dht.Token", "org.apache.cassandra.service.StorageService" ]
import java.io.IOError; import java.io.IOException; import org.apache.cassandra.dht.IPartitioner; import org.apache.cassandra.dht.Token; import org.apache.cassandra.service.StorageService;
import java.io.*; import org.apache.cassandra.dht.*; import org.apache.cassandra.service.*;
[ "java.io", "org.apache.cassandra" ]
java.io; org.apache.cassandra;
728,185
private LinkedList<Diff> diff_compute(String text1, String text2, boolean checklines, long deadline) { LinkedList<Diff> diffs = new LinkedList<Diff>(); if (text1.length() == 0) { // Just add some text (speedup). diffs.add(new Diff(Op...
LinkedList<Diff> function(String text1, String text2, boolean checklines, long deadline) { LinkedList<Diff> diffs = new LinkedList<Diff>(); if (text1.length() == 0) { diffs.add(new Diff(Operation.INSERT, text2)); return diffs; } if (text2.length() == 0) { diffs.add(new Diff(Operation.DELETE, text1)); return diffs; } St...
/** * Find the differences between two texts. Assumes that the texts do not * have any common prefix or suffix. * @param text1 Old string to be diffed. * @param text2 New string to be diffed. * @param checklines Speedup flag. If false, then don't run a * line-level diff first to iden...
Find the differences between two texts. Assumes that the texts do not have any common prefix or suffix
diff_compute
{ "repo_name": "sireum/v3-logika-runtime", "path": "library/jvm/src/main/java/org/sireum/DiffMatchPatch.java", "license": "bsd-2-clause", "size": 104219 }
[ "java.lang.String", "java.util.LinkedList" ]
import java.lang.String; import java.util.LinkedList;
import java.lang.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
2,628,218
public IDataNode getImportantData(Plugin plugin) { IDataNode dataNode = _importantNodeCache.get(plugin); if (dataNode != null) return dataNode; dataNode = DataStorage.get(plugin, new DataPath("nucleus.important-messages")); dataNode.load(); _importantNodeCache...
IDataNode function(Plugin plugin) { IDataNode dataNode = _importantNodeCache.get(plugin); if (dataNode != null) return dataNode; dataNode = DataStorage.get(plugin, new DataPath(STR)); dataNode.load(); _importantNodeCache.put(plugin, dataNode); return dataNode; }
/** * Get the data node where important messages are stored * for the specified plugin. */
Get the data node where important messages are stored for the specified plugin
getImportantData
{ "repo_name": "JCThePants/NucleusFramework", "path": "src/com/jcwhatever/nucleus/internal/managed/messenger/InternalMessengerFactory.java", "license": "mit", "size": 7655 }
[ "com.jcwhatever.nucleus.providers.storage.DataStorage", "com.jcwhatever.nucleus.storage.DataPath", "com.jcwhatever.nucleus.storage.IDataNode", "org.bukkit.plugin.Plugin" ]
import com.jcwhatever.nucleus.providers.storage.DataStorage; import com.jcwhatever.nucleus.storage.DataPath; import com.jcwhatever.nucleus.storage.IDataNode; import org.bukkit.plugin.Plugin;
import com.jcwhatever.nucleus.providers.storage.*; import com.jcwhatever.nucleus.storage.*; import org.bukkit.plugin.*;
[ "com.jcwhatever.nucleus", "org.bukkit.plugin" ]
com.jcwhatever.nucleus; org.bukkit.plugin;
1,703,422
public boolean containsAll(Collection<?> coll) { for (Object e : coll) { if (!contains(e)) // Invokes safe contains() above return false; } return true; }
boolean function(Collection<?> coll) { for (Object e : coll) { if (!contains(e)) return false; } return true; }
/** * The next two methods are overridden to protect against an * unscrupulous List whose contains(Object o) method senses when o * is a Map.Entry, and calls o.setValue. */
The next two methods are overridden to protect against an unscrupulous List whose contains(Object o) method senses when o is a Map.Entry, and calls o.setValue
containsAll
{ "repo_name": "haocheng/10-eclipse-tips", "path": "src/main/java/tw/idv/haocheng/Tip8.java", "license": "apache-2.0", "size": 192091 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,845,391
public void testQueryByActivityIdAndBusinessKeyWithChildren() { ExecutionQuery query = runtimeService.createExecutionQuery().activityId("receivePayment") .processInstanceBusinessKey("BUSINESS-KEY-1", true); assertEquals(1, query.list().size()); assertEquals(1, query.count());...
void function() { ExecutionQuery query = runtimeService.createExecutionQuery().activityId(STR) .processInstanceBusinessKey(STR, true); assertEquals(1, query.list().size()); assertEquals(1, query.count()); Execution execution = query.singleResult(); assertNotNull(execution); assertEquals(STR, execution.getActivityId());...
/** * Validate fix for ACT-1896 */
Validate fix for ACT-1896
testQueryByActivityIdAndBusinessKeyWithChildren
{ "repo_name": "zwets/flowable-engine", "path": "modules/flowable5-test/src/test/java/org/activiti/engine/test/api/runtime/ExecutionQueryTest.java", "license": "apache-2.0", "size": 83669 }
[ "org.flowable.engine.runtime.Execution", "org.flowable.engine.runtime.ExecutionQuery" ]
import org.flowable.engine.runtime.Execution; import org.flowable.engine.runtime.ExecutionQuery;
import org.flowable.engine.runtime.*;
[ "org.flowable.engine" ]
org.flowable.engine;
748,357
public ComputeNodeType addComputeNode(String name, List<ProcessorType> processors, List<AdaptorType> adaptors, float memorySize, float diskSize, String osName) throws InvalidElementException { ComputeNodeType cn = new ComputeNodeType(); cn.setName(name); if (processors != null) { ...
ComputeNodeType function(String name, List<ProcessorType> processors, List<AdaptorType> adaptors, float memorySize, float diskSize, String osName) throws InvalidElementException { ComputeNodeType cn = new ComputeNodeType(); cn.setName(name); if (processors != null) { for (ProcessorType p : processors) { cn.getProcessor...
/** * Adds a new ComputeNode with the given information and returns the instance of the new ComputeNode. * * @param name Compute node name * @param processors List of processors * @param adaptors List of adaptors * @param memorySize Memory size * @param diskSize Disk size * @para...
Adds a new ComputeNode with the given information and returns the instance of the new ComputeNode
addComputeNode
{ "repo_name": "mF2C/COMPSs", "path": "compss/runtime/config/xml/resources/src/main/java/es/bsc/compss/types/resources/ResourcesFile.java", "license": "apache-2.0", "size": 130588 }
[ "es.bsc.compss.types.resources.exceptions.InvalidElementException", "es.bsc.compss.types.resources.jaxb.AdaptorType", "es.bsc.compss.types.resources.jaxb.AdaptorsListType", "es.bsc.compss.types.resources.jaxb.ComputeNodeType", "es.bsc.compss.types.resources.jaxb.MemoryType", "es.bsc.compss.types.resources...
import es.bsc.compss.types.resources.exceptions.InvalidElementException; import es.bsc.compss.types.resources.jaxb.AdaptorType; import es.bsc.compss.types.resources.jaxb.AdaptorsListType; import es.bsc.compss.types.resources.jaxb.ComputeNodeType; import es.bsc.compss.types.resources.jaxb.MemoryType; import es.bsc.comps...
import es.bsc.compss.types.resources.exceptions.*; import es.bsc.compss.types.resources.jaxb.*; import java.util.*;
[ "es.bsc.compss", "java.util" ]
es.bsc.compss; java.util;
56,461
private void analyze(AutoIngestDataSource dataSource) throws AnalysisStartupException, AutoIngestJobLoggerException, InterruptedException, CaseNodeData.InvalidDataException, CoordinationServiceException { Manifest manifest = currentJob.getManifest(); Path manifestPath = manifest.getFileP...
void function(AutoIngestDataSource dataSource) throws AnalysisStartupException, AutoIngestJobLoggerException, InterruptedException, CaseNodeData.InvalidDataException, CoordinationServiceException { Manifest manifest = currentJob.getManifest(); Path manifestPath = manifest.getFilePath(); sysLogger.log(Level.INFO, STR, m...
/** * Analyzes the data source content returned by the data source * processor using the configured set of data source level and file * level analysis modules. * * @param dataSource The data source to analyze. * * @throws AnalysisStartupException if the...
Analyzes the data source content returned by the data source processor using the configured set of data source level and file level analysis modules
analyze
{ "repo_name": "APriestman/autopsy", "path": "Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java", "license": "apache-2.0", "size": 162441 }
[ "java.nio.file.Path", "java.time.Instant", "java.util.Date", "java.util.List", "java.util.logging.Level", "org.sleuthkit.autopsy.coordinationservice.CaseNodeData", "org.sleuthkit.autopsy.coordinationservice.CoordinationService", "org.sleuthkit.autopsy.experimental.autoingest.AutoIngestJobLogger", "o...
import java.nio.file.Path; import java.time.Instant; import java.util.Date; import java.util.List; import java.util.logging.Level; import org.sleuthkit.autopsy.coordinationservice.CaseNodeData; import org.sleuthkit.autopsy.coordinationservice.CoordinationService; import org.sleuthkit.autopsy.experimental.autoingest.Aut...
import java.nio.file.*; import java.time.*; import java.util.*; import java.util.logging.*; import org.sleuthkit.autopsy.coordinationservice.*; import org.sleuthkit.autopsy.experimental.autoingest.*; import org.sleuthkit.autopsy.experimental.configuration.*; import org.sleuthkit.autopsy.ingest.*;
[ "java.nio", "java.time", "java.util", "org.sleuthkit.autopsy" ]
java.nio; java.time; java.util; org.sleuthkit.autopsy;
2,639,051
@Nullable @VisibleForTesting static String getOriginFromTag(@Nullable String tag) { // If the user touched the settings cog on a flipped notification originating from this // class, there will be a notification tag extra in a specific format. From the tag we can // read the origin of...
static String getOriginFromTag(@Nullable String tag) { if (tag == null !tag.startsWith(PLATFORM_TAG_PREFIX)) return null; String[] parts = tag.split(NotificationConstants.NOTIFICATION_TAG_SEPARATOR); assert parts.length >= 3; try { URI uri = new URI(parts[1]); if (uri.getHost() != null) return parts[1]; } catch (URISyn...
/** * Attempts to extract an origin from the tag extra in the given intent. * * See {@link #makePlatformTag} for details about the format of the tag. * * @param tag The tag from the intent extra. May be null. * @return The origin string. Returns null if there was no tag extra in the given ...
Attempts to extract an origin from the tag extra in the given intent. See <code>#makePlatformTag</code> for details about the format of the tag
getOriginFromTag
{ "repo_name": "guorendong/iridium-browser-ubuntu", "path": "chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java", "license": "bsd-3-clause", "size": 23889 }
[ "android.util.Log", "java.net.URISyntaxException", "javax.annotation.Nullable" ]
import android.util.Log; import java.net.URISyntaxException; import javax.annotation.Nullable;
import android.util.*; import java.net.*; import javax.annotation.*;
[ "android.util", "java.net", "javax.annotation" ]
android.util; java.net; javax.annotation;
2,168,868
@Override public void mousePressed(MouseEvent e) { }
void function(MouseEvent e) { }
/** * Mouse pressed event * * @param e event */
Mouse pressed event
mousePressed
{ "repo_name": "acenode/jpexs-decompiler", "path": "src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java", "license": "gpl-3.0", "size": 27577 }
[ "java.awt.event.MouseEvent" ]
import java.awt.event.MouseEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
45,122
public Point getSelectionRectangleAnchor() { return selectionRectangleAnchor; }
Point function() { return selectionRectangleAnchor; }
/** * DOCUMENT ME! * * @return DOCUMENT ME! */
DOCUMENT ME
getSelectionRectangleAnchor
{ "repo_name": "cismet/jGrid", "path": "src/main/java/com/guigarage/jgrid/JGrid.java", "license": "apache-2.0", "size": 29546 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,722,518
public String getServerAddr() { if (_connection instanceof Socket) return ((Socket)_connection).getLocalAddress().getHostAddress(); return _listener.getHost(); }
String function() { if (_connection instanceof Socket) return ((Socket)_connection).getLocalAddress().getHostAddress(); return _listener.getHost(); }
/** Get the listeners HttpServer. * @return HttpServer. */
Get the listeners HttpServer
getServerAddr
{ "repo_name": "dineshkummarc/Gitak_r982", "path": "server/selenium-remote-control-1.0.3/selenium-server/org/openqa/jetty/http/HttpConnection.java", "license": "apache-2.0", "size": 42218 }
[ "java.net.Socket" ]
import java.net.Socket;
import java.net.*;
[ "java.net" ]
java.net;
2,260,837
EAttribute getActivityPhase_Phase();
EAttribute getActivityPhase_Phase();
/** * Returns the meta object for the attribute '{@link lqn.ActivityPhase#getPhase <em>Phase</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Phase</em>'. * @see lqn.ActivityPhase#getPhase() * @see #getActivityPhase() * @generated */
Returns the meta object for the attribute '<code>lqn.ActivityPhase#getPhase Phase</code>'.
getActivityPhase_Phase
{ "repo_name": "aciancone/klapersuite", "path": "klapersuite.metamodel.lqn/src/lqn/LqnPackage.java", "license": "epl-1.0", "size": 116938 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,131,657
static void writeHBaseByteArray(final ChannelBuffer buf, final byte[] b) { buf.writeByte(11); // Code for byte[].class in HbaseObjectWritable writeByteArray(buf, b); }
static void writeHBaseByteArray(final ChannelBuffer buf, final byte[] b) { buf.writeByte(11); writeByteArray(buf, b); }
/** * Writes a byte array as an HBase RPC parameter. * @param buf The buffer to serialize the string to. * @param b The byte array to serialize. */
Writes a byte array as an HBase RPC parameter
writeHBaseByteArray
{ "repo_name": "SteamShon/asynchbase", "path": "src/HBaseRpc.java", "license": "bsd-3-clause", "size": 52440 }
[ "org.jboss.netty.buffer.ChannelBuffer" ]
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.*;
[ "org.jboss.netty" ]
org.jboss.netty;
1,595,970
public List<FunctionInput> getFunctionInputs(); /** * Returns the {@link ExpressionEvaluator} for the constant with name constantName if such a * constant exists, or {@code null}. * * @param constantName the name of the constant * @return the {@ExpressionEvaluator} for constantName or ...
List<FunctionInput> function(); /** * Returns the {@link ExpressionEvaluator} for the constant with name constantName if such a * constant exists, or {@code null}. * * @param constantName the name of the constant * @return the {@ExpressionEvaluator} for constantName or {@code null}
/** * Returns the {@link FunctionInput}s associated to all attributes, variables and macros known * by the context. * * @return all known function inputs */
Returns the <code>FunctionInput</code>s associated to all attributes, variables and macros known by the context
getFunctionInputs
{ "repo_name": "cm-is-dog/rapidminer-studio-core", "path": "src/main/java/com/rapidminer/tools/expression/ExpressionContext.java", "license": "agpl-3.0", "size": 3932 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,885,510
public Map<Skill, Integer> getStatBonuses();
Map<Skill, Integer> function();
/** * Gets a map containing any stat bonuses this feat grants * * @return a map of skills to the amount this feat boosts that skill */
Gets a map containing any stat bonuses this feat grants
getStatBonuses
{ "repo_name": "Gildorym/GildorymAPI", "path": "src/com/gildorymrp/api/plugin/core/PassiveFeat.java", "license": "agpl-3.0", "size": 367 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,311,199
@Test public void testCopyMemberToVersion() { DiskStoreID id0 = new DiskStoreID(0, 0); DiskStoreID id1 = new DiskStoreID(0, 1); DiskStoreID id2 = new DiskStoreID(1, 0); DiskRegionVersionVector rvv0 = new DiskRegionVersionVector(id0); rvv0.getNextVersion(); rvv0.getNextVersion(); rvv0.ge...
void function() { DiskStoreID id0 = new DiskStoreID(0, 0); DiskStoreID id1 = new DiskStoreID(0, 1); DiskStoreID id2 = new DiskStoreID(1, 0); DiskRegionVersionVector rvv0 = new DiskRegionVersionVector(id0); rvv0.getNextVersion(); rvv0.getNextVersion(); rvv0.getNextVersion(); rvv0.recordVersion(id1, 1); rvv0.recordVersio...
/** * Test that we can copy the member to version map correctly. */
Test that we can copy the member to version map correctly
testCopyMemberToVersion
{ "repo_name": "PurelyApplied/geode", "path": "geode-core/src/test/java/org/apache/geode/internal/cache/versions/RegionVersionVectorTest.java", "license": "apache-2.0", "size": 44075 }
[ "org.apache.geode.internal.cache.persistence.DiskStoreID", "org.junit.Assert" ]
import org.apache.geode.internal.cache.persistence.DiskStoreID; import org.junit.Assert;
import org.apache.geode.internal.cache.persistence.*; import org.junit.*;
[ "org.apache.geode", "org.junit" ]
org.apache.geode; org.junit;
1,600,137
public static void main(String[] args) { PutransFactory factory = new PutransFactory(); Iterator iter = factory.getIterator(); try { } catch (Exception exc) { factory.log.error(exc.getMessage(), exc); } // try } // main
static void function(String[] args) { PutransFactory factory = new PutransFactory(); Iterator iter = factory.getIterator(); try { } catch (Exception exc) { factory.log.error(exc.getMessage(), exc); } }
/** Main program * @param args commandline arguments (none) */
Main program
main
{ "repo_name": "gfis/putrans", "path": "src/main/java/org/teherba/putrans/PutransFactory.java", "license": "apache-2.0", "size": 4169 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
471,510
List<Alert> findAlertsByStatus(boolean enabled);
List<Alert> findAlertsByStatus(boolean enabled);
/** * Returns a list of alerts by status (enabled alerts or disabled alerts). * * @param enabled Alert status (true for enabled alerts and false for disabled alerts) * * @return The list of alerts for the given status. Will never be null but may be empty. */
Returns a list of alerts by status (enabled alerts or disabled alerts)
findAlertsByStatus
{ "repo_name": "jbhatt-salesforce/Warden-Service", "path": "ArgusCore/src/main/java/com/salesforce/dva/argus/service/AlertService.java", "license": "bsd-3-clause", "size": 11946 }
[ "com.salesforce.dva.argus.entity.Alert", "java.util.List" ]
import com.salesforce.dva.argus.entity.Alert; import java.util.List;
import com.salesforce.dva.argus.entity.*; import java.util.*;
[ "com.salesforce.dva", "java.util" ]
com.salesforce.dva; java.util;
1,999,861
private Application.ActivityLifecycleCallbacks createLifecycleCallback() { return new Application.ActivityLifecycleCallbacks() {
Application.ActivityLifecycleCallbacks function() { return new Application.ActivityLifecycleCallbacks() {
/** * Creates {@link Application.ActivityLifecycleCallbacks} listener that will respond to onResume and onPause of any Activity in the application * obtaining information if the Application is in the background or foreground. * * @return Application lifecycle callbacks to be registered on the system...
Creates <code>Application.ActivityLifecycleCallbacks</code> listener that will respond to onResume and onPause of any Activity in the application obtaining information if the Application is in the background or foreground
createLifecycleCallback
{ "repo_name": "comapi/comapi-sdk-android", "path": "COMAPI/foundation/src/main/java/com/comapi/internal/lifecycle/LifeCycleController.java", "license": "mit", "size": 6480 }
[ "android.app.Application" ]
import android.app.Application;
import android.app.*;
[ "android.app" ]
android.app;
1,592,279
public boolean isApplicationExist(String appName, String username, String groupId) throws APIManagementException { if (username == null) { return false; } Subscriber subscriber = getSubscriber(username); Connection connection = null; PreparedStatement preparedSta...
boolean function(String appName, String username, String groupId) throws APIManagementException { if (username == null) { return false; } Subscriber subscriber = getSubscriber(username); Connection connection = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; int appId = 0; String sqlQuery ...
/** * Check whether given application name is available under current subscriber or group * * @param appName application name * @param username subscriber * @param groupId group of the subscriber * @return true if application is available for the subscriber * @throws APIManagementEx...
Check whether given application name is available under current subscriber or group
isApplicationExist
{ "repo_name": "dhanuka84/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": 461690 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "org.apache.commons.lang.StringUtils", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.api.model.Subscriber", "org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants", "or...
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import org.apache.commons.lang.StringUtils; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.Subscriber; import org.wso2.carbon.apimgt.impl.dao.constan...
import java.sql.*; import org.apache.commons.lang.*; 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.apache.commons", "org.wso2.carbon" ]
java.sql; org.apache.commons; org.wso2.carbon;
2,822,677
public boolean isStandby(OpenWebIfConfig config) throws IOException { String url = new UrlBuilder(config, POWERSTATE).build(); PowerState result = executeRequest(config, url, PowerState.class); return result.isStandby(); }
boolean function(OpenWebIfConfig config) throws IOException { String url = new UrlBuilder(config, POWERSTATE).build(); PowerState result = executeRequest(config, url, PowerState.class); return result.isStandby(); }
/** * Returns true, if the sat reveiver is in standby. */
Returns true, if the sat reveiver is in standby
isStandby
{ "repo_name": "paolodenti/openhab", "path": "bundles/action/org.openhab.action.openwebif/src/main/java/org/openhab/action/openwebif/internal/impl/OpenWebIfCommunicator.java", "license": "epl-1.0", "size": 5237 }
[ "java.io.IOException", "org.openhab.action.openwebif.internal.impl.config.OpenWebIfConfig", "org.openhab.action.openwebif.internal.impl.model.PowerState" ]
import java.io.IOException; import org.openhab.action.openwebif.internal.impl.config.OpenWebIfConfig; import org.openhab.action.openwebif.internal.impl.model.PowerState;
import java.io.*; import org.openhab.action.openwebif.internal.impl.config.*; import org.openhab.action.openwebif.internal.impl.model.*;
[ "java.io", "org.openhab.action" ]
java.io; org.openhab.action;
455,897
public boolean onActivityResult(int requestCode, int resultCode, final Intent data) { boolean result = false; if (requestCode == REQUEST_CODE_IMAGE && resultCode == Activity.RESULT_OK) { result = true; Toast.makeText(mContext, "Loading attachment", Toast.LENGTH_LONG).show()...
boolean function(int requestCode, int resultCode, final Intent data) { boolean result = false; if (requestCode == REQUEST_CODE_IMAGE && resultCode == Activity.RESULT_OK) { result = true; Toast.makeText(mContext, STR, Toast.LENGTH_LONG).show(); new ImageLoaderTask(mContext, data.getData()).execute(); } else if (requestC...
/** * Handles activity results that were started by this View. Returns true if the result was * handled by this view, false otherwise. * * @param requestCode * @param resultCode * @param data */
Handles activity results that were started by this View. Returns true if the result was handled by this view, false otherwise
onActivityResult
{ "repo_name": "mingtang1079/qksms", "path": "QKSMS/src/main/java/com/moez/QKSMS/ui/view/ComposeView.java", "license": "gpl-3.0", "size": 37303 }
[ "android.app.Activity", "android.content.Intent", "android.widget.Toast" ]
import android.app.Activity; import android.content.Intent; import android.widget.Toast;
import android.app.*; import android.content.*; import android.widget.*;
[ "android.app", "android.content", "android.widget" ]
android.app; android.content; android.widget;
1,984,792
public File getCmdlineInterpreterDirectory() { return new File(System.getProperty("user.home") + "/.mscript"); }
File function() { return new File(System.getProperty(STR) + STR); }
/** * Returns the location of the cmdline interpreter folder. * * @return */
Returns the location of the cmdline interpreter folder
getCmdlineInterpreterDirectory
{ "repo_name": "sk89q/CommandHelper", "path": "src/main/java/com/laytonsmith/core/MethodScriptFileLocations.java", "license": "mit", "size": 6589 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,147,250
private String getInLdapFilter(String property, List values) { List<String> filters = new ArrayList<String>(); for(Object value : values) { filters.add("(" + property + "=" + value.toString() + ")"); } return StringUtils.join(filters, "|"); }
String function(String property, List values) { List<String> filters = new ArrayList<String>(); for(Object value : values) { filters.add("(" + property + "=" + value.toString() + ")"); } return StringUtils.join(filters, " "); }
/** * Builds a filter for property in (values) search type. * This is done by creating a list of property=value combined by or (|). * * @param property * @param values * @return */
Builds a filter for property in (values) search type. This is done by creating a list of property=value combined by or (|)
getInLdapFilter
{ "repo_name": "geosolutions-it/geostore", "path": "src/core/persistence/src/main/java/it/geosolutions/geostore/core/dao/ldap/impl/LdapBaseDAOImpl.java", "license": "gpl-3.0", "size": 10600 }
[ "java.util.ArrayList", "java.util.List", "org.apache.commons.lang.StringUtils" ]
import java.util.ArrayList; import java.util.List; import org.apache.commons.lang.StringUtils;
import java.util.*; import org.apache.commons.lang.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
2,525,389
protected TrustManagerFactory buildTrustManagerFactory() throws SSLException { try (InputStream tsf = Files.newInputStream(Paths.get(truststore))) { TrustManagerFactory tmf = TrustManagerFactory.getInstance( algorithm == null ? TrustManagerFactory.getDefaultAlgorithm() : ...
TrustManagerFactory function() throws SSLException { try (InputStream tsf = Files.newInputStream(Paths.get(truststore))) { TrustManagerFactory tmf = TrustManagerFactory.getInstance( algorithm == null ? TrustManagerFactory.getDefaultAlgorithm() : algorithm); KeyStore ts = KeyStore.getInstance(store_type); ts.load(tsf, t...
/** * Builds TrustManagerFactory from the file based truststore. * * @return TrustManagerFactory from the file based truststore * @throws SSLException if any issues encountered during the build process */
Builds TrustManagerFactory from the file based truststore
buildTrustManagerFactory
{ "repo_name": "jrwest/cassandra", "path": "src/java/org/apache/cassandra/security/FileBasedSslContextFactory.java", "license": "apache-2.0", "size": 7298 }
[ "java.io.InputStream", "java.nio.file.Files", "java.nio.file.Paths", "java.security.KeyStore", "javax.net.ssl.SSLException", "javax.net.ssl.TrustManagerFactory", "org.apache.cassandra.io.util.File" ]
import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Paths; import java.security.KeyStore; import javax.net.ssl.SSLException; import javax.net.ssl.TrustManagerFactory; import org.apache.cassandra.io.util.File;
import java.io.*; import java.nio.file.*; import java.security.*; import javax.net.ssl.*; import org.apache.cassandra.io.util.*;
[ "java.io", "java.nio", "java.security", "javax.net", "org.apache.cassandra" ]
java.io; java.nio; java.security; javax.net; org.apache.cassandra;
382,962
@Nonnull public static Matcher<AddressFamilyCapabilities> hasSendExtendedCommunity(boolean value) { return new HasSendExtendedCommunity(equalTo(value)); } private AddressFamilyCapabilitiesMatchers() {}
static Matcher<AddressFamilyCapabilities> function(boolean value) { return new HasSendExtendedCommunity(equalTo(value)); } private AddressFamilyCapabilitiesMatchers() {}
/** * Provides a matcher that matches if the {@link AddressFamilyCapabilities}'s * sendExtendedCommunity is equal to the given value. */
Provides a matcher that matches if the <code>AddressFamilyCapabilities</code>'s sendExtendedCommunity is equal to the given value
hasSendExtendedCommunity
{ "repo_name": "dhalperi/batfish", "path": "projects/batfish-common-protocol/src/test/java/org/batfish/datamodel/matchers/AddressFamilyCapabilitiesMatchers.java", "license": "apache-2.0", "size": 2087 }
[ "org.batfish.datamodel.bgp.AddressFamilyCapabilities", "org.batfish.datamodel.matchers.AddressFamilyCapabilitiesMatchersImpl", "org.hamcrest.Matcher" ]
import org.batfish.datamodel.bgp.AddressFamilyCapabilities; import org.batfish.datamodel.matchers.AddressFamilyCapabilitiesMatchersImpl; import org.hamcrest.Matcher;
import org.batfish.datamodel.bgp.*; import org.batfish.datamodel.matchers.*; import org.hamcrest.*;
[ "org.batfish.datamodel", "org.hamcrest" ]
org.batfish.datamodel; org.hamcrest;
482,006
private FSPaths createNewPaths(String dirName) throws HiveException { FSPaths fsp2 = new FSPaths(specPath); if (childSpecPathDynLinkedPartitions != null) { fsp2.tmpPath = new Path(fsp2.tmpPath, dirName + Path.SEPARATOR + childSpecPathDynLinkedPartitions); fsp2.taskOutputTempPath = ...
FSPaths function(String dirName) throws HiveException { FSPaths fsp2 = new FSPaths(specPath); if (childSpecPathDynLinkedPartitions != null) { fsp2.tmpPath = new Path(fsp2.tmpPath, dirName + Path.SEPARATOR + childSpecPathDynLinkedPartitions); fsp2.taskOutputTempPath = new Path(fsp2.taskOutputTempPath, dirName + Path.SEP...
/** * create new path. * * @param dirName * @return * @throws HiveException */
create new path
createNewPaths
{ "repo_name": "BUPTAnderson/apache-hive-2.1.1-src", "path": "ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java", "license": "apache-2.0", "size": 50883 }
[ "org.apache.hadoop.fs.Path", "org.apache.hadoop.hive.ql.metadata.HiveException", "org.apache.hadoop.hive.ql.plan.FileSinkDesc" ]
import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.plan.FileSinkDesc;
import org.apache.hadoop.fs.*; import org.apache.hadoop.hive.ql.metadata.*; import org.apache.hadoop.hive.ql.plan.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
164,476
@Override public String toString() { try { StringWriter stringWriter = new StringWriter(); JsonWriter jsonWriter = new JsonWriter(stringWriter); jsonWriter.setLenient(true); Streams.write(this, jsonWriter); return stringWriter.toStr...
String function() { try { StringWriter stringWriter = new StringWriter(); JsonWriter jsonWriter = new JsonWriter(stringWriter); jsonWriter.setLenient(true); Streams.write(this, jsonWriter); return stringWriter.toString(); } catch (IOException e) { throw new AssertionError(e); } }
/** * Returns a String representation of this element. */
Returns a String representation of this element
toString
{ "repo_name": "michal-skrabacz/gson-realm", "path": "gson-realm/src/main/java/com/google/gson/JsonElement.java", "license": "apache-2.0", "size": 12636 }
[ "com.google.gson.internal.Streams", "com.google.gson.stream.JsonWriter", "java.io.IOException", "java.io.StringWriter" ]
import com.google.gson.internal.Streams; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.io.StringWriter;
import com.google.gson.internal.*; import com.google.gson.stream.*; import java.io.*;
[ "com.google.gson", "java.io" ]
com.google.gson; java.io;
2,620,985
@Test public void shouldEditConceptComplex() throws Exception { executeDataSet("org/openmrs/api/include/ObsServiceTest-complex.xml"); ConceptService cs = Context.getConceptService(); ConceptFormController conceptFormController = (ConceptFormController) applicationContext.getBean("conceptForm"); ...
void function() throws Exception { executeDataSet(STR); ConceptService cs = Context.getConceptService(); ConceptFormController conceptFormController = (ConceptFormController) applicationContext.getBean(STR); MockHttpServletRequest mockRequest = new MockHttpServletRequest(); mockRequest.setMethod("POST"); mockRequest.se...
/** * This test makes sure that ConceptComplex objects can be edited * * @throws Exception */
This test makes sure that ConceptComplex objects can be edited
shouldEditConceptComplex
{ "repo_name": "Bhamni/openmrs-core", "path": "web/src/test/java/org/openmrs/web/controller/ConceptFormControllerTest.java", "license": "mpl-2.0", "size": 47529 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.openmrs.api.ConceptService", "org.openmrs.api.context.Context", "org.springframework.mock.web.MockHttpServletRequest", "org.springframework.validation.BindException" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.openmrs.api.ConceptService; import org.openmrs.api.context.Context; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.validation.BindException;
import javax.servlet.http.*; import org.openmrs.api.*; import org.openmrs.api.context.*; import org.springframework.mock.web.*; import org.springframework.validation.*;
[ "javax.servlet", "org.openmrs.api", "org.springframework.mock", "org.springframework.validation" ]
javax.servlet; org.openmrs.api; org.springframework.mock; org.springframework.validation;
51,327
void writeTo(Appendable out) throws IOException;
void writeTo(Appendable out) throws IOException;
/** * Writes the tag to the output. */
Writes the tag to the output
writeTo
{ "repo_name": "fivesmallq/web-data-extractor", "path": "src/main/java/jodd/lagarto/Tag.java", "license": "apache-2.0", "size": 6253 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,281,019
public void setStatisticRepository(final StatisticRepository statisticRepository) { this.statisticRepository = statisticRepository; }
void function(final StatisticRepository statisticRepository) { this.statisticRepository = statisticRepository; }
/** * Sets the statistic repository with the specified statistic repository. * * @param statisticRepository the specified statistic repository */
Sets the statistic repository with the specified statistic repository
setStatisticRepository
{ "repo_name": "446541492/solo", "path": "src/main/java/org/b3log/solo/service/StatisticMgmtService.java", "license": "apache-2.0", "size": 14248 }
[ "org.b3log.solo.repository.StatisticRepository" ]
import org.b3log.solo.repository.StatisticRepository;
import org.b3log.solo.repository.*;
[ "org.b3log.solo" ]
org.b3log.solo;
280,344
protected final FieldSpec.Builder componentField(TypeName type, String name) { return FieldSpec.builder(type, componentFieldNames.getUniqueName(name)); }
final FieldSpec.Builder function(TypeName type, String name) { return FieldSpec.builder(type, componentFieldNames.getUniqueName(name)); }
/** * Creates a {@link FieldSpec.Builder} with a unique name based off of {@code name}. */
Creates a <code>FieldSpec.Builder</code> with a unique name based off of name
componentField
{ "repo_name": "hansonchar/dagger", "path": "java/dagger/internal/codegen/AbstractComponentWriter.java", "license": "apache-2.0", "size": 25005 }
[ "com.squareup.javapoet.FieldSpec", "com.squareup.javapoet.TypeName" ]
import com.squareup.javapoet.FieldSpec; import com.squareup.javapoet.TypeName;
import com.squareup.javapoet.*;
[ "com.squareup.javapoet" ]
com.squareup.javapoet;
1,900,039
private boolean loadActivitiesIfNeeded() { if (mReloadActivities && mIntent != null) { mReloadActivities = false; mActivities.clear(); List<ResolveInfo> resolveInfos = mContext.getPackageManager() .queryIntentActivities(mIntent, 0); final i...
boolean function() { if (mReloadActivities && mIntent != null) { mReloadActivities = false; mActivities.clear(); List<ResolveInfo> resolveInfos = mContext.getPackageManager() .queryIntentActivities(mIntent, 0); final int resolveInfoCount = resolveInfos.size(); for (int i = 0; i < resolveInfoCount; i++) { ResolveInfo re...
/** * Loads the activities for the current intent if needed which is * if they are not already loaded for the current intent. * * @return Whether loading was performed. */
Loads the activities for the current intent if needed which is if they are not already loaded for the current intent
loadActivitiesIfNeeded
{ "repo_name": "Trellmor/BerryMotesGallery", "path": "berryMotesGallery/src/main/java/com/trellmor/widget/ActivityChooserModel.java", "license": "gpl-3.0", "size": 38337 }
[ "android.content.pm.ResolveInfo", "java.util.List" ]
import android.content.pm.ResolveInfo; import java.util.List;
import android.content.pm.*; import java.util.*;
[ "android.content", "java.util" ]
android.content; java.util;
107,709
public static boolean isAwaited(Object future) { // If the object is not reified, it cannot be a future if ((MOP.isReifiedObject(future)) == false) { return false; } else { org.objectweb.proactive.core.mop.Proxy theProxy = ((StubObject) future).getProxy(); ...
static boolean function(Object future) { if ((MOP.isReifiedObject(future)) == false) { return false; } else { org.objectweb.proactive.core.mop.Proxy theProxy = ((StubObject) future).getProxy(); if (!(theProxy instanceof Future)) { return false; } else { if (((Future) theProxy).isAwaited()) { return true; } else { retur...
/** * Return false if the object <code>future</code> is available. This method is recursive, i.e. * if result of future is a future too, <CODE>isAwaited</CODE> is called again on this result, * and so on. */
Return false if the object <code>future</code> is available. This method is recursive, i.e. if result of future is a future too, <code>isAwaited</code> is called again on this result, and so on
isAwaited
{ "repo_name": "paraita/programming", "path": "programming-core/src/main/java/org/objectweb/proactive/api/PAFuture.java", "license": "agpl-3.0", "size": 16969 }
[ "org.objectweb.proactive.core.body.future.Future", "org.objectweb.proactive.core.mop.MOP", "org.objectweb.proactive.core.mop.StubObject" ]
import org.objectweb.proactive.core.body.future.Future; import org.objectweb.proactive.core.mop.MOP; import org.objectweb.proactive.core.mop.StubObject;
import org.objectweb.proactive.core.body.future.*; import org.objectweb.proactive.core.mop.*;
[ "org.objectweb.proactive" ]
org.objectweb.proactive;
1,798,947
public void assertContains(AssertionInfo info, char[] actual, char[] values) { arrays.assertContains(info, failures, actual, values); }
void function(AssertionInfo info, char[] actual, char[] values) { arrays.assertContains(info, failures, actual, values); }
/** * Asserts that the given array contains the given values, in any order. * * @param info contains information about the assertion. * @param actual the given array. * @param values the values that are expected to be in the given array. * @throws NullPointerException if the array of values is {@code...
Asserts that the given array contains the given values, in any order
assertContains
{ "repo_name": "ChrisCanCompute/assertj-core", "path": "src/main/java/org/assertj/core/internal/CharArrays.java", "license": "apache-2.0", "size": 14759 }
[ "org.assertj.core.api.AssertionInfo" ]
import org.assertj.core.api.AssertionInfo;
import org.assertj.core.api.*;
[ "org.assertj.core" ]
org.assertj.core;
127,393
public static byte[] decode(HuffmanTree tree, byte[] source){ ByteArrayInputStream bais = new ByteArrayInputStream(source); int size = bais.read() | (bais.read() << 8) | (bais.read() << 16) | (bais.read() << 24); BitInputStream bis = new BitInputStream(bais); byte[] out = new byte[size]; Node root; try {...
static byte[] function(HuffmanTree tree, byte[] source){ ByteArrayInputStream bais = new ByteArrayInputStream(source); int size = bais.read() (bais.read() << 8) (bais.read() << 16) (bais.read() << 24); BitInputStream bis = new BitInputStream(bais); byte[] out = new byte[size]; Node root; try { if (tree == null) { root ...
/** * Huffman decode the source array * * @param tree * a Huffman tree as created by new Tree() or null * @param source * A huffman compressed array as returned by encode(). If tree is null, the frequency * count is expected to be included to the source. * @return the d...
Huffman decode the source array
decode
{ "repo_name": "sazgin/elexis-3-core", "path": "ch.rgw.utility/src/ch/rgw/compress/Huff.java", "license": "epl-1.0", "size": 9145 }
[ "ch.rgw.compress.HuffmanTree", "ch.rgw.io.BitInputStream", "ch.rgw.tools.ExHandler", "java.io.ByteArrayInputStream" ]
import ch.rgw.compress.HuffmanTree; import ch.rgw.io.BitInputStream; import ch.rgw.tools.ExHandler; import java.io.ByteArrayInputStream;
import ch.rgw.compress.*; import ch.rgw.io.*; import ch.rgw.tools.*; import java.io.*;
[ "ch.rgw.compress", "ch.rgw.io", "ch.rgw.tools", "java.io" ]
ch.rgw.compress; ch.rgw.io; ch.rgw.tools; java.io;
2,537,398
protected String digestEncodedPassword(final String encodedPassword, final Map<String, Object> values) { val hashService = new DefaultHashService(); if (StringUtils.isNotBlank(properties.getStaticSalt())) { hashService.setPrivateSalt(ByteSource.Util.bytes(properties.getStaticSalt())); ...
String function(final String encodedPassword, final Map<String, Object> values) { val hashService = new DefaultHashService(); if (StringUtils.isNotBlank(properties.getStaticSalt())) { hashService.setPrivateSalt(ByteSource.Util.bytes(properties.getStaticSalt())); } hashService.setHashAlgorithmName(properties.getAlgorith...
/** * Digest encoded password. * * @param encodedPassword the encoded password * @param values the values retrieved from database * @return the digested password */
Digest encoded password
digestEncodedPassword
{ "repo_name": "apereo/cas", "path": "support/cas-server-support-jdbc-authentication/src/main/java/org/apereo/cas/adaptors/jdbc/QueryAndEncodeDatabaseAuthenticationHandler.java", "license": "apache-2.0", "size": 6648 }
[ "java.util.Map", "org.apache.commons.lang3.StringUtils", "org.apache.shiro.crypto.hash.DefaultHashService", "org.apache.shiro.crypto.hash.HashRequest", "org.apache.shiro.util.ByteSource" ]
import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.crypto.hash.DefaultHashService; import org.apache.shiro.crypto.hash.HashRequest; import org.apache.shiro.util.ByteSource;
import java.util.*; import org.apache.commons.lang3.*; import org.apache.shiro.crypto.hash.*; import org.apache.shiro.util.*;
[ "java.util", "org.apache.commons", "org.apache.shiro" ]
java.util; org.apache.commons; org.apache.shiro;
506,002
public List<OperationInner> value() { return this.value; }
List<OperationInner> function() { return this.value; }
/** * Get the value property: List of CDN operations supported by the CDN resource provider. * * @return the value value. */
Get the value property: List of CDN operations supported by the CDN resource provider
value
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OperationsListResult.java", "license": "mit", "size": 2509 }
[ "com.azure.resourcemanager.cdn.fluent.models.OperationInner", "java.util.List" ]
import com.azure.resourcemanager.cdn.fluent.models.OperationInner; import java.util.List;
import com.azure.resourcemanager.cdn.fluent.models.*; import java.util.*;
[ "com.azure.resourcemanager", "java.util" ]
com.azure.resourcemanager; java.util;
338,282
@ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable<ClusterInner> listByResourceGroup(String resourceGroupName, Context context) { return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); }
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ClusterInner> function(String resourceGroupName, Context context) { return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); }
/** * Gets Log Analytics clusters in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @t...
Gets Log Analytics clusters in a resource group
listByResourceGroup
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersClientImpl.java", "license": "mit", "size": 69008 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.core.util.Context", "com.azure.resourcemanager.loganalytics.fluent.models.ClusterInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.loganalytics.fluent.models.ClusterInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.loganalytics.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
259,112
protected boolean makeNewFolder(String path) { File newFolder = new File(path); if (!newFolder.exists()) return newFolder.mkdir(); return false; }
boolean function(String path) { File newFolder = new File(path); if (!newFolder.exists()) return newFolder.mkdir(); return false; }
/** * making new Folder with given path * * @param path * @return true if folder created newly, false if the folder already * presented */
making new Folder with given path
makeNewFolder
{ "repo_name": "debabratahazra/DS", "path": "designstudio/components/basic/ui/com.odcgroup.basic.ui/src/main/java/com/temenos/t24/tools/eclipse/basic/wizards/docgeneration/file/FileCreator.java", "license": "epl-1.0", "size": 1438 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
778,672
public static List<Class<?>> scanInstanceOf(Package root, Class<?> conditionClass, int maxCount) throws IOException, ClassNotFoundException { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); return scan(root, conditionClass, InstanceOfFilter.INSTANCE, maxCount, c...
static List<Class<?>> function(Package root, Class<?> conditionClass, int maxCount) throws IOException, ClassNotFoundException { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); return scan(root, conditionClass, InstanceOfFilter.INSTANCE, maxCount, classLoader); }
/** * Scans classes which is instance of the condition class in the root. * The invocation of this method behaves in exactly the same way as the invocation * <code> * ClassScanner.Filter filter = InstanceOfFilter.INSTANCE; * ClassLoader classLoader = Thread.currentThread().getContextCla...
Scans classes which is instance of the condition class in the root. The invocation of this method behaves in exactly the same way as the invocation <code> ClassScanner.Filter filter = InstanceOfFilter.INSTANCE; ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); scan(root, conditionClass, filter, ...
scanInstanceOf
{ "repo_name": "ihiroky/jcs", "path": "src/main/java/net/ihiroky/jcs/ClassScanner.java", "license": "mit", "size": 12865 }
[ "java.io.IOException", "java.util.List" ]
import java.io.IOException; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,674,521
public static File extractTessResources(String resourceName) { File targetPath = null; try { targetPath = new File(TESS4J_TEMP_DIR, resourceName); URL tessResourceUrl = LoadLibs.class.getResource(resourceName.startsWith("/") ? resourceName : "/" + resourceName); ...
static File function(String resourceName) { File targetPath = null; try { targetPath = new File(TESS4J_TEMP_DIR, resourceName); URL tessResourceUrl = LoadLibs.class.getResource(resourceName.startsWith("/") ? resourceName : "/" + resourceName); if (tessResourceUrl == null) { return null; } URLConnection urlConnection = ...
/** * Extracts tesseract resources to temp folder. * * @param resourceName name of file or directory * @return target path, which could be file or directory */
Extracts tesseract resources to temp folder
extractTessResources
{ "repo_name": "WodlBodl/visionAssistant", "path": "backend/ocr/ocr/src/net/sourceforge/tess4j/util/LoadLibs.java", "license": "mit", "size": 6176 }
[ "java.io.File", "java.net.JarURLConnection", "java.net.URLConnection", "java.util.logging.Level", "org.apache.commons.io.FileUtils" ]
import java.io.File; import java.net.JarURLConnection; import java.net.URLConnection; import java.util.logging.Level; import org.apache.commons.io.FileUtils;
import java.io.*; import java.net.*; import java.util.logging.*; import org.apache.commons.io.*;
[ "java.io", "java.net", "java.util", "org.apache.commons" ]
java.io; java.net; java.util; org.apache.commons;
1,572,376
@Ignore @Test public void testInterfaceStabilityAnnotationForLimitedAPI() throws ClassNotFoundException, IOException, LinkageError { // find classes that are: // In the main jar // AND are not in a hadoop-compat module // AND are public // NOT test classes // AND NOT generated class...
void function() throws ClassNotFoundException, IOException, LinkageError { ClassFinder classFinder = new ClassFinder( new And(new MainCodeResourcePathFilter(), new TestFileNameFilter()), new Not((FileNameFilter)new TestFileNameFilter()), new And(new PublicClassFilter(), new Not(new TestClassFilter()), new Not(new Gener...
/** * Checks whether all the classes in client and common modules that are marked * InterfaceAudience.Public do not have {@link InterfaceStability} annotations. */
Checks whether all the classes in client and common modules that are marked InterfaceAudience.Public do not have <code>InterfaceStability</code> annotations
testInterfaceStabilityAnnotationForLimitedAPI
{ "repo_name": "JingchengDu/hbase", "path": "hbase-client/src/test/java/org/apache/hadoop/hbase/TestInterfaceAudienceAnnotations.java", "license": "apache-2.0", "size": 20056 }
[ "java.io.IOException", "java.util.Set", "org.apache.hadoop.hbase.ClassFinder", "org.apache.hadoop.hbase.ClassTestFinder", "org.junit.Assert" ]
import java.io.IOException; import java.util.Set; import org.apache.hadoop.hbase.ClassFinder; import org.apache.hadoop.hbase.ClassTestFinder; import org.junit.Assert;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.junit.*;
[ "java.io", "java.util", "org.apache.hadoop", "org.junit" ]
java.io; java.util; org.apache.hadoop; org.junit;
2,396,502
public PortStatistics calcDeltaStats(DeviceId deviceId, PortStatistics prvStats, PortStatistics newStats) { // calculate time difference long deltaStatsSec, deltaStatsNano; if (newStats.durationNano() < prvStats.durationNano()) { deltaStatsNano = newStats.durationNano() - prvStat...
PortStatistics function(DeviceId deviceId, PortStatistics prvStats, PortStatistics newStats) { long deltaStatsSec, deltaStatsNano; if (newStats.durationNano() < prvStats.durationNano()) { deltaStatsNano = newStats.durationNano() - prvStats.durationNano() + TimeUnit.SECONDS.toNanos(1); deltaStatsSec = newStats.durationS...
/** * Calculate delta statistics by subtracting previous from new statistics. * * @param deviceId device indentifier * @param prvStats previous port statistics * @param newStats new port statistics * @return PortStatistics */
Calculate delta statistics by subtracting previous from new statistics
calcDeltaStats
{ "repo_name": "mengmoya/onos", "path": "core/store/dist/src/main/java/org/onosproject/store/device/impl/ECDeviceStore.java", "license": "apache-2.0", "size": 37241 }
[ "java.util.concurrent.TimeUnit", "org.onosproject.net.DeviceId", "org.onosproject.net.device.DefaultPortStatistics", "org.onosproject.net.device.PortStatistics" ]
import java.util.concurrent.TimeUnit; import org.onosproject.net.DeviceId; import org.onosproject.net.device.DefaultPortStatistics; import org.onosproject.net.device.PortStatistics;
import java.util.concurrent.*; import org.onosproject.net.*; import org.onosproject.net.device.*;
[ "java.util", "org.onosproject.net" ]
java.util; org.onosproject.net;
2,061,934
public Durable2PCParticipant deserialize(String id, ObjectInputStream stream) throws Exception { if (id.startsWith(Constants.PARTICIPANT_ID_PREFIX + "DurableTestParticipant")) { System.out.println("xts service test : attempting to deserialize WS-AT participant " + id); DurableTestPar...
Durable2PCParticipant function(String id, ObjectInputStream stream) throws Exception { if (id.startsWith(Constants.PARTICIPANT_ID_PREFIX + STR)) { System.out.println(STR + id); DurableTestParticipant participant = (DurableTestParticipant)stream.readObject(); System.out.println(STR + id); return participant; } return nu...
/** * called during recovery processing to allow an application to identify a participant id * belonging to one of its participants and recreate the participant by deserializing * it from the supplied object input stream. n.b. this is only appropriate in case the * participant was originally saved u...
called during recovery processing to allow an application to identify a participant id belonging to one of its participants and recreate the participant by deserializing it from the supplied object input stream. n.b. this is only appropriate in case the participant was originally saved using serialization
deserialize
{ "repo_name": "nmcl/scratch", "path": "graalvm/transactions/fork/narayana/XTS/localjunit/xtstest/src/org/jboss/jbossts/xts/servicetests/service/recovery/TestATRecoveryModule.java", "license": "apache-2.0", "size": 4484 }
[ "com.arjuna.wst.Durable2PCParticipant", "java.io.ObjectInputStream", "org.jboss.jbossts.xts.servicetests.service.Constants", "org.jboss.jbossts.xts.servicetests.service.participant.DurableTestParticipant" ]
import com.arjuna.wst.Durable2PCParticipant; import java.io.ObjectInputStream; import org.jboss.jbossts.xts.servicetests.service.Constants; import org.jboss.jbossts.xts.servicetests.service.participant.DurableTestParticipant;
import com.arjuna.wst.*; import java.io.*; import org.jboss.jbossts.xts.servicetests.service.*; import org.jboss.jbossts.xts.servicetests.service.participant.*;
[ "com.arjuna.wst", "java.io", "org.jboss.jbossts" ]
com.arjuna.wst; java.io; org.jboss.jbossts;
2,353,289
public void initialize(BSFManager mgr, String lang, Vector declaredBeans) throws BSFException { super.initialize(mgr, lang, declaredBeans); // create a shell shell = new GroovyShell(mgr.getClassLoader()); // register the mgr with object name "bsf" shell.setVariable("bsf", n...
void function(BSFManager mgr, String lang, Vector declaredBeans) throws BSFException { super.initialize(mgr, lang, declaredBeans); shell = new GroovyShell(mgr.getClassLoader()); shell.setVariable("bsf", new BSFFunctions(mgr, this)); int size = declaredBeans.size(); for (int i = 0; i < size; i++) { declareBean((BSFDecla...
/** * Initialize the engine. */
Initialize the engine
initialize
{ "repo_name": "Selventa/model-builder", "path": "tools/groovy/src/subprojects/groovy-bsf/src/main/java/org/codehaus/groovy/bsf/GroovyEngine.java", "license": "apache-2.0", "size": 5151 }
[ "groovy.lang.GroovyShell", "java.util.Vector", "org.apache.bsf.BSFDeclaredBean", "org.apache.bsf.BSFException", "org.apache.bsf.BSFManager", "org.apache.bsf.util.BSFFunctions" ]
import groovy.lang.GroovyShell; import java.util.Vector; import org.apache.bsf.BSFDeclaredBean; import org.apache.bsf.BSFException; import org.apache.bsf.BSFManager; import org.apache.bsf.util.BSFFunctions;
import groovy.lang.*; import java.util.*; import org.apache.bsf.*; import org.apache.bsf.util.*;
[ "groovy.lang", "java.util", "org.apache.bsf" ]
groovy.lang; java.util; org.apache.bsf;
377,425
@ApiModelProperty(value = "The last position in the result set. ") public Integer getEndPosition() { return endPosition; }
@ApiModelProperty(value = STR) Integer function() { return endPosition; }
/** * The last position in the result set. . * @return endPosition **/
The last position in the result set.
getEndPosition
{ "repo_name": "docusign/docusign-java-client", "path": "src/main/java/com/docusign/esign/model/PowerFormsResponse.java", "license": "mit", "size": 7698 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,835,698
@Test public void policyNone() throws Exception { // setup given conditions doReturn(true).when(mockedNodeService).hasAspect(nodeRef, RecordableVersionModel.ASPECT_VERSIONABLE); doReturn(RecordableVersionPolicy.NONE.toString()).when(mockedNodeService).getProperty(nodeRef, Record...
void function() throws Exception { doReturn(true).when(mockedNodeService).hasAspect(nodeRef, RecordableVersionModel.ASPECT_VERSIONABLE); doReturn(RecordableVersionPolicy.NONE.toString()).when(mockedNodeService).getProperty(nodeRef, RecordableVersionModel.PROP_RECORDABLE_VERSION_POLICY); versionProperties.put(VersionMod...
/** * Given that the node has a recordable version policy of NONE * When I create a version * Then the version service creates a normal version. */
Given that the node has a recordable version policy of NONE When I create a version Then the version service creates a normal version
policyNone
{ "repo_name": "dnacreative/records-management", "path": "rm-server/unit-test/java/org/alfresco/module/org_alfresco_module_rm/version/RecordableVersionServiceImplUnitTest.java", "license": "lgpl-3.0", "size": 22998 }
[ "org.alfresco.repo.version.VersionModel", "org.alfresco.service.cmr.version.VersionType", "org.mockito.Mockito" ]
import org.alfresco.repo.version.VersionModel; import org.alfresco.service.cmr.version.VersionType; import org.mockito.Mockito;
import org.alfresco.repo.version.*; import org.alfresco.service.cmr.version.*; import org.mockito.*;
[ "org.alfresco.repo", "org.alfresco.service", "org.mockito" ]
org.alfresco.repo; org.alfresco.service; org.mockito;
910,460
public void initializePackageContents() { if (isInitialized) return; isInitialized = true; // Initialize package setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); // Obtain other dependent packages ComponentRepositoryPackage theComponentRepositoryPackage = (ComponentRepositoryPa...
void function() { if (isInitialized) return; isInitialized = true; setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); ComponentRepositoryPackage theComponentRepositoryPackage = (ComponentRepositoryPackage)EPackage.Registry.INSTANCE.getEPackage(ComponentRepositoryPackage.eNS_URI); InterfaceRepositoryPackage the...
/** * Complete the initialization of the package and its meta-model. This * method is guarded to have no affect on any invocation but its first. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any invocation but its first.
initializePackageContents
{ "repo_name": "KAMP-Research/KAMP4APS", "path": "edu.kit.ipd.sdq.kamp4aps.aps/src/edu/kit/ipd/sdq/kamp4aps/model/aPS/BusComponents/impl/BusComponentsPackageImpl.java", "license": "apache-2.0", "size": 22330 }
[ "edu.kit.ipd.sdq.kamp4aps.model.aPS.BusComponents", "edu.kit.ipd.sdq.kamp4aps.model.aPS.ComponentRepository", "edu.kit.ipd.sdq.kamp4aps.model.aPS.InterfaceRepository", "org.eclipse.emf.ecore.EPackage" ]
import edu.kit.ipd.sdq.kamp4aps.model.aPS.BusComponents; import edu.kit.ipd.sdq.kamp4aps.model.aPS.ComponentRepository; import edu.kit.ipd.sdq.kamp4aps.model.aPS.InterfaceRepository; import org.eclipse.emf.ecore.EPackage;
import edu.kit.ipd.sdq.kamp4aps.model.*; import org.eclipse.emf.ecore.*;
[ "edu.kit.ipd", "org.eclipse.emf" ]
edu.kit.ipd; org.eclipse.emf;
2,702,126
public void paint(Graphics g) { g.translate(0, -visibleRow * getRowHeight()); super.paint(g); // Draw the Table border if we have focus. if (highlightBorder != null) { highlightBorder.paintBorder(this, g, 0, visibleRow * getRowHeight(), getWidth(), getRowHeight()); } else{ // Tre...
void function(Graphics g) { g.translate(0, -visibleRow * getRowHeight()); super.paint(g); if (highlightBorder != null) { highlightBorder.paintBorder(this, g, 0, visibleRow * getRowHeight(), getWidth(), getRowHeight()); } else{ if (!UIManager.getLookAndFeel().getName().equals(STR)){ LinesBorder linesBorder = new LinesBo...
/** * Subclassed to translate the graphics such that the last visible row * will be drawn at 0,0. */
Subclassed to translate the graphics such that the last visible row will be drawn at 0,0
paint
{ "repo_name": "apache/incubator-taverna-workbench", "path": "taverna-ui/src/main/java/org/apache/taverna/lang/ui/treetable/JTreeTable.java", "license": "apache-2.0", "size": 20595 }
[ "java.awt.Graphics", "java.awt.Insets", "javax.swing.UIManager" ]
import java.awt.Graphics; import java.awt.Insets; import javax.swing.UIManager;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,085,758
public void testL1SoftRefL2() { Properties userProps = new Properties(); userProps.setProperty("datanucleus.cache.level1.type", "soft"); userProps.setProperty("datanucleus.cache.level2.type", "weak"); PersistenceManagerFactory cachePMF = TestHelper.getPMF(1, userProps); ...
void function() { Properties userProps = new Properties(); userProps.setProperty(STR, "soft"); userProps.setProperty(STR, "weak"); PersistenceManagerFactory cachePMF = TestHelper.getPMF(1, userProps); runL2CacheTestForPMF(cachePMF); }
/** * Basic test for L1 Cache using "SoftRefCache" and L2 cache. */
Basic test for L1 Cache using "SoftRefCache" and L2 cache
testL1SoftRefL2
{ "repo_name": "hopecee/texsts", "path": "jdo/general/src/test/org/datanucleus/tests/CacheTest.java", "license": "apache-2.0", "size": 56796 }
[ "java.util.Properties", "javax.jdo.PersistenceManagerFactory", "org.datanucleus.tests.TestHelper" ]
import java.util.Properties; import javax.jdo.PersistenceManagerFactory; import org.datanucleus.tests.TestHelper;
import java.util.*; import javax.jdo.*; import org.datanucleus.tests.*;
[ "java.util", "javax.jdo", "org.datanucleus.tests" ]
java.util; javax.jdo; org.datanucleus.tests;
2,321,198
public boolean isAudioOn() { if (DBG) log("isAudioOn()"); if (mService != null && isEnabled()) { try { return mService.isAudioOn(); } catch (RemoteException e) { Log.e(TAG, Log.getStackTraceString(new Throwable())); } } ...
boolean function() { if (DBG) log(STR); if (mService != null && isEnabled()) { try { return mService.isAudioOn(); } catch (RemoteException e) { Log.e(TAG, Log.getStackTraceString(new Throwable())); } } if (mService == null) Log.w(TAG, STR); return false; }
/** * Check if Bluetooth SCO audio is connected. * * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission. * * @return true if SCO is connected, * false otherwise or on error * @hide */
Check if Bluetooth SCO audio is connected. Requires <code>android.Manifest.permission#BLUETOOTH</code> permission
isAudioOn
{ "repo_name": "rex-xxx/mt6572_x201", "path": "mediatek/frameworks-ext/base/core/java/android/bluetooth/BluetoothHeadset.java", "license": "gpl-2.0", "size": 38530 }
[ "android.os.RemoteException", "android.util.Log" ]
import android.os.RemoteException; import android.util.Log;
import android.os.*; import android.util.*;
[ "android.os", "android.util" ]
android.os; android.util;
2,552,202
@SuppressWarnings("ThrowFromFinallyBlock") protected void writeToSocket(Socket sock, OutputStream out, TcpDiscoveryAbstractMessage msg, long timeout) throws IOException, IgniteCheckedException { assert sock != null; assert msg != null; assert out != null; ...
@SuppressWarnings(STR) void function(Socket sock, OutputStream out, TcpDiscoveryAbstractMessage msg, long timeout) throws IOException, IgniteCheckedException { assert sock != null; assert msg != null; assert out != null; SocketTimeoutObject obj = new SocketTimeoutObject(sock, U.currentTimeMillis() + timeout); addTimeou...
/** * Writes message to the socket. * * @param sock Socket. * @param out Stream to write to. * @param msg Message. * @param timeout Timeout. * @throws IOException If IO failed or write timed out. * @throws IgniteCheckedException If marshalling failed. */
Writes message to the socket
writeToSocket
{ "repo_name": "a1vanov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java", "license": "apache-2.0", "size": 76111 }
[ "java.io.IOException", "java.io.OutputStream", "java.net.Socket", "java.net.SocketTimeoutException", "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.util.typedef.internal.U", "org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage" ]
import java.io.IOException; import java.io.OutputStream; import java.net.Socket; import java.net.SocketTimeoutException; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage;
import java.io.*; import java.net.*; import org.apache.ignite.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.spi.discovery.tcp.messages.*;
[ "java.io", "java.net", "org.apache.ignite" ]
java.io; java.net; org.apache.ignite;
1,527,270
void scheduleUpdateNotification( boolean selectionCoordsChanged, boolean selectionLocationChanged, boolean contentChanged, boolean userDirectlyChangedContent) { // Internal editor throttling // We want special behaviour, here where we do not reset the delay every // time this metho...
void scheduleUpdateNotification( boolean selectionCoordsChanged, boolean selectionLocationChanged, boolean contentChanged, boolean userDirectlyChangedContent) { notedSelectionCoordsChanged = selectionCoordsChanged; notedSelectionLocationChanged = selectionLocationChanged; notedContentChanged = contentChanged; notedUser...
/** * Schedule the editor's update notification */
Schedule the editor's update notification
scheduleUpdateNotification
{ "repo_name": "wisebaldone/incubator-wave", "path": "wave/src/main/java/org/waveprotocol/wave/client/editor/EditorUpdateEventImpl.java", "license": "apache-2.0", "size": 8689 }
[ "org.waveprotocol.wave.client.scheduler.Scheduler", "org.waveprotocol.wave.client.scheduler.SchedulerInstance" ]
import org.waveprotocol.wave.client.scheduler.Scheduler; import org.waveprotocol.wave.client.scheduler.SchedulerInstance;
import org.waveprotocol.wave.client.scheduler.*;
[ "org.waveprotocol.wave" ]
org.waveprotocol.wave;
867,662
protected EntityManagerFactory findDefaultEntityManagerFactory(String requestingBeanName) throws NoSuchBeanDefinitionException { String[] beanNames = BeanFactoryUtils.beanNamesForTypeIncludingAncestors(this.beanFactory, EntityManagerFactory.class); if (beanNames.length == 1) { String unitName = beanNa...
EntityManagerFactory function(String requestingBeanName) throws NoSuchBeanDefinitionException { String[] beanNames = BeanFactoryUtils.beanNamesForTypeIncludingAncestors(this.beanFactory, EntityManagerFactory.class); if (beanNames.length == 1) { String unitName = beanNames[0]; EntityManagerFactory emf = (EntityManagerFa...
/** * Find a single default EntityManagerFactory in the Spring application context. * @return the default EntityManagerFactory * @throws NoSuchBeanDefinitionException if there is no single EntityManagerFactory in the context */
Find a single default EntityManagerFactory in the Spring application context
findDefaultEntityManagerFactory
{ "repo_name": "qobel/esoguproject", "path": "spring-framework/spring-orm/src/main/java/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessor.java", "license": "apache-2.0", "size": 32401 }
[ "javax.persistence.EntityManagerFactory", "org.springframework.beans.factory.BeanFactoryUtils", "org.springframework.beans.factory.NoSuchBeanDefinitionException", "org.springframework.beans.factory.NoUniqueBeanDefinitionException", "org.springframework.beans.factory.config.ConfigurableBeanFactory" ]
import javax.persistence.EntityManagerFactory; import org.springframework.beans.factory.BeanFactoryUtils; import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.NoUniqueBeanDefinitionException; import org.springframework.beans.factory.config.ConfigurableBeanFact...
import javax.persistence.*; import org.springframework.beans.factory.*; import org.springframework.beans.factory.config.*;
[ "javax.persistence", "org.springframework.beans" ]
javax.persistence; org.springframework.beans;
2,725,166
protected String createTransaction() throws IOException { final HttpPost createTx = new HttpPost(serverAddress + "fcr:tx"); try (final CloseableHttpResponse response = execute(createTx)) { assertEquals(CREATED.getStatusCode(), getStatus(response)); return getLocation(response...
String function() throws IOException { final HttpPost createTx = new HttpPost(serverAddress + STR); try (final CloseableHttpResponse response = execute(createTx)) { assertEquals(CREATED.getStatusCode(), getStatus(response)); return getLocation(response); } }
/** * Creates a transaction, asserts that it's successful and returns the transaction location. * * @return string containing transaction location * @throws IOException exception thrown during the function */
Creates a transaction, asserts that it's successful and returns the transaction location
createTransaction
{ "repo_name": "lsitu/fcrepo4", "path": "fcrepo-http-api/src/test/java/org/fcrepo/integration/http/api/AbstractResourceIT.java", "license": "apache-2.0", "size": 25342 }
[ "java.io.IOException", "javax.ws.rs.core.Response", "org.apache.http.client.methods.CloseableHttpResponse", "org.apache.http.client.methods.HttpPost", "org.junit.Assert" ]
import java.io.IOException; import javax.ws.rs.core.Response; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.junit.Assert;
import java.io.*; import javax.ws.rs.core.*; import org.apache.http.client.methods.*; import org.junit.*;
[ "java.io", "javax.ws", "org.apache.http", "org.junit" ]
java.io; javax.ws; org.apache.http; org.junit;
2,062,444
private void overrideDependencyMgtsWithImported(DescriptorParseContext parseContext, PomReader pomReader) throws IOException, SAXException { Map<MavenDependencyKey, PomDependencyMgt> importedDependencyMgts = parseImportedDependencyMgts(parseContext, pomReader.parseDependencyMgt()); pomReader.addImpo...
void function(DescriptorParseContext parseContext, PomReader pomReader) throws IOException, SAXException { Map<MavenDependencyKey, PomDependencyMgt> importedDependencyMgts = parseImportedDependencyMgts(parseContext, pomReader.parseDependencyMgt()); pomReader.addImportedDependencyMgts(importedDependencyMgts); }
/** * Overrides existing dependency management information with imported ones if existing. * * @param parseContext Parse context * @param pomReader POM reader * @throws IOException * @throws SAXException */
Overrides existing dependency management information with imported ones if existing
overrideDependencyMgtsWithImported
{ "repo_name": "tkmnet/RCRS-ADF", "path": "gradle/gradle-2.1/src/core-impl/org/gradle/api/internal/artifacts/ivyservice/ivyresolve/parser/GradlePomModuleDescriptorParser.java", "license": "bsd-2-clause", "size": 10177 }
[ "java.io.IOException", "java.util.Map", "org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.data.MavenDependencyKey", "org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.data.PomDependencyMgt", "org.xml.sax.SAXException" ]
import java.io.IOException; import java.util.Map; import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.data.MavenDependencyKey; import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.data.PomDependencyMgt; import org.xml.sax.SAXException;
import java.io.*; import java.util.*; import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.data.*; import org.xml.sax.*;
[ "java.io", "java.util", "org.gradle.api", "org.xml.sax" ]
java.io; java.util; org.gradle.api; org.xml.sax;
2,321,981
public ScruTable backfollowFrom(Heaper value) { throw new UnimplementedException(); }
ScruTable function(Heaper value) { throw new UnimplementedException(); }
/** * Return the subTable with the domain of all positions whose values are equal to * value. Defined by analogy with corresponding Waldo-level operation. */
Return the subTable with the domain of all positions whose values are equal to value. Defined by analogy with corresponding Waldo-level operation
backfollowFrom
{ "repo_name": "jonesd/udanax-gold2java", "path": "abora-gold/src/generated-sources/translator/info/dgjones/abora/gold/collection/tables/ScruTable.java", "license": "mit", "size": 30731 }
[ "info.dgjones.abora.gold.collection.tables.ScruTable", "info.dgjones.abora.gold.java.exception.UnimplementedException", "info.dgjones.abora.gold.xpp.basic.Heaper" ]
import info.dgjones.abora.gold.collection.tables.ScruTable; import info.dgjones.abora.gold.java.exception.UnimplementedException; import info.dgjones.abora.gold.xpp.basic.Heaper;
import info.dgjones.abora.gold.collection.tables.*; import info.dgjones.abora.gold.java.exception.*; import info.dgjones.abora.gold.xpp.basic.*;
[ "info.dgjones.abora" ]
info.dgjones.abora;
1,195,369
public static void addMessageIntoList(List<Message> messageList, Message message) { if (message != null) { messageList.add(message); } }
static void function(List<Message> messageList, Message message) { if (message != null) { messageList.add(message); } }
/** * add the given message into the given message list * * @param messageList the given message list * @param message the given message */
add the given message into the given message list
addMessageIntoList
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/sys/MessageBuilder.java", "license": "apache-2.0", "size": 5425 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,252,658
public int getSystemVCSTimeout() { return getSystemPropertyValue(SystemProperty.DEFAULT_VCS_TIMEOUT, 120); }
int function() { return getSystemPropertyValue(SystemProperty.DEFAULT_VCS_TIMEOUT, 120); }
/** * VCS command timeout. */
VCS command timeout
getSystemVCSTimeout
{ "repo_name": "simeshev/parabuild-ci", "path": "src/org/parabuild/ci/configuration/SystemConfigurationManagerImpl.java", "license": "lgpl-3.0", "size": 32865 }
[ "org.parabuild.ci.object.SystemProperty" ]
import org.parabuild.ci.object.SystemProperty;
import org.parabuild.ci.object.*;
[ "org.parabuild.ci" ]
org.parabuild.ci;
1,781,879
protected void requestLoginDetails() { LogInDialogFragment dlg = new LogInDialogFragment(); dlg.show(getSupportFragmentManager(), "login"); }
void function() { LogInDialogFragment dlg = new LogInDialogFragment(); dlg.show(getSupportFragmentManager(), "login"); }
/** * Opens the login dialog * The dialog handles sending the intent around post-login */
Opens the login dialog The dialog handles sending the intent around post-login
requestLoginDetails
{ "repo_name": "richsage/Joind.in-android-app", "path": "source/src/in/joind/activity/SettingsActivity.java", "license": "bsd-3-clause", "size": 4791 }
[ "in.joind.fragment.LogInDialogFragment" ]
import in.joind.fragment.LogInDialogFragment;
import in.joind.fragment.*;
[ "in.joind.fragment" ]
in.joind.fragment;
1,059,723
EList<IfcRelContainedInSpatialStructure> getContainedInStructure();
EList<IfcRelContainedInSpatialStructure> getContainedInStructure();
/** * Returns the value of the '<em><b>Contained In Structure</b></em>' reference list. * The list contents are of type {@link cn.dlb.bim.models.ifc2x3tc1.IfcRelContainedInSpatialStructure}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Contained In Structure</em>' reference list isn't clear, ...
Returns the value of the 'Contained In Structure' reference list. The list contents are of type <code>cn.dlb.bim.models.ifc2x3tc1.IfcRelContainedInSpatialStructure</code>. If the meaning of the 'Contained In Structure' reference list isn't clear, there really should be more of a description here...
getContainedInStructure
{ "repo_name": "shenan4321/BIMplatform", "path": "generated/cn/dlb/bim/models/ifc2x3tc1/IfcGrid.java", "license": "agpl-3.0", "size": 6039 }
[ "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,785,405
@VisibleForTesting static ContactDeletionInteraction startWithTestLoaderManager( Activity activity, Uri contactUri, boolean finishActivityWhenDone, TestLoaderManager testLoaderManager) { if (contactUri == null) { return null; } FragmentManager fragmen...
static ContactDeletionInteraction startWithTestLoaderManager( Activity activity, Uri contactUri, boolean finishActivityWhenDone, TestLoaderManager testLoaderManager) { if (contactUri == null) { return null; } FragmentManager fragmentManager = activity.getFragmentManager(); ContactDeletionInteraction fragment = (Contact...
/** * Starts the interaction and optionally set up a {@link TestLoaderManager}. * * @param activity the activity within which to start the interaction * @param contactUri the URI of the contact to delete * @param finishActivityWhenDone whether to finish the activity upon completion of the ...
Starts the interaction and optionally set up a <code>TestLoaderManager</code>
startWithTestLoaderManager
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "packages/apps/Contacts/src/com/android/contacts/interactions/ContactDeletionInteraction.java", "license": "gpl-3.0", "size": 12063 }
[ "android.app.Activity", "android.app.FragmentManager", "android.net.Uri" ]
import android.app.Activity; import android.app.FragmentManager; import android.net.Uri;
import android.app.*; import android.net.*;
[ "android.app", "android.net" ]
android.app; android.net;
2,478,011
public JoinFragment createOuterJoinFragment() { return new OracleJoinFragment(); } /** * {@inheritDoc}
JoinFragment function() { return new OracleJoinFragment(); } /** * {@inheritDoc}
/** * Support for the oracle proprietary join syntax... * * @return The orqacle join fragment */
Support for the oracle proprietary join syntax..
createOuterJoinFragment
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/hibernate-distribution-3.6.10.Final/project/hibernate-core/src/main/java/org/hibernate/dialect/Oracle8iDialect.java", "license": "unlicense", "size": 17656 }
[ "org.hibernate.sql.JoinFragment", "org.hibernate.sql.OracleJoinFragment" ]
import org.hibernate.sql.JoinFragment; import org.hibernate.sql.OracleJoinFragment;
import org.hibernate.sql.*;
[ "org.hibernate.sql" ]
org.hibernate.sql;
81,419
public RexLiteral makeExactLiteral(BigDecimal bd) { RelDataType relType; int scale = bd.scale(); long l = bd.unscaledValue().longValue(); assert scale >= 0; assert scale <= typeFactory.getTypeSystem().getMaxNumericScale() : scale; assert BigDecimal.valueOf(l, scale).equals(bd); if (scale =...
RexLiteral function(BigDecimal bd) { RelDataType relType; int scale = bd.scale(); long l = bd.unscaledValue().longValue(); assert scale >= 0; assert scale <= typeFactory.getTypeSystem().getMaxNumericScale() : scale; assert BigDecimal.valueOf(l, scale).equals(bd); if (scale == 0) { if ((l >= Integer.MIN_VALUE) && (l <= ...
/** * Creates a numeric literal. */
Creates a numeric literal
makeExactLiteral
{ "repo_name": "YrAuYong/incubator-calcite", "path": "core/src/main/java/org/apache/calcite/rex/RexBuilder.java", "license": "apache-2.0", "size": 43815 }
[ "java.math.BigDecimal", "org.apache.calcite.rel.type.RelDataType", "org.apache.calcite.sql.type.SqlTypeName" ]
import java.math.BigDecimal; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.sql.type.SqlTypeName;
import java.math.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.sql.type.*;
[ "java.math", "org.apache.calcite" ]
java.math; org.apache.calcite;
2,224,723
AddressQuery addressQuery(SimpleString address) throws ActiveMQException; // Transaction operations ----------------------------------------
AddressQuery addressQuery(SimpleString address) throws ActiveMQException;
/** * Queries information on a binding. * * @param address the address of the biding to query * @return an AddressQuery containing information on the binding attached to the given address * @throws ActiveMQException if an exception occurs while querying the binding */
Queries information on a binding
addressQuery
{ "repo_name": "willr3/activemq-artemis", "path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java", "license": "apache-2.0", "size": 41343 }
[ "org.apache.activemq.artemis.api.core.ActiveMQException", "org.apache.activemq.artemis.api.core.SimpleString" ]
import org.apache.activemq.artemis.api.core.ActiveMQException; import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.api.core.*;
[ "org.apache.activemq" ]
org.apache.activemq;
1,943,115
Document post() throws IOException;
Document post() throws IOException;
/** * Execute the request as a POST, and parse the result. * @return parsed Document * @throws java.net.MalformedURLException if the request URL is not a HTTP or HTTPS URL, or is otherwise malformed * @throws HttpStatusException if the response is not OK and HTTP response errors are not ignored ...
Execute the request as a POST, and parse the result
post
{ "repo_name": "jhy/jsoup", "path": "src/main/java/org/jsoup/Connection.java", "license": "mit", "size": 31086 }
[ "java.io.IOException", "org.jsoup.nodes.Document" ]
import java.io.IOException; import org.jsoup.nodes.Document;
import java.io.*; import org.jsoup.nodes.*;
[ "java.io", "org.jsoup.nodes" ]
java.io; org.jsoup.nodes;
2,190,491
EList<Receipt> getReceipts();
EList<Receipt> getReceipts();
/** * Returns the value of the '<em><b>Receipts</b></em>' reference list. * The list contents are of type {@link CIM.IEC61968.PaymentMetering.Receipt}. * It is bidirectional and its opposite is '{@link CIM.IEC61968.PaymentMetering.Receipt#getVendorShift <em>Vendor Shift</em>}'. * <!-- begin-user-doc --> * <p>...
Returns the value of the 'Receipts' reference list. The list contents are of type <code>CIM.IEC61968.PaymentMetering.Receipt</code>. It is bidirectional and its opposite is '<code>CIM.IEC61968.PaymentMetering.Receipt#getVendorShift Vendor Shift</code>'. If the meaning of the 'Receipts' reference list isn't clear, there...
getReceipts
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/ModelJoin/src/main/java/CIM/IEC61968/PaymentMetering/VendorShift.java", "license": "mit", "size": 9759 }
[ "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,494,869
private MediaInfo toVideo(File input, MediaInfo mediaInfo, File outputPath, int codec) { StopWatch sw = new StopWatch(); sw.start(); String ffmpeg = mediaConverter.getFfmpeg(); StringBuilder command = new StringBuilder(ffmpeg); command.append(" "); command.append("-i ...
MediaInfo function(File input, MediaInfo mediaInfo, File outputPath, int codec) { StopWatch sw = new StopWatch(); sw.start(); String ffmpeg = mediaConverter.getFfmpeg(); StringBuilder command = new StringBuilder(ffmpeg); command.append(" "); command.append(STR); command.append(input.getAbsolutePath()); command.append("...
/** * Converts input file to Flash Video or H.264 Video. * * @param input input file * @param mediaInfo mediaInfo object * @param outputPath output path * @param codec which codec to use, Flash Movie or H.264 Movie * @return returns mediaInfo object */
Converts input file to Flash Video or H.264 Video
toVideo
{ "repo_name": "edmedia/unitube", "path": "src/main/java/nz/ac/otago/edmedia/media/converter/FFmpegConverter.java", "license": "gpl-3.0", "size": 21713 }
[ "java.io.File", "nz.ac.otago.edmedia.media.bean.MediaInfo", "nz.ac.otago.edmedia.util.CommandReturn", "nz.ac.otago.edmedia.util.CommandRunner", "org.apache.commons.lang.time.StopWatch" ]
import java.io.File; import nz.ac.otago.edmedia.media.bean.MediaInfo; import nz.ac.otago.edmedia.util.CommandReturn; import nz.ac.otago.edmedia.util.CommandRunner; import org.apache.commons.lang.time.StopWatch;
import java.io.*; import nz.ac.otago.edmedia.media.bean.*; import nz.ac.otago.edmedia.util.*; import org.apache.commons.lang.time.*;
[ "java.io", "nz.ac.otago", "org.apache.commons" ]
java.io; nz.ac.otago; org.apache.commons;
2,178,057
public Object get(String name) throws ClassifierNotFoundException { // Search in model Object mClassifier = Model.getFacade().lookupIn(mPackage, name); if (mClassifier == null) { Class classifier; // Try to find it via the classpath try { // Special case for model if (Model.getFacade().isAM...
Object function(String name) throws ClassifierNotFoundException { Object mClassifier = Model.getFacade().lookupIn(mPackage, name); if (mClassifier == null) { Class classifier; try { if (Model.getFacade().isAModel(mPackage)) { classifier = Class.forName(name); } else { String clazzName = javaName + "." + name; classifie...
/** * Get a classifier from the model. If it is not in the model, try * to find it with the CLASSPATH. If found, in the classpath, the * classifier is created and added to the model. If not found at * all, a datatype is created and added to the model. * * @param name The name of the classi...
Get a classifier from the model. If it is not in the model, try to find it with the CLASSPATH. If found, in the classpath, the classifier is created and added to the model. If not found at all, a datatype is created and added to the model
get
{ "repo_name": "carvalhomb/tsmells", "path": "sample/argouml/argouml/org/argouml/uml/reveng/java/PackageContext.java", "license": "gpl-2.0", "size": 7299 }
[ "org.argouml.model.Facade", "org.argouml.model.Model", "org.argouml.uml.reveng.ImportClassLoader" ]
import org.argouml.model.Facade; import org.argouml.model.Model; import org.argouml.uml.reveng.ImportClassLoader;
import org.argouml.model.*; import org.argouml.uml.reveng.*;
[ "org.argouml.model", "org.argouml.uml" ]
org.argouml.model; org.argouml.uml;
2,452,881
public void testDoesUserAccountExist() { List<UserAccount> users = userAccMgr.getAuthenticatedUsers(); assertNull("There should be no authenticated users", users); createTestAccount(); users = userAccMgr.getAuthenticatedUsers(); assertEquals("There should be 1 authenticated user", 1, users....
void function() { List<UserAccount> users = userAccMgr.getAuthenticatedUsers(); assertNull(STR, users); createTestAccount(); users = userAccMgr.getAuthenticatedUsers(); assertEquals(STR, 1, users.size()); UserAccount userAcc = new UserAccount(ClientManagerTest.TEST_AUTH_TOKEN, ClientManagerTest.TEST_REFRESH_TOKEN, Clie...
/** * Test to check if a user account exists. */
Test to check if a user account exists
testDoesUserAccountExist
{ "repo_name": "seethaa/force_analytics_example", "path": "native/test/SalesforceSDKTest/src/com/salesforce/androidsdk/accounts/UserAccountManagerTest.java", "license": "apache-2.0", "size": 11576 }
[ "com.salesforce.androidsdk.rest.ClientManagerTest", "java.util.List" ]
import com.salesforce.androidsdk.rest.ClientManagerTest; import java.util.List;
import com.salesforce.androidsdk.rest.*; import java.util.*;
[ "com.salesforce.androidsdk", "java.util" ]
com.salesforce.androidsdk; java.util;
970,884
@Override public void undo() { final byte mRID = DrawingActivityMulti.getMyRID(); if (D) { Log.d(tag, "---- undo --------------------" +"\n- my rID: "+mRID +"\n--- all paths in reverse order:"); synchronized (DrawingActivity.path) { for (int i = DrawingActivity.path.size() - 1; i >= 0; ...
void function() { final byte mRID = DrawingActivityMulti.getMyRID(); if (D) { Log.d(tag, STR +STR+mRID +STR); synchronized (DrawingActivity.path) { for (int i = DrawingActivity.path.size() - 1; i >= 0; i--) { DrawingPath dp = DrawingActivity.path.get(i); if(D){Log.d(tag+STR, STR +STR+dp.getPID() +STR+(byte) ((dp.getPID...
/** * Removes the latest path this user has drawn and notifies * others of its' removal. */
Removes the latest path this user has drawn and notifies others of its' removal
undo
{ "repo_name": "BoEmma/netpaint", "path": "src/com/kandidat/rityta/multi/DrawingViewMulti.java", "license": "apache-2.0", "size": 9417 }
[ "android.util.Log", "com.kandidat.rityta.DrawingActivity", "com.kandidat.rityta.DrawingPath" ]
import android.util.Log; import com.kandidat.rityta.DrawingActivity; import com.kandidat.rityta.DrawingPath;
import android.util.*; import com.kandidat.rityta.*;
[ "android.util", "com.kandidat.rityta" ]
android.util; com.kandidat.rityta;
1,715,798
public static void setSessionAttribute(HttpServletRequest request, String name, Object value) { Assert.notNull(request, "Request must not be null"); if (value != null) { request.getSession().setAttribute(name, value); } else { HttpSession session = request.getSession(false); if (session != null) { ...
static void function(HttpServletRequest request, String name, Object value) { Assert.notNull(request, STR); if (value != null) { request.getSession().setAttribute(name, value); } else { HttpSession session = request.getSession(false); if (session != null) { session.removeAttribute(name); } } }
/** * Set the session attribute with the given name to the given value. * Removes the session attribute if value is null, if a session existed at all. * Does not create a new session if not necessary! * @param request current HTTP request * @param name the name of the session attribute * @param value the va...
Set the session attribute with the given name to the given value. Removes the session attribute if value is null, if a session existed at all. Does not create a new session if not necessary
setSessionAttribute
{ "repo_name": "boggad/jdk9-sample", "path": "sample-catalog/spring-jdk9/src/spring.web/org/springframework/web/util/WebUtils.java", "license": "mit", "size": 29940 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpSession", "org.springframework.util.Assert" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.springframework.util.Assert;
import javax.servlet.http.*; import org.springframework.util.*;
[ "javax.servlet", "org.springframework.util" ]
javax.servlet; org.springframework.util;
1,489,895
public DateTimeFormatterBuilder appendMonthOfYear(int minDigits) { return appendDecimal(DateTimeFieldType.monthOfYear(), minDigits, 2); }
DateTimeFormatterBuilder function(int minDigits) { return appendDecimal(DateTimeFieldType.monthOfYear(), minDigits, 2); }
/** * Instructs the printer to emit a numeric monthOfYear field. * * @param minDigits minimum number of digits to print * @return this DateTimeFormatterBuilder, for chaining */
Instructs the printer to emit a numeric monthOfYear field
appendMonthOfYear
{ "repo_name": "maqarg/joda-time", "path": "src/main/java/org/joda/time/format/DateTimeFormatterBuilder.java", "license": "apache-2.0", "size": 104430 }
[ "org.joda.time.DateTimeFieldType" ]
import org.joda.time.DateTimeFieldType;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,077,688
private Map<Thermostat, SortedMap<Period, ZoneStatus>> renderSchedule1() { final Map<Thermostat, SortedMap<Period, ZoneStatus>> result = new TreeMap<Thermostat, SortedMap<Period, ZoneStatus>>(); Thermostat t = new NullThermostat("thermostat"); Period pNight = new Period("night", "0...
Map<Thermostat, SortedMap<Period, ZoneStatus>> function() { final Map<Thermostat, SortedMap<Period, ZoneStatus>> result = new TreeMap<Thermostat, SortedMap<Period, ZoneStatus>>(); Thermostat t = new NullThermostat(STR); Period pNight = new Period("night", "0:00", "9:00", STR); ZoneStatus zsNight = new ZoneStatusImpl(25...
/** * Render the schedule with overlapping periods as follows: * * Night: midnight to 9:00 * Morning: 8:00 to 10:00 * Day: 9:00 to 21:00 * Evening: 18:00 to 23:59 */
Render the schedule with overlapping periods as follows: Night: midnight to 9:00 Morning: 8:00 to 10:00 Day: 9:00 to 21:00 Evening: 18:00 to 23:59
renderSchedule1
{ "repo_name": "marcass/dz-1", "path": "dz3-scheduler/src/test/java/net/sf/dz3/scheduler/SchedulerTest.java", "license": "gpl-3.0", "size": 34004 }
[ "java.util.Map", "java.util.SortedMap", "java.util.TreeMap", "net.sf.dz3.device.model.Thermostat", "net.sf.dz3.device.model.ZoneStatus", "net.sf.dz3.device.model.impl.ZoneStatusImpl" ]
import java.util.Map; import java.util.SortedMap; import java.util.TreeMap; import net.sf.dz3.device.model.Thermostat; import net.sf.dz3.device.model.ZoneStatus; import net.sf.dz3.device.model.impl.ZoneStatusImpl;
import java.util.*; import net.sf.dz3.device.model.*; import net.sf.dz3.device.model.impl.*;
[ "java.util", "net.sf.dz3" ]
java.util; net.sf.dz3;
183,743
@Override public void flushGraphics(Rectangle region) { }
void function(Rectangle region) { }
/** * Does nothing. * * @see GraphicsSource#flushGraphics(Rectangle) */
Does nothing
flushGraphics
{ "repo_name": "archimatetool/archi", "path": "org.eclipse.draw2d/src/org/eclipse/draw2d/NativeGraphicsSource.java", "license": "mit", "size": 2338 }
[ "org.eclipse.draw2d.geometry.Rectangle" ]
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.draw2d.geometry.*;
[ "org.eclipse.draw2d" ]
org.eclipse.draw2d;
1,273,325
public static ErrorMessageFactory shouldNotBeEmpty(Path actual) { return new ShouldNotBeEmpty("%nExpecting path <%s> not to be empty", actual); } private ShouldNotBeEmpty(String format, Object... arguments) { super(format, arguments); }
static ErrorMessageFactory function(Path actual) { return new ShouldNotBeEmpty(STR, actual); } private ShouldNotBeEmpty(String format, Object... arguments) { super(format, arguments); }
/** * Creates a new <code>{@link ShouldNotBeEmpty}</code>. * @param actual the actual path in the failed assertion. * @return the created {@code ErrorMessageFactory}. */
Creates a new <code><code>ShouldNotBeEmpty</code></code>
shouldNotBeEmpty
{ "repo_name": "joel-costigliola/assertj-core", "path": "src/main/java/org/assertj/core/error/ShouldNotBeEmpty.java", "license": "apache-2.0", "size": 2085 }
[ "java.nio.file.Path" ]
import java.nio.file.Path;
import java.nio.file.*;
[ "java.nio" ]
java.nio;
2,778,909
public ArrayList<Note> heartbeat() { //account for recording never stopping if(counter == Integer.MAX_VALUE - 1) { endRecording(); return null; } //Advance counter if sequence is playing or recording if(status == MonomeUp.PLAYING || status == MonomeUp.RECORDING || status == MonomeUp.C...
ArrayList<Note> function() { if(counter == Integer.MAX_VALUE - 1) { endRecording(); return null; } if(status == MonomeUp.PLAYING status == MonomeUp.RECORDING status == MonomeUp.CUEDSTOP) counter ++; if(status == MonomeUp.PLAYING) { if(counter > length) { counter = 1; } if(events.containsKey(counter)) { ArrayList<Note> ...
/** * Called by the intiating class in order to cycle through the sequence events and return any notes to be played * @return An ArrayList to be played at the current count. If no events, returns null. * */
Called by the intiating class in order to cycle through the sequence events and return any notes to be played
heartbeat
{ "repo_name": "adamribaudo/sevenuplive", "path": "src/mtn/sevenuplive/modes/NoteSequence.java", "license": "lgpl-3.0", "size": 18233 }
[ "java.util.ArrayList", "java.util.Hashtable" ]
import java.util.ArrayList; import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
2,492,005
public void removeGroupContent(final String inGroupID) throws VException, SQLException, IOException { final OrderObject lOrder = new OrderObjectImpl(); lOrder.setValue(GroupHome.KEY_ID, 0); final QuestionHome lHome = BOMHelper.getQuestionHome(); final QueryResult lQuestions = lHome.s...
void function(final String inGroupID) throws VException, SQLException, IOException { final OrderObject lOrder = new OrderObjectImpl(); lOrder.setValue(GroupHome.KEY_ID, 0); final QuestionHome lHome = BOMHelper.getQuestionHome(); final QueryResult lQuestions = lHome.selectOfGroup(inGroupID, lOrder); while (lQuestions.ha...
/** Removed the content of the specified group from the search index. * * @param inGroupID String * @throws VException * @throws SQLException * @throws IOException */
Removed the content of the specified group from the search index
removeGroupContent
{ "repo_name": "aktion-hip/vif", "path": "org.hip.vif.core/src/org/hip/vif/core/bom/search/VIFContentIndexer.java", "license": "gpl-2.0", "size": 8569 }
[ "java.io.IOException", "java.sql.SQLException", "org.hip.kernel.bom.OrderObject", "org.hip.kernel.bom.QueryResult", "org.hip.kernel.bom.impl.OrderObjectImpl", "org.hip.kernel.exc.VException", "org.hip.vif.core.bom.BOMHelper", "org.hip.vif.core.bom.GroupHome", "org.hip.vif.core.bom.QuestionHome" ]
import java.io.IOException; import java.sql.SQLException; import org.hip.kernel.bom.OrderObject; import org.hip.kernel.bom.QueryResult; import org.hip.kernel.bom.impl.OrderObjectImpl; import org.hip.kernel.exc.VException; import org.hip.vif.core.bom.BOMHelper; import org.hip.vif.core.bom.GroupHome; import org.hip.vif.c...
import java.io.*; import java.sql.*; import org.hip.kernel.bom.*; import org.hip.kernel.bom.impl.*; import org.hip.kernel.exc.*; import org.hip.vif.core.bom.*;
[ "java.io", "java.sql", "org.hip.kernel", "org.hip.vif" ]
java.io; java.sql; org.hip.kernel; org.hip.vif;
238,771
public final static Field getIdField(final Class<? extends AbstractModel> clazz) { AssertTools.assertNotNull(clazz); Field field = null; String modelClassName = clazz.getName(); field = ID_FIELDS.get(modelClassName); if (field == null) { try { fie...
final static Field function(final Class<? extends AbstractModel> clazz) { AssertTools.assertNotNull(clazz); Field field = null; String modelClassName = clazz.getName(); field = ID_FIELDS.get(modelClassName); if (field == null) { try { field = BeanTools.getAnnotatedPrivateField(clazz, Id.class, EmbeddedId.class); } catc...
/** * Retrieve the @Id or @EmbeddedId field * * @param clazz the class of the model * @return @Id or @EmbeddedId field * @throws UnexpectedException If it does not exist */
Retrieve the @Id or @EmbeddedId field
getIdField
{ "repo_name": "acheype/cantharella", "path": "cantharella.data/src/main/java/nc/ird/cantharella/data/model/utils/AbstractModel.java", "license": "agpl-3.0", "size": 3856 }
[ "java.lang.reflect.Field", "javax.persistence.EmbeddedId", "javax.persistence.Id" ]
import java.lang.reflect.Field; import javax.persistence.EmbeddedId; import javax.persistence.Id;
import java.lang.reflect.*; import javax.persistence.*;
[ "java.lang", "javax.persistence" ]
java.lang; javax.persistence;
1,520,729
public static byte[] toByteArray(Reader input, Charset encoding) throws IOException { ByteArrayOutputStream output = new ByteArrayOutputStream(); copy(input, output, encoding); return output.toByteArray(); }
static byte[] function(Reader input, Charset encoding) throws IOException { ByteArrayOutputStream output = new ByteArrayOutputStream(); copy(input, output, encoding); return output.toByteArray(); }
/** * Get the contents of a <code>Reader</code> as a <code>byte[]</code> * using the specified character encoding. * <p> * This method buffers the input internally, so there is no need to use a * <code>BufferedReader</code>. * * @param input the <code>Reader</code> to read from ...
Get the contents of a <code>Reader</code> as a <code>byte[]</code> using the specified character encoding. This method buffers the input internally, so there is no need to use a <code>BufferedReader</code>
toByteArray
{ "repo_name": "trivium-io/trivium-core", "path": "src/io/trivium/dep/org/apache/commons/io/IOUtils.java", "license": "apache-2.0", "size": 97969 }
[ "io.trivium.dep.org.apache.commons.io.output.ByteArrayOutputStream", "java.io.IOException", "java.io.Reader", "java.nio.charset.Charset" ]
import io.trivium.dep.org.apache.commons.io.output.ByteArrayOutputStream; import java.io.IOException; import java.io.Reader; import java.nio.charset.Charset;
import io.trivium.dep.org.apache.commons.io.output.*; import java.io.*; import java.nio.charset.*;
[ "io.trivium.dep", "java.io", "java.nio" ]
io.trivium.dep; java.io; java.nio;
2,665,177
public boolean okayToSendError(int taskId, String emailAddress) { boolean returnValue = false; Date currentTime = new Date(); Integer task = new Integer(taskId); Map<String,Date> timestampsMap = this.screenerMap.get(task); if (timestampsMap == null) { ...
boolean function(int taskId, String emailAddress) { boolean returnValue = false; Date currentTime = new Date(); Integer task = new Integer(taskId); Map<String,Date> timestampsMap = this.screenerMap.get(task); if (timestampsMap == null) { timestampsMap = new HashMap<String,Date>(); timestampsMap.put(emailAddress, curren...
/** * Returns true if it is okay to send error email to this address. * Email with same taskId cannot go to the same address more than once per hour. */
Returns true if it is okay to send error email to this address. Email with same taskId cannot go to the same address more than once per hour
okayToSendError
{ "repo_name": "wheresmybrain/syp-scheduler", "path": "src/main/java/com/wheresmybrain/syp/scheduler/events/errorhandler/TaskErrorHandler.java", "license": "lgpl-3.0", "size": 15410 }
[ "java.util.Date", "java.util.HashMap", "java.util.Map" ]
import java.util.Date; import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,795,370
public void setServletContext(ServletContext servletContext) { _servletContext = servletContext; }
void function(ServletContext servletContext) { _servletContext = servletContext; }
/** * Sets the servlet context. */
Sets the servlet context
setServletContext
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/server/dispatch/PageFilterChain.java", "license": "gpl-2.0", "size": 7903 }
[ "javax.servlet.ServletContext" ]
import javax.servlet.ServletContext;
import javax.servlet.*;
[ "javax.servlet" ]
javax.servlet;
2,627,031
public final void reloadSchedule() { final byte scheduleType = cm.getActiveBuildConfig(activeBuildID).getScheduleType(); if (scheduleType == ActiveBuildConfig.SCHEDULE_TYPE_AUTOMATIC) { automaticSchedule = true; if (!paused) { runContinuously = true; } } else if (scheduleType == ...
final void function() { final byte scheduleType = cm.getActiveBuildConfig(activeBuildID).getScheduleType(); if (scheduleType == ActiveBuildConfig.SCHEDULE_TYPE_AUTOMATIC) { automaticSchedule = true; if (!paused) { runContinuously = true; } } else if (scheduleType == ActiveBuildConfig.SCHEDULE_TYPE_MANUAL) { automaticSc...
/** * Requests this schedule to reload it's configuration. This * method is used to notify a scheduler about changes in * persistent configuration. */
Requests this schedule to reload it's configuration. This method is used to notify a scheduler about changes in persistent configuration
reloadSchedule
{ "repo_name": "simeshev/parabuild-ci", "path": "src/org/parabuild/ci/build/AutomaticScheduler.java", "license": "lgpl-3.0", "size": 21314 }
[ "org.parabuild.ci.object.ActiveBuildConfig" ]
import org.parabuild.ci.object.ActiveBuildConfig;
import org.parabuild.ci.object.*;
[ "org.parabuild.ci" ]
org.parabuild.ci;
572,427
static void validateLinkedEntity(LinkedEntity expectedLinkedEntity, LinkedEntity actualLinkedEntity) { assertEquals(expectedLinkedEntity.getName(), actualLinkedEntity.getName()); assertEquals(expectedLinkedEntity.getDataSource(), actualLinkedEntity.getDataSource()); assertEquals(expectedLin...
static void validateLinkedEntity(LinkedEntity expectedLinkedEntity, LinkedEntity actualLinkedEntity) { assertEquals(expectedLinkedEntity.getName(), actualLinkedEntity.getName()); assertEquals(expectedLinkedEntity.getDataSource(), actualLinkedEntity.getDataSource()); assertEquals(expectedLinkedEntity.getLanguage(), actu...
/** * Helper method to validate a single named entity. * * @param expectedLinkedEntity namedEntity returned by the service. * @param actualLinkedEntity namedEntity returned by the API. */
Helper method to validate a single named entity
validateLinkedEntity
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/textanalytics/azure-ai-textanalytics/src/test/java/com/azure/ai/textanalytics/TextAnalyticsClientTestBase.java", "license": "mit", "size": 49541 }
[ "com.azure.ai.textanalytics.models.LinkedEntity", "org.junit.jupiter.api.Assertions" ]
import com.azure.ai.textanalytics.models.LinkedEntity; import org.junit.jupiter.api.Assertions;
import com.azure.ai.textanalytics.models.*; import org.junit.jupiter.api.*;
[ "com.azure.ai", "org.junit.jupiter" ]
com.azure.ai; org.junit.jupiter;
1,242,395
@Test public void testShouldEndWithUri() { // when builder = HttpFilters.request().uri().endsWith(".html"); // then assertRequestMatches(builder, request); assertRequestNotMatches(builder, invalidRequest); }
void function() { builder = HttpFilters.request().uri().endsWith(".html"); assertRequestMatches(builder, request); assertRequestNotMatches(builder, invalidRequest); }
/** * Tests the creating of {@link HttpFilterBuilder} that matches only request that ends with given substring. */
Tests the creating of <code>HttpFilterBuilder</code> that matches only request that ends with given substring
testShouldEndWithUri
{ "repo_name": "CSchulz/arquillian-extension-warp", "path": "impl/src/test/java/org/jboss/arquillian/warp/impl/client/filter/http/TestHttpFilters.java", "license": "apache-2.0", "size": 13377 }
[ "org.jboss.arquillian.warp.client.filter.http.HttpFilters" ]
import org.jboss.arquillian.warp.client.filter.http.HttpFilters;
import org.jboss.arquillian.warp.client.filter.http.*;
[ "org.jboss.arquillian" ]
org.jboss.arquillian;
42,033
protected void updateNetworkWeights() { // find active neuron in output layer // TODO : change idx, in general case not 1 CompetitiveNeuron winningNeuron = ((CompetitiveLayer) neuralNetwork .getLayerAt(1)).getWinner(); Connection[] inputConnections = winningNeuron .getConnectionsFromOtherLayers(); ...
void function() { CompetitiveNeuron winningNeuron = ((CompetitiveLayer) neuralNetwork .getLayerAt(1)).getWinner(); Connection[] inputConnections = winningNeuron .getConnectionsFromOtherLayers(); for(Connection connection : inputConnections) { double weight = connection.getWeight().getValue(); double input = connection....
/** * Adjusts weights for the winning neuron */
Adjusts weights for the winning neuron
updateNetworkWeights
{ "repo_name": "dwaybright/StrategicAssaultSimulator", "path": "core/src/neuroph_jars/sources/Core/src/main/java/org/neuroph/nnet/learning/CompetitiveLearning.java", "license": "gpl-2.0", "size": 2567 }
[ "org.neuroph.core.Connection", "org.neuroph.nnet.comp.layer.CompetitiveLayer", "org.neuroph.nnet.comp.neuron.CompetitiveNeuron" ]
import org.neuroph.core.Connection; import org.neuroph.nnet.comp.layer.CompetitiveLayer; import org.neuroph.nnet.comp.neuron.CompetitiveNeuron;
import org.neuroph.core.*; import org.neuroph.nnet.comp.layer.*; import org.neuroph.nnet.comp.neuron.*;
[ "org.neuroph.core", "org.neuroph.nnet" ]
org.neuroph.core; org.neuroph.nnet;
662,267
public FeatureResultSet queryFeaturesForChunk(String[] columns, double minX, double minY, double maxX, double maxY, String orderBy, int limit) { return queryFeaturesForChunk(false, columns, minX, minY, maxX, maxY, orderBy, limit); }
FeatureResultSet function(String[] columns, double minX, double minY, double maxX, double maxY, String orderBy, int limit) { return queryFeaturesForChunk(false, columns, minX, minY, maxX, maxY, orderBy, limit); }
/** * Query for features within the bounds, starting at the offset and * returning no more than the limit * * @param columns * columns * @param minX * min x * @param minY * min y * @param maxX * max x * @param maxY * max y * @param orde...
Query for features within the bounds, starting at the offset and returning no more than the limit
queryFeaturesForChunk
{ "repo_name": "ngageoint/geopackage-java", "path": "src/main/java/mil/nga/geopackage/extension/rtree/RTreeIndexTableDao.java", "license": "mit", "size": 349361 }
[ "mil.nga.geopackage.features.user.FeatureResultSet" ]
import mil.nga.geopackage.features.user.FeatureResultSet;
import mil.nga.geopackage.features.user.*;
[ "mil.nga.geopackage" ]
mil.nga.geopackage;
1,962,738
List<Member> getMembers(PerunSession sess, Vo vo, Status status) throws InternalErrorException, PrivilegeException, VoNotExistsException;
List<Member> getMembers(PerunSession sess, Vo vo, Status status) throws InternalErrorException, PrivilegeException, VoNotExistsException;
/** * Get all VO members who have the status. * * @param sess * @param vo * @param status get only members who have this status * @return all members of the VO * @throws InternalErrorException * @throws PrivilegeException * @throws VoNotExistsException */
Get all VO members who have the status
getMembers
{ "repo_name": "stavamichal/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/MembersManager.java", "license": "bsd-2-clause", "size": 57708 }
[ "cz.metacentrum.perun.core.api.exceptions.InternalErrorException", "cz.metacentrum.perun.core.api.exceptions.PrivilegeException", "cz.metacentrum.perun.core.api.exceptions.VoNotExistsException", "java.util.List" ]
import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum.perun.core.api.exceptions.VoNotExistsException; import java.util.List;
import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
490,491
default void checkCanInsertIntoTable(SystemSecurityContext context, CatalogSchemaTableName table) { denyInsertTable(table.toString()); }
default void checkCanInsertIntoTable(SystemSecurityContext context, CatalogSchemaTableName table) { denyInsertTable(table.toString()); }
/** * Check if identity is allowed to insert into the specified table in a catalog. * * @throws AccessDeniedException if not allowed */
Check if identity is allowed to insert into the specified table in a catalog
checkCanInsertIntoTable
{ "repo_name": "hgschmie/presto", "path": "presto-spi/src/main/java/io/prestosql/spi/security/SystemAccessControl.java", "license": "apache-2.0", "size": 21168 }
[ "io.prestosql.spi.connector.CatalogSchemaTableName", "io.prestosql.spi.security.AccessDeniedException" ]
import io.prestosql.spi.connector.CatalogSchemaTableName; import io.prestosql.spi.security.AccessDeniedException;
import io.prestosql.spi.connector.*; import io.prestosql.spi.security.*;
[ "io.prestosql.spi" ]
io.prestosql.spi;
2,564,713
protected BeanConnection createBeanConnection(int sourcePos, int targetPos, String event, boolean hidden) throws Exception { BeanConnection result; BeanInfo compInfo; EventSetDescriptor[] esds; int i; BeanInstance instSource; BeanInstance instTarget; result = null; // was there a...
BeanConnection function(int sourcePos, int targetPos, String event, boolean hidden) throws Exception { BeanConnection result; BeanInfo compInfo; EventSetDescriptor[] esds; int i; BeanInstance instSource; BeanInstance instTarget; result = null; if ((sourcePos == -1) (targetPos == -1)) { return result; } instSource = (Be...
/** * generates a connection based on the given parameters * * @param sourcePos the source position in the m_BeanInstances vector * @param targetPos the target position in the m_BeanInstances vector * @param event the name of the event, i.e., the connection * @param hidden true if the connection is h...
generates a connection based on the given parameters
createBeanConnection
{ "repo_name": "mydzigear/weka.kmeanspp.silhouette_score", "path": "src/weka/gui/beans/xml/XMLBeans.java", "license": "gpl-3.0", "size": 66607 }
[ "java.beans.BeanInfo", "java.beans.EventSetDescriptor", "java.beans.Introspector" ]
import java.beans.BeanInfo; import java.beans.EventSetDescriptor; import java.beans.Introspector;
import java.beans.*;
[ "java.beans" ]
java.beans;
2,606,643
//StringTable table2 = new StringTable("Directory_Location,Email_TO,Email_CC,Subject,Body",","); //table2.insertStringColumn("O:\\Grant\\Brian,emanuelrivera2010@yahoo.com,,Grant Process Alert-Folder5,File Change one"); //table2.insertStringColumn("O:\\Grant\\Ellie,emanuelrivera2010@yahoo.com,,Grant Process Al...
Timing StopWatch1=new Timing(); }
/** * The main method. * * @param args the arguments */
The main method
main
{ "repo_name": "earasoft/TUGrantProcessor", "path": "srcTest/org/shared/performance/DataTest2.java", "license": "gpl-2.0", "size": 2087 }
[ "org.shared.performance.Timing" ]
import org.shared.performance.Timing;
import org.shared.performance.*;
[ "org.shared.performance" ]
org.shared.performance;
1,768,003
public static Period stringToPeriod(String s) throws MotuConverterException { Period period = null; StringBuilder stringBuilder = new StringBuilder(); for (PeriodFormatter periodFormatter : DateUtils.PERIOD_FORMATTERS.values()) { try { period = periodFormatter.pa...
static Period function(String s) throws MotuConverterException { Period period = null; StringBuilder stringBuilder = new StringBuilder(); for (PeriodFormatter periodFormatter : DateUtils.PERIOD_FORMATTERS.values()) { try { period = periodFormatter.parsePeriod(s); } catch (IllegalArgumentException e) { stringBuilder.app...
/** * String to period. * * @param s the s * @return the period * @throws MotuConverterException the motu converter exception */
String to period
stringToPeriod
{ "repo_name": "clstoulouse/motu", "path": "motu-web/src/main/java/fr/cls/atoll/motu/web/common/utils/DateUtils.java", "license": "lgpl-3.0", "size": 28188 }
[ "fr.cls.atoll.motu.library.converter.exception.MotuConverterException", "org.joda.time.Period", "org.joda.time.format.PeriodFormatter" ]
import fr.cls.atoll.motu.library.converter.exception.MotuConverterException; import org.joda.time.Period; import org.joda.time.format.PeriodFormatter;
import fr.cls.atoll.motu.library.converter.exception.*; import org.joda.time.*; import org.joda.time.format.*;
[ "fr.cls.atoll", "org.joda.time" ]
fr.cls.atoll; org.joda.time;
3,611
@Override public Iterator<T> iterator() { if (iterator == null) { iterator = new PredicateIterator<T>(iterable.iterator(), predicate); } else { iterator.set(iterable.iterator(), predicate); } return iterator; } }
Iterator<T> function() { if (iterator == null) { iterator = new PredicateIterator<T>(iterable.iterator(), predicate); } else { iterator.set(iterable.iterator(), predicate); } return iterator; } }
/** * Returns an iterator. Note that the same iterator instance is returned each time this method is called. Use the * {@link Predicate.PredicateIterator} constructor for nested or multithreaded iteration. */
Returns an iterator. Note that the same iterator instance is returned each time this method is called. Use the <code>Predicate.PredicateIterator</code> constructor for nested or multithreaded iteration
iterator
{ "repo_name": "grum/Ashley", "path": "gdx-lib/src/main/java/com/badlogic/gdx/utils/Predicate.java", "license": "apache-2.0", "size": 4079 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,201,767
private int getPopupMenuItem(JPopupMenu menu, String text) { int index = -1; for (int i = 0; (index == -1) && (i < menu.getComponentCount()); i++) { Component comp = menu.getComponent(i); if (comp instanceof JMenuItem) { JMenuItem item = (JMenuItem) comp; ...
int function(JPopupMenu menu, String text) { int index = -1; for (int i = 0; (index == -1) && (i < menu.getComponentCount()); i++) { Component comp = menu.getComponent(i); if (comp instanceof JMenuItem) { JMenuItem item = (JMenuItem) comp; if (text.equals(item.getText())) { index = i; } } } return index; }
/** * Returns the index of an item in a popup menu. * * @param menu the menu. * @param text the label. * * @return The item index. */
Returns the index of an item in a popup menu
getPopupMenuItem
{ "repo_name": "akardapolov/ASH-Viewer", "path": "jfreechart-fse/src/main/java/org/jfree/chart/PolarChartPanel.java", "license": "gpl-3.0", "size": 8628 }
[ "java.awt.Component", "javax.swing.JMenuItem", "javax.swing.JPopupMenu" ]
import java.awt.Component; import javax.swing.JMenuItem; import javax.swing.JPopupMenu;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
338,457
@NotNull protected static Compiler retrieveCompiler() throws RegexpEngineNotFoundException { return RegexpUtils.getRegexpCompiler(); }
static Compiler function() throws RegexpEngineNotFoundException { return RegexpUtils.getRegexpCompiler(); }
/** * Retrieves the regexp compiler. * @return such compiler. * @throws RegexpEngineNotFoundException if the system is not configured * properly in order to provide regexp services. */
Retrieves the regexp compiler
retrieveCompiler
{ "repo_name": "rydnr/java-commons", "path": "src/main/java/org/acmsl/commons/utils/net/URLUtils.java", "license": "gpl-2.0", "size": 22921 }
[ "org.acmsl.commons.regexpplugin.Compiler", "org.acmsl.commons.regexpplugin.RegexpEngineNotFoundException", "org.acmsl.commons.utils.regexp.RegexpUtils" ]
import org.acmsl.commons.regexpplugin.Compiler; import org.acmsl.commons.regexpplugin.RegexpEngineNotFoundException; import org.acmsl.commons.utils.regexp.RegexpUtils;
import org.acmsl.commons.regexpplugin.*; import org.acmsl.commons.utils.regexp.*;
[ "org.acmsl.commons" ]
org.acmsl.commons;
2,688,105
@Nonnull public Map<String, TaskState> getTaskStates(@Nonnull String taskType) { return _pinotHelixTaskResourceManager.getTaskStates(taskType); }
Map<String, TaskState> function(@Nonnull String taskType) { return _pinotHelixTaskResourceManager.getTaskStates(taskType); }
/** * Get all tasks' state for the given task type. * * @param taskType Task type * @return Map from task name to task state */
Get all tasks' state for the given task type
getTaskStates
{ "repo_name": "apucher/pinot", "path": "pinot-controller/src/main/java/com/linkedin/pinot/controller/helix/core/minion/ClusterInfoProvider.java", "license": "apache-2.0", "size": 4883 }
[ "java.util.Map", "javax.annotation.Nonnull", "org.apache.helix.task.TaskState" ]
import java.util.Map; import javax.annotation.Nonnull; import org.apache.helix.task.TaskState;
import java.util.*; import javax.annotation.*; import org.apache.helix.task.*;
[ "java.util", "javax.annotation", "org.apache.helix" ]
java.util; javax.annotation; org.apache.helix;
442,519
return selector; } /** * Sets the value of the selector property. * * @param value * allowed object is * {@link Selector }
return selector; } /** * Sets the value of the selector property. * * @param value * allowed object is * {@link Selector }
/** * Gets the value of the selector property. * * @return * possible object is * {@link Selector } * */
Gets the value of the selector property
getSelector
{ "repo_name": "stoksey69/googleads-java-lib", "path": "modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201506/express/ProductServiceServiceInterfaceget.java", "license": "apache-2.0", "size": 1976 }
[ "com.google.api.ads.adwords.jaxws.v201506.cm.Selector" ]
import com.google.api.ads.adwords.jaxws.v201506.cm.Selector;
import com.google.api.ads.adwords.jaxws.v201506.cm.*;
[ "com.google.api" ]
com.google.api;
1,681,393