method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public String generate(T object) throws MisoNamingException, IOException; | String function(T object) throws MisoNamingException, IOException; | /**
* Generates the field value for object
*
* @param object the entity to generate a field value for
* @return the generated value
* @throws MisoNamingException if any <b>user-preventable</b> error occurs
* @throws IOException if database access is required and fails
*/ | Generates the field value for object | generate | {
"repo_name": "TGAC/miso-lims",
"path": "core/src/main/java/uk/ac/bbsrc/tgac/miso/core/service/naming/generation/NameGenerator.java",
"license": "gpl-3.0",
"size": 755
} | [
"java.io.IOException",
"uk.ac.bbsrc.tgac.miso.core.exception.MisoNamingException"
] | import java.io.IOException; import uk.ac.bbsrc.tgac.miso.core.exception.MisoNamingException; | import java.io.*; import uk.ac.bbsrc.tgac.miso.core.exception.*; | [
"java.io",
"uk.ac.bbsrc"
] | java.io; uk.ac.bbsrc; | 971,939 |
public void connectFailed(Route failedRoute, IOException failure) {
if (failedRoute.proxy().type() != Proxy.Type.DIRECT && address.proxySelector() != null) {
// Tell the proxy selector when we fail to connect on a fresh connection.
address.proxySelector().connectFailed(
... | void function(Route failedRoute, IOException failure) { if (failedRoute.proxy().type() != Proxy.Type.DIRECT && address.proxySelector() != null) { address.proxySelector().connectFailed( address.url().uri(), failedRoute.proxy().address(), failure); } routeDatabase.failed(failedRoute); } | /**
* Clients should invoke this method when they encounter a connectivity
* failure on a connection returned by this route selector.
*/ | Clients should invoke this method when they encounter a connectivity failure on a connection returned by this route selector | connectFailed | {
"repo_name": "WeiDianzhao1989/AndroidAppLib",
"path": "network/src/main/java/com/koudai/net/kernal/internal/http/RouteSelector.java",
"license": "apache-2.0",
"size": 8384
} | [
"com.koudai.net.kernal.Route",
"java.io.IOException",
"java.net.Proxy"
] | import com.koudai.net.kernal.Route; import java.io.IOException; import java.net.Proxy; | import com.koudai.net.kernal.*; import java.io.*; import java.net.*; | [
"com.koudai.net",
"java.io",
"java.net"
] | com.koudai.net; java.io; java.net; | 149,394 |
public static void closeCustomShell() throws IOException {
Shell.closeCustomShell();
} | static void function() throws IOException { Shell.closeCustomShell(); } | /**
* This will close the custom shell that you opened.
*
* @throws IOException
*/ | This will close the custom shell that you opened | closeCustomShell | {
"repo_name": "cernekee/ics-openconnect",
"path": "app/src/main/java/com/stericson/RootTools/RootTools.java",
"license": "gpl-2.0",
"size": 31056
} | [
"com.stericson.RootTools",
"java.io.IOException"
] | import com.stericson.RootTools; import java.io.IOException; | import com.stericson.*; import java.io.*; | [
"com.stericson",
"java.io"
] | com.stericson; java.io; | 2,782,800 |
public boolean checkDigits(StringBuffer buf, Scanner scanner, String min, String max) throws IOException {
int bl = buf.length();
boolean neg = bl > 0 && buf.charAt( 0 ) == '-';
if ( neg && min == null || ! neg && max == null ) {
return false; // nothing to ch... | boolean function(StringBuffer buf, Scanner scanner, String min, String max) throws IOException { int bl = buf.length(); boolean neg = bl > 0 && buf.charAt( 0 ) == '-'; if ( neg && min == null ! neg && max == null ) { return false; } String number = "" + scanner.lookAhead(); for (int i = neg ? 1 : 0; i < bl; i++ ) { if ... | /**
* Check the digits of a buffer.
*
* @param buf The buffer
* @param scanner The scanner
* @param min For negative values only. Inclusive.
* @param max For positive values only. Inclusive.
* @return <tt>true</tt> if the number is in the expected range, <t... | Check the digits of a buffer | checkDigits | {
"repo_name": "alternet/alternet.ml",
"path": "scanner/src/main/java/ml/alternet/scan/NumberConstraint.java",
"license": "mit",
"size": 12383
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,769,044 |
public static String objectToJson(Object object) throws JsonProcessingException {
return objectMapper.writeValueAsString(object);
} | static String function(Object object) throws JsonProcessingException { return objectMapper.writeValueAsString(object); } | /**
* Converts the input POJO object to its JSON string.
*
* @param object the object to serialize into a JSON string.
* @return the JSON string representation of the object.
* @throws JsonProcessingException if there's trouble serializing object
* to a JSON string.
*/ | Converts the input POJO object to its JSON string | objectToJson | {
"repo_name": "heremaps/here-aaa-java-sdk",
"path": "here-oauth-client/src/main/java/com/here/account/util/JsonSerializer.java",
"license": "apache-2.0",
"size": 4697
} | [
"com.fasterxml.jackson.core.JsonProcessingException"
] | import com.fasterxml.jackson.core.JsonProcessingException; | import com.fasterxml.jackson.core.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 307,539 |
public static void cacheInternalItemId(ConsumerBean consumerBean, String clientId, Long internalId) {
final String clientIdKey = MemCacheKeys.getItemInternalId(consumerBean.getShort_name(), clientId);
MemCachePeer.put(clientIdKey, internalId,Constants.CACHING_TIME);
} | static void function(ConsumerBean consumerBean, String clientId, Long internalId) { final String clientIdKey = MemCacheKeys.getItemInternalId(consumerBean.getShort_name(), clientId); MemCachePeer.put(clientIdKey, internalId,Constants.CACHING_TIME); } | /**
* Cache an item's internal ID keyed by client ID
* @param consumerBean -
* @param clientId the client item ID (cache key)
* @param internalId the internal item ID (cache value)
*/ | Cache an item's internal ID keyed by client ID | cacheInternalItemId | {
"repo_name": "guiquanz/seldon-server",
"path": "server/src/io/seldon/api/resource/service/ItemService.java",
"license": "apache-2.0",
"size": 20154
} | [
"io.seldon.api.Constants",
"io.seldon.api.resource.ConsumerBean",
"io.seldon.memcache.MemCacheKeys",
"io.seldon.memcache.MemCachePeer"
] | import io.seldon.api.Constants; import io.seldon.api.resource.ConsumerBean; import io.seldon.memcache.MemCacheKeys; import io.seldon.memcache.MemCachePeer; | import io.seldon.api.*; import io.seldon.api.resource.*; import io.seldon.memcache.*; | [
"io.seldon.api",
"io.seldon.memcache"
] | io.seldon.api; io.seldon.memcache; | 335,454 |
private TextAreaElement getTextAreaElement() {
return getElement().cast();
} | TextAreaElement function() { return getElement().cast(); } | /**
* Get the TextAreaElement for the widget
*
* @return TextAreaElement element of the widget
*/ | Get the TextAreaElement for the widget | getTextAreaElement | {
"repo_name": "Sage-Bionetworks/gwtbootstrap3",
"path": "gwtbootstrap3/src/main/java/org/gwtbootstrap3/client/ui/TextArea.java",
"license": "apache-2.0",
"size": 4073
} | [
"com.google.gwt.dom.client.TextAreaElement"
] | import com.google.gwt.dom.client.TextAreaElement; | import com.google.gwt.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,893,363 |
private static DefaultConfigurationKey createConfigurationKey()
{
return new DefaultConfigurationKey(DefaultExpressionEngine.INSTANCE);
} | static DefaultConfigurationKey function() { return new DefaultConfigurationKey(DefaultExpressionEngine.INSTANCE); } | /**
* Creates a {@code DefaultConfigurationKey} object.
*
* @return the new key object
*/ | Creates a DefaultConfigurationKey object | createConfigurationKey | {
"repo_name": "mohanaraosv/commons-configuration",
"path": "src/test/java/org/apache/commons/configuration2/TestAbstractHierarchicalConfiguration.java",
"license": "apache-2.0",
"size": 42005
} | [
"org.apache.commons.configuration2.tree.DefaultConfigurationKey",
"org.apache.commons.configuration2.tree.DefaultExpressionEngine"
] | import org.apache.commons.configuration2.tree.DefaultConfigurationKey; import org.apache.commons.configuration2.tree.DefaultExpressionEngine; | import org.apache.commons.configuration2.tree.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,682,515 |
public void clearStore() {
if (store == null)
return;
try {
if (SecurityUtil.isPackageProtectionEnabled()){
try{
AccessController.doPrivileged(new PrivilegedStoreClear());
}catch(PrivilegedActionException ex){
... | void function() { if (store == null) return; try { if (SecurityUtil.isPackageProtectionEnabled()){ try{ AccessController.doPrivileged(new PrivilegedStoreClear()); }catch(PrivilegedActionException ex){ Exception exception = ex.getException(); log.error(STR + exception); exception.printStackTrace(); } } else { store.clea... | /**
* Clear all sessions from the Store.
*/ | Clear all sessions from the Store | clearStore | {
"repo_name": "Netprophets/JBOSSWEB_7_0_13_FINAL",
"path": "java/org/apache/catalina/session/PersistentManagerBase.java",
"license": "lgpl-3.0",
"size": 36997
} | [
"java.io.IOException",
"java.security.AccessController",
"java.security.PrivilegedActionException",
"org.apache.catalina.security.SecurityUtil"
] | import java.io.IOException; import java.security.AccessController; import java.security.PrivilegedActionException; import org.apache.catalina.security.SecurityUtil; | import java.io.*; import java.security.*; import org.apache.catalina.security.*; | [
"java.io",
"java.security",
"org.apache.catalina"
] | java.io; java.security; org.apache.catalina; | 206,590 |
ViewDialog newViewDialog(VaadinView<?> view, String name); | ViewDialog newViewDialog(VaadinView<?> view, String name); | /**
* Create a new ViewDialog instance for a {@link VaadinView} by name
* @param view the view
* @param name the dialog name
* @return a new {@link ViewDialog} showing the view.
*/ | Create a new ViewDialog instance for a <code>VaadinView</code> by name | newViewDialog | {
"repo_name": "chelu/jdal",
"path": "vaadin/src/main/java/org/jdal/vaadin/ui/GuiFactory.java",
"license": "apache-2.0",
"size": 1959
} | [
"org.jdal.vaadin.ui.form.ViewDialog"
] | import org.jdal.vaadin.ui.form.ViewDialog; | import org.jdal.vaadin.ui.form.*; | [
"org.jdal.vaadin"
] | org.jdal.vaadin; | 1,731,962 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ResourceProviderOperationInner>> listSinglePageAsync() {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter th... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<ResourceProviderOperationInner>> function() { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String accept = STR; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), thi... | /**
* List all of the available operations the Desktop Virtualization resource provider supports.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return result of the... | List all of the available operations the Desktop Virtualization resource provider supports | listSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/OperationsClientImpl.java",
"license": "mit",
"size": 12601
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.desktopvirtualization.fluent.models.ResourceProviderOperationInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.desktopvirtualization.fluent.models.ResourceProviderOperati... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.desktopvirtualization.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,240,145 |
@Override()
public java.lang.Class<?> getJavaClass(
) {
return org.opennms.netmgt.config.charts.Red.class;
} | @Override() java.lang.Class<?> function( ) { return org.opennms.netmgt.config.charts.Red.class; } | /**
* Method getJavaClass.
*
* @return the Java class represented by this descriptor.
*/ | Method getJavaClass | getJavaClass | {
"repo_name": "vishwaAbhinav/OpenNMS",
"path": "opennms-config/target/generated-sources/castor/org/opennms/netmgt/config/charts/descriptors/RedDescriptor.java",
"license": "gpl-2.0",
"size": 6016
} | [
"org.opennms.netmgt.config.charts.Red"
] | import org.opennms.netmgt.config.charts.Red; | import org.opennms.netmgt.config.charts.*; | [
"org.opennms.netmgt"
] | org.opennms.netmgt; | 587,798 |
public GVTGlyphVector createGlyphVector(FontRenderContext frc,
CharacterIterator ci) {
if (ci instanceof AttributedCharacterIterator) {
AttributedCharacterIterator aci = (AttributedCharacterIterator)ci;
if (ArabicTextHandler.containsArabic... | GVTGlyphVector function(FontRenderContext frc, CharacterIterator ci) { if (ci instanceof AttributedCharacterIterator) { AttributedCharacterIterator aci = (AttributedCharacterIterator)ci; if (ArabicTextHandler.containsArabic(aci)) { String str = ArabicTextHandler.createSubstituteString(aci); return createGlyphVector(frc... | /**
* Returns a new GlyphVector object created with the specified
* CharacterIterator and the specified FontRenderContext.
*/ | Returns a new GlyphVector object created with the specified CharacterIterator and the specified FontRenderContext | createGlyphVector | {
"repo_name": "srnsw/xena",
"path": "plugins/image/ext/src/batik-1.7/sources/org/apache/batik/gvt/font/AWTGVTFont.java",
"license": "gpl-3.0",
"size": 11426
} | [
"java.awt.font.FontRenderContext",
"java.awt.font.GlyphVector",
"java.text.AttributedCharacterIterator",
"java.text.CharacterIterator",
"org.apache.batik.gvt.text.ArabicTextHandler"
] | import java.awt.font.FontRenderContext; import java.awt.font.GlyphVector; import java.text.AttributedCharacterIterator; import java.text.CharacterIterator; import org.apache.batik.gvt.text.ArabicTextHandler; | import java.awt.font.*; import java.text.*; import org.apache.batik.gvt.text.*; | [
"java.awt",
"java.text",
"org.apache.batik"
] | java.awt; java.text; org.apache.batik; | 944,520 |
void logRename(String src, String dst, long timestamp, boolean toLogRpcIds,
Options.Rename... options) {
RenameOp op = RenameOp.getInstance(cache.get())
.setSource(src)
.setDestination(dst)
.setTimestamp(timestamp)
.setOptions(options);
logRpcIds(op, toLogRpcIds);
logEdit(op)... | void logRename(String src, String dst, long timestamp, boolean toLogRpcIds, Options.Rename... options) { RenameOp op = RenameOp.getInstance(cache.get()) .setSource(src) .setDestination(dst) .setTimestamp(timestamp) .setOptions(options); logRpcIds(op, toLogRpcIds); logEdit(op); } | /**
* Add rename record to edit log.
*
* The destination should be the file name, not the destination directory.
*/ | Add rename record to edit log. The destination should be the file name, not the destination directory | logRename | {
"repo_name": "jaypatil/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java",
"license": "gpl-3.0",
"size": 58205
} | [
"org.apache.hadoop.fs.Options",
"org.apache.hadoop.hdfs.server.namenode.FSEditLogOp"
] | import org.apache.hadoop.fs.Options; import org.apache.hadoop.hdfs.server.namenode.FSEditLogOp; | import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.server.namenode.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 986,760 |
public void setPortTypeAnalyzerLinkPersistence(
PortTypeAnalyzerLinkPersistence portTypeAnalyzerLinkPersistence) {
this.portTypeAnalyzerLinkPersistence = portTypeAnalyzerLinkPersistence;
} | void function( PortTypeAnalyzerLinkPersistence portTypeAnalyzerLinkPersistence) { this.portTypeAnalyzerLinkPersistence = portTypeAnalyzerLinkPersistence; } | /**
* Sets the port type analyzer link persistence.
*
* @param portTypeAnalyzerLinkPersistence the port type analyzer link persistence
*/ | Sets the port type analyzer link persistence | setPortTypeAnalyzerLinkPersistence | {
"repo_name": "queza85/edison",
"path": "edison-portal-framework/edison-appstore-2016-portlet/docroot/WEB-INF/src/org/kisti/edison/science/service/base/RequiredLibServiceBaseImpl.java",
"license": "gpl-3.0",
"size": 52463
} | [
"org.kisti.edison.science.service.persistence.PortTypeAnalyzerLinkPersistence"
] | import org.kisti.edison.science.service.persistence.PortTypeAnalyzerLinkPersistence; | import org.kisti.edison.science.service.persistence.*; | [
"org.kisti.edison"
] | org.kisti.edison; | 2,156,616 |
private void invalidateCorruptReplicas(BlockInfo blk) {
Collection<DatanodeDescriptor> nodes = corruptReplicas.getNodes(blk);
boolean removedFromBlocksMap = true;
if (nodes == null)
return;
// make a copy of the array of nodes in order to avoid
// ConcurrentModificationException, when the bl... | void function(BlockInfo blk) { Collection<DatanodeDescriptor> nodes = corruptReplicas.getNodes(blk); boolean removedFromBlocksMap = true; if (nodes == null) return; DatanodeDescriptor[] nodesCopy = nodes.toArray(new DatanodeDescriptor[0]); for (DatanodeDescriptor node : nodesCopy) { try { if (!invalidateBlock(new Block... | /**
* Invalidate corrupt replicas.
* <p>
* This will remove the replicas from the block's location list,
* add them to {@link #invalidateBlocks} so that they could be further
* deleted from the respective data-nodes,
* and remove the block from corruptReplicasMap.
* <p>
* This method should be c... | Invalidate corrupt replicas. This will remove the replicas from the block's location list, add them to <code>#invalidateBlocks</code> so that they could be further deleted from the respective data-nodes, and remove the block from corruptReplicasMap. This method should be called when the block has sufficient number of l... | invalidateCorruptReplicas | {
"repo_name": "samuelan/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java",
"license": "apache-2.0",
"size": 146899
} | [
"java.io.IOException",
"java.util.Collection",
"org.apache.hadoop.hdfs.server.blockmanagement.CorruptReplicasMap"
] | import java.io.IOException; import java.util.Collection; import org.apache.hadoop.hdfs.server.blockmanagement.CorruptReplicasMap; | import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.server.blockmanagement.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,489,740 |
public static AntClassLoader newAntClassLoader(final ClassLoader parent,
final Project project,
final Path path,
final boolean parentFirst) {
return new An... | static AntClassLoader function(final ClassLoader parent, final Project project, final Path path, final boolean parentFirst) { return new AntClassLoader(parent, project, path, parentFirst); } /** * * @param file The file representing the jar * @return Returns a {@link JarFile} instance, which is constructed based upon t... | /**
* Factory method
*
* @param parent ClassLoader
* @param project Project
* @param path Path
* @param parentFirst boolean
* @return AntClassLoader
*/ | Factory method | newAntClassLoader | {
"repo_name": "pjanouse/jenkins",
"path": "core/src/main/java/jenkins/util/AntClassLoader.java",
"license": "mit",
"size": 60541
} | [
"java.util.jar.JarFile",
"org.apache.tools.ant.Project",
"org.apache.tools.ant.types.Path"
] | import java.util.jar.JarFile; import org.apache.tools.ant.Project; import org.apache.tools.ant.types.Path; | import java.util.jar.*; import org.apache.tools.ant.*; import org.apache.tools.ant.types.*; | [
"java.util",
"org.apache.tools"
] | java.util; org.apache.tools; | 317,054 |
public void refresh() {
boolean changed = false;
Iterator it = _dirtyParagraphs.iterator();
while(it.hasNext()) {
Paragraph p = (Paragraph)it.next();
if(p.performWordWrap() > 0)
changed = true;
}
if(changed) {
_textField._controller.getCurrentEnvironment().correctCurrentSection();
_textF... | void function() { boolean changed = false; Iterator it = _dirtyParagraphs.iterator(); while(it.hasNext()) { Paragraph p = (Paragraph)it.next(); if(p.performWordWrap() > 0) changed = true; } if(changed) { _textField._controller.getCurrentEnvironment().correctCurrentSection(); _textField.getRepaintManager().markCompletly... | /**
* Refreshes all dirty paragraphs
*/ | Refreshes all dirty paragraphs | refresh | {
"repo_name": "script-solution/BBCodeEditor",
"path": "bbcodeeditor/control/WordwrapManager.java",
"license": "gpl-2.0",
"size": 2087
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 240,817 |
public Paint getPaint() {
return this.paint;
} | Paint function() { return this.paint; } | /**
* Returns the paint.
*
* @return The paint (never <code>null</code>).
*
* @see #setPaint(Paint)
*/ | Returns the paint | getPaint | {
"repo_name": "JSansalone/JFreeChart",
"path": "source/org/jfree/chart/plot/dial/DialValueIndicator.java",
"license": "lgpl-2.1",
"size": 23421
} | [
"java.awt.Paint"
] | import java.awt.Paint; | import java.awt.*; | [
"java.awt"
] | java.awt; | 526,563 |
@Test
public void load_application_using_manager_mode ()
throws JsonProcessingException, IOException {
File csapApplicationDefinition = new File(
getClass().getResource( "/org/csap/test/data/clusterConfigManager.json" ).getPath() );
// Configure the manager...
Application.setJvmInManagerMode( true );
... | void function () throws JsonProcessingException, IOException { File csapApplicationDefinition = new File( getClass().getResource( STR ).getPath() ); Application.setJvmInManagerMode( true ); HostStatusManager testStatus = new HostStatusManager( new File( getClass().getResource( STR ).getPath() ) ); csapApplication.setHo... | /**
*
* Application has split personality: Node Manager and Node Agent
*
* Node Manager mode will not change active lifecycle
*
* @throws JsonProcessingException
* @throws IOException
*/ | Application has split personality: Node Manager and Node Agent Node Manager mode will not change active lifecycle | load_application_using_manager_mode | {
"repo_name": "peterdnight/csap-core",
"path": "csap-core-service/src/test/java/org/csap/test/t3/models/using_spring/Load_Working_Models_Test.java",
"license": "mit",
"size": 33916
} | [
"com.fasterxml.jackson.core.JsonProcessingException",
"java.io.File",
"java.io.IOException",
"org.assertj.core.api.Assertions",
"org.csap.agent.linux.HostStatusManager",
"org.csap.agent.model.Application"
] | import com.fasterxml.jackson.core.JsonProcessingException; import java.io.File; import java.io.IOException; import org.assertj.core.api.Assertions; import org.csap.agent.linux.HostStatusManager; import org.csap.agent.model.Application; | import com.fasterxml.jackson.core.*; import java.io.*; import org.assertj.core.api.*; import org.csap.agent.linux.*; import org.csap.agent.model.*; | [
"com.fasterxml.jackson",
"java.io",
"org.assertj.core",
"org.csap.agent"
] | com.fasterxml.jackson; java.io; org.assertj.core; org.csap.agent; | 13,547 |
public String patch_toText(List<Patch> patches) {
StringBuilder text = new StringBuilder();
for (Patch aPatch : patches) {
text.append(aPatch);
}
return text.toString();
} | String function(List<Patch> patches) { StringBuilder text = new StringBuilder(); for (Patch aPatch : patches) { text.append(aPatch); } return text.toString(); } | /**
* Take a list of patches and return a textual representation.
* @param patches List of Patch objects.
* @return Text representation of patches.
*/ | Take a list of patches and return a textual representation | patch_toText | {
"repo_name": "xjyaikj/OnlinePreparation",
"path": "src/main/java/com/xjy/op/util/DiffMatchPatch.java",
"license": "mit",
"size": 89008
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 718,803 |
private String getFileName(String pContentDisposition) {
String fileName = null;
if (pContentDisposition != null) {
String cdl = pContentDisposition.toLowerCase(Locale.ENGLISH);
if (cdl.startsWith(FORM_DATA) || cdl.startsWith(ATTACHMENT)) {
ParameterParser par... | String function(String pContentDisposition) { String fileName = null; if (pContentDisposition != null) { String cdl = pContentDisposition.toLowerCase(Locale.ENGLISH); if (cdl.startsWith(FORM_DATA) cdl.startsWith(ATTACHMENT)) { ParameterParser parser = new ParameterParser(); parser.setLowerCaseNames(true); Map<String,St... | /**
* Returns the given content-disposition headers file name.
* @param pContentDisposition The content-disposition headers value.
* @return The file name
*/ | Returns the given content-disposition headers file name | getFileName | {
"repo_name": "whitingjr/JbossWeb_7_2_0",
"path": "src/main/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java",
"license": "apache-2.0",
"size": 41088
} | [
"java.util.Locale",
"java.util.Map"
] | import java.util.Locale; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,781,955 |
public static void setMailManager(MailManager mailManager) {
AppStore.setObject(KEY_MAIL_MANAGER, mailManager);
} | static void function(MailManager mailManager) { AppStore.setObject(KEY_MAIL_MANAGER, mailManager); } | /**
* Method to setup mail manager in AppStoreWrapper.
*
* @param mailManager
* mailmanager object configured with proper mail configuration
* that will be used to send mail
*/ | Method to setup mail manager in AppStoreWrapper | setMailManager | {
"repo_name": "impetus-opensource/ankush",
"path": "ankush/src/main/java/com/impetus/ankush/AppStoreWrapper.java",
"license": "lgpl-3.0",
"size": 22762
} | [
"com.impetus.ankush.common.mail.MailManager"
] | import com.impetus.ankush.common.mail.MailManager; | import com.impetus.ankush.common.mail.*; | [
"com.impetus.ankush"
] | com.impetus.ankush; | 401,791 |
private static ImmutableList<CssDeclarationNode> expandMatchingValueOnlyFunctions(
CssDeclarationNode declaration, BrowserPrefixRule rule) {
ImmutableList.Builder<CssDeclarationNode> expansionNodes = ImmutableList.builder();
for (CssPropertyValueNode ruleValueNode : rule.getValueOnlyExpansionNodes()) {
... | static ImmutableList<CssDeclarationNode> function( CssDeclarationNode declaration, BrowserPrefixRule rule) { ImmutableList.Builder<CssDeclarationNode> expansionNodes = ImmutableList.builder(); for (CssPropertyValueNode ruleValueNode : rule.getValueOnlyExpansionNodes()) { List<CssValueNode> expansionNodeValues = new Arr... | /**
* Returns the value-only function expansion for this declaration and rule. For each value-only
* expansion rule we can match 0 or more values.
* For example: margin: calc(X) calc(Y); -> margin: -webkit-calc(X) -webkit-calc(Y);
*/ | Returns the value-only function expansion for this declaration and rule. For each value-only expansion rule we can match 0 or more values. For example: margin: calc(X) calc(Y); -> margin: -webkit-calc(X) -webkit-calc(Y) | expandMatchingValueOnlyFunctions | {
"repo_name": "google/closure-stylesheets",
"path": "src/com/google/common/css/compiler/passes/AutoExpandBrowserPrefix.java",
"license": "apache-2.0",
"size": 10794
} | [
"com.google.common.collect.ImmutableList",
"com.google.common.css.compiler.ast.CssCommentNode",
"com.google.common.css.compiler.ast.CssDeclarationNode",
"com.google.common.css.compiler.ast.CssFunctionNode",
"com.google.common.css.compiler.ast.CssPropertyValueNode",
"com.google.common.css.compiler.ast.CssV... | import com.google.common.collect.ImmutableList; import com.google.common.css.compiler.ast.CssCommentNode; import com.google.common.css.compiler.ast.CssDeclarationNode; import com.google.common.css.compiler.ast.CssFunctionNode; import com.google.common.css.compiler.ast.CssPropertyValueNode; import com.google.common.css.... | import com.google.common.collect.*; import com.google.common.css.compiler.ast.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,927,677 |
private void drawVerticalRule(Graphics2D g,
boolean vertexAtTop,
boolean drawTicksRight, int x, int y, int length,
double tinyEveryY,
double minorEveryY,
... | void function(Graphics2D g, boolean vertexAtTop, boolean drawTicksRight, int x, int y, int length, double tinyEveryY, double minorEveryY, double midMajorEveryY, double majorEveryY) { int tiniest = drawTicksRight ? TINIEST_TICK_LENGTH : -1 * TINIEST_TICK_LENGTH; int minor = drawTicksRight ? MINOR_TICK_LENGTH : -1 * MINO... | /**
* Draw a vertical ruler.
*
* @param g the graphics context
* @param vertexAtTop true if the horizontal/vertical vertex is oriented to the top
* @param drawTicksRight true if the ruler should draw interval tick marks to the right side of the solid ruler
* ... | Draw a vertical ruler | drawVerticalRule | {
"repo_name": "joebowen/landing_zone_project",
"path": "openrocket-release-15.03/swing/src/net/sf/openrocket/gui/print/components/Rule.java",
"license": "gpl-2.0",
"size": 11048
} | [
"java.awt.Color",
"java.awt.Graphics2D"
] | import java.awt.Color; import java.awt.Graphics2D; | import java.awt.*; | [
"java.awt"
] | java.awt; | 797,969 |
// is value null ?
if (value == null) return true;
// is value not an Identifier instance ?
if (!(value instanceof Identifier)) return true;
Identifier other = (Identifier) value;
ParticipantQuery participantQuery = new ParticipantQuery();
participantQuery.leftJ... | if (value == null) return true; if (!(value instanceof Identifier)) return true; Identifier other = (Identifier) value; ParticipantQuery participantQuery = new ParticipantQuery(); participantQuery.leftJoinFetchOnIdentifiers(); if (other.getValue() != null) participantQuery.filterByIdentifierValueExactMatch(other .getVa... | /**
* Will check in the DB whether there exist another participant with the same ID.
*/ | Will check in the DB whether there exist another participant with the same ID | validate | {
"repo_name": "NCIP/caaers",
"path": "caAERS/software/core/src/main/java/gov/nih/nci/cabig/caaers/validation/annotation/UniqueIdentifierForParticipantValidator.java",
"license": "bsd-3-clause",
"size": 3421
} | [
"gov.nih.nci.cabig.caaers.dao.query.ParticipantQuery",
"gov.nih.nci.cabig.caaers.domain.Identifier",
"gov.nih.nci.cabig.caaers.domain.Participant",
"java.util.List",
"org.apache.commons.lang.ObjectUtils",
"org.apache.commons.lang.StringUtils"
] | import gov.nih.nci.cabig.caaers.dao.query.ParticipantQuery; import gov.nih.nci.cabig.caaers.domain.Identifier; import gov.nih.nci.cabig.caaers.domain.Participant; import java.util.List; import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.StringUtils; | import gov.nih.nci.cabig.caaers.dao.query.*; import gov.nih.nci.cabig.caaers.domain.*; import java.util.*; import org.apache.commons.lang.*; | [
"gov.nih.nci",
"java.util",
"org.apache.commons"
] | gov.nih.nci; java.util; org.apache.commons; | 667,301 |
private static void loadFilesPath(Context context) {
if (context != null) {
try {
File file = context.getFilesDir();
// The file shouldn't be null, but apparently it still can happen, see
// http://code.google.com/p/android/issues/detail?id=8886
... | static void function(Context context) { if (context != null) { try { File file = context.getFilesDir(); if (file != null) { CrashConstants.FILES_PATH = file.getAbsolutePath(); } } catch (Exception e) { L.e(STR); e.printStackTrace(); } } } | /**
* Helper method to set the files path. If an exception occurs, the files
* path will be null!
*
* @param context The context to use. Usually your Activity object.
*/ | Helper method to set the files path. If an exception occurs, the files path will be null | loadFilesPath | {
"repo_name": "jecelyin/920-text-editor-v2",
"path": "common/src/main/java/com/jecelyin/common/app/crash/CrashConstants.java",
"license": "apache-2.0",
"size": 9538
} | [
"android.content.Context",
"com.jecelyin.common.utils.L",
"java.io.File"
] | import android.content.Context; import com.jecelyin.common.utils.L; import java.io.File; | import android.content.*; import com.jecelyin.common.utils.*; import java.io.*; | [
"android.content",
"com.jecelyin.common",
"java.io"
] | android.content; com.jecelyin.common; java.io; | 1,242,981 |
public Principal getLocalPrincipal() {
Certificate[] certs = getLocalCertificates();
if (certs == null || certs.length == 0 || (!(certs[0] instanceof X509Certificate))) {
return null;
}
return ((X509Certificate) certs[0]).getSubjectX500Principal();
}
| Principal function() { Certificate[] certs = getLocalCertificates(); if (certs == null certs.length == 0 (!(certs[0] instanceof X509Certificate))) { return null; } return ((X509Certificate) certs[0]).getSubjectX500Principal(); } | /**
* Returns the {@code Principal} used to identify the local host during the handshake.
*
* @return the {@code Principal} used to identify the local host during the handshake, or
* {@code null} if none was used.
* @throws IllegalStateException
* if no connection... | Returns the Principal used to identify the local host during the handshake | getLocalPrincipal | {
"repo_name": "skyHALud/codenameone",
"path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/x-net/src/main/java/javax/net/ssl/HttpsURLConnection.java",
"license": "gpl-2.0",
"size": 8084
} | [
"java.security.Principal",
"java.security.cert.Certificate",
"java.security.cert.X509Certificate"
] | import java.security.Principal; import java.security.cert.Certificate; import java.security.cert.X509Certificate; | import java.security.*; import java.security.cert.*; | [
"java.security"
] | java.security; | 2,181,445 |
public void setFile(final String aName)
{
// Handle empty param
if ((aName == null) || (aName.trim().length() == 0)) {
return;
}
try {
mRoot = ImportControlLoader.load(new File(aName).toURI());
}
catch (final CheckstyleException ex) {
... | void function(final String aName) { if ((aName == null) (aName.trim().length() == 0)) { return; } try { mRoot = ImportControlLoader.load(new File(aName).toURI()); } catch (final CheckstyleException ex) { throw new ConversionException(STR + aName, ex); } } | /**
* Set the parameter for the file containing the import control
* configuration. It will cause the file to be loaded.
* @param aName the name of the file to load.
* @throws ConversionException on error loading the file.
*/ | Set the parameter for the file containing the import control configuration. It will cause the file to be loaded | setFile | {
"repo_name": "Andrew0701/checkstyle",
"path": "src/checkstyle/com/puppycrawl/tools/checkstyle/checks/imports/ImportControlCheck.java",
"license": "lgpl-2.1",
"size": 5314
} | [
"com.puppycrawl.tools.checkstyle.api.CheckstyleException",
"java.io.File",
"org.apache.commons.beanutils.ConversionException"
] | import com.puppycrawl.tools.checkstyle.api.CheckstyleException; import java.io.File; import org.apache.commons.beanutils.ConversionException; | import com.puppycrawl.tools.checkstyle.api.*; import java.io.*; import org.apache.commons.beanutils.*; | [
"com.puppycrawl.tools",
"java.io",
"org.apache.commons"
] | com.puppycrawl.tools; java.io; org.apache.commons; | 774,937 |
return OdeHelper.createMass();
}
| return OdeHelper.createMass(); } | /**
* Not in the original API. By TZ.
*/ | Not in the original API. By TZ | dMassCreate | {
"repo_name": "billhj/Etoile-java",
"path": "Ode4j/src/org/ode4j/cpp/internal/ApiCppMass.java",
"license": "mit",
"size": 6289
} | [
"org.ode4j.ode.OdeHelper"
] | import org.ode4j.ode.OdeHelper; | import org.ode4j.ode.*; | [
"org.ode4j.ode"
] | org.ode4j.ode; | 937,545 |
public static <T extends Enum<T>> EquivalentConverter<T> getGenericConverter(Class<T> enumClass) {
return new EnumConverter<T>(enumClass);
}
// The common enum converter
@SuppressWarnings({ "rawtypes", "unchecked" })
private static class EnumConverter<T extends Enum<T>> implements EquivalentConverter<T> {
p... | static <T extends Enum<T>> EquivalentConverter<T> function(Class<T> enumClass) { return new EnumConverter<T>(enumClass); } @SuppressWarnings({ STR, STR }) private static class EnumConverter<T extends Enum<T>> implements EquivalentConverter<T> { private Class<T> specificType; public EnumConverter(Class<T> specificType) ... | /**
* Retrieve a generic enum converter for use with StructureModifiers.
* @param enumClass - Enum class
* @return A generic enum converter
*/ | Retrieve a generic enum converter for use with StructureModifiers | getGenericConverter | {
"repo_name": "ewized/ProtocolLib",
"path": "ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/EnumWrappers.java",
"license": "gpl-2.0",
"size": 15434
} | [
"com.comphenix.protocol.reflect.EquivalentConverter"
] | import com.comphenix.protocol.reflect.EquivalentConverter; | import com.comphenix.protocol.reflect.*; | [
"com.comphenix.protocol"
] | com.comphenix.protocol; | 1,204,554 |
public Object clickOnItem(final int itemIndex, final int clickCount) {
output.printLine("Click " + Integer.toString(clickCount)
+ " times on JList\n : " + toStringSource());
output.printGolden("Click " + Integer.toString(clickCount)
+ " times on JList");
ch... | Object function(final int itemIndex, final int clickCount) { output.printLine(STR + Integer.toString(clickCount) + STR + toStringSource()); output.printGolden(STR + Integer.toString(clickCount) + STR); checkIndex(itemIndex); try { scrollToItem(itemIndex); } catch (TimeoutExpiredException e) { output.printStackTrace(e);... | /**
* Clicks on item by item index.
*
* @param itemIndex Item index.
* @param clickCount count click.
* @return Click point or null if list does not contains itemIndex'th item.
* @throws NoSuchItemException
*/ | Clicks on item by item index | clickOnItem | {
"repo_name": "FauxFaux/jdk9-jdk",
"path": "test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/JListOperator.java",
"license": "gpl-2.0",
"size": 56271
} | [
"java.awt.Point",
"java.awt.Rectangle",
"javax.swing.JList",
"org.netbeans.jemmy.QueueTool",
"org.netbeans.jemmy.TimeoutExpiredException"
] | import java.awt.Point; import java.awt.Rectangle; import javax.swing.JList; import org.netbeans.jemmy.QueueTool; import org.netbeans.jemmy.TimeoutExpiredException; | import java.awt.*; import javax.swing.*; import org.netbeans.jemmy.*; | [
"java.awt",
"javax.swing",
"org.netbeans.jemmy"
] | java.awt; javax.swing; org.netbeans.jemmy; | 1,315,056 |
@Override
protected void onPostExecute(String file_url) {
// dismiss the dialog after the file was downloaded
dismissDialog(progress_bar_type);
// Displaying downloaded image into image view
// Reading image path from sdcard
String imagePath = Environment.getExternalStorageDirectory()
.toStr... | void function(String file_url) { dismissDialog(progress_bar_type); String imagePath = Environment.getExternalStorageDirectory() .toString() + STR; my_image.setImageDrawable(Drawable.createFromPath(imagePath)); File file = new File(Environment.getExternalStorageDirectory() .getAbsolutePath() + STR); Intent target = new ... | /**
* After completing background task Dismiss the progress dialog
* **/ | After completing background task Dismiss the progress dialog | onPostExecute | {
"repo_name": "genciii/Android",
"path": "download/src/com/example/download/MainActivity.java",
"license": "apache-2.0",
"size": 6264
} | [
"android.content.ActivityNotFoundException",
"android.content.Intent",
"android.graphics.drawable.Drawable",
"android.net.Uri",
"android.os.Environment",
"java.io.File"
] | import android.content.ActivityNotFoundException; import android.content.Intent; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Environment; import java.io.File; | import android.content.*; import android.graphics.drawable.*; import android.net.*; import android.os.*; import java.io.*; | [
"android.content",
"android.graphics",
"android.net",
"android.os",
"java.io"
] | android.content; android.graphics; android.net; android.os; java.io; | 2,210,453 |
public String fieldValueToString(String fieldIdentifier) {
String value = null;
GenericField<?> field = get(fieldIdentifier);
if (field != null) {
value = field.getValueAsString();
}
return value;
}
| String function(String fieldIdentifier) { String value = null; GenericField<?> field = get(fieldIdentifier); if (field != null) { value = field.getValueAsString(); } return value; } | /**
* A convenience method for retrieving the value of one of
* this Entry's fields, as a String.
*
* @param fieldIdentifier the String name of the field
* @return the value as a String, or null if the value is not set
*/ | A convenience method for retrieving the value of one of this Entry's fields, as a String | fieldValueToString | {
"repo_name": "plaird/storageroom-java",
"path": "src/main/java/com/storageroomapp/client/Entry.java",
"license": "apache-2.0",
"size": 7528
} | [
"com.storageroomapp.client.field.GenericField"
] | import com.storageroomapp.client.field.GenericField; | import com.storageroomapp.client.field.*; | [
"com.storageroomapp.client"
] | com.storageroomapp.client; | 604,204 |
public List<Source> getXSLTemplates(); | List<Source> function(); | /**
*
* This method provides a way to get the XSL Transform(s) for the KC
* generated XML. This XSLT will create a transformed XML-FO stream that
* will be converted to PDF. Note that multiple transforms are possible on
* this data.
*/ | This method provides a way to get the XSL Transform(s) for the KC generated XML. This XSLT will create a transformed XML-FO stream that will be converted to PDF. Note that multiple transforms are possible on this data | getXSLTemplates | {
"repo_name": "sanjupolus/KC6.oLatest",
"path": "coeus-impl/src/main/java/org/kuali/coeus/common/framework/print/Printable.java",
"license": "agpl-3.0",
"size": 2795
} | [
"java.util.List",
"javax.xml.transform.Source"
] | import java.util.List; import javax.xml.transform.Source; | import java.util.*; import javax.xml.transform.*; | [
"java.util",
"javax.xml"
] | java.util; javax.xml; | 467,991 |
public final void addSimActionListener(SimActionListener listener) {
if (actionListeners == null) { // delayed creation
actionListeners = new Vector(); // volatile???
}
synchronized (actionListeners) {
actionListeners.add(listener);
}
} | final void function(SimActionListener listener) { if (actionListeners == null) { actionListeners = new Vector(); } synchronized (actionListeners) { actionListeners.add(listener); } } | /**
* <p>Registers a listener/observer for simulation action events.</p>
* @param listener The to-be-registered listener object.
*/ | Registers a listener/observer for simulation action events | addSimActionListener | {
"repo_name": "jsmithabq/yaak",
"path": "src/yaak/model/SimAction.java",
"license": "lgpl-3.0",
"size": 2522
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,552,629 |
public static ServiceRegistrarFactory load(final Path plugin,
final ClassLoader environment,
final ClassLoader parent)
throws ServiceRegistrarLoadingException {
return load("plugin jar file: " + plugin, pluginClassLoad... | static ServiceRegistrarFactory function(final Path plugin, final ClassLoader environment, final ClassLoader parent) throws ServiceRegistrarLoadingException { return load(STR + plugin, pluginClassLoader(plugin, environment, parent)); } | /**
* Load a {@link ServiceRegistrarFactory} from a plugin jar file with a specified parent class
* loader and a list of exposed classes.
*
* @param plugin The plugin jar file to load.
* @param environment The class loader to use for providing plugin interface dependencies.
* @param parent T... | Load a <code>ServiceRegistrarFactory</code> from a plugin jar file with a specified parent class loader and a list of exposed classes | load | {
"repo_name": "udomsak/helios",
"path": "helios-service-registration/src/main/java/com/spotify/helios/serviceregistration/ServiceRegistrarLoader.java",
"license": "apache-2.0",
"size": 6352
} | [
"java.nio.file.Path"
] | import java.nio.file.Path; | import java.nio.file.*; | [
"java.nio"
] | java.nio; | 1,747,906 |
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
// Log.d(TAG, String.format("onKeyDown(): keyCode = %x", keyCode));
int c = getUnicodeChar(keyCode, event);
if (c == 0) {
return super.onKeyDown(keyCode, event);
}
// Log.d(TAG, String.format(... | boolean function(int keyCode, KeyEvent event) { int c = getUnicodeChar(keyCode, event); if (c == 0) { return super.onKeyDown(keyCode, event); } if (!mIsShifted) { if (c == MODIFIED_UTF7_SHIFT) { toShifted(); return true; } else if (isAsciiPrintable(c)) { commitCharacter(c); return true; } return super.onKeyDown(keyCode... | /**
* Translates key events encoded in modified UTF-7 into Unicode text.
*/ | Translates key events encoded in modified UTF-7 into Unicode text | onKeyDown | {
"repo_name": "wirelesscollege/uiautomator-input-helper",
"path": "Utf7Ime/src/jp/jun_nama/test/utf7ime/Utf7ImeService.java",
"license": "apache-2.0",
"size": 5645
} | [
"android.view.KeyEvent"
] | import android.view.KeyEvent; | import android.view.*; | [
"android.view"
] | android.view; | 2,377,633 |
String findUserByEmail(String email) throws NoSuchElementException; | String findUserByEmail(String email) throws NoSuchElementException; | /**
* Find a user's id given their email address. Note that this query is case
* sensitive!
*
* @param email user's email address
*
* @return the user's id if found
* @throws NoSuchElementException if we can't find a user with that exact
* email address
*/ | Find a user's id given their email address. Note that this query is case sensitive | findUserByEmail | {
"repo_name": "themadrobot/appinventor-sources",
"path": "appinventor/appengine/src/com/google/appinventor/server/storage/StorageIo.java",
"license": "apache-2.0",
"size": 19838
} | [
"java.util.NoSuchElementException"
] | import java.util.NoSuchElementException; | import java.util.*; | [
"java.util"
] | java.util; | 1,024,454 |
private void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) {
try {
new XmlAddressBookStorage(filePath).saveAddressBook(addressBook, addToTestDataPathIfNotNull(filePath));
} catch (IOException ioe) {
throw new AssertionError("There should not be an error wr... | void function(ReadOnlyAddressBook addressBook, String filePath) { try { new XmlAddressBookStorage(filePath).saveAddressBook(addressBook, addToTestDataPathIfNotNull(filePath)); } catch (IOException ioe) { throw new AssertionError(STR, ioe); } } | /**
* Saves {@code addressBook} at the specified {@code filePath}.
*/ | Saves addressBook at the specified filePath | saveAddressBook | {
"repo_name": "damithc/addressbook-level4",
"path": "src/test/java/seedu/address/storage/XmlAddressBookStorageTest.java",
"license": "mit",
"size": 4971
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,046,458 |
public void setAuthenticationTrustResolver(final AuthenticationTrustResolver resolver) {
authenticationTrustResolver = resolver;
} | void function(final AuthenticationTrustResolver resolver) { authenticationTrustResolver = resolver; } | /**
* Dependency injection for the {@link AuthenticationTrustResolver}.
* @param resolver the resolver
*/ | Dependency injection for the <code>AuthenticationTrustResolver</code> | setAuthenticationTrustResolver | {
"repo_name": "pixare40/gymapp",
"path": "target/work/plugins/spring-security-core-2.0-RC4/src/java/grails/plugin/springsecurity/web/access/AjaxAwareAccessDeniedHandler.java",
"license": "gpl-2.0",
"size": 6136
} | [
"org.springframework.security.authentication.AuthenticationTrustResolver"
] | import org.springframework.security.authentication.AuthenticationTrustResolver; | import org.springframework.security.authentication.*; | [
"org.springframework.security"
] | org.springframework.security; | 1,213,260 |
protected void addCodePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AddressLatitudeDirectionType_code_feature"),
getString("_UI_PropertyDe... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), XALPackage.eINSTANCE.getAddressLatitudeDirectionType_Code(), true, false, false, ItemPropertyDesc... | /**
* This adds a property descriptor for the Code feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Code feature. | addCodePropertyDescriptor | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/org/oasis/xAL/provider/AddressLatitudeDirectionTypeItemProvider.java",
"license": "apache-2.0",
"size": 8349
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor",
"org.oasis.xAL.XALPackage"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.oasis.xAL.XALPackage; | import org.eclipse.emf.edit.provider.*; import org.oasis.*; | [
"org.eclipse.emf",
"org.oasis"
] | org.eclipse.emf; org.oasis; | 2,818,117 |
public MarketSummaryDataBean getMarketSummaryInternal() throws Exception {
if (Log.doActionTrace()) {
Log.trace("TradeAction:getMarketSummaryInternal()");
}
MarketSummaryDataBean marketSummaryData = null;
marketSummaryData = trade.getMarketSummary();
return ... | MarketSummaryDataBean function() throws Exception { if (Log.doActionTrace()) { Log.trace(STR); } MarketSummaryDataBean marketSummaryData = null; marketSummaryData = trade.getMarketSummary(); return marketSummaryData; } | /**
* Compute and return a snapshot of the current market conditions This
* includes the TSIA - an index of the price of the top 100 Trade stock
* quotes The openTSIA ( the index at the open) The volume of shares traded,
* Top Stocks gain and loss
*
* @return A snapshot of the curren... | Compute and return a snapshot of the current market conditions This includes the TSIA - an index of the price of the top 100 Trade stock quotes The openTSIA ( the index at the open) The volume of shares traded, Top Stocks gain and loss | getMarketSummaryInternal | {
"repo_name": "jmilliro/daytrader",
"path": "javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/TradeAction.java",
"license": "apache-2.0",
"size": 25191
} | [
"org.apache.geronimo.daytrader.javaee6.core.beans.MarketSummaryDataBean",
"org.apache.geronimo.daytrader.javaee6.utils.Log"
] | import org.apache.geronimo.daytrader.javaee6.core.beans.MarketSummaryDataBean; import org.apache.geronimo.daytrader.javaee6.utils.Log; | import org.apache.geronimo.daytrader.javaee6.core.beans.*; import org.apache.geronimo.daytrader.javaee6.utils.*; | [
"org.apache.geronimo"
] | org.apache.geronimo; | 194,081 |
@Test
public void testSizeWithoutFilterMaxResults() {
when(service.count(nullable(Filter.class), eq(false))).thenReturn(5L);
provider = new PagingDataProvider<>(service, emf.getModel(TestEntity.class), false);
provider.setMaxResults(2);
provider.size(query);
assertEqual... | void function() { when(service.count(nullable(Filter.class), eq(false))).thenReturn(5L); provider = new PagingDataProvider<>(service, emf.getModel(TestEntity.class), false); provider.setMaxResults(2); provider.size(query); assertEquals(2, provider.getSize()); provider.fetch(query); verify(service).fetch(isNull(), eq(0)... | /**
* Test that the max results setting is respected
*/ | Test that the max results setting is respected | testSizeWithoutFilterMaxResults | {
"repo_name": "opencirclesolutions/dynamo",
"path": "dynamo-frontend/src/test/java/com/ocs/dynamo/ui/provider/PagingDataProviderTest.java",
"license": "apache-2.0",
"size": 4744
} | [
"com.ocs.dynamo.dao.SortOrders",
"com.ocs.dynamo.domain.TestEntity",
"com.ocs.dynamo.filter.Filter",
"org.junit.jupiter.api.Assertions",
"org.mockito.ArgumentMatchers",
"org.mockito.Mockito"
] | import com.ocs.dynamo.dao.SortOrders; import com.ocs.dynamo.domain.TestEntity; import com.ocs.dynamo.filter.Filter; import org.junit.jupiter.api.Assertions; import org.mockito.ArgumentMatchers; import org.mockito.Mockito; | import com.ocs.dynamo.dao.*; import com.ocs.dynamo.domain.*; import com.ocs.dynamo.filter.*; import org.junit.jupiter.api.*; import org.mockito.*; | [
"com.ocs.dynamo",
"org.junit.jupiter",
"org.mockito"
] | com.ocs.dynamo; org.junit.jupiter; org.mockito; | 1,825,547 |
public void wireExtensibleHandlers() throws WiringException {
List<ProtocolHandler> handlers = getHandlers();
for (Iterator<?> h = handlers.iterator(); h.hasNext(); ) {
Object handler = h.next();
if (handler instanceof ExtensibleHandler) {
final ExtensibleHand... | void function() throws WiringException { List<ProtocolHandler> handlers = getHandlers(); for (Iterator<?> h = handlers.iterator(); h.hasNext(); ) { Object handler = h.next(); if (handler instanceof ExtensibleHandler) { final ExtensibleHandler extensibleHandler = (ExtensibleHandler) handler; final List<Class<?>> markerI... | /**
* ExtensibleHandler wiring. This should get called after the class was constructed
* and every stuff was set
*
* @throws WiringException
*/ | ExtensibleHandler wiring. This should get called after the class was constructed and every stuff was set | wireExtensibleHandlers | {
"repo_name": "aduprat/james-protocols",
"path": "api/src/main/java/org/apache/james/protocols/api/handler/AbstractProtocolHandlerChain.java",
"license": "apache-2.0",
"size": 3577
} | [
"java.util.Iterator",
"java.util.List"
] | import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,743,188 |
public DFSOutputStream primitiveCreate(String src,
FsPermission absPermission,
EnumSet<CreateFlag> flag,
boolean createParent,
short replication,
long blockSize,
... | DFSOutputStream function(String src, FsPermission absPermission, EnumSet<CreateFlag> flag, boolean createParent, short replication, long blockSize, Progressable progress, int buffersize, ChecksumOpt checksumOpt) throws IOException, UnresolvedLinkException { checkOpen(); CreateFlag.validate(flag); DFSOutputStream result... | /**
* Same as {{@link #create(String, FsPermission, EnumSet, short, long,
* Progressable, int, ChecksumOpt)} except that the permission
* is absolute (ie has already been masked with umask.
*/ | Same as {<code>#create(String, FsPermission, EnumSet, short, long, Progressable, int, ChecksumOpt)</code> except that the permission is absolute (ie has already been masked with umask | primitiveCreate | {
"repo_name": "tomatoKiller/Hadoop_Source_Learn",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java",
"license": "apache-2.0",
"size": 95752
} | [
"java.io.IOException",
"java.util.EnumSet",
"org.apache.hadoop.fs.CreateFlag",
"org.apache.hadoop.fs.Options",
"org.apache.hadoop.fs.UnresolvedLinkException",
"org.apache.hadoop.fs.permission.FsPermission",
"org.apache.hadoop.util.DataChecksum",
"org.apache.hadoop.util.Progressable"
] | import java.io.IOException; import java.util.EnumSet; import org.apache.hadoop.fs.CreateFlag; import org.apache.hadoop.fs.Options; import org.apache.hadoop.fs.UnresolvedLinkException; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.util.DataChecksum; import org.apache.hadoop.util.Progressa... | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,287,699 |
List<CreatureDTO> findMostVulnerableCreaturesToWeapon(WeaponDTO weaponDTO); | List<CreatureDTO> findMostVulnerableCreaturesToWeapon(WeaponDTO weaponDTO); | /**
* Find all CreatureDTOs, which are the most vulnerable to the given WeaponDTO.
*
* @param weaponDTO the WeaponDTO
* @return list of the most vulnerable CreatureDTOs
*/ | Find all CreatureDTOs, which are the most vulnerable to the given WeaponDTO | findMostVulnerableCreaturesToWeapon | {
"repo_name": "Vaculik/creatures-hunting",
"path": "ApiLayer/src/main/java/cz/muni/fi/pa165/facade/WeaponEfficiencyFacade.java",
"license": "gpl-2.0",
"size": 2427
} | [
"cz.muni.fi.pa165.dto.CreatureDTO",
"cz.muni.fi.pa165.dto.WeaponDTO",
"java.util.List"
] | import cz.muni.fi.pa165.dto.CreatureDTO; import cz.muni.fi.pa165.dto.WeaponDTO; import java.util.List; | import cz.muni.fi.pa165.dto.*; import java.util.*; | [
"cz.muni.fi",
"java.util"
] | cz.muni.fi; java.util; | 41,647 |
public static void updateThumbnail(InputStream fileInputStream, String fileContentType, APIProvider apiProvider,
String apiId, String tenantDomain) throws APIManagementException {
ResourceFile apiImage = new ResourceFile(fileInputStream, fileContentType);
apiPr... | static void function(InputStream fileInputStream, String fileContentType, APIProvider apiProvider, String apiId, String tenantDomain) throws APIManagementException { ResourceFile apiImage = new ResourceFile(fileInputStream, fileContentType); apiProvider.setThumbnailToAPI(apiId, apiImage, tenantDomain); } | /**
* Update thumbnail of an API/API Product
*
* @param fileInputStream Input stream
* @param fileContentType The content type of the image
* @param apiProvider API Provider
* @param apiId API/API Product UUID
* @param tenantDomain Tenant domain of the API
* @thr... | Update thumbnail of an API/API Product | updateThumbnail | {
"repo_name": "fazlan-nazeem/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java",
"license": "apache-2.0",
"size": 89948
} | [
"java.io.InputStream",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.APIProvider",
"org.wso2.carbon.apimgt.api.model.ResourceFile"
] | import java.io.InputStream; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.APIProvider; import org.wso2.carbon.apimgt.api.model.ResourceFile; | import java.io.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; | [
"java.io",
"org.wso2.carbon"
] | java.io; org.wso2.carbon; | 1,961,327 |
@Override
protected void drawLabels(Canvas c, float pos, PointF anchor) {
final float labelRotationAngleDegrees = mXAxis.getLabelRotationAngle();
// pre allocate to save performance (dont allocate in loop)
float[] position = new float[] {
0f, 0f
};
BarD... | void function(Canvas c, float pos, PointF anchor) { final float labelRotationAngleDegrees = mXAxis.getLabelRotationAngle(); float[] position = new float[] { 0f, 0f }; BarData bd = mChart.getData(); int step = bd.getDataSetCount(); for (int i = mMinX; i <= mMaxX; i += mXAxis.mAxisLabelModulus) { position[1] = i * step +... | /**
* draws the x-labels on the specified y-position
*
* @param pos
*/ | draws the x-labels on the specified y-position | drawLabels | {
"repo_name": "muyoumumumu/QuShuChe",
"path": "MPChartLib/src/com/github/mikephil/charting/renderer/XAxisRendererHorizontalBarChart.java",
"license": "apache-2.0",
"size": 9507
} | [
"android.graphics.Canvas",
"android.graphics.PointF",
"com.github.mikephil.charting.data.BarData"
] | import android.graphics.Canvas; import android.graphics.PointF; import com.github.mikephil.charting.data.BarData; | import android.graphics.*; import com.github.mikephil.charting.data.*; | [
"android.graphics",
"com.github.mikephil"
] | android.graphics; com.github.mikephil; | 1,397,793 |
public void compressFolder(Reference reference) {
File temp = null;
FileInputStream fis = null;
ToolSession toolSession = SessionManager.getCurrentToolSession();
try {
// Create the compressed archive in the filesystem
ZipOutputStream out = null;
try {
temp = File.createTempFile("sakai_conte... | void function(Reference reference) { File temp = null; FileInputStream fis = null; ToolSession toolSession = SessionManager.getCurrentToolSession(); try { ZipOutputStream out = null; try { temp = File.createTempFile(STR, ".tmp"); ContentCollection collection = ContentHostingService.getCollection(reference.getId()); out... | /**
* Compresses a ContentCollection to a new zip archive with the same folder name
*
* @param reference sakai entity reference
* @throws Exception on failure
*/ | Compresses a ContentCollection to a new zip archive with the same folder name | compressFolder | {
"repo_name": "rodriguezdevera/sakai",
"path": "kernel/kernel-util/src/main/java/org/sakaiproject/content/util/ZipContentUtil.java",
"license": "apache-2.0",
"size": 20151
} | [
"java.io.BufferedOutputStream",
"java.io.File",
"java.io.FileInputStream",
"java.io.FileOutputStream",
"java.io.IOException",
"java.util.zip.ZipOutputStream",
"org.sakaiproject.content.api.ContentCollection",
"org.sakaiproject.content.api.ContentResourceEdit",
"org.sakaiproject.content.cover.Content... | import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.zip.ZipOutputStream; import org.sakaiproject.content.api.ContentCollection; import org.sakaiproject.content.api.ContentResourceEdit; import org.sakaipro... | import java.io.*; import java.util.zip.*; import org.sakaiproject.content.api.*; import org.sakaiproject.content.cover.*; import org.sakaiproject.entity.api.*; import org.sakaiproject.tool.api.*; import org.sakaiproject.tool.cover.*; | [
"java.io",
"java.util",
"org.sakaiproject.content",
"org.sakaiproject.entity",
"org.sakaiproject.tool"
] | java.io; java.util; org.sakaiproject.content; org.sakaiproject.entity; org.sakaiproject.tool; | 224,480 |
private void notifyShowContextualSearch(GSAContextDisplaySelection selectionContext) {
if (!mPolicy.canSendSurroundings()) selectionContext = null;
for (ContextualSearchObserver observer : mObservers) {
observer.onShowContextualSearch(selectionContext);
}
} | void function(GSAContextDisplaySelection selectionContext) { if (!mPolicy.canSendSurroundings()) selectionContext = null; for (ContextualSearchObserver observer : mObservers) { observer.onShowContextualSearch(selectionContext); } } | /**
* Notifies all Contextual Search observers that a search has occurred.
* @param selectionContext The selection and context that triggered the search.
*/ | Notifies all Contextual Search observers that a search has occurred | notifyShowContextualSearch | {
"repo_name": "endlessm/chromium-browser",
"path": "chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java",
"license": "bsd-3-clause",
"size": 85866
} | [
"org.chromium.chrome.browser.gsa.GSAContextDisplaySelection"
] | import org.chromium.chrome.browser.gsa.GSAContextDisplaySelection; | import org.chromium.chrome.browser.gsa.*; | [
"org.chromium.chrome"
] | org.chromium.chrome; | 1,720,755 |
public void restoreCluster() throws IOException {
if (isDistributedCluster()) {
getHBaseClusterInterface().restoreInitialStatus();
} else {
try {
shutdownMiniCluster();
} catch (Exception e) {
// re-wrap into IOException
throw new IOException(e);
}
}
} | void function() throws IOException { if (isDistributedCluster()) { getHBaseClusterInterface().restoreInitialStatus(); } else { try { shutdownMiniCluster(); } catch (Exception e) { throw new IOException(e); } } } | /**
* Restores the cluster to the initial state if it is a distributed cluster, otherwise, shutdowns the
* mini cluster.
*/ | Restores the cluster to the initial state if it is a distributed cluster, otherwise, shutdowns the mini cluster | restoreCluster | {
"repo_name": "HubSpot/hbase",
"path": "hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestingUtility.java",
"license": "apache-2.0",
"size": 6758
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 288,599 |
private void setupAuthorization() throws IOException {
SecurityInfo securityInfo = SecurityInfo.getInfo(serviceName);
this.useSasl = client.userProvider.isHBaseSecurityEnabled();
this.token = null;
if (useSasl && securityInfo != null) {
AuthenticationProtos.TokenIdentifier.Kind tokenKind = secu... | void function() throws IOException { SecurityInfo securityInfo = SecurityInfo.getInfo(serviceName); this.useSasl = client.userProvider.isHBaseSecurityEnabled(); this.token = null; if (useSasl && securityInfo != null) { AuthenticationProtos.TokenIdentifier.Kind tokenKind = securityInfo.getTokenKind(); if (tokenKind != n... | /**
* Set up server authorization
*
* @throws java.io.IOException if auth setup failed
*/ | Set up server authorization | setupAuthorization | {
"repo_name": "jurmous/async-hbase-client",
"path": "src/main/java/org/apache/hadoop/hbase/ipc/AsyncRpcChannel.java",
"license": "apache-2.0",
"size": 26742
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos",
"org.apache.hadoop.hbase.security.AuthMethod",
"org.apache.hadoop.hbase.security.SecurityInfo",
"org.apache.hadoop.io.Text",
"org.apache.hadoop.security.SecurityUtil",
"org.apache.hadoop.security.token.TokenIdentif... | import java.io.IOException; import org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos; import org.apache.hadoop.hbase.security.AuthMethod; import org.apache.hadoop.hbase.security.SecurityInfo; import org.apache.hadoop.io.Text; import org.apache.hadoop.security.SecurityUtil; import org.apache.hadoop.securit... | import java.io.*; import org.apache.hadoop.hbase.protobuf.generated.*; import org.apache.hadoop.hbase.security.*; import org.apache.hadoop.io.*; import org.apache.hadoop.security.*; import org.apache.hadoop.security.token.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 872,714 |
@Idempotent
BlockStoragePolicy getStoragePolicy(String path) throws IOException; | BlockStoragePolicy getStoragePolicy(String path) throws IOException; | /**
* Get the storage policy for a file/directory.
* @param path
* Path of an existing file/directory.
* @throws AccessControlException
* If access is denied
* @throws org.apache.hadoop.fs.UnresolvedLinkException
* if <code>src</code> contains a symlink
* @throws jav... | Get the storage policy for a file/directory | getStoragePolicy | {
"repo_name": "NJUJYB/disYarn",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java",
"license": "apache-2.0",
"size": 60058
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,903,854 |
public void clearChecking() {
this.checkedPathsSet.clear();
this.greyedPathsSet.clear();
fireValueChanged(new TreeCheckingEvent(new TreePath(model.getRoot())));
} | void function() { this.checkedPathsSet.clear(); this.greyedPathsSet.clear(); fireValueChanged(new TreeCheckingEvent(new TreePath(model.getRoot()))); } | /**
* Clears the checking.
*/ | Clears the checking | clearChecking | {
"repo_name": "erpcya/adempierePOS",
"path": "org.eevolution.manufacturing/src/main/java/base/it/cnr/imaa/essi/lablib/gui/checkboxtree/DefaultTreeCheckingModel.java",
"license": "gpl-2.0",
"size": 22688
} | [
"javax.swing.tree.TreePath"
] | import javax.swing.tree.TreePath; | import javax.swing.tree.*; | [
"javax.swing"
] | javax.swing; | 1,522,179 |
void addDim(IntVar[] c, int[] cUse, IntVar[] dUse); | void addDim(IntVar[] c, int[] cUse, IntVar[] dUse); | /**
* Add a new dimension.
*
* @param c the capacity of each node. The variables *must be* ordered according to {@link org.btrplace.scheduler.choco.DefaultReconfigurationProblem#getNode(org.btrplace.model.Node)}.
* @param cUse the resource usage of each of the cSlices
* @param dUse the resou... | Add a new dimension | addDim | {
"repo_name": "btrplace/scheduler-UCC-15",
"path": "choco/src/main/java/org/btrplace/scheduler/choco/view/Cumulatives.java",
"license": "lgpl-3.0",
"size": 1561
} | [
"org.chocosolver.solver.variables.IntVar"
] | import org.chocosolver.solver.variables.IntVar; | import org.chocosolver.solver.variables.*; | [
"org.chocosolver.solver"
] | org.chocosolver.solver; | 2,717,621 |
Parse parse(ContentEntity entity, Task link) throws DroidsException, IOException; | Parse parse(ContentEntity entity, Task link) throws DroidsException, IOException; | /**
* Creates the parse for some content.
*
* @param entity
* the underlying stream we are using
* @param link
* the link that correspond to the stream
* @return the parse object
*/ | Creates the parse for some content | parse | {
"repo_name": "trickl/trickl-crawler",
"path": "src/main/java/com/trickl/crawler/api/Parser.java",
"license": "apache-2.0",
"size": 1217
} | [
"java.io.IOException",
"org.apache.droids.api.ContentEntity",
"org.apache.droids.api.Parse",
"org.apache.droids.exception.DroidsException"
] | import java.io.IOException; import org.apache.droids.api.ContentEntity; import org.apache.droids.api.Parse; import org.apache.droids.exception.DroidsException; | import java.io.*; import org.apache.droids.api.*; import org.apache.droids.exception.*; | [
"java.io",
"org.apache.droids"
] | java.io; org.apache.droids; | 1,344,982 |
public String toString() {
StringBuilder s = new StringBuilder(this.base);
for (String pathComponent : this.components) {
if (s.charAt(s.length() - 1) != '/') {
s.append("/");
}
s.append(pathComponent);
}
char connector = '?';
for (Map.Entry<String, String> e : this.que... | String function() { StringBuilder s = new StringBuilder(this.base); for (String pathComponent : this.components) { if (s.charAt(s.length() - 1) != '/') { s.append("/"); } s.append(pathComponent); } char connector = '?'; for (Map.Entry<String, String> e : this.queryStringParameters.entrySet()) { s.append(connector); s.a... | /**
* Returns a String representing the serialized URL including the base
* followed by any path components added to the path component queue
* and, last but not least, appending any query string parameters as
* name-value pairs after the full path.
*
* @return
*/ | Returns a String representing the serialized URL including the base followed by any path components added to the path component queue and, last but not least, appending any query string parameters as name-value pairs after the full path | toString | {
"repo_name": "processone/google-wave-api",
"path": "wave-robot-api/src/main/java/com/google/wave/api/oauth/impl/OpenSocialUrl.java",
"license": "apache-2.0",
"size": 3297
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,673,576 |
private String makeCommaSeparatedList(Collection<String> items) {
String list = "";
for (Iterator<String> iterator = items.iterator(); iterator.hasNext(); ) {
list += iterator.next() + (iterator.hasNext() ? ", " : "");
}
return list;
} | String function(Collection<String> items) { String list = STR, STR"); } return list; } | /**
* Converts a collection of strings into a single string of comma-separated items
*
* @param items A collection of strings
* @return A string of comma-separated items
*/ | Converts a collection of strings into a single string of comma-separated items | makeCommaSeparatedList | {
"repo_name": "kefir-/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java",
"license": "apache-2.0",
"size": 63757
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,109,674 |
public void logError(final String logText) {
Date date = new Date();
GUI.getInstance().log(dateFormat.format(date) + ": " + logText, errorSet);
} | void function(final String logText) { Date date = new Date(); GUI.getInstance().log(dateFormat.format(date) + STR + logText, errorSet); } | /**
* Prints out a logText on the standard output.
*
* @param logText
* the text to be logged
*/ | Prints out a logText on the standard output | logError | {
"repo_name": "psmoot/Pm2Media",
"path": "pm2media/pm2media-ivy/src/org/gitub/pm2media/Logger.java",
"license": "gpl-2.0",
"size": 3598
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,780,647 |
public AugBlueprint getAugment( String id ) {
return getAugment( id, dlcEnabledByDefault );
} | AugBlueprint function( String id ) { return getAugment( id, dlcEnabledByDefault ); } | /**
* A frontend using the global DLC default.
*/ | A frontend using the global DLC default | getAugment | {
"repo_name": "Vhati/ftl-profile-editor",
"path": "src/main/java/net/blerf/ftl/parser/DataManager.java",
"license": "gpl-2.0",
"size": 9772
} | [
"net.blerf.ftl.xml.AugBlueprint"
] | import net.blerf.ftl.xml.AugBlueprint; | import net.blerf.ftl.xml.*; | [
"net.blerf.ftl"
] | net.blerf.ftl; | 2,378,274 |
public void renderParticle(WorldRenderer worldRendererIn, Entity entityIn, float partialTicks, float p_180434_4_, float p_180434_5_, float p_180434_6_, float p_180434_7_, float p_180434_8_)
{
if (this.entity != null)
{
RenderManager rendermanager = Minecraft.getMinecraft().getRenderM... | void function(WorldRenderer worldRendererIn, Entity entityIn, float partialTicks, float p_180434_4_, float p_180434_5_, float p_180434_6_, float p_180434_7_, float p_180434_8_) { if (this.entity != null) { RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager(); rendermanager.setRenderPosition(EntityF... | /**
* Renders the particle
*/ | Renders the particle | renderParticle | {
"repo_name": "dogjaw2233/tiu-s-mod",
"path": "build/tmp/recompileMc/sources/net/minecraft/client/particle/MobAppearance.java",
"license": "lgpl-2.1",
"size": 3683
} | [
"net.minecraft.client.Minecraft",
"net.minecraft.client.renderer.GlStateManager",
"net.minecraft.client.renderer.OpenGlHelper",
"net.minecraft.client.renderer.WorldRenderer",
"net.minecraft.client.renderer.entity.RenderManager",
"net.minecraft.entity.Entity",
"net.minecraft.util.MathHelper"
] | import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.entity.Entity; import net.minecraft.util.Math... | import net.minecraft.client.*; import net.minecraft.client.renderer.*; import net.minecraft.client.renderer.entity.*; import net.minecraft.entity.*; import net.minecraft.util.*; | [
"net.minecraft.client",
"net.minecraft.entity",
"net.minecraft.util"
] | net.minecraft.client; net.minecraft.entity; net.minecraft.util; | 300,625 |
public void login(boolean autoLogin) {
if (PardusConstants.DEBUG) {
Log.v(this.getClass().getSimpleName(), "Showing login screen");
}
this.autoLogin = autoLogin;
String imagePath = PardusPreferences.getImagePath();
PardusImagePack imagePack = new PardusImagePack(imagePath);
if (imagePack.isInst... | void function(boolean autoLogin) { if (PardusConstants.DEBUG) { Log.v(this.getClass().getSimpleName(), STR); } this.autoLogin = autoLogin; String imagePath = PardusPreferences.getImagePath(); PardusImagePack imagePack = new PardusImagePack(imagePath); if (imagePack.isInstalled()) { LocalContentProvider.FILEPATH = image... | /**
* Displays the local login screen.
*
* @param autoLogin
* whether to automatically log in if the account info is stored
*/ | Displays the local login screen | login | {
"repo_name": "MrLoick/pardus-android",
"path": "src/at/pardus/android/browser/PardusWebView.java",
"license": "gpl-3.0",
"size": 32694
} | [
"android.util.Log",
"at.pardus.android.content.LocalContentProvider",
"java.util.Date"
] | import android.util.Log; import at.pardus.android.content.LocalContentProvider; import java.util.Date; | import android.util.*; import at.pardus.android.content.*; import java.util.*; | [
"android.util",
"at.pardus.android",
"java.util"
] | android.util; at.pardus.android; java.util; | 2,409,097 |
private int executeUpdate(String sql) throws SQLException {
try (Connection conn = DriverManager.getConnection(URL)) {
try (PreparedStatement stmt = conn.prepareStatement(sql)) {
return stmt.executeUpdate();
}
}
} | int function(String sql) throws SQLException { try (Connection conn = DriverManager.getConnection(URL)) { try (PreparedStatement stmt = conn.prepareStatement(sql)) { return stmt.executeUpdate(); } } } | /**
* Execute update sql operation using new connection.
*
* @param sql update SQL query.
* @return update count.
* @throws SQLException on error.
*/ | Execute update sql operation using new connection | executeUpdate | {
"repo_name": "samaitra/ignite",
"path": "modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinMetadataPrimaryKeysSelfTest.java",
"license": "apache-2.0",
"size": 4794
} | [
"java.sql.Connection",
"java.sql.DriverManager",
"java.sql.PreparedStatement",
"java.sql.SQLException"
] | import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,408,575 |
public java.sql.Date getSQLDate()
{
final Calendar cal = Calendar.getInstance(DateHelper.UTC);
cal.set(Calendar.YEAR, calendar.get(Calendar.YEAR));
cal.set(Calendar.DAY_OF_YEAR, calendar.get(Calendar.DAY_OF_YEAR));
cal.set(Calendar.HOUR_OF_DAY, 0);
cal.set(Calendar.MINUTE, 0);
cal.set(Calend... | java.sql.Date function() { final Calendar cal = Calendar.getInstance(DateHelper.UTC); cal.set(Calendar.YEAR, calendar.get(Calendar.YEAR)); cal.set(Calendar.DAY_OF_YEAR, calendar.get(Calendar.DAY_OF_YEAR)); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLI... | /**
* Considers the time zone of the user, for example, if date is 20.11.1970 23:00:00 UTC but the user's locale is Europe/Berlin then the
* java.sql.Date should be 21.11.1970! <br/>
* This methods transforms first the day into UTC and then into java.sql.Date.
*/ | Considers the time zone of the user, for example, if date is 20.11.1970 23:00:00 UTC but the user's locale is Europe/Berlin then the java.sql.Date should be 21.11.1970! This methods transforms first the day into UTC and then into java.sql.Date | getSQLDate | {
"repo_name": "FlowsenAusMonotown/projectforge",
"path": "projectforge-business/src/main/java/org/projectforge/framework/time/DateHolder.java",
"license": "gpl-3.0",
"size": 21661
} | [
"java.util.Calendar",
"java.util.Date"
] | import java.util.Calendar; import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,698,705 |
@Test
public void testEquals() throws Exception {
HashSet<Object> set = new HashSet<>();
HashSet<String> keySet = new HashSet<>();
PortRangeParams[] srcs = {
null, new PortRangeParams(0), new PortRangeParams(65535),
new PortRangeParams(0, 65535), new PortRangePa... | void function() throws Exception { HashSet<Object> set = new HashSet<>(); HashSet<String> keySet = new HashSet<>(); PortRangeParams[] srcs = { null, new PortRangeParams(0), new PortRangeParams(65535), new PortRangeParams(0, 65535), new PortRangeParams(23456), new PortRangeParams(17, 99), }; PortRangeParams[] dsts = { n... | /**
* Test case for object identify.
*
* <ul>
* <li>{@link VTNLayer4PortMatch#equals(Object)}</li>
* <li>{@link VTNLayer4PortMatch#hashCode()}</li>
* <li>{@link VTNLayer4PortMatch#setConditionKey(StringBuilder)}</li>
* </ul>
*
* @throws Exception An error occurred.
... | Test case for object identify. <code>VTNLayer4PortMatch#equals(Object)</code> <code>VTNLayer4PortMatch#hashCode()</code> <code>VTNLayer4PortMatch#setConditionKey(StringBuilder)</code> | testEquals | {
"repo_name": "opendaylight/vtn",
"path": "manager/implementation/src/test/java/org/opendaylight/vtn/manager/internal/util/flow/match/VTNTcpMatchTest.java",
"license": "epl-1.0",
"size": 24700
} | [
"java.util.HashSet"
] | import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 527,464 |
void updateNetworkSelection(int serviceState, Phone phone) {
if (TelephonyCapabilities.supportsNetworkSelection(phone)) {
// get the shared preference of network_selection.
// empty is auto mode, otherwise it is the operator alpha name
// in case there is no operator ... | void updateNetworkSelection(int serviceState, Phone phone) { if (TelephonyCapabilities.supportsNetworkSelection(phone)) { SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(mContext); String networkSelection = sp.getString(PhoneBase.NETWORK_SELECTION_NAME_KEY, STRSTRupdateNetworkSelection()...STRstate... | /**
* Update notification about no service of user selected operator
*
* @param serviceState Phone service state
*/ | Update notification about no service of user selected operator | updateNetworkSelection | {
"repo_name": "risingsunm/Phone_4.0",
"path": "src/com/android/phone/NotificationMgr.java",
"license": "gpl-3.0",
"size": 60919
} | [
"android.content.SharedPreferences",
"android.preference.PreferenceManager",
"android.telephony.ServiceState",
"android.text.TextUtils",
"com.android.internal.telephony.Phone",
"com.android.internal.telephony.PhoneBase"
] | import android.content.SharedPreferences; import android.preference.PreferenceManager; import android.telephony.ServiceState; import android.text.TextUtils; import com.android.internal.telephony.Phone; import com.android.internal.telephony.PhoneBase; | import android.content.*; import android.preference.*; import android.telephony.*; import android.text.*; import com.android.internal.telephony.*; | [
"android.content",
"android.preference",
"android.telephony",
"android.text",
"com.android.internal"
] | android.content; android.preference; android.telephony; android.text; com.android.internal; | 2,071,404 |
public void setExtra(List<Integer> colors, List<String> labels) {
this.mExtraColors = Utils.convertIntegers(colors);
this.mExtraLabels = Utils.convertStrings(labels);
} | void function(List<Integer> colors, List<String> labels) { this.mExtraColors = Utils.convertIntegers(colors); this.mExtraLabels = Utils.convertStrings(labels); } | /**
* Colors and labels that will be appended to the end of the auto calculated
* colors and labels arrays after calculating the legend. (if the legend has
* already been calculated, you will need to call notifyDataSetChanged() to
* let the changes take effect)
*/ | Colors and labels that will be appended to the end of the auto calculated colors and labels arrays after calculating the legend. (if the legend has already been calculated, you will need to call notifyDataSetChanged() to let the changes take effect) | setExtra | {
"repo_name": "ndhunju/dailyJournal",
"path": "app/src/main/java/com/ndhunju/dailyjournal/controller/mpAndroidCharts/components/Legend.java",
"license": "gpl-2.0",
"size": 24437
} | [
"com.ndhunju.dailyjournal.controller.mpAndroidCharts.utils.Utils",
"java.util.List"
] | import com.ndhunju.dailyjournal.controller.mpAndroidCharts.utils.Utils; import java.util.List; | import com.ndhunju.dailyjournal.controller.*; import java.util.*; | [
"com.ndhunju.dailyjournal",
"java.util"
] | com.ndhunju.dailyjournal; java.util; | 2,588,810 |
@Override
public void badRequest(final BadRequestException exception) {
logWarn("Bad Request on " + request().getUri() + ": " + exception.getMessage());
if (this.api_version > 0) {
// always default to the latest version of the error formatter since we
// need to return something
switch (t... | void function(final BadRequestException exception) { logWarn(STR + request().getUri() + STR + exception.getMessage()); if (this.api_version > 0) { switch (this.api_version) { case 1: default: sendReply(exception.getStatus(), serializer.formatErrorV1(exception)); } return; } if (hasQueryStringParam("json")) { final Stri... | /**
* Sends an error message to the client. Handles responses from
* deprecated API calls.
* @param exception The exception that was thrown
*/ | Sends an error message to the client. Handles responses from deprecated API calls | badRequest | {
"repo_name": "hustdelta/opentsdb",
"path": "src/tsd/HttpQuery.java",
"license": "gpl-3.0",
"size": 39717
} | [
"org.jboss.netty.handler.codec.http.HttpResponseStatus"
] | import org.jboss.netty.handler.codec.http.HttpResponseStatus; | import org.jboss.netty.handler.codec.http.*; | [
"org.jboss.netty"
] | org.jboss.netty; | 318,354 |
private static Pattern getNoCopts(RuleContext ruleContext) {
Pattern nocopts = null;
if (ruleContext.getRule().isAttrDefined(NO_COPTS_ATTRIBUTE, Type.STRING)) {
String nocoptsAttr = ruleContext.expandMakeVariables(NO_COPTS_ATTRIBUTE,
ruleContext.attributes().get(NO_COPTS_ATTRIBUTE, Type.STRING... | static Pattern function(RuleContext ruleContext) { Pattern nocopts = null; if (ruleContext.getRule().isAttrDefined(NO_COPTS_ATTRIBUTE, Type.STRING)) { String nocoptsAttr = ruleContext.expandMakeVariables(NO_COPTS_ATTRIBUTE, ruleContext.attributes().get(NO_COPTS_ATTRIBUTE, Type.STRING)); try { nocopts = Pattern.compile(... | /**
* Returns nocopts pattern built from the make variable expanded nocopts
* attribute.
*/ | Returns nocopts pattern built from the make variable expanded nocopts attribute | getNoCopts | {
"repo_name": "kchodorow/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java",
"license": "apache-2.0",
"size": 26720
} | [
"com.google.devtools.build.lib.analysis.RuleContext",
"com.google.devtools.build.lib.syntax.Type",
"java.util.regex.Pattern",
"java.util.regex.PatternSyntaxException"
] | import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.syntax.Type; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; | import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.syntax.*; import java.util.regex.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 2,184,053 |
private Point2D.Float filteredLocation(long cursorID) {
Point2D.Float[] history = pointHistory.get(cursorID);
float weight = 1.0f;
float avgX = history[0].x;
float avgY = history[0].y;
for (int i = 0; i < history.length; i++) {
avgX = (history[i].x * weight) + (avgX * (1.0f - weight));
avgY = (histor... | Point2D.Float function(long cursorID) { Point2D.Float[] history = pointHistory.get(cursorID); float weight = 1.0f; float avgX = history[0].x; float avgY = history[0].y; for (int i = 0; i < history.length; i++) { avgX = (history[i].x * weight) + (avgX * (1.0f - weight)); avgY = (history[i].y * weight) + (avgY * (1.0f - ... | /**
* Filtered location.
*
* @param cursorID
* the cursor id
* @return the point2 d. float
*/ | Filtered location | filteredLocation | {
"repo_name": "synergynet/synergynet2.5",
"path": "synergynet2.5/src/main/java/synergynetframework/mtinput/filters/AveragingFilter.java",
"license": "bsd-3-clause",
"size": 6733
} | [
"java.awt.geom.Point2D"
] | import java.awt.geom.Point2D; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 1,562,553 |
@Test
public void testProducesConsumesAnnotationOnClientInterfaceMethod(HttpServletRequest req, HttpServletResponse resp) throws Exception {
final String m = "testProducesConsumesAnnotationOnClientInterfaceMethod";
MyClient client = RestClientBuilder.newBuilder()
... | void function(HttpServletRequest req, HttpServletResponse resp) throws Exception { final String m = STR; MyClient client = RestClientBuilder.newBuilder() .baseUri(URI.create(STR @Produce(application/json) @Consume(application/xml)STRfooSTRSent-AcceptSTRSent-Accept: STRSent-ContentTypeSTRSent-ContentType: STR @Produce(a... | /**
* Tests that MP Rest Client's <code>@Produces</code> annotation affects the value transmitted in
* the <code>Accept</code> header, and that it's <code>@Consumes</code> annotation affects the
* value transmitted in the <code>Content-Type</code> header when it is applied to the method.
* Note that... | Tests that MP Rest Client's <code>@Produces</code> annotation affects the value transmitted in the <code>Accept</code> header, and that it's <code>@Consumes</code> annotation affects the value transmitted in the <code>Content-Type</code> header when it is applied to the method. Note that this is opposite of what you wo... | testProducesConsumesAnnotationOnClientInterfaceMethod | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.microprofile.rest.client_fat/test-applications/produceConsumeApp/src/mpRestClient11/produceConsume/ProduceConsumeTestServlet.java",
"license": "epl-1.0",
"size": 5223
} | [
"java.net.URI",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"javax.ws.rs.core.MediaType",
"org.eclipse.microprofile.rest.client.RestClientBuilder",
"org.junit.Assert"
] | import java.net.URI; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.core.MediaType; import org.eclipse.microprofile.rest.client.RestClientBuilder; import org.junit.Assert; | import java.net.*; import javax.servlet.http.*; import javax.ws.rs.core.*; import org.eclipse.microprofile.rest.client.*; import org.junit.*; | [
"java.net",
"javax.servlet",
"javax.ws",
"org.eclipse.microprofile",
"org.junit"
] | java.net; javax.servlet; javax.ws; org.eclipse.microprofile; org.junit; | 1,129,944 |
public Object getObject(int i, java.util.Map<String, Class<?>> map) throws SQLException {
return getObject(i);
} | Object function(int i, java.util.Map<String, Class<?>> map) throws SQLException { return getObject(i); } | /**
* JDBC 2.0 Returns the value of column i as a Java object. Use the map to
* determine the class from which to construct data of SQL structured and
* distinct types.
*
* @param i
* the first column is 1, the second is 2, ...
* @param map
* the mapping fr... | JDBC 2.0 Returns the value of column i as a Java object. Use the map to determine the class from which to construct data of SQL structured and distinct types | getObject | {
"repo_name": "scopej/mysql-connector-j",
"path": "src/com/mysql/jdbc/ResultSetImpl.java",
"license": "gpl-2.0",
"size": 287512
} | [
"java.sql.SQLException",
"java.util.Map"
] | import java.sql.SQLException; import java.util.Map; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 2,886,627 |
public ServiceResponse<Error> put413(Boolean booleanValue) throws ErrorException, IOException {
return put413Async(booleanValue).toBlocking().single();
} | ServiceResponse<Error> function(Boolean booleanValue) throws ErrorException, IOException { return put413Async(booleanValue).toBlocking().single(); } | /**
* Return 413 status code - should be represented in the client as an error.
*
* @param booleanValue Simple boolean value true
* @throws ErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @return the Error object wr... | Return 413 status code - should be represented in the client as an error | put413 | {
"repo_name": "haocs/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/implementation/HttpClientFailuresImpl.java",
"license": "mit",
"size": 78284
} | [
"com.microsoft.rest.ServiceResponse",
"java.io.IOException"
] | import com.microsoft.rest.ServiceResponse; import java.io.IOException; | import com.microsoft.rest.*; import java.io.*; | [
"com.microsoft.rest",
"java.io"
] | com.microsoft.rest; java.io; | 1,421,738 |
@PostConstruct
public void init() {
cache = DAOFactory.getCacheDAO().findLast();
if (cache == null) {
cache = new Cache();
}
contentList = DAOFactory.getContentDAO().findAllWithAccesses();
} | void function() { cache = DAOFactory.getCacheDAO().findLast(); if (cache == null) { cache = new Cache(); } contentList = DAOFactory.getContentDAO().findAllWithAccesses(); } | /**
* The init() method that initializes the CacheBean. It retrieves the stored
* caches and contents.
*
*/ | The init() method that initializes the CacheBean. It retrieves the stored caches and contents | init | {
"repo_name": "smartenit-eu/smartenit",
"path": "unada/web/src/main/java/eu/smartenit/unada/web/ui/CacheBean.java",
"license": "apache-2.0",
"size": 2802
} | [
"eu.smartenit.unada.db.dao.util.DAOFactory",
"eu.smartenit.unada.db.dto.Cache"
] | import eu.smartenit.unada.db.dao.util.DAOFactory; import eu.smartenit.unada.db.dto.Cache; | import eu.smartenit.unada.db.dao.util.*; import eu.smartenit.unada.db.dto.*; | [
"eu.smartenit.unada"
] | eu.smartenit.unada; | 1,572,152 |
EAttribute getBidClearing_StartUpCost(); | EAttribute getBidClearing_StartUpCost(); | /**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Informative.MarketOperations.BidClearing#getStartUpCost <em>Start Up Cost</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Start Up Cost</em>'.
* @see CIM.IEC61970.Informative.MarketO... | Returns the meta object for the attribute '<code>CIM.IEC61970.Informative.MarketOperations.BidClearing#getStartUpCost Start Up Cost</code>'. | getBidClearing_StartUpCost | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Informative/MarketOperations/MarketOperationsPackage.java",
"license": "mit",
"size": 688294
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,431,924 |
public void remove(H label) {
SoftReference<Edge<H, V>> softE = this.incidences.get(label);
if (softE == null || softE.get() == null) return;
Edge<H, V> e = softE.get();
//IN
List<H> inSet = vertexEdgeMap.get(e.inVertex.getHandle()).get();
if (inSet != null) {
inSet.remove(e.handle)... | void function(H label) { SoftReference<Edge<H, V>> softE = this.incidences.get(label); if (softE == null softE.get() == null) return; Edge<H, V> e = softE.get(); List<H> inSet = vertexEdgeMap.get(e.inVertex.getHandle()).get(); if (inSet != null) { inSet.remove(e.handle); } List<H> outSet = vertexEdgeMap.get(e.outVertex... | /**
* Removes the edge by the its label
*
* @param name the vertex's handle or edge's label
*/ | Removes the edge by the its label | remove | {
"repo_name": "thanhvc/poc-sam",
"path": "services/src/main/java/org/exoplatform/social/common/graph/EdgeContext.java",
"license": "lgpl-3.0",
"size": 6162
} | [
"java.lang.ref.SoftReference",
"java.util.List"
] | import java.lang.ref.SoftReference; import java.util.List; | import java.lang.ref.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 2,001,714 |
protected void reload(PrintWriter writer, ContextName cn,
StringManager smClient) {
if (debug >= 1)
log("restart: Reloading web application '" + cn + "'");
if (!validateContextName(cn, writer, smClient)) {
return;
}
try {
Context con... | void function(PrintWriter writer, ContextName cn, StringManager smClient) { if (debug >= 1) log(STR + cn + "'"); if (!validateContextName(cn, writer, smClient)) { return; } try { Context context = (Context) host.findChild(cn.getName()); if (context == null) { writer.println(smClient.getString(STR, RequestUtil.filter(cn... | /**
* Reload the web application at the specified context path.
*
* @param writer Writer to render to
* @param cn Name of the application to be restarted
*/ | Reload the web application at the specified context path | reload | {
"repo_name": "plumer/codana",
"path": "tomcat_files/8.0.22/ManagerServlet.java",
"license": "mit",
"size": 61543
} | [
"java.io.PrintWriter",
"org.apache.catalina.Context",
"org.apache.catalina.util.ContextName",
"org.apache.catalina.util.RequestUtil",
"org.apache.tomcat.util.ExceptionUtils",
"org.apache.tomcat.util.res.StringManager"
] | import java.io.PrintWriter; import org.apache.catalina.Context; import org.apache.catalina.util.ContextName; import org.apache.catalina.util.RequestUtil; import org.apache.tomcat.util.ExceptionUtils; import org.apache.tomcat.util.res.StringManager; | import java.io.*; import org.apache.catalina.*; import org.apache.catalina.util.*; import org.apache.tomcat.util.*; import org.apache.tomcat.util.res.*; | [
"java.io",
"org.apache.catalina",
"org.apache.tomcat"
] | java.io; org.apache.catalina; org.apache.tomcat; | 120,208 |
public void init() throws ServletException {
// Put your code here
} | void function() throws ServletException { } | /**
* Initialization of the servlet. <br>
*
* @throws ServletException if an error occurs
*/ | Initialization of the servlet. | init | {
"repo_name": "zaoming/fox_shopping",
"path": "src/com/fox/sp/servlet/MyTrolley.java",
"license": "apache-2.0",
"size": 2945
} | [
"javax.servlet.ServletException"
] | import javax.servlet.ServletException; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 507,210 |
@Override
public void enqueueEvent(EnumListenerEvent operation, EntryEvent event,
Object substituteValue) throws IOException, CacheException {
// There is a case where the event is serialized for processing. The
// region is not
// serialized along with the event since it is a transient field. I
... | void function(EnumListenerEvent operation, EntryEvent event, Object substituteValue) throws IOException, CacheException { GatewaySenderEventImpl senderEvent = null; boolean isPrimary = sender.isPrimary(); if (!isPrimary) { synchronized (unprocessedEventsLock) { if (sender.isPrimary()) { isPrimary = true; } else { sende... | /**
* Add the input object to the event queue
*/ | Add the input object to the event queue | enqueueEvent | {
"repo_name": "ysung-pivotal/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderEventProcessor.java",
"license": "apache-2.0",
"size": 32311
} | [
"com.gemstone.gemfire.cache.CacheException",
"com.gemstone.gemfire.cache.EntryEvent",
"com.gemstone.gemfire.cache.Region",
"com.gemstone.gemfire.internal.cache.DistributedRegion",
"com.gemstone.gemfire.internal.cache.EnumListenerEvent",
"com.gemstone.gemfire.internal.cache.wan.GatewaySenderEventImpl",
"... | import com.gemstone.gemfire.cache.CacheException; import com.gemstone.gemfire.cache.EntryEvent; import com.gemstone.gemfire.cache.Region; import com.gemstone.gemfire.internal.cache.DistributedRegion; import com.gemstone.gemfire.internal.cache.EnumListenerEvent; import com.gemstone.gemfire.internal.cache.wan.GatewaySend... | import com.gemstone.gemfire.cache.*; import com.gemstone.gemfire.internal.cache.*; import com.gemstone.gemfire.internal.cache.wan.*; import com.gemstone.gemfire.pdx.internal.*; import java.io.*; | [
"com.gemstone.gemfire",
"java.io"
] | com.gemstone.gemfire; java.io; | 78,236 |
public Coords3d getAlignedValue(Side side) {
return new Coords3d(
side.getAlignX().getAlignedValue(x),
side.getAlignY().getAlignedValue(y),
side.getAlignZ().getAlignedValue(z));
} | Coords3d function(Side side) { return new Coords3d( side.getAlignX().getAlignedValue(x), side.getAlignY().getAlignedValue(y), side.getAlignZ().getAlignedValue(z)); } | /**
* Returns with the coordinate of this boundary queried by the parameter.
* @param side the side we want to get
* @return the point we asked for
*/ | Returns with the coordinate of this boundary queried by the parameter | getAlignedValue | {
"repo_name": "printingin3d/javascad",
"path": "src/main/java/eu/printingin3d/javascad/coords/Boundaries3d.java",
"license": "gpl-2.0",
"size": 6119
} | [
"eu.printingin3d.javascad.enums.Side"
] | import eu.printingin3d.javascad.enums.Side; | import eu.printingin3d.javascad.enums.*; | [
"eu.printingin3d.javascad"
] | eu.printingin3d.javascad; | 2,443,735 |
public static NfcAdapter getNfcAdapter(Activity context)
{
// get an instance of the context's cached NfcAdapter
NfcAdapter mNfcAdapter = NfcAdapter.getDefaultAdapter(context);
// check if NFC is enabled
checkNfcEnabled(context, mNfcAdapter);
return mNfcAdapter;
} | static NfcAdapter function(Activity context) { NfcAdapter mNfcAdapter = NfcAdapter.getDefaultAdapter(context); checkNfcEnabled(context, mNfcAdapter); return mNfcAdapter; } | /**
* retrieves an {@link NfcAdapter} if it is available,
* sends the user to the configuration screen if it is not enabled
* returns null if this device doesn't support nfc.
*/ | retrieves an <code>NfcAdapter</code> if it is available, sends the user to the configuration screen if it is not enabled returns null if this device doesn't support nfc | getNfcAdapter | {
"repo_name": "djimondev/Sensors-ToolKit",
"path": "library/src/root/gast/nfc/NfcUtil.java",
"license": "apache-2.0",
"size": 6377
} | [
"android.app.Activity",
"android.nfc.NfcAdapter"
] | import android.app.Activity; import android.nfc.NfcAdapter; | import android.app.*; import android.nfc.*; | [
"android.app",
"android.nfc"
] | android.app; android.nfc; | 1,700,481 |
public void add(final TIntSet pIdxs, ImageExt img) {
avgR *= nPoints;
avgG *= nPoints;
avgB *= nPoints;
TIntIterator iter = pIdxs.iterator();
while (iter.hasNext()) {
int pixIdx = iter.next();
avgR +... | void function(final TIntSet pIdxs, ImageExt img) { avgR *= nPoints; avgG *= nPoints; avgB *= nPoints; TIntIterator iter = pIdxs.iterator(); while (iter.hasNext()) { int pixIdx = iter.next(); avgR += img.getR(pixIdx); avgG += img.getG(pixIdx); avgB += img.getB(pixIdx); } nPoints += pIdxs.size(); avgR /= nPoints; avgG /=... | /**
* adds the calculated HSB of points to the current instance sums.
*
* @param pIdxs pixel indexes
* @param img
*/ | adds the calculated HSB of points to the current instance sums | add | {
"repo_name": "nking/curvature-scale-space-corners-and-transformations",
"path": "src/algorithms/imageProcessing/GroupPixelLUVWideRangeLightness.java",
"license": "mit",
"size": 7040
} | [
"gnu.trove.iterator.TIntIterator",
"gnu.trove.set.TIntSet"
] | import gnu.trove.iterator.TIntIterator; import gnu.trove.set.TIntSet; | import gnu.trove.iterator.*; import gnu.trove.set.*; | [
"gnu.trove.iterator",
"gnu.trove.set"
] | gnu.trove.iterator; gnu.trove.set; | 1,150,135 |
public Set<String> getComponentStreams(String componentId) {
return getComponentCommon(componentId).get_streams().keySet();
} | Set<String> function(String componentId) { return getComponentCommon(componentId).get_streams().keySet(); } | /**
* Gets the set of streams declared for the specified component.
*/ | Gets the set of streams declared for the specified component | getComponentStreams | {
"repo_name": "zhangjunfang/jstorm-0.9.6.3-",
"path": "jstorm-client/src/main/java/backtype/storm/task/GeneralTopologyContext.java",
"license": "apache-2.0",
"size": 6087
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,933,612 |
public double scoreAnswer(Question q, Answer a) {
return 0.0;
} | double function(Question q, Answer a) { return 0.0; } | /**
* Override this method with your scorer implementation.
* @param q Question
* @param a Answer
* @return The score for this answer, or NaN if not applicable.
*/ | Override this method with your scorer implementation | scoreAnswer | {
"repo_name": "SeanTater/uncc2014watsonsim",
"path": "src/main/java/edu/uncc/cs/watsonsim/scorers/AnswerScorer.java",
"license": "gpl-2.0",
"size": 917
} | [
"edu.uncc.cs.watsonsim.Answer",
"edu.uncc.cs.watsonsim.Question"
] | import edu.uncc.cs.watsonsim.Answer; import edu.uncc.cs.watsonsim.Question; | import edu.uncc.cs.watsonsim.*; | [
"edu.uncc.cs"
] | edu.uncc.cs; | 1,810,033 |
public Pattern getValidationPattern(); | Pattern function(); | /**
* [Property] Gets a Pattern object used in String property input validation.
*/ | [Property] Gets a Pattern object used in String property input validation | getValidationPattern | {
"repo_name": "dogjaw2233/tiu-s-mod",
"path": "build/tmp/recompileMc/sources/net/minecraftforge/fml/client/config/IConfigElement.java",
"license": "lgpl-2.1",
"size": 5454
} | [
"java.util.regex.Pattern"
] | import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 472,896 |
protected void unsetRoleManagementService(RoleManagementService roleManagementService) {
if (logger.isDebugEnabled()) {
logger.debug("RoleManagementService unset in SCIMCommonComponent bundle.");
}
SCIMCommonComponentHolder.setRoleManagementService(null);
} | void function(RoleManagementService roleManagementService) { if (logger.isDebugEnabled()) { logger.debug(STR); } SCIMCommonComponentHolder.setRoleManagementService(null); } | /**
* Unset role management service implementation.
*/ | Unset role management service implementation | unsetRoleManagementService | {
"repo_name": "wso2-extensions/identity-inbound-provisioning-scim2",
"path": "components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/internal/SCIMCommonComponent.java",
"license": "apache-2.0",
"size": 13540
} | [
"org.wso2.carbon.identity.role.mgt.core.RoleManagementService"
] | import org.wso2.carbon.identity.role.mgt.core.RoleManagementService; | import org.wso2.carbon.identity.role.mgt.core.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 293,443 |
default void sendAdminMessage(CommandSender sender, String message) {
sender.sendMessage(adminFormat(message));
} | default void sendAdminMessage(CommandSender sender, String message) { sender.sendMessage(adminFormat(message)); } | /**
* Send command admin message.
*
* @param sender the @{@link org.bukkit.command.CommandSender} sender
* @param message the {@link java.lang.String} message
*/ | Send command admin message | sendAdminMessage | {
"repo_name": "Relicum/Ipsum",
"path": "src/main/java/com/relicum/ipsum/Locale/IMessage.java",
"license": "gpl-3.0",
"size": 6841
} | [
"org.bukkit.command.CommandSender"
] | import org.bukkit.command.CommandSender; | import org.bukkit.command.*; | [
"org.bukkit.command"
] | org.bukkit.command; | 87,782 |
public static boolean doesFileExist(String fileName, Context context){
//Taken from stackoverflow --> http://stackoverflow.com/questions/13205385/how-to-check-if-file-is-available-in-internal-memory
String path=context.getFilesDir().getAbsolutePath() + "/" + fileName;
File file = new File( p... | static boolean function(String fileName, Context context){ String path=context.getFilesDir().getAbsolutePath() + "/" + fileName; File file = new File( path ); if (file.exists()) { return true; } else { return false; } } | /**
* This static function checks if the file exists, returns true if it does, and false if it doesn't.
* @param context - see above methods
* @param fileName -see above methods
* @return
*/ | This static function checks if the file exists, returns true if it does, and false if it doesn't | doesFileExist | {
"repo_name": "CMPUT301F15T14/AndroidDesignProject",
"path": "app/src/main/java/ca/ualberta/t14/gametrader/FileIO.java",
"license": "gpl-2.0",
"size": 6739
} | [
"android.content.Context",
"java.io.File"
] | import android.content.Context; import java.io.File; | import android.content.*; import java.io.*; | [
"android.content",
"java.io"
] | android.content; java.io; | 2,531,601 |
public static Bitmap getBitmap(final String imagePath, int sampleSize) {
final Options options = new Options();
options.inDither = false;
options.inSampleSize = sampleSize;
RandomAccessFile file = null;
try {
file = new RandomAccessFile(imagePath, "r");
... | static Bitmap function(final String imagePath, int sampleSize) { final Options options = new Options(); options.inDither = false; options.inSampleSize = sampleSize; RandomAccessFile file = null; try { file = new RandomAccessFile(imagePath, "r"); return BitmapFactory.decodeFileDescriptor(file.getFD(), null, options); } ... | /**
* Get a bitmap from the image path
*
* @param imagePath
* @param sampleSize
* @return bitmap or null if read fails
*/ | Get a bitmap from the image path | getBitmap | {
"repo_name": "esironal/PocketHub",
"path": "app/src/main/java/com/github/pockethub/util/ImageUtils.java",
"license": "apache-2.0",
"size": 7430
} | [
"android.graphics.Bitmap",
"android.graphics.BitmapFactory",
"android.util.Log",
"java.io.IOException",
"java.io.RandomAccessFile"
] | import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.util.Log; import java.io.IOException; import java.io.RandomAccessFile; | import android.graphics.*; import android.util.*; import java.io.*; | [
"android.graphics",
"android.util",
"java.io"
] | android.graphics; android.util; java.io; | 1,916,904 |
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
try{
Web.setHeader(true, request, response, out, "pb... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(STR); PrintWriter out = response.getWriter(); try{ Web.setHeader(true, request, response, out, "pbx", STR); String user = Web.getCookieValue(request, "user"); String action = request.ge... | /**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods | processRequest | {
"repo_name": "motaz/stpanel",
"path": "src/java/sd/code/stpanel/pages/Dialplans.java",
"license": "gpl-2.0",
"size": 7101
} | [
"java.io.IOException",
"java.io.PrintWriter",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 1,186,583 |
@ThreadSafe
static SkyKey internalKey(GlobDescriptor glob, String subdirName) {
return internalKey(glob.packageId, glob.subdir.getRelative(subdirName),
glob.pattern, glob.excludeDirs);
}
@ThreadSafe
public static final class InvalidGlobPatternException extends Exception {
private final Str... | static SkyKey internalKey(GlobDescriptor glob, String subdirName) { return internalKey(glob.packageId, glob.subdir.getRelative(subdirName), glob.pattern, glob.excludeDirs); } public static final class InvalidGlobPatternException extends Exception { private final String pattern; InvalidGlobPatternException(String patter... | /**
* Constructs a {@link SkyKey} for a glob lookup.
*
* <p>Do not use outside {@code GlobFunction}.
*/ | Constructs a <code>SkyKey</code> for a glob lookup. Do not use outside GlobFunction | internalKey | {
"repo_name": "kidaa/bazel",
"path": "src/main/java/com/google/devtools/build/lib/skyframe/GlobValue.java",
"license": "apache-2.0",
"size": 4443
} | [
"com.google.devtools.build.skyframe.SkyKey"
] | import com.google.devtools.build.skyframe.SkyKey; | import com.google.devtools.build.skyframe.*; | [
"com.google.devtools"
] | com.google.devtools; | 172,376 |
private void addType(Document doc, Element oaiDc, GenericItem item)
{
for(ItemContentType itemContentType : item.getItemContentTypes())
{
Element secondaryType = doc.createElement("dc:type");
Text data = doc.createTextNode(OaiUtil.removeInvalidXmlChars(itemContentType.getContentType().getName()));... | void function(Document doc, Element oaiDc, GenericItem item) { for(ItemContentType itemContentType : item.getItemContentTypes()) { Element secondaryType = doc.createElement(STR); Text data = doc.createTextNode(OaiUtil.removeInvalidXmlChars(itemContentType.getContentType().getName())); secondaryType.appendChild(data); o... | /**
* Add the type information
*
* @param doc
* @param oaiDc
* @param item
*/ | Add the type information | addType | {
"repo_name": "nate-rcl/irplus",
"path": "ir_service/src/edu/ur/ir/oai/metadata/provider/service/DefaultQualifiedDublinCoreMetadataProvider.java",
"license": "apache-2.0",
"size": 23750
} | [
"edu.ur.ir.item.GenericItem",
"edu.ur.ir.item.ItemContentType",
"edu.ur.ir.oai.OaiUtil",
"org.w3c.dom.Document",
"org.w3c.dom.Element",
"org.w3c.dom.Text"
] | import edu.ur.ir.item.GenericItem; import edu.ur.ir.item.ItemContentType; import edu.ur.ir.oai.OaiUtil; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Text; | import edu.ur.ir.item.*; import edu.ur.ir.oai.*; import org.w3c.dom.*; | [
"edu.ur.ir",
"org.w3c.dom"
] | edu.ur.ir; org.w3c.dom; | 47,052 |
public Pair<InflationIssuerProviderDiscount, CurveBuildingBlockBundle> makeCurvesFromDerivatives(
final MultiCurveBundle<GeneratorCurve>[] curveBundles,
final InflationIssuerProviderDiscount knownData,
LinkedHashMap<String, IndexPrice[]> priceMap,
final InstrumentDerivativeVisitor<ParameterInf... | Pair<InflationIssuerProviderDiscount, CurveBuildingBlockBundle> function( final MultiCurveBundle<GeneratorCurve>[] curveBundles, final InflationIssuerProviderDiscount knownData, LinkedHashMap<String, IndexPrice[]> priceMap, final InstrumentDerivativeVisitor<ParameterInflationIssuerProviderInterface, Double> calculator,... | /**
* Build a block of curves without the discount curve.
* @param curveBundles The curve bundles, not null
* @param knownData The known data (fx rates, other curves, model parameters, ...)
* @param priceMap The inflation curves names map.
* @param calculator The calculator of the value on which the cali... | Build a block of curves without the discount curve | makeCurvesFromDerivatives | {
"repo_name": "codeaudit/OG-Platform",
"path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/provider/curve/inflationissuer/InflationIssuerDiscountBuildingRepository.java",
"license": "apache-2.0",
"size": 23653
} | [
"com.google.common.collect.LinkedListMultimap",
"com.opengamma.analytics.financial.curve.interestrate.generator.GeneratorCurve",
"com.opengamma.analytics.financial.instrument.index.IborIndex",
"com.opengamma.analytics.financial.instrument.index.IndexON",
"com.opengamma.analytics.financial.instrument.index.I... | import com.google.common.collect.LinkedListMultimap; import com.opengamma.analytics.financial.curve.interestrate.generator.GeneratorCurve; import com.opengamma.analytics.financial.instrument.index.IborIndex; import com.opengamma.analytics.financial.instrument.index.IndexON; import com.opengamma.analytics.financial.inst... | import com.google.common.collect.*; import com.opengamma.analytics.financial.curve.interestrate.generator.*; import com.opengamma.analytics.financial.instrument.index.*; import com.opengamma.analytics.financial.interestrate.*; import com.opengamma.analytics.financial.legalentity.*; import com.opengamma.analytics.financ... | [
"com.google.common",
"com.opengamma.analytics",
"com.opengamma.util",
"java.util"
] | com.google.common; com.opengamma.analytics; com.opengamma.util; java.util; | 185,280 |
public void setBoolean(int parameterIndex, boolean x) throws SQLException {
if (this.useTrueBoolean) {
setInternal(parameterIndex, x ? "1" : "0");
} else {
setInternal(parameterIndex, x ? "'t'" : "'f'");
this.parameterTypes[parameterIndex - 1 + getParameterIndexO... | void function(int parameterIndex, boolean x) throws SQLException { if (this.useTrueBoolean) { setInternal(parameterIndex, x ? "1" : "0"); } else { setInternal(parameterIndex, x ? "'t'" : "'f'"); this.parameterTypes[parameterIndex - 1 + getParameterIndexOffset()] = Types.BOOLEAN; } } | /**
* Set a parameter to a Java boolean value. The driver converts this to a
* SQL BIT value when it sends it to the database.
*
* @param parameterIndex
* the first parameter is 1...
* @param x
* the parameter value
*
* @throws SQLException
* ... | Set a parameter to a Java boolean value. The driver converts this to a SQL BIT value when it sends it to the database | setBoolean | {
"repo_name": "swankjesse/mysql-connector-j",
"path": "src/com/mysql/jdbc/PreparedStatement.java",
"license": "gpl-2.0",
"size": 198268
} | [
"java.sql.SQLException",
"java.sql.Types"
] | import java.sql.SQLException; import java.sql.Types; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,904,662 |
public void addFile( final String path, final File source) throws FileNotFoundException {
addFile( path, source, -1);
} | void function( final String path, final File source) throws FileNotFoundException { addFile( path, source, -1); } | /**
* Adds a file entry to the archive with the default permissions of 644.
*
* @param path the destination path for the installed file.
* @param source the local file to be included in the package.
* @throws java.io.FileNotFoundException file wasn't found
*/ | Adds a file entry to the archive with the default permissions of 644 | addFile | {
"repo_name": "craigwblake/redline",
"path": "src/main/java/org/redline_rpm/payload/Contents.java",
"license": "mit",
"size": 27953
} | [
"java.io.File",
"java.io.FileNotFoundException"
] | import java.io.File; import java.io.FileNotFoundException; | import java.io.*; | [
"java.io"
] | java.io; | 73,908 |
public String moveContributorUp() {
if (userId != null) {
user = userService.getUser(userId, false);
}
if( user == null || (!item.getOwner().equals(user) && !user.hasRole(IrRole.ADMIN_ROLE) &&
!institutionalCollectionPermissionHelper.isInstitutionalCollectionAdmin(user, genericItemId)))
{
... | String function() { if (userId != null) { user = userService.getUser(userId, false); } if( user == null (!item.getOwner().equals(user) && !user.hasRole(IrRole.ADMIN_ROLE) && !institutionalCollectionPermissionHelper.isInstitutionalCollectionAdmin(user, genericItemId))) { return STR; } log.debug(STR + contributorId); Ite... | /**
* Moves the contributor up for sorting
*
*/ | Moves the contributor up for sorting | moveContributorUp | {
"repo_name": "nate-rcl/irplus",
"path": "ir_web/src/edu/ur/ir/web/action/item/AddContributorsToItem.java",
"license": "apache-2.0",
"size": 19035
} | [
"edu.ur.ir.item.ItemContributor",
"edu.ur.ir.user.IrRole"
] | import edu.ur.ir.item.ItemContributor; import edu.ur.ir.user.IrRole; | import edu.ur.ir.item.*; import edu.ur.ir.user.*; | [
"edu.ur.ir"
] | edu.ur.ir; | 1,325,846 |
protected final void enableNormalize() {
checkState(this.setUpRan, "Attempted to configure before running setUp().");
this.normalizeEnabled = true;
} | final void function() { checkState(this.setUpRan, STR); this.normalizeEnabled = true; } | /**
* Perform AST normalization before running the test pass
*
* @see Normalize
*/ | Perform AST normalization before running the test pass | enableNormalize | {
"repo_name": "vobruba-martin/closure-compiler",
"path": "test/com/google/javascript/jscomp/CompilerTestCase.java",
"license": "apache-2.0",
"size": 86059
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 375,245 |
public static MozuClient<com.mozu.api.contracts.reference.TopLevelDomainCollection> getTopLevelDomainsClient(String responseFields) throws Exception
{
MozuUrl url = com.mozu.api.urls.platform.ReferenceDataUrl.getTopLevelDomainsUrl(responseFields);
String verb = "GET";
Class<?> clz = com.mozu.api.contracts.ref... | static MozuClient<com.mozu.api.contracts.reference.TopLevelDomainCollection> function(String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.platform.ReferenceDataUrl.getTopLevelDomainsUrl(responseFields); String verb = "GET"; Class<?> clz = com.mozu.api.contracts.reference.TopLevelDomainCollection.c... | /**
* Retrieves the entire list of top-level internet domains that the system supports.
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.reference.TopLevelDomainCollection> mozuClient=GetTopLevelDomainsClient( responseFields);
* client.setBaseAddress(url);
* client.executeRequest();
* TopLevelDomainColl... | Retrieves the entire list of top-level internet domains that the system supports. <code><code> MozuClient mozuClient=GetTopLevelDomainsClient( responseFields); client.setBaseAddress(url); client.executeRequest(); TopLevelDomainCollection topLevelDomainCollection = client.Result(); </code></code> | getTopLevelDomainsClient | {
"repo_name": "lakshmi-nair/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/platform/ReferenceDataClient.java",
"license": "mit",
"size": 27055
} | [
"com.mozu.api.MozuClient",
"com.mozu.api.MozuClientFactory",
"com.mozu.api.MozuUrl"
] | import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,798,298 |
void drawRouteLabels(Graphics2D g, Context ctx, LayoutNode n, BitSet visited); | void drawRouteLabels(Graphics2D g, Context ctx, LayoutNode n, BitSet visited); | /**
* Draws the labels of a route.
*
* @param g The graphics context.
* @param ctx The canvas context.
* @param n The destination.
* @param visited The method sets all nodes that are visited.
*/ | Draws the labels of a route | drawRouteLabels | {
"repo_name": "JosuaKrause/BusVis",
"path": "src/main/java/infovis/busvis/NodeDrawer.java",
"license": "mit",
"size": 5287
} | [
"java.awt.Graphics2D",
"java.util.BitSet"
] | import java.awt.Graphics2D; import java.util.BitSet; | import java.awt.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 1,316,718 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.