method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
@Test public void whenSetCommentInAddCommentThenReturnAddedComment() { Tracker tracker = new Tracker(); Item item = new Item("User", "User's name is Semyon"); tracker.add(item); tracker.addComment(item, "Comment"); Assert.assertTrue(Arrays.asList(item.getComment().getCom...
void function() { Tracker tracker = new Tracker(); Item item = new Item("User", STR); tracker.add(item); tracker.addComment(item, STR); Assert.assertTrue(Arrays.asList(item.getComment().getCommentDescription()).contains(STR)); }
/** * Test of the add comment method. */
Test of the add comment method
whenSetCommentInAddCommentThenReturnAddedComment
{ "repo_name": "Kilanov/java-a-to-z", "path": "tracker/src/test/java/ru/skilanov/service/TrackerTest.java", "license": "apache-2.0", "size": 3209 }
[ "java.util.Arrays", "org.junit.Assert", "ru.skilanov.models.Item", "ru.skilanov.service.Tracker" ]
import java.util.Arrays; import org.junit.Assert; import ru.skilanov.models.Item; import ru.skilanov.service.Tracker;
import java.util.*; import org.junit.*; import ru.skilanov.models.*; import ru.skilanov.service.*;
[ "java.util", "org.junit", "ru.skilanov.models", "ru.skilanov.service" ]
java.util; org.junit; ru.skilanov.models; ru.skilanov.service;
2,509,320
private static int getTenantIdOfDomain(String tenantDomain) throws IdentityApplicationManagementException { try { return IdPManagementUtil.getTenantIdOfDomain(tenantDomain); } catch (UserStoreException e) { log.error(e.getMessage(), e); String msg = "...
static int function(String tenantDomain) throws IdentityApplicationManagementException { try { return IdPManagementUtil.getTenantIdOfDomain(tenantDomain); } catch (UserStoreException e) { log.error(e.getMessage(), e); String msg = STR + tenantDomain; throw new IdentityApplicationManagementException(msg); } }
/** * Get the tenant id of the given tenant domain. * * @param tenantDomain Tenant Domain * @return Tenant Id of domain user belongs to. * @throws IdentityApplicationManagementException Error when getting tenant id from tenant * domain */
Get the tenant id of the given tenant domain
getTenantIdOfDomain
{ "repo_name": "SupunS/carbon-identity", "path": "components/identity/org.wso2.carbon.identity.provisioning/src/main/java/org/wso2/carbon/identity/provisioning/OutboundProvisioningManager.java", "license": "apache-2.0", "size": 31064 }
[ "org.wso2.carbon.identity.application.common.IdentityApplicationManagementException", "org.wso2.carbon.idp.mgt.util.IdPManagementUtil", "org.wso2.carbon.user.api.UserStoreException" ]
import org.wso2.carbon.identity.application.common.IdentityApplicationManagementException; import org.wso2.carbon.idp.mgt.util.IdPManagementUtil; import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.identity.application.common.*; import org.wso2.carbon.idp.mgt.util.*; import org.wso2.carbon.user.api.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,938,781
public final void deleteComment() { if (State.TO_POST.equals(getState())) { super.delete(); } else { setState(State.TO_DELETE); super.save(); } }
final void function() { if (State.TO_POST.equals(getState())) { super.delete(); } else { setState(State.TO_DELETE); super.save(); } }
/** * Performs soft delete of model. If State of object was SYNCED, it will be set to TO_DELETE. * If the model is persisted only in the local database, it will be removed immediately. */
Performs soft delete of model. If State of object was SYNCED, it will be set to TO_DELETE. If the model is persisted only in the local database, it will be removed immediately
deleteComment
{ "repo_name": "dhis2/dhis2-android-dashboard", "path": "api/src/main/java/org/hisp/dhis/android/dashboard/api/models/InterpretationComment.java", "license": "bsd-3-clause", "size": 4541 }
[ "org.hisp.dhis.android.dashboard.api.models.meta.State" ]
import org.hisp.dhis.android.dashboard.api.models.meta.State;
import org.hisp.dhis.android.dashboard.api.models.meta.*;
[ "org.hisp.dhis" ]
org.hisp.dhis;
632,022
public void initKeyboardEvent(String typeArg, boolean canBubbleArg, boolean cancelableArg, AbstractView viewArg, String keyIdentifierArg, int k...
void function(String typeArg, boolean canBubbleArg, boolean cancelableArg, AbstractView viewArg, String keyIdentifierArg, int keyLocationArg, String modifiersList) { initUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, 0); keyIdentifier = keyIdentifierArg; keyLocation = keyLocationArg; modifierKeys.clear(); Strin...
/** * <b>DOM</b>: Initializes this KeyboardEvent object. * @param typeArg Specifies the event type. * @param canBubbleArg Specifies whether or not the event can bubble. * @param cancelableArg Specifies whether or not the event's default action * can be prevented. * @param viewArg Specif...
DOM: Initializes this KeyboardEvent object
initKeyboardEvent
{ "repo_name": "adufilie/flex-sdk", "path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/dom/events/DOMKeyboardEvent.java", "license": "apache-2.0", "size": 17021 }
[ "org.w3c.dom.views.AbstractView" ]
import org.w3c.dom.views.AbstractView;
import org.w3c.dom.views.*;
[ "org.w3c.dom" ]
org.w3c.dom;
815,683
public T gzip() { GzipDataFormat gzdf = new GzipDataFormat(); return dataFormat(gzdf); }
T function() { GzipDataFormat gzdf = new GzipDataFormat(); return dataFormat(gzdf); }
/** * Uses the GZIP deflater data format */
Uses the GZIP deflater data format
gzip
{ "repo_name": "rmarting/camel", "path": "camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java", "license": "apache-2.0", "size": 42614 }
[ "org.apache.camel.model.dataformat.GzipDataFormat" ]
import org.apache.camel.model.dataformat.GzipDataFormat;
import org.apache.camel.model.dataformat.*;
[ "org.apache.camel" ]
org.apache.camel;
2,066,831
public Object getXAResourceManager() throws StandardException { return(rawstore.getXAResourceManager()); }
Object function() throws StandardException { return(rawstore.getXAResourceManager()); }
/** * Return the XAResourceManager associated with this AccessFactory. * <p> * Returns an object which can be used to implement the "offline" * 2 phase commit interaction between the accessfactory and outstanding * transaction managers taking care of in-doubt transactions. * * @retur...
Return the XAResourceManager associated with this AccessFactory. Returns an object which can be used to implement the "offline" 2 phase commit interaction between the accessfactory and outstanding transaction managers taking care of in-doubt transactions
getXAResourceManager
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.engine/org/apache/derby/impl/store/access/RAMAccessManager.java", "license": "apache-2.0", "size": 50723 }
[ "org.apache.derby.shared.common.error.StandardException" ]
import org.apache.derby.shared.common.error.StandardException;
import org.apache.derby.shared.common.error.*;
[ "org.apache.derby" ]
org.apache.derby;
2,837,282
boolean validate(String enteredValue, ActionErrors errors);
boolean validate(String enteredValue, ActionErrors errors);
/** * This method validate various data types. * @param enteredValue entered Value * @param errors errors * @return conditionError. */
This method validate various data types
validate
{ "repo_name": "NCIP/commons-module", "path": "software/washu-commons/src/main/java/edu/wustl/common/datatypes/IDBDataType.java", "license": "bsd-3-clause", "size": 944 }
[ "org.apache.struts.action.ActionErrors" ]
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.*;
[ "org.apache.struts" ]
org.apache.struts;
514,996
public static BaseFunction checkCallable(Object functionValue, Location location) throws EvalException { if (functionValue instanceof BaseFunction) { return (BaseFunction) functionValue; } else { throw new EvalException( location, "'" + EvalUtils.getDataTypeName(functionValue) + "'...
static BaseFunction function(Object functionValue, Location location) throws EvalException { if (functionValue instanceof BaseFunction) { return (BaseFunction) functionValue; } else { throw new EvalException( location, "'" + EvalUtils.getDataTypeName(functionValue) + STR); } } private static final StackManipulation che...
/** * Checks whether the given object is a {@link BaseFunction}. * * <p>Public for reflection by the compiler and access from generated byte code. * * @throws EvalException If not a BaseFunction. */
Checks whether the given object is a <code>BaseFunction</code>. Public for reflection by the compiler and access from generated byte code
checkCallable
{ "repo_name": "mikelikespie/bazel", "path": "src/main/java/com/google/devtools/build/lib/syntax/FuncallExpression.java", "license": "apache-2.0", "size": 36585 }
[ "com.google.common.collect.ImmutableList", "com.google.devtools.build.lib.events.Location", "com.google.devtools.build.lib.syntax.compiler.ByteCodeUtils", "net.bytebuddy.implementation.bytecode.StackManipulation" ]
import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.events.Location; import com.google.devtools.build.lib.syntax.compiler.ByteCodeUtils; import net.bytebuddy.implementation.bytecode.StackManipulation;
import com.google.common.collect.*; import com.google.devtools.build.lib.events.*; import com.google.devtools.build.lib.syntax.compiler.*; import net.bytebuddy.implementation.bytecode.*;
[ "com.google.common", "com.google.devtools", "net.bytebuddy.implementation" ]
com.google.common; com.google.devtools; net.bytebuddy.implementation;
320,940
AuthorizationResult authorize(ModelNode operation, String attribute, ModelNode currentValue, Set<Action.ActionEffect> effects); /** * Check for authorization to execute an operation. * * @param operation the operation. Cannot be {@code null}
AuthorizationResult authorize(ModelNode operation, String attribute, ModelNode currentValue, Set<Action.ActionEffect> effects); /** * Check for authorization to execute an operation. * * @param operation the operation. Cannot be {@code null}
/** * Check for authorization to read or modify an attribute, limiting the check to the given effects of the operation * @param operation the operation that will read or modify * @param attribute the attribute name * @param currentValue the current value of the attribute * @param effects the ef...
Check for authorization to read or modify an attribute, limiting the check to the given effects of the operation
authorize
{ "repo_name": "luck3y/wildfly-core", "path": "controller/src/main/java/org/jboss/as/controller/OperationContext.java", "license": "lgpl-2.1", "size": 65367 }
[ "java.util.Set", "org.jboss.as.controller.access.Action", "org.jboss.as.controller.access.AuthorizationResult", "org.jboss.dmr.ModelNode" ]
import java.util.Set; import org.jboss.as.controller.access.Action; import org.jboss.as.controller.access.AuthorizationResult; import org.jboss.dmr.ModelNode;
import java.util.*; import org.jboss.as.controller.access.*; import org.jboss.dmr.*;
[ "java.util", "org.jboss.as", "org.jboss.dmr" ]
java.util; org.jboss.as; org.jboss.dmr;
585,538
public static void createOutputDir(final File outputDir) { if (!outputDir.exists()) { JavaCCErrors.warning("Output directory \"" + outputDir + "\" does not exist. Creating the directory."); if (!outputDir.mkdirs()) { JavaCCErrors.semantic_error("Cannot create the ou...
static void function(final File outputDir) { if (!outputDir.exists()) { JavaCCErrors.warning(STRSTR\STR); if (!outputDir.mkdirs()) { JavaCCErrors.semantic_error(STR + outputDir); return; } } if (!outputDir.isDirectory()) { JavaCCErrors.semantic_error("\"STR is not a valid output directory.STRCannot write to the output ...
/** * Creates an output directory. * * @param outputDir - the output directory to be created */
Creates an output directory
createOutputDir
{ "repo_name": "jtb-javacc/JTB", "path": "src/EDU/purdue/jtb/parser/JavaCCGlobals.java", "license": "bsd-3-clause", "size": 22093 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,767,902
public GallerySettings getGallerySettings() { final Ode ode = Ode.getInstance(); return ode.getGallerySettings(); }
GallerySettings function() { final Ode ode = Ode.getInstance(); return ode.getGallerySettings(); }
/** * Returns the gallery settings. * * @return gallery settings */
Returns the gallery settings
getGallerySettings
{ "repo_name": "bitsecure/appinventor1-sources", "path": "appinventor/appengine/src/com/google/appinventor/client/GalleryClient.java", "license": "apache-2.0", "size": 13660 }
[ "com.google.appinventor.shared.rpc.project.GallerySettings" ]
import com.google.appinventor.shared.rpc.project.GallerySettings;
import com.google.appinventor.shared.rpc.project.*;
[ "com.google.appinventor" ]
com.google.appinventor;
1,695,556
private static void releaseBuffer(List<DFSPacket> packets, ByteArrayManager bam) { for(DFSPacket p : packets) { p.releaseBuffer(bam); } packets.clear(); } private volatile boolean streamerClosed = false; private ExtendedBlock block; // its length is number of bytes acked private Token<Block...
static void function(List<DFSPacket> packets, ByteArrayManager bam) { for(DFSPacket p : packets) { p.releaseBuffer(bam); } packets.clear(); } private volatile boolean streamerClosed = false; private ExtendedBlock block; private Token<BlockTokenIdentifier> accessToken; private DataOutputStream blockStream; private DataI...
/** * release a list of packets to ByteArrayManager * * @param packets packets to be release * @param bam ByteArrayManager */
release a list of packets to ByteArrayManager
releaseBuffer
{ "repo_name": "jth/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java", "license": "apache-2.0", "size": 64924 }
[ "com.google.common.cache.LoadingCache", "java.io.DataInputStream", "java.io.DataOutputStream", "java.io.IOException", "java.net.Socket", "java.util.ArrayList", "java.util.LinkedList", "java.util.List", "java.util.concurrent.atomic.AtomicBoolean", "java.util.concurrent.atomic.AtomicInteger", "jav...
import com.google.common.cache.LoadingCache; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.net.Socket; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent....
import com.google.common.cache.*; import java.io.*; import java.net.*; import java.util.*; import java.util.concurrent.atomic.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.protocol.datatransfer.*; import org.apache.hadoop.hdfs.security.token.block.*; import or...
[ "com.google.common", "java.io", "java.net", "java.util", "org.apache.hadoop" ]
com.google.common; java.io; java.net; java.util; org.apache.hadoop;
1,720,388
public static Object unmarshalByType(final Unmarshaller u, final XMLStreamReader reader, final Class type, final boolean isList, final JAXBUtils.CONSTRUCTION_TYPE ctype) throws WebServiceException { if (DEBUG_E...
static Object function(final Unmarshaller u, final XMLStreamReader reader, final Class type, final boolean isList, final JAXBUtils.CONSTRUCTION_TYPE ctype) throws WebServiceException { if (DEBUG_ENABLED) { log.debug(STR); log.debug(STR + type); log.debug(STR + isList); log.debug(STR+ ctype); }
/** * The root element being read is defined by schema/JAXB; however its contents are known by * schema/JAXB. Therefore we use unmarshal by the declared type (This method is used to * unmarshal rpc elements) * * @param u Unmarshaller * @param reader XMLStreamReader * @param ty...
The root element being read is defined by schema/JAXB; however its contents are known by schema/JAXB. Therefore we use unmarshal by the declared type (This method is used to unmarshal rpc elements)
unmarshalByType
{ "repo_name": "arunasujith/wso2-axis2", "path": "modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBDSContext.java", "license": "apache-2.0", "size": 48423 }
[ "javax.xml.bind.Unmarshaller", "javax.xml.stream.XMLStreamReader", "javax.xml.ws.WebServiceException", "org.apache.axis2.jaxws.message.databinding.JAXBUtils" ]
import javax.xml.bind.Unmarshaller; import javax.xml.stream.XMLStreamReader; import javax.xml.ws.WebServiceException; import org.apache.axis2.jaxws.message.databinding.JAXBUtils;
import javax.xml.bind.*; import javax.xml.stream.*; import javax.xml.ws.*; import org.apache.axis2.jaxws.message.databinding.*;
[ "javax.xml", "org.apache.axis2" ]
javax.xml; org.apache.axis2;
1,244,559
private void showGlobalContextActionBar() { ActionBar actionBar = getActionBar(); actionBar.setDisplayShowTitleEnabled(true); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); actionBar.setTitle(R.string.app_name); }
void function() { ActionBar actionBar = getActionBar(); actionBar.setDisplayShowTitleEnabled(true); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); actionBar.setTitle(R.string.app_name); }
/** * Per the navigation drawer design guidelines, updates the action bar to show the global app * 'context', rather than just what's in the current screen. */
Per the navigation drawer design guidelines, updates the action bar to show the global app 'context', rather than just what's in the current screen
showGlobalContextActionBar
{ "repo_name": "rsteckler/unbounce-android", "path": "app/src/main/java/com/ryansteckler/nlpunbounce/NavigationDrawerFragment.java", "license": "mit", "size": 9438 }
[ "android.app.ActionBar" ]
import android.app.ActionBar;
import android.app.*;
[ "android.app" ]
android.app;
681,291
public static Bitmap getCachedBitmap(String value, Object projectKey) { if (projectKey != null) { Map<String, SoftReference<Bitmap>> map = sProjectBitmapCache.get(projectKey); if (map != null) { SoftReference<Bitmap> ref = map.get(value); if (ref != nu...
static Bitmap function(String value, Object projectKey) { if (projectKey != null) { Map<String, SoftReference<Bitmap>> map = sProjectBitmapCache.get(projectKey); if (map != null) { SoftReference<Bitmap> ref = map.get(value); if (ref != null) { return ref.get(); } } } else { SoftReference<Bitmap> ref = sFrameworkBitmapC...
/** * Returns the bitmap for a specific path, from a specific project cache, or from the * framework cache. * @param value the path of the bitmap * @param projectKey the key of the project, or null to query the framework cache. * @return the cached Bitmap or null if not found. */
Returns the bitmap for a specific path, from a specific project cache, or from the framework cache
getCachedBitmap
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java", "license": "gpl-3.0", "size": 22860 }
[ "android.graphics.Bitmap", "java.lang.ref.SoftReference", "java.util.Map" ]
import android.graphics.Bitmap; import java.lang.ref.SoftReference; import java.util.Map;
import android.graphics.*; import java.lang.ref.*; import java.util.*;
[ "android.graphics", "java.lang", "java.util" ]
android.graphics; java.lang; java.util;
2,388,437
public void onRetryFailure(OperationFailureException lastException) { out.println("Failed despite retries." + ((lastException == null) ? "" : " Encountered exception:" + lastException)); }
void function(OperationFailureException lastException) { out.println(STR + ((lastException == null) ? STR Encountered exception:" + lastException)); }
/** * May be optionally overridden to handle a failure after the * TRANSACTION_RETRY_MAX has been exceeded. After this method is called, * the RunTransaction constructor will return. By default, this method * prints the last exception. */
May be optionally overridden to handle a failure after the TRANSACTION_RETRY_MAX has been exceeded. After this method is called, the RunTransaction constructor will return. By default, this method prints the last exception
onRetryFailure
{ "repo_name": "prat0318/dbms", "path": "mini_dbms/je-5.0.103/examples/je/rep/quote/RunTransaction.java", "license": "mit", "size": 11320 }
[ "com.sleepycat.je.OperationFailureException" ]
import com.sleepycat.je.OperationFailureException;
import com.sleepycat.je.*;
[ "com.sleepycat.je" ]
com.sleepycat.je;
2,395,046
public Optional<String> getBzOpt() { return getAnnotationStringOpt("BZ"); }
Optional<String> function() { return getAnnotationStringOpt("BZ"); }
/** * Return an optional Type=Z value for the reserved key <code>BZ</code> * as a string. * * @return an optional Type=Z value for the reserved key <code>BZ</code> * as a string */
Return an optional Type=Z value for the reserved key <code>BZ</code> as a string
getBzOpt
{ "repo_name": "heuermh/dishevelled-bio", "path": "alignment/src/main/java/org/dishevelled/bio/alignment/sam/SamRecord.java", "license": "lgpl-3.0", "size": 61001 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
2,145,443
public final void unregister(SelectableChannel channel) { SelectionKey selectionKey = channel.keyFor(selector); if (selectionKey == null) { return; } selectionKey.cancel(); selectionKey.attach(null); }
final void function(SelectableChannel channel) { SelectionKey selectionKey = channel.keyFor(selector); if (selectionKey == null) { return; } selectionKey.cancel(); selectionKey.attach(null); }
/** * Removes the {@link SelectableChannel} from the hub's {@link Selector}. * * @param channel the {@link SelectableChannel} to remove. */
Removes the <code>SelectableChannel</code> from the hub's <code>Selector</code>
unregister
{ "repo_name": "jenkinsci/remoting", "path": "src/main/java/org/jenkinsci/remoting/protocol/IOHub.java", "license": "mit", "size": 38666 }
[ "java.nio.channels.SelectableChannel", "java.nio.channels.SelectionKey" ]
import java.nio.channels.SelectableChannel; import java.nio.channels.SelectionKey;
import java.nio.channels.*;
[ "java.nio" ]
java.nio;
2,320,419
public static Project getSelectedProject() { DataContext dataContext = DataManager.getInstance().getDataContextFromFocus().getResult(); return DataKeys.PROJECT.getData(dataContext); }
static Project function() { DataContext dataContext = DataManager.getInstance().getDataContextFromFocus().getResult(); return DataKeys.PROJECT.getData(dataContext); }
/** * This method returns currently selected project in workspace. * * @return Project */
This method returns currently selected project in workspace
getSelectedProject
{ "repo_name": "Microsoft/Azure-Toolkit-for-IntelliJ", "path": "src/com/microsoft/intellij/util/PluginUtil.java", "license": "mit", "size": 8225 }
[ "com.intellij.ide.DataManager", "com.intellij.openapi.actionSystem.DataContext", "com.intellij.openapi.actionSystem.DataKeys", "com.intellij.openapi.project.Project" ]
import com.intellij.ide.DataManager; import com.intellij.openapi.actionSystem.DataContext; import com.intellij.openapi.actionSystem.DataKeys; import com.intellij.openapi.project.Project;
import com.intellij.ide.*; import com.intellij.openapi.*; import com.intellij.openapi.project.*;
[ "com.intellij.ide", "com.intellij.openapi" ]
com.intellij.ide; com.intellij.openapi;
2,777,700
public boolean isSelected(File basedir, String filename, File file) { validate(); Enumeration<FileSelector> e = selectorElements(); // First, check that all elements are correctly configured while (e.hasMoreElements()) { if (e.nextElement().isSelected(basedir, filename, ...
boolean function(File basedir, String filename, File file) { validate(); Enumeration<FileSelector> e = selectorElements(); while (e.hasMoreElements()) { if (e.nextElement().isSelected(basedir, filename, file)) { return true; } } return false; }
/** * Returns true (the file is selected) if any of the other selectors * agree that the file should be selected. * * @param basedir the base directory the scan is being done from * @param filename the name of the file to check * @param file a java.io.File object for the filename that the ...
Returns true (the file is selected) if any of the other selectors agree that the file should be selected
isSelected
{ "repo_name": "Mayo-WE01051879/mayosapp", "path": "Build/src/main/org/apache/tools/ant/types/selectors/OrSelector.java", "license": "mit", "size": 2376 }
[ "java.io.File", "java.util.Enumeration" ]
import java.io.File; import java.util.Enumeration;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,103,203
@Message(id = 46, value = "Cannot obtain a valid default address for communicating with " + "the ProcessController using either %s or InetAddress.getLocalHost(). Please check your system's " + "network configuration or use the %s command line switch to configure a valid address") Runtime...
@Message(id = 46, value = STR + STR + STR) RuntimeException cannotObtainValidDefaultAddress(@Cause Throwable cause, String defaultAddress, String option);
/** * Creates an exception indicating the default address cannot be obtained for communicating with the * ProcessController. * * @param cause the cause of the error. * @param defaultAddress the default address. * @param option the option. * * @return a {@link Run...
Creates an exception indicating the default address cannot be obtained for communicating with the ProcessController
cannotObtainValidDefaultAddress
{ "repo_name": "luck3y/wildfly-core", "path": "host-controller/src/main/java/org/jboss/as/host/controller/logging/HostControllerLogger.java", "license": "lgpl-2.1", "size": 65652 }
[ "org.jboss.logging.annotations.Cause", "org.jboss.logging.annotations.Message" ]
import org.jboss.logging.annotations.Cause; import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.*;
[ "org.jboss.logging" ]
org.jboss.logging;
1,956,967
public UserInfo getUserInfo (String username) throws Exception { Map userInfoMap = (Map)fileMap.get(propertyFileName); if (userInfoMap == null) return null; return (UserInfo)userInfoMap.get(username); }
UserInfo function (String username) throws Exception { Map userInfoMap = (Map)fileMap.get(propertyFileName); if (userInfoMap == null) return null; return (UserInfo)userInfoMap.get(username); }
/** * Don't implement this as we want to pre-fetch all of the * users. * @see org.mortbay.jetty.plus.jaas.spi.AbstractLoginModule#lazyLoadUser(java.lang.String) * @param username * @throws Exception */
Don't implement this as we want to pre-fetch all of the users
getUserInfo
{ "repo_name": "napcs/qedserver", "path": "jetty/modules/plus/src/main/java/org/mortbay/jetty/plus/jaas/spi/PropertyFileLoginModule.java", "license": "mit", "size": 5629 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,715,982
public int numberOfSimilarEventAtSameTime(int time, EventType evtType, String nodeId) { //Get events scheduled for the same time Set<Event<?>> evtSet = this.events.get(time); //No event already scheduled for the given time if(evtSet == null){ ...
int function(int time, EventType evtType, String nodeId) { Set<Event<?>> evtSet = this.events.get(time); if(evtSet == null){ return 0; } else { int count = 0; for(Event<?> evt : evtSet){ if((evt.getType() == evtType) && evt.getNodeID().equals(nodeId)){ count++; } } return count; } }
/** * Return the number of similar events (same type and node Id) scheduled for the same time * * @param time when the event is scheduled * @param evtType type of the event * @param nodeId Id of the node associated to the event * * @return number of similar events scheduled for the ...
Return the number of similar events (same type and node Id) scheduled for the same time
numberOfSimilarEventAtSameTime
{ "repo_name": "pcjesus/NetworkSimulator", "path": "src/msm/simulator/ScheduledEvents.java", "license": "mit", "size": 6167 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,864,266
public static String xmlNode2String(Node xmlNode) throws Exception { TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(); transformer.setOutputProperty(PROPERTY_INDENT, VALUE_YES); javax.xml.transform.dom.DOMSource src = new javax.xml.transform.do...
static String function(Node xmlNode) throws Exception { TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(); transformer.setOutputProperty(PROPERTY_INDENT, VALUE_YES); javax.xml.transform.dom.DOMSource src = new javax.xml.transform.dom.DOMSource(xmlNode); ja...
/** * This method should eventually replace the toXMLString(Document doc) method. * * @param xmlNode * @return * @throws Exception */
This method should eventually replace the toXMLString(Document doc) method
xmlNode2String
{ "repo_name": "ungerik/ephesoft", "path": "Ephesoft_Community_Release_4.0.2.0/source/dcma-util/src/main/java/com/ephesoft/dcma/util/XMLUtil.java", "license": "agpl-3.0", "size": 19765 }
[ "javax.xml.transform.Transformer", "javax.xml.transform.TransformerFactory", "javax.xml.transform.dom.DOMSource", "org.w3c.dom.Node" ]
import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import org.w3c.dom.Node;
import javax.xml.transform.*; import javax.xml.transform.dom.*; import org.w3c.dom.*;
[ "javax.xml", "org.w3c.dom" ]
javax.xml; org.w3c.dom;
1,110,753
private void logTotalInstances() { int totInstances = 0; for (Application application : getApplications().getRegisteredApplications()) { totInstances += application.getInstancesAsIsFromEureka().size(); } logger.debug("The total number of all instances in the client now is...
void function() { int totInstances = 0; for (Application application : getApplications().getRegisteredApplications()) { totInstances += application.getInstancesAsIsFromEureka().size(); } logger.debug(STR, totInstances); }
/** * Logs the total number of non-filtered instances stored locally. */
Logs the total number of non-filtered instances stored locally
logTotalInstances
{ "repo_name": "jaume-pinyol/eureka", "path": "eureka-client/src/main/java/com/netflix/discovery/DiscoveryClient.java", "license": "apache-2.0", "size": 86924 }
[ "com.netflix.discovery.shared.Application" ]
import com.netflix.discovery.shared.Application;
import com.netflix.discovery.shared.*;
[ "com.netflix.discovery" ]
com.netflix.discovery;
1,532,983
@Override public void onStart() { super.onStart(); // Start activity tracking via Google Analytics if (!isDeveloper) GoogleAnalytics.getInstance(this).reportActivityStart(this); }
void function() { super.onStart(); if (!isDeveloper) GoogleAnalytics.getInstance(this).reportActivityStart(this); }
/** * Overriding onStart to enable Google Analytics stats collection */
Overriding onStart to enable Google Analytics stats collection
onStart
{ "repo_name": "greekins/baIOT_Android", "path": "mobile/src/main/java/org/openhab/habdroid/ui/OpenHABMainActivity.java", "license": "epl-1.0", "size": 58883 }
[ "com.google.android.gms.analytics.GoogleAnalytics" ]
import com.google.android.gms.analytics.GoogleAnalytics;
import com.google.android.gms.analytics.*;
[ "com.google.android" ]
com.google.android;
1,192,981
protected void handleChangedResources() { if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) { if (isDirty()) { changedResources.addAll(editingDomain.getResourceSet().getResources()); } editingDomain.getCommandStack().flush(); updateProblemIndication = false; for (Resourc...
void function() { if (!changedResources.isEmpty() && (!isDirty() handleDirtyConflict())) { if (isDirty()) { changedResources.addAll(editingDomain.getResourceSet().getResources()); } editingDomain.getCommandStack().flush(); updateProblemIndication = false; for (Resource resource : changedResources) { if (resource.isLoad...
/** * Handles what to do with changed resources on activation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Handles what to do with changed resources on activation.
handleChangedResources
{ "repo_name": "andydunkel/RCP-Demo-Application", "path": "com.da.editor.model.editor/src/demomodel/presentation/DemomodelEditor.java", "license": "epl-1.0", "size": 53957 }
[ "java.io.IOException", "java.util.Collections", "org.eclipse.emf.ecore.resource.Resource", "org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain", "org.eclipse.jface.viewers.StructuredSelection" ]
import java.io.IOException; import java.util.Collections; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; import org.eclipse.jface.viewers.StructuredSelection;
import java.io.*; import java.util.*; import org.eclipse.emf.ecore.resource.*; import org.eclipse.emf.edit.domain.*; import org.eclipse.jface.viewers.*;
[ "java.io", "java.util", "org.eclipse.emf", "org.eclipse.jface" ]
java.io; java.util; org.eclipse.emf; org.eclipse.jface;
576,070
@VisibleForTesting static void processHsrpGroups( Map<Ip, Map<String, Set<String>>> ipOwners, Map<Integer, Map<NodeInterfacePair, Set<Ip>>> hsrpGroups, L3Adjacencies l3Adjacencies, NetworkConfigurations nc) { hsrpGroups.forEach( (groupNum, ipSpaceByCandidate) -> { asser...
static void processHsrpGroups( Map<Ip, Map<String, Set<String>>> ipOwners, Map<Integer, Map<NodeInterfacePair, Set<Ip>>> hsrpGroups, L3Adjacencies l3Adjacencies, NetworkConfigurations nc) { hsrpGroups.forEach( (groupNum, ipSpaceByCandidate) -> { assert groupNum != null; Set<NodeInterfacePair> candidates = ipSpaceByCand...
/** * Take {@code hsrpGroups} table, run master interface selection process, and add that * IP/interface pair to ip owners */
Take hsrpGroups table, run master interface selection process, and add that IP/interface pair to ip owners
processHsrpGroups
{ "repo_name": "arifogel/batfish", "path": "projects/batfish-common-protocol/src/main/java/org/batfish/common/topology/IpOwners.java", "license": "apache-2.0", "size": 28139 }
[ "com.google.common.collect.ImmutableList", "java.util.Collections", "java.util.Comparator", "java.util.HashMap", "java.util.HashSet", "java.util.List", "java.util.Map", "java.util.Set", "org.batfish.datamodel.Interface", "org.batfish.datamodel.Ip", "org.batfish.datamodel.NetworkConfigurations", ...
import com.google.common.collect.ImmutableList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.batfish.datamodel.Interface; import org.batfish.datamodel.Ip; import org.batfish.da...
import com.google.common.collect.*; import java.util.*; import org.batfish.datamodel.*; import org.batfish.datamodel.collections.*;
[ "com.google.common", "java.util", "org.batfish.datamodel" ]
com.google.common; java.util; org.batfish.datamodel;
455,012
@Internal public StreamExecutionEnvironment execEnv() { return executionEnvironment; }
StreamExecutionEnvironment function() { return executionEnvironment; }
/** * This is a temporary workaround for Python API. Python API should not use StreamExecutionEnvironment at all. */
This is a temporary workaround for Python API. Python API should not use StreamExecutionEnvironment at all
execEnv
{ "repo_name": "darionyaphet/flink", "path": "flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/api/bridge/java/internal/StreamTableEnvironmentImpl.java", "license": "apache-2.0", "size": 14556 }
[ "org.apache.flink.streaming.api.environment.StreamExecutionEnvironment" ]
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.api.environment.*;
[ "org.apache.flink" ]
org.apache.flink;
2,380,011
protected boolean compareIds(COSDictionary first, COSDictionary last) { COSBase idFirst = first.getDictionaryObject(COSName.ID); COSBase idLast = last.getDictionaryObject(COSName.ID); // According to the revised PDF/A specification the IDs have to be identical // if both are pres...
boolean function(COSDictionary first, COSDictionary last) { COSBase idFirst = first.getDictionaryObject(COSName.ID); COSBase idLast = last.getDictionaryObject(COSName.ID); if (idFirst != null && idLast != null) { if (!(idFirst instanceof COSArray) !(idLast instanceof COSArray)) { return false; } boolean isEqual = true;...
/** * Return true if the ID of the first dictionary is the same as the id of the last dictionary Return false * otherwise. * * @param first the first dictionary for comparison. * @param last the last dictionary for comparison. * @return true if the IDs of the first and last dictionary are...
Return true if the ID of the first dictionary is the same as the id of the last dictionary Return false otherwise
compareIds
{ "repo_name": "apache/pdfbox", "path": "preflight/src/main/java/org/apache/pdfbox/preflight/process/TrailerValidationProcess.java", "license": "apache-2.0", "size": 12145 }
[ "org.apache.pdfbox.cos.COSArray", "org.apache.pdfbox.cos.COSBase", "org.apache.pdfbox.cos.COSDictionary", "org.apache.pdfbox.cos.COSName", "org.apache.pdfbox.cos.COSString" ]
import org.apache.pdfbox.cos.COSArray; import org.apache.pdfbox.cos.COSBase; import org.apache.pdfbox.cos.COSDictionary; import org.apache.pdfbox.cos.COSName; import org.apache.pdfbox.cos.COSString;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
2,832,733
public void setDestinationType(final IType type) { Assert.isNotNull(type); fType= type; }
void function(final IType type) { Assert.isNotNull(type); fType= type; }
/** * Sets the destination type of the move operation. * * @param type * the destination type */
Sets the destination type of the move operation
setDestinationType
{ "repo_name": "kaloyan-raev/che", "path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/jdt/core/refactoring/descriptors/MoveStaticMembersDescriptor.java", "license": "epl-1.0", "size": 6060 }
[ "org.eclipse.core.runtime.Assert", "org.eclipse.jdt.core.IType" ]
import org.eclipse.core.runtime.Assert; import org.eclipse.jdt.core.IType;
import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*;
[ "org.eclipse.core", "org.eclipse.jdt" ]
org.eclipse.core; org.eclipse.jdt;
1,985,078
private static HashMap<String, Term> findSubstituteVar(VarType type, Variable var, Term term, HashMap<String, Term> subs, boolean first) { String name1 = var.getVarName(first); Term oldTerm = subs.get(name1); if (oldTerm != null) { if (first) { return findSubstitu...
static HashMap<String, Term> function(VarType type, Variable var, Term term, HashMap<String, Term> subs, boolean first) { String name1 = var.getVarName(first); Term oldTerm = subs.get(name1); if (oldTerm != null) { if (first) { return findSubstitute(type, oldTerm, term, subs); } else { return findSubstitute(type, term,...
/** * To find a substitution that can unify a Vriable and a Term * @param type The type of Variable to be substituted * @param var The Variable to be unified * @param term The Term to be unified * @param subs The substitution formed so far * @param first If it is the first Term in unify ...
To find a substitution that can unify a Vriable and a Term
findSubstituteVar
{ "repo_name": "automenta/jcog", "path": "nars/jcog/nars/reason/language/Variable.java", "license": "gpl-3.0", "size": 10835 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
478,312
List<T> ret = new ArrayList<T>(list.size() < count ? list.size() : count); int i = 0; for (T elem : list) { ret.add(elem); if (i++ > count) { break; } } return ret; }
List<T> ret = new ArrayList<T>(list.size() < count ? list.size() : count); int i = 0; for (T elem : list) { ret.add(elem); if (i++ > count) { break; } } return ret; }
/** * Copies <code>count</code> items off of list, starting from the beginning. * * @param <T> The type of the list. * @param list The list to copy from. * @param count The number of items to copy. * @return The copied list. */
Copies <code>count</code> items off of list, starting from the beginning
copyFirst
{ "repo_name": "Micah-S/hidden-ms", "path": "src/src/net/sf/odinms/tools/CollectionUtil.java", "license": "agpl-3.0", "size": 690 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,149,772
void removeTreePaths(List paths) { //treeDisplay.removeTreeSelectionListener(selectionListener); Iterator j = paths.iterator(); while (j.hasNext()) treeDisplay.removeSelectionPath((TreePath) j.next()); //treeDisplay.addTreeSelectionListener(selectionListener); }
void removeTreePaths(List paths) { Iterator j = paths.iterator(); while (j.hasNext()) treeDisplay.removeSelectionPath((TreePath) j.next()); }
/** * Removes the collection of <code>TreePath</code>s from the main tree. * We first need to remove the <code>TreeSelectionListener</code> to avoid * loop. * * @param paths Collection of paths to be removed. */
Removes the collection of <code>TreePath</code>s from the main tree. We first need to remove the <code>TreeSelectionListener</code> to avoid loop
removeTreePaths
{ "repo_name": "tp81/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserUI.java", "license": "gpl-2.0", "size": 79052 }
[ "java.util.Iterator", "java.util.List", "javax.swing.tree.TreePath" ]
import java.util.Iterator; import java.util.List; import javax.swing.tree.TreePath;
import java.util.*; import javax.swing.tree.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
783,311
public Color getColor() { return color; }
public Color getColor() { return color; }
/** * Returns the button text. */
Returns the button text
getText
{ "repo_name": "mad-s/opsu", "path": "src/itdelatrisu/opsu/states/ButtonMenu.java", "license": "gpl-3.0", "size": 27423 }
[ "org.newdawn.slick.Color" ]
import org.newdawn.slick.Color;
import org.newdawn.slick.*;
[ "org.newdawn.slick" ]
org.newdawn.slick;
2,648,049
public void throwException() { mv.visitInsn(Opcodes.ATHROW); }
void function() { mv.visitInsn(Opcodes.ATHROW); }
/** * Generates the instruction to throw an exception. */
Generates the instruction to throw an exception
throwException
{ "repo_name": "llbit/ow2-asm", "path": "src/org/objectweb/asm/commons/GeneratorAdapter.java", "license": "bsd-3-clause", "size": 50594 }
[ "org.objectweb.asm.Opcodes" ]
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.*;
[ "org.objectweb.asm" ]
org.objectweb.asm;
929,310
@POST @Consumes({ApiMediaType.APPLICATION_XML, ApiMediaType.APPLICATION_JSON, ApiMediaType.APPLICATION_X_YAML}) public Response add(Host host);
@Consumes({ApiMediaType.APPLICATION_XML, ApiMediaType.APPLICATION_JSON, ApiMediaType.APPLICATION_X_YAML}) Response function(Host host);
/** * Creates a new host and adds it to the database. The host is * created based on the properties of @host. * <p> * The Host#name, Host#address and Host#rootPassword properties * are required. * * @param host the host definition from which to create the new * host...
Creates a new host and adds it to the database. The host is created based on the properties of @host. The Host#name, Host#address and Host#rootPassword properties are required
add
{ "repo_name": "halober/ovirt-engine", "path": "backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/HostsResource.java", "license": "apache-2.0", "size": 2327 }
[ "javax.ws.rs.Consumes", "javax.ws.rs.core.Response", "org.ovirt.engine.api.model.Host" ]
import javax.ws.rs.Consumes; import javax.ws.rs.core.Response; import org.ovirt.engine.api.model.Host;
import javax.ws.rs.*; import javax.ws.rs.core.*; import org.ovirt.engine.api.model.*;
[ "javax.ws", "org.ovirt.engine" ]
javax.ws; org.ovirt.engine;
2,029,058
Set<String> getObservablePropertiesForOffering(String offering);
Set<String> getObservablePropertiesForOffering(String offering);
/** * Get the observable properties associated with the specified offering. * * @param offering * the offering * * @return the observable properties */
Get the observable properties associated with the specified offering
getObservablePropertiesForOffering
{ "repo_name": "ahuarte47/SOS", "path": "core/api/src/main/java/org/n52/sos/cache/ContentCache.java", "license": "gpl-2.0", "size": 25657 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,856,311
super.onCreate(); mInputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); mWordSeparators = getResources().getString(R.string.word_separators); }
super.onCreate(); mInputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); mWordSeparators = getResources().getString(R.string.word_separators); }
/** * Main initialization of the input method component. Be sure to call to * super class. */
Main initialization of the input method component. Be sure to call to super class
onCreate
{ "repo_name": "red13dotnet/keepass2android", "path": "src/java/KP2ASoftKeyboard/src/keepass2android/softkeyboard/KP2AKeyboard.java", "license": "gpl-3.0", "size": 25841 }
[ "android.view.inputmethod.InputMethodManager" ]
import android.view.inputmethod.InputMethodManager;
import android.view.inputmethod.*;
[ "android.view" ]
android.view;
114,554
public Set<TopologyCluster> getClusters() { return ImmutableSet.copyOf(clusters.get().values()); }
Set<TopologyCluster> function() { return ImmutableSet.copyOf(clusters.get().values()); }
/** * Returns the set of topology clusters. * * @return set of clusters */
Returns the set of topology clusters
getClusters
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "core/common/src/main/java/org/onosproject/common/DefaultTopology.java", "license": "apache-2.0", "size": 31273 }
[ "com.google.common.collect.ImmutableSet", "java.util.Set", "org.onosproject.net.topology.TopologyCluster" ]
import com.google.common.collect.ImmutableSet; import java.util.Set; import org.onosproject.net.topology.TopologyCluster;
import com.google.common.collect.*; import java.util.*; import org.onosproject.net.topology.*;
[ "com.google.common", "java.util", "org.onosproject.net" ]
com.google.common; java.util; org.onosproject.net;
1,922,586
public void setHibernateMaxExecutions(int hibernateMaxExecutions) { ActionQueue.setMAX_EXECUTIONS_SIZE(hibernateMaxExecutions); }
void function(int hibernateMaxExecutions) { ActionQueue.setMAX_EXECUTIONS_SIZE(hibernateMaxExecutions); }
/** * Set the limit for the hibernate executions queue * Less than zero always uses event amalgamation */
Set the limit for the hibernate executions queue Less than zero always uses event amalgamation
setHibernateMaxExecutions
{ "repo_name": "loftuxab/alfresco-community-loftux", "path": "projects/repository/source/java/org/alfresco/repo/domain/schema/SchemaBootstrap.java", "license": "lgpl-3.0", "size": 99930 }
[ "org.hibernate.engine.ActionQueue" ]
import org.hibernate.engine.ActionQueue;
import org.hibernate.engine.*;
[ "org.hibernate.engine" ]
org.hibernate.engine;
1,436,613
@Test public void testSpecificEndTime() throws Exception { // Get the mutable ticket part. KerberosPrincipal clientPrincipal = new KerberosPrincipal( "hnelson@EXAMPLE.COM" ); EncTicketPart encTicketPart = getTicketArchetype( clientPrincipal ); // Make changes to test. ...
void function() throws Exception { KerberosPrincipal clientPrincipal = new KerberosPrincipal( STR ); EncTicketPart encTicketPart = getTicketArchetype( clientPrincipal ); KerberosPrincipal serverPrincipal = new KerberosPrincipal( STR ); String passPhrase = STR; EncryptionKey serverKey = getEncryptionKey( serverPrincipal...
/** * Tests that a user-specified end time is honored when that end time does not * violate policy. * * "The expiration time of the ticket will be set to the earlier of the * requested endtime and a time determined by local policy, possibly by * using realm- or principal-specific factors....
Tests that a user-specified end time is honored when that end time does not violate policy. "The expiration time of the ticket will be set to the earlier of the requested endtime and a time determined by local policy, possibly by using realm- or principal-specific factors."
testSpecificEndTime
{ "repo_name": "drankye/directory-server", "path": "protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingServiceTest.java", "license": "apache-2.0", "size": 81600 }
[ "javax.security.auth.kerberos.KerberosPrincipal", "org.apache.directory.shared.kerberos.KerberosTime", "org.apache.directory.shared.kerberos.codec.options.KdcOptions", "org.apache.directory.shared.kerberos.components.EncTicketPart", "org.apache.directory.shared.kerberos.components.EncryptionKey", "org.apa...
import javax.security.auth.kerberos.KerberosPrincipal; import org.apache.directory.shared.kerberos.KerberosTime; import org.apache.directory.shared.kerberos.codec.options.KdcOptions; import org.apache.directory.shared.kerberos.components.EncTicketPart; import org.apache.directory.shared.kerberos.components.EncryptionKe...
import javax.security.auth.kerberos.*; import org.apache.directory.shared.kerberos.*; import org.apache.directory.shared.kerberos.codec.options.*; import org.apache.directory.shared.kerberos.components.*; import org.apache.directory.shared.kerberos.messages.*; import org.junit.*;
[ "javax.security", "org.apache.directory", "org.junit" ]
javax.security; org.apache.directory; org.junit;
894,505
public double getPreferenciasImpuestos(){ String valor=PreferenceManager.getDefaultSharedPreferences(contexto).getString("txtImpuestos", "18"); double retorno=18.0; try { retorno=Double.parseDouble(valor); } catch (Exception e) { // TODO: handle exception Log.d(TAG,"get...
double function(){ String valor=PreferenceManager.getDefaultSharedPreferences(contexto).getString(STR, "18"); double retorno=18.0; try { retorno=Double.parseDouble(valor); } catch (Exception e) { Log.d(TAG,STR); } retorno=(retorno/100)+1; return retorno; }
/** * Retorna el valor del impuesto /100 y +1. Esta es la forma adecuada para calcular el valor de un importa, incluido el iva. * @return */
Retorna el valor del impuesto /100 y +1. Esta es la forma adecuada para calcular el valor de un importa, incluido el iva
getPreferenciasImpuestos
{ "repo_name": "oscarcoresoft/gastosmovil", "path": "src/deeloco/android/gastos/Movil/plus/ValoresPreferencias.java", "license": "gpl-3.0", "size": 17356 }
[ "android.preference.PreferenceManager", "android.util.Log" ]
import android.preference.PreferenceManager; import android.util.Log;
import android.preference.*; import android.util.*;
[ "android.preference", "android.util" ]
android.preference; android.util;
2,190,587
private void createH2PrivilegeSet(H2PrivilegeSet h2PrivilegeSet, DatabasePrivilegeSet privileges) { h2PrivilegeSet.setDeletePriv(privileges.getDeletePriv()); h2PrivilegeSet.setInsertPriv(privileges.getInsertPriv()); h2PrivilegeSet.setSelectPriv(privilege...
void function(H2PrivilegeSet h2PrivilegeSet, DatabasePrivilegeSet privileges) { h2PrivilegeSet.setDeletePriv(privileges.getDeletePriv()); h2PrivilegeSet.setInsertPriv(privileges.getInsertPriv()); h2PrivilegeSet.setSelectPriv(privileges.getSelectPriv()); h2PrivilegeSet.setUpdatePriv(privileges.getUpdatePriv()); }
/** * Create H2 privilege set * * @param h2PrivilegeSet H2 privilege set * @param privileges set of privileges */
Create H2 privilege set
createH2PrivilegeSet
{ "repo_name": "maheshika/carbon-storage-management", "path": "components/rss-manager/org.wso2.carbon.rssmanager.core/src/main/java/org/wso2/carbon/rssmanager/core/manager/impl/h2/H2SystemRSSManager.java", "license": "apache-2.0", "size": 22572 }
[ "org.wso2.carbon.rssmanager.core.dto.common.DatabasePrivilegeSet", "org.wso2.carbon.rssmanager.core.dto.common.H2PrivilegeSet" ]
import org.wso2.carbon.rssmanager.core.dto.common.DatabasePrivilegeSet; import org.wso2.carbon.rssmanager.core.dto.common.H2PrivilegeSet;
import org.wso2.carbon.rssmanager.core.dto.common.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
2,118,362
private void openFolderButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openFolderButtonActionPerformed String path = FileIO.getPathOfExecutable() + "reports"; File reportsDirectory = new File(path); if (!reportsDirectory.exists() || !reportsDirectory.isDirectory()) r...
void function(java.awt.event.ActionEvent evt) { String path = FileIO.getPathOfExecutable() + STR; File reportsDirectory = new File(path); if (!reportsDirectory.exists() !reportsDirectory.isDirectory()) return; try { java.awt.Desktop.getDesktop().open(reportsDirectory); } catch (IOException ex) { Logger.getLogger(Simula...
/** * Opens the folder that contains the generated reports when the Open Folder * button is clicked. * * @param evt an action event. * @since 1.0 */
Opens the folder that contains the generated reports when the Open Folder button is clicked
openFolderButtonActionPerformed
{ "repo_name": "thiagotts/CloudReports", "path": "src/main/java/cloudreports/gui/SimulationView.java", "license": "gpl-3.0", "size": 8250 }
[ "java.io.File", "java.io.IOException", "java.util.logging.Level", "java.util.logging.Logger" ]
import java.io.File; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger;
import java.io.*; import java.util.logging.*;
[ "java.io", "java.util" ]
java.io; java.util;
47,620
ComponentContainerDescription buildToolBarDescription(WorkbenchContext context);
ComponentContainerDescription buildToolBarDescription(WorkbenchContext context);
/** * Return descriptions of the plug-in-specific components to appear * in the "plug-in" tool bar (the top tool bar). * The tool bar components will be enabled and disabled based on * whether nodes associated with the plug-in are selected in the * navigator. */
Return descriptions of the plug-in-specific components to appear in the "plug-in" tool bar (the top tool bar). The tool bar components will be enabled and disabled based on whether nodes associated with the plug-in are selected in the navigator
buildToolBarDescription
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/Plugin.java", "license": "epl-1.0", "size": 3599 }
[ "org.eclipse.persistence.tools.workbench.framework.app.ComponentContainerDescription", "org.eclipse.persistence.tools.workbench.framework.context.WorkbenchContext" ]
import org.eclipse.persistence.tools.workbench.framework.app.ComponentContainerDescription; import org.eclipse.persistence.tools.workbench.framework.context.WorkbenchContext;
import org.eclipse.persistence.tools.workbench.framework.app.*; import org.eclipse.persistence.tools.workbench.framework.context.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
860,737
public static BreakIterator getSentenceInstance(Locale locale) { return getBreakInstance(locale, SENTENCE_INDEX); }
static BreakIterator function(Locale locale) { return getBreakInstance(locale, SENTENCE_INDEX); }
/** * Returns a new <code>BreakIterator</code> instance * for <a href="BreakIterator.html#sentence">sentence breaks</a> * for the given locale. * @param locale the desired locale * @return A break iterator for sentence breaks * @exception NullPointerException if <code>locale</code> is null...
Returns a new <code>BreakIterator</code> instance for sentence breaks for the given locale
getSentenceInstance
{ "repo_name": "karianna/jdk8_tl", "path": "jdk/src/share/classes/java/text/BreakIterator.java", "license": "gpl-2.0", "size": 24180 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
1,427,253
EventQueue.invokeLater(new Runnable() {
EventQueue.invokeLater(new Runnable() {
/** * Launch the application. */
Launch the application
main
{ "repo_name": "SandraVeradelValle/tienda-2do-ciclo", "path": "src/main/java/gui/Login.java", "license": "apache-2.0", "size": 3916 }
[ "java.awt.EventQueue" ]
import java.awt.EventQueue;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,219,239
public Set<NetworkAddress> peers() { return peers; } public SessionSettings(final int sequenceRunAhead, final int actionScheduleOffset, final Set<NetworkAddress> peers) { super(); Preconditions.checkArgument(sequenceRunAhead > 0); Preconditions.checkArgument(actionScheduleOffset > sequ...
Set<NetworkAddress> function() { return peers; } SessionSettings(final int sequenceRunAhead, final int actionScheduleOffset, final Set<NetworkAddress> function) { super(); Preconditions.checkArgument(sequenceRunAhead > 0); Preconditions.checkArgument(actionScheduleOffset > sequenceRunAhead); Preconditions.checkNotNull(...
/** * The addresses of all peers in the session (except this one!) * * @return The set of peers */
The addresses of all peers in the session (except this one!)
peers
{ "repo_name": "nlr/Lockstep", "path": "Lockstep/src/io/njlr/lockstep/network/session/SessionSettings.java", "license": "mit", "size": 2481 }
[ "com.google.common.base.Preconditions", "com.google.common.collect.ImmutableSet", "io.njlr.lockstep.network.NetworkAddress", "java.util.Set" ]
import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import io.njlr.lockstep.network.NetworkAddress; import java.util.Set;
import com.google.common.base.*; import com.google.common.collect.*; import io.njlr.lockstep.network.*; import java.util.*;
[ "com.google.common", "io.njlr.lockstep", "java.util" ]
com.google.common; io.njlr.lockstep; java.util;
691,156
private File getTempImageDir() { File f = new File(StorageUtils.getSharedStoragePath() + "/tmp_images/"); if (!f.exists()) f.mkdirs(); return f; } /** * Populate Author field by data from {@link #mAuthorList}. * If there is no data shows "Set author" text defined in resources. * <p> *...
File function() { File f = new File(StorageUtils.getSharedStoragePath() + STR); if (!f.exists()) f.mkdirs(); return f; } /** * Populate Author field by data from {@link #mAuthorList}. * If there is no data shows STR text defined in resources. * <p> * Be sure that you get {@link #mAuthorList}. See {@link #populateFields...
/** * Get a temp directory for image manipulation (create if necessary) */
Get a temp directory for image manipulation (create if necessary)
getTempImageDir
{ "repo_name": "neo618/Book-Catalogue", "path": "src/com/eleybourn/bookcatalogue/BookDetailsAbstract.java", "license": "gpl-3.0", "size": 32351 }
[ "com.eleybourn.bookcatalogue.utils.StorageUtils", "java.io.File" ]
import com.eleybourn.bookcatalogue.utils.StorageUtils; import java.io.File;
import com.eleybourn.bookcatalogue.utils.*; import java.io.*;
[ "com.eleybourn.bookcatalogue", "java.io" ]
com.eleybourn.bookcatalogue; java.io;
2,206,867
private String dumpMap(Map<String, ?> map) { StringBuilder out = new StringBuilder(); out.append('{'); for (Map.Entry<String, ?> entry : map.entrySet()) { out.append(entry.getKey() + ':' + entry.getValue() + '\n'); } out.append('}'); return out.toStrin...
String function(Map<String, ?> map) { StringBuilder out = new StringBuilder(); out.append('{'); for (Map.Entry<String, ?> entry : map.entrySet()) { out.append(entry.getKey() + ':' + entry.getValue() + '\n'); } out.append('}'); return out.toString(); }
/** * Serialize a Map into a String. * * @param map the map to serialize * @return a String serialization of the map */
Serialize a Map into a String
dumpMap
{ "repo_name": "DeanWay/phenotips", "path": "components/solr-access-service/api/src/main/java/org/phenotips/solr/AbstractSolrScriptService.java", "license": "agpl-3.0", "size": 19897 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
57,392
public long copyIn(final String sql, Reader from, int bufferSize) throws SQLException, IOException { char[] cbuf = new char[bufferSize]; int len; CopyIn cp = copyIn(sql); try { while ( (len = from.read(cbuf)) > 0) { byte[] buf = encoding.encode(new String(...
long function(final String sql, Reader from, int bufferSize) throws SQLException, IOException { char[] cbuf = new char[bufferSize]; int len; CopyIn cp = copyIn(sql); try { while ( (len = from.read(cbuf)) > 0) { byte[] buf = encoding.encode(new String(cbuf, 0, len)); cp.writeToCopy(buf, 0, buf.length); } return cp.endCo...
/** * Use COPY FROM STDIN for very fast copying from a Reader into a database table. * @param sql COPY FROM STDIN statement * @param from a CSV file or such * @param bufferSize number of characters to buffer and push over network to server at once * @return number of rows updated for server 8.2...
Use COPY FROM STDIN for very fast copying from a Reader into a database table
copyIn
{ "repo_name": "tivv/davepgjdbc", "path": "org/postgresql/copy/CopyManager.java", "license": "bsd-3-clause", "size": 7432 }
[ "java.io.IOException", "java.io.Reader", "java.sql.SQLException" ]
import java.io.IOException; import java.io.Reader; import java.sql.SQLException;
import java.io.*; import java.sql.*;
[ "java.io", "java.sql" ]
java.io; java.sql;
2,885,986
public IBroadcastScope getBroadcastScope(IScope scope, String name) { return scope.getBroadcastScope(name); }
IBroadcastScope function(IScope scope, String name) { return scope.getBroadcastScope(name); }
/** * Return broadcast scope object for given scope and child scope name. * * @param scope * Scope object * @param name * Child scope name * @return Broadcast scope */
Return broadcast scope object for given scope and child scope name
getBroadcastScope
{ "repo_name": "ant-media/Ant-Media-Server", "path": "src/main/java/org/red5/server/stream/StreamService.java", "license": "apache-2.0", "size": 39377 }
[ "org.red5.server.api.scope.IBroadcastScope", "org.red5.server.api.scope.IScope" ]
import org.red5.server.api.scope.IBroadcastScope; import org.red5.server.api.scope.IScope;
import org.red5.server.api.scope.*;
[ "org.red5.server" ]
org.red5.server;
1,005,132
public static <T> Iterator<T> toUnique(Iterator<T> self, Comparator<T> comparator) { return new ToUniqueIterator<>(self, comparator); }
static <T> Iterator<T> function(Iterator<T> self, Comparator<T> comparator) { return new ToUniqueIterator<>(self, comparator); }
/** * Returns an iterator equivalent to this iterator with all duplicated * items removed by using the supplied comparator. * * @param self an Iterator * @param comparator a Comparator used to determine unique (equal) items * If {@code null}, the Comparable natural ordering of the e...
Returns an iterator equivalent to this iterator with all duplicated items removed by using the supplied comparator
toUnique
{ "repo_name": "apache/incubator-groovy", "path": "src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java", "license": "apache-2.0", "size": 703151 }
[ "java.util.Comparator", "java.util.Iterator" ]
import java.util.Comparator; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,620,472
@Override public void enterFunction(@NotNull ErlangParser.FunctionContext ctx) { }
@Override public void enterFunction(@NotNull ErlangParser.FunctionContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitTokFloat
{ "repo_name": "IsThisThePayneResidence/intellidots", "path": "src/main/java/ua/edu/hneu/ast/parsers/ErlangBaseListener.java", "license": "gpl-3.0", "size": 35359 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
559,204
private static <K, V> Multimap<K, V> filterFiltered( FilteredMultimap<K, V> multimap, Predicate<? super Entry<K, V>> entryPredicate) { Predicate<Entry<K, V>> predicate = Predicates.<Entry<K, V>>and(multimap.entryPredicate(), entryPredicate); return new FilteredEntryMultimap<K, V>(multimap.unfilt...
static <K, V> Multimap<K, V> function( FilteredMultimap<K, V> multimap, Predicate<? super Entry<K, V>> entryPredicate) { Predicate<Entry<K, V>> predicate = Predicates.<Entry<K, V>>and(multimap.entryPredicate(), entryPredicate); return new FilteredEntryMultimap<K, V>(multimap.unfiltered(), predicate); }
/** * Support removal operations when filtering a filtered multimap. Since a * filtered multimap has iterators that don't support remove, passing one to * the FilteredEntryMultimap constructor would lead to a multimap whose removal * operations would fail. This method combines the predicates to avoid that ...
Support removal operations when filtering a filtered multimap. Since a filtered multimap has iterators that don't support remove, passing one to the FilteredEntryMultimap constructor would lead to a multimap whose removal operations would fail. This method combines the predicates to avoid that problem
filterFiltered
{ "repo_name": "tli2/guava", "path": "guava/src/com/google/common/collect/Multimaps.java", "license": "apache-2.0", "size": 83553 }
[ "com.google.common.base.Predicate", "com.google.common.base.Predicates", "java.util.Map" ]
import com.google.common.base.Predicate; import com.google.common.base.Predicates; import java.util.Map;
import com.google.common.base.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
521,440
@Beta public static Event<RequestIntercepted> requestIntercepted() { return new Event<>(DOMAIN_NAME + ".requestIntercepted", map("interceptionId", RequestIntercepted.class)); }
static Event<RequestIntercepted> function() { return new Event<>(DOMAIN_NAME + STR, map(STR, RequestIntercepted.class)); }
/** * Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked.(EXPERIMENTAL) * * @return {@link RequestIntercepted} Object */
Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked.(EXPERIMENTAL)
requestIntercepted
{ "repo_name": "chrisblock/selenium", "path": "java/client/src/org/openqa/selenium/devtools/network/Network.java", "license": "apache-2.0", "size": 25604 }
[ "org.openqa.selenium.devtools.ConverterFunctions", "org.openqa.selenium.devtools.Event", "org.openqa.selenium.devtools.network.model.RequestIntercepted" ]
import org.openqa.selenium.devtools.ConverterFunctions; import org.openqa.selenium.devtools.Event; import org.openqa.selenium.devtools.network.model.RequestIntercepted;
import org.openqa.selenium.devtools.*; import org.openqa.selenium.devtools.network.model.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
1,034,179
private void writeAttribute(java.lang.String namespace,java.lang.String attName, java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{ if (namespace.equals("")) { x...
void function(java.lang.String namespace,java.lang.String attName, java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{ if (namespace.equals("")) { xmlWriter.writeAttribute(attName,attValue); } else { registerPrefix(xmlWriter, namespace); xmlWriter.writeAttri...
/** * Util method to write an attribute without the ns prefix */
Util method to write an attribute without the ns prefix
writeAttribute
{ "repo_name": "zzsoszz/axiswebservice_demo", "path": "opensource_axis2.1.6.2/org/apache/axis2/databinding/types/xsd/String.java", "license": "apache-2.0", "size": 21090 }
[ "javax.xml.stream.XMLStreamWriter" ]
import javax.xml.stream.XMLStreamWriter;
import javax.xml.stream.*;
[ "javax.xml" ]
javax.xml;
550,646
column.type=Types.OTHER; }
column.type=Types.OTHER; }
/** * reset the type of the column */
reset the type of the column
resetType
{ "repo_name": "gpickin/Lucee4", "path": "lucee-java/lucee-core/src/lucee/runtime/type/QueryColumnUtil.java", "license": "lgpl-2.1", "size": 10329 }
[ "java.sql.Types" ]
import java.sql.Types;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,459,085
return DataUtils.removeConstantColumns(dataSet); } //==================== Private Methods ========================================//
return DataUtils.removeConstantColumns(dataSet); }
/** * Removes any constant columns from the given dataset. * @return - new dataset with constant columns removed. */
Removes any constant columns from the given dataset
filter
{ "repo_name": "amurrayw/tetrad", "path": "tetrad-gui/src/main/java/edu/cmu/tetradapp/model/datamanip/RemoveConstantColumnsDataFilter.java", "license": "gpl-2.0", "size": 3131 }
[ "edu.cmu.tetrad.data.DataUtils" ]
import edu.cmu.tetrad.data.DataUtils;
import edu.cmu.tetrad.data.*;
[ "edu.cmu.tetrad" ]
edu.cmu.tetrad;
1,244,251
@Generated @Selector("userScripts") public native NSArray<? extends WKUserScript> userScripts();
@Selector(STR) native NSArray<? extends WKUserScript> function();
/** * The user scripts associated with this user content * controller. */
The user scripts associated with this user content controller
userScripts
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/webkit/WKUserContentController.java", "license": "apache-2.0", "size": 12283 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,176,400
public static String elementToString(Element element) throws TransformerException { DOMSource domSource = new DOMSource(element); StringWriter stringWriter = new StringWriter(); StreamResult streamResult = new StreamResult(stringWriter); TransformerFactory transformerFactory...
static String function(Element element) throws TransformerException { DOMSource domSource = new DOMSource(element); StringWriter stringWriter = new StringWriter(); StreamResult streamResult = new StreamResult(stringWriter); TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transforme...
/** * <p>Converts an {@code Element} object into {@code String} representation</p> * @param element * @return * @throws TransformerException */
Converts an Element object into String representation
elementToString
{ "repo_name": "zaizi/sensefy", "path": "sensefy-api/src/main/java/org/zaizi/sensefy/api/utils/DocumentUtils.java", "license": "lgpl-3.0", "size": 3243 }
[ "java.io.StringWriter", "javax.xml.transform.OutputKeys", "javax.xml.transform.Transformer", "javax.xml.transform.TransformerException", "javax.xml.transform.TransformerFactory", "javax.xml.transform.dom.DOMSource", "javax.xml.transform.stream.StreamResult", "org.w3c.dom.Element" ]
import java.io.StringWriter; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Element...
import java.io.*; import javax.xml.transform.*; import javax.xml.transform.dom.*; import javax.xml.transform.stream.*; import org.w3c.dom.*;
[ "java.io", "javax.xml", "org.w3c.dom" ]
java.io; javax.xml; org.w3c.dom;
2,110,728
@Test public void testAdd_String_Path() throws IOException { try (TempDirectory temp1 = newConcrete("1"); TempDirectory temp2 = newConcrete("2")) { Path path = temp2.getPath(); Resource res = loader.getResource("classpath:TEXT/bomtext.txt"); byte[] ...
void function() throws IOException { try (TempDirectory temp1 = newConcrete("1"); TempDirectory temp2 = newConcrete("2")) { Path path = temp2.getPath(); Resource res = loader.getResource(STR); byte[] expectedData = Misc.toByteArray(res); Path file1 = temp1.add("123", res); Path actual = temp2.add("123", file1); assertT...
/** * Test of add method, of class TempDirectory. * * @throws java.io.IOException */
Test of add method, of class TempDirectory
testAdd_String_Path
{ "repo_name": "enlo/jmt-projects", "path": "jmt-core/src/test/java/info/naiv/lab/java/jmt/io/TempDirectoryTest.java", "license": "mit", "size": 9957 }
[ "info.naiv.lab.java.jmt.Misc", "java.io.IOException", "java.nio.file.Files", "java.nio.file.Path", "org.hamcrest.Matchers", "org.junit.Assert", "org.springframework.core.io.Resource" ]
import info.naiv.lab.java.jmt.Misc; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import org.hamcrest.Matchers; import org.junit.Assert; import org.springframework.core.io.Resource;
import info.naiv.lab.java.jmt.*; import java.io.*; import java.nio.file.*; import org.hamcrest.*; import org.junit.*; import org.springframework.core.io.*;
[ "info.naiv.lab", "java.io", "java.nio", "org.hamcrest", "org.junit", "org.springframework.core" ]
info.naiv.lab; java.io; java.nio; org.hamcrest; org.junit; org.springframework.core;
2,484,850
private Geometry parseCone(Node node, String title) { String heightAtt = node.getAttributes().getNamedItem("height") .getNodeValue().trim(); float height = getFloat(heightAtt, 2); String radiusAtt = node.getAttributes().getNamedItem("bottomRadius") .getNodeVal...
Geometry function(Node node, String title) { String heightAtt = node.getAttributes().getNamedItem(STR) .getNodeValue().trim(); float height = getFloat(heightAtt, 2); String radiusAtt = node.getAttributes().getNamedItem(STR) .getNodeValue().trim(); float radius = getFloat(radiusAtt, 1); Node sideNode = node.getAttribute...
/** * Parses an X3D Cone node and creates a corresponding jME Cone * * @param node * The X3D Cone node * @param title * A title for the cone. If <code>null</code> is passed, a * generic title is used. * @return The jME Cone */
Parses an X3D Cone node and creates a corresponding jME Cone
parseCone
{ "repo_name": "tectronics/xenogeddon", "path": "src/com/jmex/model/converters/X3dToJme.java", "license": "gpl-2.0", "size": 86719 }
[ "com.jme.math.FastMath", "com.jme.math.Vector3f", "com.jme.scene.Geometry", "com.jme.scene.shape.Cone", "com.jme.scene.shape.Disk", "org.w3c.dom.Node" ]
import com.jme.math.FastMath; import com.jme.math.Vector3f; import com.jme.scene.Geometry; import com.jme.scene.shape.Cone; import com.jme.scene.shape.Disk; import org.w3c.dom.Node;
import com.jme.math.*; import com.jme.scene.*; import com.jme.scene.shape.*; import org.w3c.dom.*;
[ "com.jme.math", "com.jme.scene", "org.w3c.dom" ]
com.jme.math; com.jme.scene; org.w3c.dom;
1,165,249
@Test public void testIcmpWithType() throws Exception { VNSAccessControlList acl = new VNSAccessControlList("testAcl"); VNSAccessControlListEntry icmpAcl = icmpAclEntry(8); acl.addAclEntry(icmpAcl); testHintInternal(acl, (Ethernet) icmpPacket1, defaultHint & ...
void function() throws Exception { VNSAccessControlList acl = new VNSAccessControlList(STR); VNSAccessControlListEntry icmpAcl = icmpAclEntry(8); acl.addAclEntry(icmpAcl); testHintInternal(acl, (Ethernet) icmpPacket1, defaultHint & ~(OFMatch.OFPFW_DL_TYPE OFMatch.OFPFW_NW_PROTO OFMatch.OFPFW_TP_SRC)); }
/** * Test icmp ACL with ICMP type matching */
Test icmp ACL with ICMP type matching
testIcmpWithType
{ "repo_name": "mandeepdhami/netvirt-ctrl", "path": "sdnplatform/src/test/java/org/sdnplatform/netvirt/virtualrouting/internal/VirtualRoutingHintTest.java", "license": "epl-1.0", "size": 19772 }
[ "org.openflow.protocol.OFMatch", "org.sdnplatform.netvirt.core.VNSAccessControlList", "org.sdnplatform.netvirt.core.VNSAccessControlListEntry", "org.sdnplatform.packet.Ethernet" ]
import org.openflow.protocol.OFMatch; import org.sdnplatform.netvirt.core.VNSAccessControlList; import org.sdnplatform.netvirt.core.VNSAccessControlListEntry; import org.sdnplatform.packet.Ethernet;
import org.openflow.protocol.*; import org.sdnplatform.netvirt.core.*; import org.sdnplatform.packet.*;
[ "org.openflow.protocol", "org.sdnplatform.netvirt", "org.sdnplatform.packet" ]
org.openflow.protocol; org.sdnplatform.netvirt; org.sdnplatform.packet;
1,501,610
public FormDefinitionCacheEntry resolveFormDefinition(FormDefinition formDefinition) { String formDefinitionId = formDefinition.getId(); String deploymentId = formDefinition.getDeploymentId(); FormDefinitionCacheEntry cachedForm = formCache.get(formDefinitionId); if (cachedForm == ...
FormDefinitionCacheEntry function(FormDefinition formDefinition) { String formDefinitionId = formDefinition.getId(); String deploymentId = formDefinition.getDeploymentId(); FormDefinitionCacheEntry cachedForm = formCache.get(formDefinitionId); if (cachedForm == null) { FormDeploymentEntity deployment = engineConfig.get...
/** * Resolving the decision will fetch the DMN, parse it and store the {@link FormDefinition} in memory. */
Resolving the decision will fetch the DMN, parse it and store the <code>FormDefinition</code> in memory
resolveFormDefinition
{ "repo_name": "stephraleigh/flowable-engine", "path": "modules/flowable-form-engine/src/main/java/org/flowable/form/engine/impl/persistence/deploy/DeploymentManager.java", "license": "apache-2.0", "size": 9113 }
[ "java.util.List", "org.flowable.engine.common.api.FlowableException", "org.flowable.form.api.FormDefinition", "org.flowable.form.engine.impl.persistence.entity.FormDeploymentEntity", "org.flowable.form.engine.impl.persistence.entity.FormResourceEntity" ]
import java.util.List; import org.flowable.engine.common.api.FlowableException; import org.flowable.form.api.FormDefinition; import org.flowable.form.engine.impl.persistence.entity.FormDeploymentEntity; import org.flowable.form.engine.impl.persistence.entity.FormResourceEntity;
import java.util.*; import org.flowable.engine.common.api.*; import org.flowable.form.api.*; import org.flowable.form.engine.impl.persistence.entity.*;
[ "java.util", "org.flowable.engine", "org.flowable.form" ]
java.util; org.flowable.engine; org.flowable.form;
2,629,573
public NotebookOutlineDirectory getOutlineRoot() { return outlineRoot; }
NotebookOutlineDirectory function() { return outlineRoot; }
/** * Get outline root. * * @return */
Get outline root
getOutlineRoot
{ "repo_name": "dvorka/mindraider", "path": "mr7/src/main/java/com/emental/mindraider/ui/outline/treetable/OutlineTreeInstance.java", "license": "apache-2.0", "size": 13849 }
[ "com.emental.mindraider.ui.outline.NotebookOutlineDirectory" ]
import com.emental.mindraider.ui.outline.NotebookOutlineDirectory;
import com.emental.mindraider.ui.outline.*;
[ "com.emental.mindraider" ]
com.emental.mindraider;
1,023,415
public StyleKey[] getRequiredStyles() { return new StyleKey[] { FontStyleKeys.FONT_SIZE, FontStyleKeys.FONT_FAMILY, FontStyleKeys.FONT_EFFECT, FontStyleKeys.FONT_SMOOTH, FontStyleKeys.FONT_STRETCH, FontStyleKeys.FONT_VARIANT, FontStyleKeys.FONT_WEIGHT, }; }
StyleKey[] function() { return new StyleKey[] { FontStyleKeys.FONT_SIZE, FontStyleKeys.FONT_FAMILY, FontStyleKeys.FONT_EFFECT, FontStyleKeys.FONT_SMOOTH, FontStyleKeys.FONT_STRETCH, FontStyleKeys.FONT_VARIANT, FontStyleKeys.FONT_WEIGHT, }; }
/** * This indirectly defines the resolve order. The higher the order, the more dependent is the resolver on other * resolvers to be complete. * * @return */
This indirectly defines the resolve order. The higher the order, the more dependent is the resolver on other resolvers to be complete
getRequiredStyles
{ "repo_name": "EgorZhuk/pentaho-reporting", "path": "libraries/libcss/src/main/java/org/pentaho/reporting/libraries/css/resolver/values/percentages/text/WordSpacingResolveHandler.java", "license": "lgpl-2.1", "size": 4533 }
[ "org.pentaho.reporting.libraries.css.keys.font.FontStyleKeys", "org.pentaho.reporting.libraries.css.model.StyleKey" ]
import org.pentaho.reporting.libraries.css.keys.font.FontStyleKeys; import org.pentaho.reporting.libraries.css.model.StyleKey;
import org.pentaho.reporting.libraries.css.keys.font.*; import org.pentaho.reporting.libraries.css.model.*;
[ "org.pentaho.reporting" ]
org.pentaho.reporting;
2,504,180
public static double crossValidateModel(DensityBasedClusterer clusterer, Instances data, int numFolds, Random random) throws Exception { Instances train, test; double foldAv = 0;; data = new Instances(data); data.randomize(random); // double sumOW = 0; for (int i = 0; i...
static double function(DensityBasedClusterer clusterer, Instances data, int numFolds, Random random) throws Exception { Instances train, test; double foldAv = 0;; data = new Instances(data); data.randomize(random); for (int i = 0; i < numFolds; i++) { train = data.trainCV(numFolds, i, random); clusterer.buildClusterer(...
/** * Perform a cross-validation for DensityBasedClusterer on a set of instances. * * @param clusterer the clusterer to use * @param data the training data * @param numFolds number of folds of cross validation to perform * @param random random number seed for cross-validation * @return the cross-va...
Perform a cross-validation for DensityBasedClusterer on a set of instances
crossValidateModel
{ "repo_name": "dsibournemouth/autoweka", "path": "weka-3.7.7/src/main/java/weka/clusterers/ClusterEvaluation.java", "license": "gpl-3.0", "size": 41312 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
1,854,561
@Test public void whenFirstLessSecondandThird() { Max maxim = new Max(); int result = maxim.max(1, 2, 3); assertThat(result, is(3)); }
void function() { Max maxim = new Max(); int result = maxim.max(1, 2, 3); assertThat(result, is(3)); }
/** * Test max with first, second, third. */
Test max with first, second, third
whenFirstLessSecondandThird
{ "repo_name": "AnokisLuetto/aluetto", "path": "chapter_001/src/test/java/ru/job4j/max/MaxTest.java", "license": "apache-2.0", "size": 648 }
[ "org.hamcrest.core.Is", "org.junit.Assert" ]
import org.hamcrest.core.Is; import org.junit.Assert;
import org.hamcrest.core.*; import org.junit.*;
[ "org.hamcrest.core", "org.junit" ]
org.hamcrest.core; org.junit;
2,052,744
public void updateView() { if(getSelectedRow() >= 0) model.fireTableRowsUpdated(getSelectedRow(), getSelectedRow()); } private class RepairSummaryModel extends AbstractTableModel { private static final long serialVersionUID = -1788294077902504936L;
void function() { if(getSelectedRow() >= 0) model.fireTableRowsUpdated(getSelectedRow(), getSelectedRow()); } private class RepairSummaryModel extends AbstractTableModel { private static final long serialVersionUID = -1788294077902504936L;
/** * Updates the data within the currently selected row (assumes that only * the current mission can be edited). */
Updates the data within the currently selected row (assumes that only the current mission can be edited)
updateView
{ "repo_name": "ptgrogan/spacenet", "path": "src/main/java/edu/mit/spacenet/gui/demand/RepairSummaryTable.java", "license": "apache-2.0", "size": 5549 }
[ "javax.swing.table.AbstractTableModel" ]
import javax.swing.table.AbstractTableModel;
import javax.swing.table.*;
[ "javax.swing" ]
javax.swing;
1,384,160
private File file; public String md5Hash; public double starRating = -1; public BeatmapDifficultyCalculator starRatingCalculator; public long dateAdded = 0; public boolean favorite = false; public int playCount = 0; public long lastPlayed = 0; public int localMusicOffset = 0; pu...
private File file; public String md5Hash; public double starRating = -1; public BeatmapDifficultyCalculator starRatingCalculator; public long dateAdded = 0; public boolean favorite = false; public int playCount = 0; public long lastPlayed = 0; public int localMusicOffset = 0; public File audioFilename; public int audio...
/** * Clears the background image cache. * <p> * NOTE: This does NOT destroy the images in the cache, and will cause * memory leaks if all images have not been destroyed. */
Clears the background image cache. memory leaks if all images have not been destroyed
clearBackgroundImageCache
{ "repo_name": "Lyonlancer5/opsu", "path": "src/itdelatrisu/opsu/beatmap/Beatmap.java", "license": "gpl-3.0", "size": 15104 }
[ "java.io.File", "java.util.ArrayList", "org.newdawn.slick.Color" ]
import java.io.File; import java.util.ArrayList; import org.newdawn.slick.Color;
import java.io.*; import java.util.*; import org.newdawn.slick.*;
[ "java.io", "java.util", "org.newdawn.slick" ]
java.io; java.util; org.newdawn.slick;
1,973,507
int dim = vec1.getDimension(); assert(dim == vec2.getDimension()); assert(vec1.getOpMode() == ComplexVector.Mode.CARTESIAN); assert(vec2.getOpMode() == ComplexVector.Mode.POLAR_DENSE); short c[] = vec2.getPhaseAngles(); float[] coordinates = vec1.getCoordinates(); for (int i=0, j=0; i...
int dim = vec1.getDimension(); assert(dim == vec2.getDimension()); assert(vec1.getOpMode() == ComplexVector.Mode.CARTESIAN); assert(vec2.getOpMode() == ComplexVector.Mode.POLAR_DENSE); short c[] = vec2.getPhaseAngles(); float[] coordinates = vec1.getCoordinates(); for (int i=0, j=0; i<dim; i++, j+=2) { coordinates[j] +...
/** * Superposes vec2 with vec1. * vec1 is in CARTESIAN mode. * vec2 is in POLAR mode. */
Superposes vec2 with vec1. vec1 is in CARTESIAN mode. vec2 is in POLAR mode
superposeWithAngle
{ "repo_name": "Peratham/semanticvectors-1", "path": "src/main/java/pitt/search/semanticvectors/vectors/ComplexVectorUtils.java", "license": "bsd-3-clause", "size": 8796 }
[ "pitt.search.semanticvectors.vectors.ComplexVector" ]
import pitt.search.semanticvectors.vectors.ComplexVector;
import pitt.search.semanticvectors.vectors.*;
[ "pitt.search.semanticvectors" ]
pitt.search.semanticvectors;
1,459,608
@Generated @Deprecated @Selector("authorizationStatus") @NInt public static native long authorizationStatus();
@Selector(STR) static native long function();
/** * Returns photo data authorization status for this application */
Returns photo data authorization status for this application
authorizationStatus
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/assetslibrary/ALAssetsLibrary.java", "license": "apache-2.0", "size": 14666 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
1,333,113
public static QueryBuilder makeQuery(final String pattern, final Object[] params, final boolean quotePatternParameters, final boolean escapePatternParameters, final boolean useNativeQuery) { String query = pattern; if(params!=null) { for (Object param ...
static QueryBuilder function(final String pattern, final Object[] params, final boolean quotePatternParameters, final boolean escapePatternParameters, final boolean useNativeQuery) { String query = pattern; if(params!=null) { for (Object param : params) { query = query.replaceFirst("\\?", convertParam(param, quotePatte...
/** * Create a ES request from a PP pattern * */
Create a ES request from a PP pattern
makeQuery
{ "repo_name": "deadcyclo/nuxeo-features", "path": "nuxeo-elasticsearch/nuxeo-elasticsearch-core/src/main/java/org/nuxeo/elasticsearch/query/PageProviderQueryBuilder.java", "license": "lgpl-2.1", "size": 6821 }
[ "org.elasticsearch.index.query.QueryBuilder", "org.elasticsearch.index.query.QueryBuilders" ]
import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.query.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
572,643
public List<BidibulModule> getListActiveModules(){ List<BidibulModule> l = new ArrayList<BidibulModule>(); for (int i=0; i<_activeModule.size(); i++) { BidibulModule m = _activeModule.get(i); if (m != null) l.add(m); } return l; }
List<BidibulModule> function(){ List<BidibulModule> l = new ArrayList<BidibulModule>(); for (int i=0; i<_activeModule.size(); i++) { BidibulModule m = _activeModule.get(i); if (m != null) l.add(m); } return l; }
/** * Retourne la liste des modules. * @return List<BidibulModule> null si aucun module chargé * @see ModuleLoader#loadModules() */
Retourne la liste des modules
getListActiveModules
{ "repo_name": "astorije/bidibul", "path": "src/tools/ModuleLoader.java", "license": "gpl-3.0", "size": 8037 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
786,305
private void mouseMovedAbs(ManyMouseEvent event2) { int device = event.device; MouseInfo mouseInfo = this.getOrInitDeviceInfo(event); // int advanceValue = event.value *2; switch (event.item) { case 0: // System.out.print("X axis "); mouseInfo.lastX = mouseInfo.x; mouseInfo.x = event.v...
void function(ManyMouseEvent event2) { int device = event.device; MouseInfo mouseInfo = this.getOrInitDeviceInfo(event); switch (event.item) { case 0: mouseInfo.lastX = mouseInfo.x; mouseInfo.x = event.value; break; case 1: mouseInfo.lastY = mouseInfo.y; mouseInfo.y = event.value; break; default: System.out.print(STR);...
/** * Mouse moved abs. * * @param event2 the event2 */
Mouse moved abs
mouseMovedAbs
{ "repo_name": "steffe/MT4J_KTSI", "path": "src/org/mt4j/input/inputSources/MultipleMiceInputSource.java", "license": "gpl-2.0", "size": 17199 }
[ "org.mt4j.input.inputData.ActiveCursorPool", "org.mt4j.input.inputData.InputCursor", "org.mt4j.input.inputData.MTFingerInputEvt", "org.mt4j.util.manyMouse.ManyMouseEvent", "org.mt4j.util.math.Vector3D" ]
import org.mt4j.input.inputData.ActiveCursorPool; import org.mt4j.input.inputData.InputCursor; import org.mt4j.input.inputData.MTFingerInputEvt; import org.mt4j.util.manyMouse.ManyMouseEvent; import org.mt4j.util.math.Vector3D;
import org.mt4j.input.*; import org.mt4j.util.*; import org.mt4j.util.math.*;
[ "org.mt4j.input", "org.mt4j.util" ]
org.mt4j.input; org.mt4j.util;
2,859,599
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<ManagedInstanceEncryptionProtectorInner> createOrUpdateAsync( String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters) { ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<ManagedInstanceEncryptionProtectorInner> function( String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, managedInsta...
/** * Updates an existing encryption protector. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param...
Updates an existing encryption protector
createOrUpdateAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceEncryptionProtectorsClientImpl.java", "license": "mit", "size": 61605 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceEncryptionProtectorInner", "com.azure.resourcemanager.sql.models.EncryptionProtectorName" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceEncryptionProtectorInner; import com.azure.resourcemanager.sql.models.EncryptionProtectorName;
import com.azure.core.annotation.*; import com.azure.resourcemanager.sql.fluent.models.*; import com.azure.resourcemanager.sql.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
614,880
public int write(Index index, int version) throws IOException { IndexWriterImpl writer = getWriter(version); if (writer == null) { throw new UnsupportedVersion("Can't write index version " + version + "; this IndexWriter only supports index versions " ...
int function(Index index, int version) throws IOException { IndexWriterImpl writer = getWriter(version); if (writer == null) { throw new UnsupportedVersion(STR + version + STR + IndexWriterV1.MIN_VERSION + "-" + IndexWriterV1.MAX_VERSION + "," + IndexWriterV2.MIN_VERSION + "-" + IndexWriterV2.MAX_VERSION); } return wri...
/** * Writes the specified index to the associated output stream. This may be called multiple times in order * to write multiple indexes. * * @param index the index to write to the stream * @param version the index file version * @return the number of bytes written to the stream * @th...
Writes the specified index to the associated output stream. This may be called multiple times in order to write multiple indexes
write
{ "repo_name": "wildfly/jandex", "path": "src/main/java/org/jboss/jandex/IndexWriter.java", "license": "apache-2.0", "size": 4111 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
822,874
@Deprecated List<CidsServerMessage> getAllMessages(final String category, final User user, final int biggerThen);
List<CidsServerMessage> getAllMessages(final String category, final User user, final int biggerThen);
/** * DOCUMENT ME! * * @param category DOCUMENT ME! * @param user DOCUMENT ME! * @param biggerThen DOCUMENT ME! * * @return DOCUMENT ME! */
DOCUMENT ME
getAllMessages
{ "repo_name": "cismet/cids-server", "path": "src/main/java/de/cismet/cids/server/messages/CidsServerMessageManager.java", "license": "lgpl-3.0", "size": 6449 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,100,914
EmailResponse send(EmailRequest request);
EmailResponse send(EmailRequest request);
/** * Email sending strategy * @param request Email request * @return Email response */
Email sending strategy
send
{ "repo_name": "michaelliudl/UrEmailService", "path": "src/main/java/net/uremailsvc/service/IEmailSendingStrategy.java", "license": "gpl-2.0", "size": 378 }
[ "net.uremailsvc.pojo.EmailRequest", "net.uremailsvc.pojo.EmailResponse" ]
import net.uremailsvc.pojo.EmailRequest; import net.uremailsvc.pojo.EmailResponse;
import net.uremailsvc.pojo.*;
[ "net.uremailsvc.pojo" ]
net.uremailsvc.pojo;
2,659,710
protected void parseSequence(DICOMSequence sequence, long length, boolean isExplicit, DICOMReaderFunctions dicomReaderFunctions, boolean skipSequence) throws IOException, DICOMException { if (sequence == null) { throw new NullPointerException("Null Se...
void function(DICOMSequence sequence, long length, boolean isExplicit, DICOMReaderFunctions dicomReaderFunctions, boolean skipSequence) throws IOException, DICOMException { if (sequence == null) { throw new NullPointerException(STR); } length = length & 0xffffffffL; boolean isLengthUndefined = length == 0xffffffffL; tr...
/** * Parse a DICOM sequence. * * @param sequence DICOM sequence to parse. * @param length Length of DICOM sequence. * @param isExplicit Set if the content of the BufferedInputStream * has explicit (true) or implicit (false) v...
Parse a DICOM sequence
parseSequence
{ "repo_name": "LaDivinaCommedia/DICOMViewer", "path": "app/src/main/java/be/ac/ulb/lisa/idot/dicom/file/DICOMReader.java", "license": "gpl-3.0", "size": 25508 }
[ "be.ac.ulb.lisa.idot.dicom.DICOMException", "be.ac.ulb.lisa.idot.dicom.DICOMItem", "be.ac.ulb.lisa.idot.dicom.DICOMSequence", "be.ac.ulb.lisa.idot.dicom.DICOMTag", "java.io.EOFException", "java.io.IOException" ]
import be.ac.ulb.lisa.idot.dicom.DICOMException; import be.ac.ulb.lisa.idot.dicom.DICOMItem; import be.ac.ulb.lisa.idot.dicom.DICOMSequence; import be.ac.ulb.lisa.idot.dicom.DICOMTag; import java.io.EOFException; import java.io.IOException;
import be.ac.ulb.lisa.idot.dicom.*; import java.io.*;
[ "be.ac.ulb", "java.io" ]
be.ac.ulb; java.io;
1,825,021
void showImageFx(final AbstractFile file, final Dimension dims) { if (!fxInited) { return; } final String fileName = file.getName(); //hide the panel during loading/transformations fxPanel.setVisible(false);
void showImageFx(final AbstractFile file, final Dimension dims) { if (!fxInited) { return; } final String fileName = file.getName(); fxPanel.setVisible(false);
/** * Show image * * @param file image file to show * @param dims dimension of the parent window */
Show image
showImageFx
{ "repo_name": "jgarman/autopsy", "path": "Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.java", "license": "apache-2.0", "size": 7652 }
[ "java.awt.Dimension", "org.sleuthkit.datamodel.AbstractFile" ]
import java.awt.Dimension; import org.sleuthkit.datamodel.AbstractFile;
import java.awt.*; import org.sleuthkit.datamodel.*;
[ "java.awt", "org.sleuthkit.datamodel" ]
java.awt; org.sleuthkit.datamodel;
1,609,101
public static void createCDXIndexFile(String urlOrPath) throws IOException, java.text.ParseException { ARCReader r = ARCReaderFactory.get(urlOrPath); r.setStrict(false); r.setParseHttpHeaders(true); r.setDigest(true); output(r, CDX_FILE); }
static void function(String urlOrPath) throws IOException, java.text.ParseException { ARCReader r = ARCReaderFactory.get(urlOrPath); r.setStrict(false); r.setParseHttpHeaders(true); r.setDigest(true); output(r, CDX_FILE); }
/** * Generate a CDX index file for an ARC file. * * @param urlOrPath The ARC file to generate a CDX index for * @throws IOException * @throws java.text.ParseException */
Generate a CDX index file for an ARC file
createCDXIndexFile
{ "repo_name": "gaowangyizu/myHeritrix", "path": "myHeritrix/src/org/archive/io/arc/ARCReader.java", "license": "apache-2.0", "size": 31028 }
[ "java.io.IOException", "org.apache.commons.cli.ParseException" ]
import java.io.IOException; import org.apache.commons.cli.ParseException;
import java.io.*; import org.apache.commons.cli.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
2,546,920
public void doView_students_assignment(RunData data) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); state.setAttribute(STATE_MODE, MODE_INSTRUCTOR_VIEW_STUDENTS_ASSIGNMENT); } // doView_students_Assignment
void function(RunData data) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); state.setAttribute(STATE_MODE, MODE_INSTRUCTOR_VIEW_STUDENTS_ASSIGNMENT); }
/** * Action is to show the View Students assignment screen */
Action is to show the View Students assignment screen
doView_students_assignment
{ "repo_name": "lorenamgUMU/sakai", "path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java", "license": "apache-2.0", "size": 677150 }
[ "org.sakaiproject.cheftool.JetspeedRunData", "org.sakaiproject.cheftool.RunData", "org.sakaiproject.event.api.SessionState" ]
import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.event.api.SessionState;
import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*;
[ "org.sakaiproject.cheftool", "org.sakaiproject.event" ]
org.sakaiproject.cheftool; org.sakaiproject.event;
868,635
public ArrayList<SerialMessage> initEndpoints(boolean refresh) { ArrayList<SerialMessage> result = new ArrayList<SerialMessage>(); logger.debug("NODE {}: Initialising endpoints - version {}", this.getNode().getNodeId(), this.getVersion()); switch (this.getVersion()) { case 1: // Get number of instances...
ArrayList<SerialMessage> function(boolean refresh) { ArrayList<SerialMessage> result = new ArrayList<SerialMessage>(); logger.debug(STR, this.getNode().getNodeId(), this.getVersion()); switch (this.getVersion()) { case 1: for (ZWaveCommandClass commandClass : this.getNode().getCommandClasses()) { logger.debug(STR, this...
/** * Initializes the Multi instance / endpoint command class by setting the number of instances * or getting the endpoints. * @return SerialMessage message to send */
Initializes the Multi instance / endpoint command class by setting the number of instances or getting the endpoints
initEndpoints
{ "repo_name": "ShanksSGV/openhab", "path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/commandclass/ZWaveMultiInstanceCommandClass.java", "license": "epl-1.0", "size": 25707 }
[ "java.util.ArrayList", "java.util.Map", "org.openhab.binding.zwave.internal.protocol.SerialMessage", "org.openhab.binding.zwave.internal.protocol.ZWaveEndpoint" ]
import java.util.ArrayList; import java.util.Map; import org.openhab.binding.zwave.internal.protocol.SerialMessage; import org.openhab.binding.zwave.internal.protocol.ZWaveEndpoint;
import java.util.*; import org.openhab.binding.zwave.internal.protocol.*;
[ "java.util", "org.openhab.binding" ]
java.util; org.openhab.binding;
180,149
public boolean isOpaqueCube(IBlockState state) { return false; }
boolean function(IBlockState state) { return false; }
/** * Used to determine ambient occlusion and culling when rebuilding chunks for render */
Used to determine ambient occlusion and culling when rebuilding chunks for render
isOpaqueCube
{ "repo_name": "SmithsGaming/Armory", "path": "src/main/com/smithsmodding/armory/common/block/BlockPump.java", "license": "lgpl-3.0", "size": 4780 }
[ "net.minecraft.block.state.IBlockState" ]
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.state.*;
[ "net.minecraft.block" ]
net.minecraft.block;
1,119,491
public Object getColumnFamilyMetric(String ks, String cf, String metricName) { try { ObjectName oName = null; if (!Strings.isNullOrEmpty(ks) && !Strings.isNullOrEmpty(cf)) { String type = cf.contains(".") ? "IndexTable" : "Table"; ...
Object function(String ks, String cf, String metricName) { try { ObjectName oName = null; if (!Strings.isNullOrEmpty(ks) && !Strings.isNullOrEmpty(cf)) { String type = cf.contains(".") ? STR : "Table"; oName = new ObjectName(String.format(STR, type, ks, cf, metricName)); } else if (!Strings.isNullOrEmpty(ks)) { oName =...
/** * Retrieve ColumnFamily metrics * @param ks Keyspace for which stats are to be displayed or null for the global value * @param cf ColumnFamily for which stats are to be displayed or null for the keyspace value (if ks supplied) * @param metricName View {@link TableMetrics}. */
Retrieve ColumnFamily metrics
getColumnFamilyMetric
{ "repo_name": "driftx/cassandra", "path": "src/java/org/apache/cassandra/tools/NodeProbe.java", "license": "apache-2.0", "size": 70360 }
[ "com.google.common.base.Strings", "javax.management.JMX", "javax.management.MalformedObjectNameException", "javax.management.ObjectName", "org.apache.cassandra.metrics.CassandraMetricsRegistry" ]
import com.google.common.base.Strings; import javax.management.JMX; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import org.apache.cassandra.metrics.CassandraMetricsRegistry;
import com.google.common.base.*; import javax.management.*; import org.apache.cassandra.metrics.*;
[ "com.google.common", "javax.management", "org.apache.cassandra" ]
com.google.common; javax.management; org.apache.cassandra;
1,799,620
public void setSilos(SiloConfigPCIMerchant merchant) { m_pciMerchant = merchant; } // /////////////////////////////////////////////////////////////////////// // non-Public fields // /////////////////////////////////////////////////////////////////////// private SiloConfigPCIMerchant m_p...
void function(SiloConfigPCIMerchant merchant) { m_pciMerchant = merchant; } private SiloConfigPCIMerchant m_pciMerchant;
/** * Sets the PCI MErchant associated with the Silo Create config. * * @param merchat The PCI MErchant to be set. */
Sets the PCI MErchant associated with the Silo Create config
setSilos
{ "repo_name": "smritbhatnagar2/nexpose_java_api", "path": "src/main/java/org/rapid7/nexpose/api/generators/SiloCreateMerchantGenerator.java", "license": "bsd-3-clause", "size": 10366 }
[ "org.rapid7.nexpose.api.domain.SiloConfigPCIMerchant" ]
import org.rapid7.nexpose.api.domain.SiloConfigPCIMerchant;
import org.rapid7.nexpose.api.domain.*;
[ "org.rapid7.nexpose" ]
org.rapid7.nexpose;
1,884,431
void addMessage(CompilerMessageCategory category, String message, @Nullable String url, int lineNum, int columnNum, Navigatable navigatable);
void addMessage(CompilerMessageCategory category, String message, @Nullable String url, int lineNum, int columnNum, Navigatable navigatable);
/** * Allows to add a message to be shown in Compiler message view, with a specified Navigatable * that is used to navigate to the error location. * * @param category the category of a message (information, error, warning). * @param message the text of the message. * @param url a url to...
Allows to add a message to be shown in Compiler message view, with a specified Navigatable that is used to navigate to the error location
addMessage
{ "repo_name": "hurricup/intellij-community", "path": "java/compiler/openapi/src/com/intellij/openapi/compiler/CompileContext.java", "license": "apache-2.0", "size": 5472 }
[ "com.intellij.pom.Navigatable", "org.jetbrains.annotations.Nullable" ]
import com.intellij.pom.Navigatable; import org.jetbrains.annotations.Nullable;
import com.intellij.pom.*; import org.jetbrains.annotations.*;
[ "com.intellij.pom", "org.jetbrains.annotations" ]
com.intellij.pom; org.jetbrains.annotations;
2,394,038
public AvroSource<GenericRecord> withSchema(Schema schema) { return new AvroSource<>(getFileOrPatternSpec(), getMinBundleSize(), schema.toString(), GenericRecord.class, codec, syncMarker); }
AvroSource<GenericRecord> function(Schema schema) { return new AvroSource<>(getFileOrPatternSpec(), getMinBundleSize(), schema.toString(), GenericRecord.class, codec, syncMarker); }
/** * Returns an {@link AvroSource} that's like this one but reads files containing records that * conform to the given schema. * * <p>Does not modify this object. */
Returns an <code>AvroSource</code> that's like this one but reads files containing records that conform to the given schema. Does not modify this object
withSchema
{ "repo_name": "xsm110/Apache-Beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/io/AvroSource.java", "license": "apache-2.0", "size": 29907 }
[ "org.apache.avro.Schema", "org.apache.avro.generic.GenericRecord" ]
import org.apache.avro.Schema; import org.apache.avro.generic.GenericRecord;
import org.apache.avro.*; import org.apache.avro.generic.*;
[ "org.apache.avro" ]
org.apache.avro;
1,905,142
@FeatureDescriptor(name = FEATURE_STRING_ARRAY_VALUES) public default boolean supportsStringArrayValues() { return true; }
@FeatureDescriptor(name = FEATURE_STRING_ARRAY_VALUES) default boolean function() { return true; }
/** * Supports setting of an array of string values. */
Supports setting of an array of string values
supportsStringArrayValues
{ "repo_name": "jorgebay/tinkerpop", "path": "gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java", "license": "apache-2.0", "size": 57344 }
[ "org.apache.tinkerpop.gremlin.structure.util.FeatureDescriptor" ]
import org.apache.tinkerpop.gremlin.structure.util.FeatureDescriptor;
import org.apache.tinkerpop.gremlin.structure.util.*;
[ "org.apache.tinkerpop" ]
org.apache.tinkerpop;
737,101
public Dimension getDimension() { return Line.getLength(from, to); }
Dimension function() { return Line.getLength(from, to); }
/** * Returns the length of this line, as a dimension. * * @return the length of this line, as a dimension. */
Returns the length of this line, as a dimension
getDimension
{ "repo_name": "zgrannan/Technical-Theatre-Assistant", "path": "src/com/zgrannan/crewandroid/Geometry.java", "license": "mit", "size": 10783 }
[ "com.zgrannan.crewandroid.Util" ]
import com.zgrannan.crewandroid.Util;
import com.zgrannan.crewandroid.*;
[ "com.zgrannan.crewandroid" ]
com.zgrannan.crewandroid;
929,941
protected void setColumnInfoList(List<ColumnInfo> columnInfoList) { this.columnInfo_ = columnInfoList; }
void function(List<ColumnInfo> columnInfoList) { this.columnInfo_ = columnInfoList; }
/** * Updates the ColumnInfo List. Use this if you need to implement custom projections */
Updates the ColumnInfo List. Use this if you need to implement custom projections
setColumnInfoList
{ "repo_name": "piaozhexiu/apache-pig", "path": "src/org/apache/pig/backend/hadoop/hbase/HBaseStorage.java", "license": "apache-2.0", "size": 54667 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
397,074
@Test public void inputOutputSameEvents() throws Exception { NexmarkConfiguration config = NexmarkConfiguration.DEFAULT.copy(); config.sideInputType = NexmarkUtils.SideInputType.DIRECT; config.numEventGenerators = 1; config.numEvents = 5000; config.sideInputRowCount = 10; con...
void function() throws Exception { NexmarkConfiguration config = NexmarkConfiguration.DEFAULT.copy(); config.sideInputType = NexmarkUtils.SideInputType.DIRECT; config.numEventGenerators = 1; config.numEvents = 5000; config.sideInputRowCount = 10; config.sideInputNumShards = 3; PCollection<KV<Long, String>> sideInput = ...
/** * A smoke test that the count of input bids and outputs are the same, to help diagnose * flakiness in more complex tests. */
A smoke test that the count of input bids and outputs are the same, to help diagnose flakiness in more complex tests
inputOutputSameEvents
{ "repo_name": "lukecwik/incubator-beam", "path": "sdks/java/testing/nexmark/src/test/java/org/apache/beam/sdk/nexmark/queries/sql/SqlBoundedSideInputJoinTest.java", "license": "apache-2.0", "size": 8845 }
[ "org.apache.beam.sdk.nexmark.NexmarkConfiguration", "org.apache.beam.sdk.nexmark.NexmarkUtils", "org.apache.beam.sdk.nexmark.model.Bid", "org.apache.beam.sdk.nexmark.model.Event", "org.apache.beam.sdk.nexmark.queries.NexmarkQuery", "org.apache.beam.sdk.nexmark.queries.NexmarkQueryTransform", "org.apache...
import org.apache.beam.sdk.nexmark.NexmarkConfiguration; import org.apache.beam.sdk.nexmark.NexmarkUtils; import org.apache.beam.sdk.nexmark.model.Bid; import org.apache.beam.sdk.nexmark.model.Event; import org.apache.beam.sdk.nexmark.queries.NexmarkQuery; import org.apache.beam.sdk.nexmark.queries.NexmarkQueryTransfor...
import org.apache.beam.sdk.nexmark.*; import org.apache.beam.sdk.nexmark.model.*; import org.apache.beam.sdk.nexmark.queries.*; import org.apache.beam.sdk.testing.*; import org.apache.beam.sdk.transforms.*; import org.apache.beam.sdk.values.*; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.*; i...
[ "org.apache.beam", "org.hamcrest" ]
org.apache.beam; org.hamcrest;
2,556,695
@Test public void testRandomDeletions() throws Throwable { createTable("CREATE TABLE %s (k int PRIMARY KEY, v int,)"); int nb_keys = 30; int nb_deletes = 5; List<Integer> deletions = new ArrayList<>(nb_keys); for (int i = 0; i < nb_keys; i++) { e...
void function() throws Throwable { createTable(STR); int nb_keys = 30; int nb_deletes = 5; List<Integer> deletions = new ArrayList<>(nb_keys); for (int i = 0; i < nb_keys; i++) { execute(STR, i, i); deletions.add(i); } Collections.shuffle(deletions); for (int i = 0; i < nb_deletes; i++) execute(STR, deletions.get(i)); ...
/** * Migrated from cql_tests.py:TestCQL.range_with_deletes_test() */
Migrated from cql_tests.py:TestCQL.range_with_deletes_test()
testRandomDeletions
{ "repo_name": "nitsanw/cassandra", "path": "test/unit/org/apache/cassandra/cql3/validation/operations/DeleteTest.java", "license": "apache-2.0", "size": 49742 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
499,434
public Object invoke(Remote obj, Method method, Object[] params, long opnum) throws Exception { Exception signal_exception = null; RemoteRef rref; // rmi.log.106=$$$$$$$$$ ActivatableRef.invoke: rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.106")+obj+", "+method+...
Object function(Remote obj, Method method, Object[] params, long opnum) throws Exception { Exception signal_exception = null; RemoteRef rref; rlog.log(RMILog.VERBOSE, Messages.getString(STR)+obj+STR+method+";"); if(ref == null) { rlog.log(RMILog.VERBOSE, Messages.getString(STR)); RemoteStub stub = (RemoteStub)id.activa...
/** * If the internal remote reference of this ActivatableRef is null, the activatable object is activated using * ActivationID.activate() method. After that the remote call is delegated to the ref, by means of calling its 'invoke' method. */
If the internal remote reference of this ActivatableRef is null, the activatable object is activated using ActivationID.activate() method. After that the remote call is delegated to the ref, by means of calling its 'invoke' method
invoke
{ "repo_name": "freeVM/freeVM", "path": "enhanced/archive/classlib/java6/modules/rmi/src/main/java/org/apache/harmony/rmi/remoteref/ActivatableRef.java", "license": "apache-2.0", "size": 8429 }
[ "java.lang.reflect.Method", "java.net.ConnectException", "java.rmi.ConnectIOException", "java.rmi.Remote", "java.rmi.activation.UnknownObjectException", "java.rmi.server.RemoteRef", "java.rmi.server.RemoteStub", "org.apache.harmony.rmi.common.RMILog", "org.apache.harmony.rmi.internal.nls.Messages" ]
import java.lang.reflect.Method; import java.net.ConnectException; import java.rmi.ConnectIOException; import java.rmi.Remote; import java.rmi.activation.UnknownObjectException; import java.rmi.server.RemoteRef; import java.rmi.server.RemoteStub; import org.apache.harmony.rmi.common.RMILog; import org.apache.harmony.rm...
import java.lang.reflect.*; import java.net.*; import java.rmi.*; import java.rmi.activation.*; import java.rmi.server.*; import org.apache.harmony.rmi.common.*; import org.apache.harmony.rmi.internal.nls.*;
[ "java.lang", "java.net", "java.rmi", "org.apache.harmony" ]
java.lang; java.net; java.rmi; org.apache.harmony;
1,837,316
public void onDirectoryClick(File directory);
void function(File directory);
/** * Callback method invoked when a directory is clicked by the user on the files list * * @param directory */
Callback method invoked when a directory is clicked by the user on the files list
onDirectoryClick
{ "repo_name": "duke8804/Iluq-Cloud", "path": "src/com/owncloud/android/ui/fragment/LocalFileListFragment.java", "license": "gpl-2.0", "size": 8747 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,000,114
public void init() { if (deleteBeforeOpen) { File databaseDir = new File(getServerBaseDir()); ServerLauncherSocketFactory.shutdown(databaseDir, null); deleteDirectory(databaseDir); } }
void function() { if (deleteBeforeOpen) { File databaseDir = new File(getServerBaseDir()); ServerLauncherSocketFactory.shutdown(databaseDir, null); deleteDirectory(databaseDir); } }
/** * Shutdowns mysql instance and removes database files if necessary */
Shutdowns mysql instance and removes database files if necessary
init
{ "repo_name": "macedoleonardo/Mystic", "path": "src/main/java/com/mystic/db/utils/EmbeddedMysqlDataSource.java", "license": "apache-2.0", "size": 3048 }
[ "com.mysql.management.driverlaunched.ServerLauncherSocketFactory", "java.io.File" ]
import com.mysql.management.driverlaunched.ServerLauncherSocketFactory; import java.io.File;
import com.mysql.management.driverlaunched.*; import java.io.*;
[ "com.mysql.management", "java.io" ]
com.mysql.management; java.io;
1,860,779
public LengthAdjustmentType getLabelOffsetType() { return this.labelOffsetType; }
LengthAdjustmentType function() { return this.labelOffsetType; }
/** * Returns the label offset type. * * @return The type (never <code>null</code>). * * @see #setLabelOffsetType(LengthAdjustmentType) */
Returns the label offset type
getLabelOffsetType
{ "repo_name": "martingwhite/astor", "path": "examples/chart_11/source/org/jfree/chart/plot/Marker.java", "license": "gpl-2.0", "size": 21744 }
[ "org.jfree.chart.util.LengthAdjustmentType" ]
import org.jfree.chart.util.LengthAdjustmentType;
import org.jfree.chart.util.*;
[ "org.jfree.chart" ]
org.jfree.chart;
2,379,517