method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
@Test public void testNotAConsistent() throws Exception { ProbKnowledgeBase pkb = new KBStandaloneLoader().load( FILE_PREFIX + "test_membership_1.xml" ); ProntoReasoner reasoner = new HSOptimizedLexReasoner( new PSATSolverImpl() ); boolean result = false; try { reasoner.membershipEntailmen...
void function() throws Exception { ProbKnowledgeBase pkb = new KBStandaloneLoader().load( FILE_PREFIX + STR ); ProntoReasoner reasoner = new HSOptimizedLexReasoner( new PSATSolverImpl() ); boolean result = false; try { reasoner.membershipEntailment( pkb, ATermUtils.makeTermAppl( URI_PREFIX + "Lewis" ), ATermUtils.makeT...
/** * Membership entailment is supposed to check PABox consistency for that * individual. And it must fail in this case * @throws Exception */
Membership entailment is supposed to check PABox consistency for that individual. And it must fail in this case
testNotAConsistent
{ "repo_name": "klinovp/pronto", "path": "test/uk/ac/manchester/cs/pronto/HSOptimizedLexReasonerTest.java", "license": "apache-2.0", "size": 8147 }
[ "org.junit.Assert", "org.mindswap.pellet.utils.ATermUtils", "uk.ac.manchester.cs.pronto.benchmark.TelemetryUtils", "uk.ac.manchester.cs.pronto.io.KBStandaloneLoader" ]
import org.junit.Assert; import org.mindswap.pellet.utils.ATermUtils; import uk.ac.manchester.cs.pronto.benchmark.TelemetryUtils; import uk.ac.manchester.cs.pronto.io.KBStandaloneLoader;
import org.junit.*; import org.mindswap.pellet.utils.*; import uk.ac.manchester.cs.pronto.benchmark.*; import uk.ac.manchester.cs.pronto.io.*;
[ "org.junit", "org.mindswap.pellet", "uk.ac.manchester" ]
org.junit; org.mindswap.pellet; uk.ac.manchester;
170,645
public Writer write(Writer writer) throws JSONException { try { boolean b = false; int len = length(); writer.write('['); for (int i = 0; i < len; i += 1) { if (b) { writer.write(','); } ...
Writer function(Writer writer) throws JSONException { try { boolean b = false; int len = length(); writer.write('['); for (int i = 0; i < len; i += 1) { if (b) { writer.write(','); } Object v = this.myArrayList.get(i); if (v instanceof JSONObject) { ((JSONObject)v).write(writer); } else if (v instanceof JSONArray) { ((...
/** * Write the contents of the JSONArray as JSON text to a writer. * For compactness, no whitespace is added. * <p> * Warning: This method assumes that the data structure is acyclical. * * @return The writer. * @throws JSONException */
Write the contents of the JSONArray as JSON text to a writer. For compactness, no whitespace is added. Warning: This method assumes that the data structure is acyclical
write
{ "repo_name": "adamfisk/littleshoot-client", "path": "common/json/src/main/java/org/json/JSONArray.java", "license": "gpl-2.0", "size": 28329 }
[ "java.io.IOException", "java.io.Writer" ]
import java.io.IOException; import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
170,128
public static void rollbackConnectionQuiet(@Nullable Connection rsrc) { if (rsrc != null) try { rsrc.rollback(); } catch (SQLException ignored) { // No-op. } }
static void function(@Nullable Connection rsrc) { if (rsrc != null) try { rsrc.rollback(); } catch (SQLException ignored) { } }
/** * Quietly rollbacks JDBC connection ignoring possible checked exception. * * @param rsrc JDBC connection to rollback. If connection is {@code null}, it's no-op. */
Quietly rollbacks JDBC connection ignoring possible checked exception
rollbackConnectionQuiet
{ "repo_name": "apache/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 387878 }
[ "java.sql.Connection", "java.sql.SQLException", "org.jetbrains.annotations.Nullable" ]
import java.sql.Connection; import java.sql.SQLException; import org.jetbrains.annotations.Nullable;
import java.sql.*; import org.jetbrains.annotations.*;
[ "java.sql", "org.jetbrains.annotations" ]
java.sql; org.jetbrains.annotations;
1,234,743
@XmlElement (name = "part") @JsonName ("parts") @JsonProperty ("parts") public List<NamePart> getParts() { return parts; }
@XmlElement (name = "part") @JsonName ("parts") @JsonProperty ("parts") List<NamePart> function() { return parts; }
/** * The different parts of the name field. * * @return The different parts of the name field. */
The different parts of the name field
getParts
{ "repo_name": "ianstiles/gedcomx-record", "path": "src/main/java/org/gedcomx/record/Name.java", "license": "apache-2.0", "size": 3612 }
[ "java.util.List", "javax.xml.bind.annotation.XmlElement", "org.codehaus.enunciate.json.JsonName", "org.codehaus.jackson.annotate.JsonProperty" ]
import java.util.List; import javax.xml.bind.annotation.XmlElement; import org.codehaus.enunciate.json.JsonName; import org.codehaus.jackson.annotate.JsonProperty;
import java.util.*; import javax.xml.bind.annotation.*; import org.codehaus.enunciate.json.*; import org.codehaus.jackson.annotate.*;
[ "java.util", "javax.xml", "org.codehaus.enunciate", "org.codehaus.jackson" ]
java.util; javax.xml; org.codehaus.enunciate; org.codehaus.jackson;
1,000,740
void updateSettings(ClusterUpdateSettingsRequest request, ActionListener<ClusterUpdateSettingsResponse> listener);
void updateSettings(ClusterUpdateSettingsRequest request, ActionListener<ClusterUpdateSettingsResponse> listener);
/** * Update settings in the cluster. */
Update settings in the cluster
updateSettings
{ "repo_name": "strapdata/elassandra", "path": "server/src/main/java/org/elasticsearch/client/ClusterAdminClient.java", "license": "apache-2.0", "size": 26657 }
[ "org.elasticsearch.action.ActionListener", "org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest", "org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsResponse" ]
import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest; import org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsResponse;
import org.elasticsearch.action.*; import org.elasticsearch.action.admin.cluster.settings.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
463,138
private Properties loadProperties(File parent, String filename) { if (StringUtils.isEmpty(filename)) { logger.error("The given filename is empty."); }else if (!parent.isDirectory()) { logger.error("The given parent directory ".concat( parent.getAbsolutePat...
Properties function(File parent, String filename) { if (StringUtils.isEmpty(filename)) { logger.error(STR); }else if (!parent.isDirectory()) { logger.error(STR.concat( parent.getAbsolutePath()).concat(STR)); }else { File propertyFile = new File(parent, filename); if (propertyFile != null && propertyFile.exists() && pro...
/** * Load the application-specific properties. * * @param parent The parent file that denotes a directory * @param filename The child pathname that denotes the file in the given * parent directory * @return the property list (key and element pairs) read from the given * ...
Load the application-specific properties
loadProperties
{ "repo_name": "DISID/disid-proofs", "path": "spring-boot-application-different-config-location/src/main/java/account/config/ApplicationOwnConfigEnvironmentPostProcessor.java", "license": "gpl-3.0", "size": 12273 }
[ "java.io.File", "java.io.IOException", "java.util.Properties", "org.springframework.core.io.FileSystemResource", "org.springframework.core.io.support.PropertiesLoaderUtils", "org.springframework.util.StringUtils" ]
import java.io.File; import java.io.IOException; import java.util.Properties; import org.springframework.core.io.FileSystemResource; import org.springframework.core.io.support.PropertiesLoaderUtils; import org.springframework.util.StringUtils;
import java.io.*; import java.util.*; import org.springframework.core.io.*; import org.springframework.core.io.support.*; import org.springframework.util.*;
[ "java.io", "java.util", "org.springframework.core", "org.springframework.util" ]
java.io; java.util; org.springframework.core; org.springframework.util;
1,853,295
public TopHitsAggregatorBuilder sort(SortBuilder sort) { if (sort == null) { throw new IllegalArgumentException("[sort] must not be null: [" + name + "]"); } try { if (sorts == null) { sorts = new ArrayList<>(); } // NORELEASE w...
TopHitsAggregatorBuilder function(SortBuilder sort) { if (sort == null) { throw new IllegalArgumentException(STR + name + "]"); } try { if (sorts == null) { sorts = new ArrayList<>(); } XContentBuilder builder = XContentFactory.jsonBuilder(); builder.startObject(); sort.toXContent(builder, EMPTY_PARAMS); builder.endObj...
/** * Adds a sort builder. */
Adds a sort builder
sort
{ "repo_name": "jchampion/elasticsearch", "path": "core/src/main/java/org/elasticsearch/search/aggregations/metrics/tophits/TopHitsAggregatorBuilder.java", "license": "apache-2.0", "size": 22964 }
[ "java.io.IOException", "java.util.ArrayList", "org.elasticsearch.common.xcontent.XContentBuilder", "org.elasticsearch.common.xcontent.XContentFactory", "org.elasticsearch.search.sort.SortBuilder" ]
import java.io.IOException; import java.util.ArrayList; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.search.sort.SortBuilder;
import java.io.*; import java.util.*; import org.elasticsearch.common.xcontent.*; import org.elasticsearch.search.sort.*;
[ "java.io", "java.util", "org.elasticsearch.common", "org.elasticsearch.search" ]
java.io; java.util; org.elasticsearch.common; org.elasticsearch.search;
2,473,406
void logNoMatchingFactoryMethod(MutableInstance instance);
void logNoMatchingFactoryMethod(MutableInstance instance);
/** * The system detects that there is no corresponding factory method for this instance. * * @param instance The instance that needs to be created. * @blammo.message No corresponding factory method for {instance}. * @blammo.level error */
The system detects that there is no corresponding factory method for this instance
logNoMatchingFactoryMethod
{ "repo_name": "wspringer/spring-me", "path": "spring-me-core/src/main/java/me/springframework/di/spring/QDoxAugmentation.java", "license": "gpl-2.0", "size": 25129 }
[ "me.springframework.di.base.MutableInstance" ]
import me.springframework.di.base.MutableInstance;
import me.springframework.di.base.*;
[ "me.springframework.di" ]
me.springframework.di;
2,371,047
public List getAllocatedBlocks();
List function();
/** * Queries a list of allocated blocks. * This can be usefull for debugging purposes. * * @return a list whose elements are instances of <code>Block</code> */
Queries a list of allocated blocks. This can be usefull for debugging purposes
getAllocatedBlocks
{ "repo_name": "uw-loci/JCollider", "path": "src/main/java/de/sciss/jcollider/BlockAllocator.java", "license": "gpl-2.0", "size": 4108 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
361,799
@Override public synchronized Logger getLogger(final String name) { ClassLoader classLoader = Thread.currentThread() .getContextClassLoader(); return getClassLoaderInfo(classLoader).loggers.get(name); }
synchronized Logger function(final String name) { ClassLoader classLoader = Thread.currentThread() .getContextClassLoader(); return getClassLoaderInfo(classLoader).loggers.get(name); }
/** * Get the logger associated with the specified name inside * the classloader local configuration. If this returns null, * and the call originated for Logger.getLogger, a new * logger with the specified name will be instantiated and * added using addLogger. * * @param name...
Get the logger associated with the specified name inside the classloader local configuration. If this returns null, and the call originated for Logger.getLogger, a new logger with the specified name will be instantiated and added using addLogger
getLogger
{ "repo_name": "pistolove/sourcecode4junit", "path": "Source4Tomcat/src/org/apache/juli/ClassLoaderLogManager.java", "license": "apache-2.0", "size": 25012 }
[ "java.util.logging.Logger" ]
import java.util.logging.Logger;
import java.util.logging.*;
[ "java.util" ]
java.util;
1,707,141
public static boolean copyToFile(@NonNull File file, @NonNull InputStream is) { FileOutputStream os = null; StrictMode.ThreadPolicy old = StrictMode.allowThreadDiskWrites(); try { os = new FileOutputStream(file, false); byte[] buffer = new byte[1024]; int ...
static boolean function(@NonNull File file, @NonNull InputStream is) { FileOutputStream os = null; StrictMode.ThreadPolicy old = StrictMode.allowThreadDiskWrites(); try { os = new FileOutputStream(file, false); byte[] buffer = new byte[1024]; int readLen; while ((readLen = is.read(buffer)) != -1) { os.write(buffer, 0, ...
/** * Copy the input stream contents to file. */
Copy the input stream contents to file
copyToFile
{ "repo_name": "androidx/androidx", "path": "core/core/src/main/java/androidx/core/graphics/TypefaceCompatUtil.java", "license": "apache-2.0", "size": 8052 }
[ "android.os.StrictMode", "android.util.Log", "androidx.annotation.NonNull", "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.InputStream" ]
import android.os.StrictMode; import android.util.Log; import androidx.annotation.NonNull; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream;
import android.os.*; import android.util.*; import androidx.annotation.*; import java.io.*;
[ "android.os", "android.util", "androidx.annotation", "java.io" ]
android.os; android.util; androidx.annotation; java.io;
712,383
public void close() throws IOException { this.isClosed = true; printer.close(); }
void function() throws IOException { this.isClosed = true; printer.close(); }
/** * close this log * @throws IOException */
close this log
close
{ "repo_name": "AlexRuppert/las2peer_project", "path": "java/i5/las2peer/logging/NodeStreamLogger.java", "license": "mit", "size": 4784 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,424,401
private String[] resolveImplementedInterfaces() { String[] interfaces = null; try { InterfaceDef interfaceDef = InterfaceDefHelper.narrow(reference._get_interface_def()); if (interfaceDef!=null) { FullInterfaceDescription fid = interfaceDef.describe_interface(); if (fid != null) inter...
String[] function() { String[] interfaces = null; try { InterfaceDef interfaceDef = InterfaceDefHelper.narrow(reference._get_interface_def()); if (interfaceDef!=null) { FullInterfaceDescription fid = interfaceDef.describe_interface(); if (fid != null) interfaces = fid.base_interfaces; } } catch (Exception ex) {}; if (i...
/** * Returns list of implemented interfaces. * @param list of implemented interfaces. */
Returns list of implemented interfaces
resolveImplementedInterfaces
{ "repo_name": "ACS-Community/ACS", "path": "LGPL/CommonSoftware/jmanager/src/com/cosylab/acs/maci/plug/ComponentProxy.java", "license": "lgpl-2.1", "size": 5416 }
[ "org.omg.CORBA" ]
import org.omg.CORBA;
import org.omg.*;
[ "org.omg" ]
org.omg;
2,702,877
@Nonnull String getName();
@Nonnull String getName();
/** * Gets the name of this member. * * @return The name of this field */
Gets the name of this member
getName
{ "repo_name": "CvvT/AppTroy", "path": "app/src/main/java/org/cc/dexlib2/iface/Member.java", "license": "apache-2.0", "size": 2331 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,212,290
public Font getCurrent() { return m_Current; }
Font function() { return m_Current; }
/** * Retrieve the selected font, or null. * * @return the selected font */
Retrieve the selected font, or null
getCurrent
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/gui/chooser/FontChooser.java", "license": "gpl-3.0", "size": 4701 }
[ "java.awt.Font" ]
import java.awt.Font;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,113,165
@Override @Convert(converter = MarkerAttributeConverter.class) public Marker getMarker() { return this.getWrappedEvent().getMarker(); }
@Convert(converter = MarkerAttributeConverter.class) Marker function() { return this.getWrappedEvent().getMarker(); }
/** * Gets the marker. Annotated with {@code @Convert(converter = MarkerAttributeConverter.class)}. * * @return the marker. * @see MarkerAttributeConverter */
Gets the marker. Annotated with @Convert(converter = MarkerAttributeConverter.class)
getMarker
{ "repo_name": "lburgazzoli/logging-log4j2", "path": "log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/BasicLogEventEntity.java", "license": "apache-2.0", "size": 10122 }
[ "javax.persistence.Convert", "org.apache.logging.log4j.Marker", "org.apache.logging.log4j.core.appender.db.jpa.converter.MarkerAttributeConverter" ]
import javax.persistence.Convert; import org.apache.logging.log4j.Marker; import org.apache.logging.log4j.core.appender.db.jpa.converter.MarkerAttributeConverter;
import javax.persistence.*; import org.apache.logging.log4j.*; import org.apache.logging.log4j.core.appender.db.jpa.converter.*;
[ "javax.persistence", "org.apache.logging" ]
javax.persistence; org.apache.logging;
2,168,753
public @CheckForNull R search(final int n, final Direction d) { switch (d) { case EXACT: return getByNumber(n); case ASC: for (int m : numberOnDisk) { if (m < n) { // TODO could be made more efficient with numberOnDisk.find ...
@CheckForNull R function(final int n, final Direction d) { switch (d) { case EXACT: return getByNumber(n); case ASC: for (int m : numberOnDisk) { if (m < n) { continue; } R r = getByNumber(m); if (r != null) { return r; } } return null; case DESC: ListIterator<Integer> iterator = numberOnDisk.listIterator(numberOnDisk....
/** * Finds the build #M where M is nearby the given 'n'. * * <p> * * * @param n * the index to start the search from * @param d * defines what we mean by "nearby" above. * If EXACT, find #N or return null. * If ASC, finds the closest #M that sa...
Finds the build #M where M is nearby the given 'n'.
search
{ "repo_name": "aldaris/jenkins", "path": "core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java", "license": "mit", "size": 19292 }
[ "java.util.ListIterator", "javax.annotation.CheckForNull" ]
import java.util.ListIterator; import javax.annotation.CheckForNull;
import java.util.*; import javax.annotation.*;
[ "java.util", "javax.annotation" ]
java.util; javax.annotation;
760,200
super.executeCommand(messageEvent); // Roll the Dice Integer diceResult = ThreadLocalRandom.current().nextInt(1, 10); // Prepare Response String response = String.format("I rate %s a %d out of 10.", messageEvent.getUser().getName(), diceResult); // Send Response sendMe...
super.executeCommand(messageEvent); Integer diceResult = ThreadLocalRandom.current().nextInt(1, 10); String response = String.format(STR, messageEvent.getUser().getName(), diceResult); sendMessageToChannel(messageEvent.getChannel().getName(), response); }
/** * executeCommand Logic */
executeCommand Logic
executeCommand
{ "repo_name": "Prygoon/TwichBot", "path": "src/main/java/com/github/philippheuer/chatbot4twitch/commands/general/Rate.java", "license": "mit", "size": 1269 }
[ "java.util.concurrent.ThreadLocalRandom" ]
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,397,232
public void testIsBiggerOrEqual() throws Exception { final BigInteger big1 = new BigInteger("1"); final BigInteger big2 = new BigInteger("2"); final BigInteger big3 = new BigInteger("1"); assertFalse(NumberUtils.isBiggerOrEqual(big1, big2)); assertTrue(Number...
void function() throws Exception { final BigInteger big1 = new BigInteger("1"); final BigInteger big2 = new BigInteger("2"); final BigInteger big3 = new BigInteger("1"); assertFalse(NumberUtils.isBiggerOrEqual(big1, big2)); assertTrue(NumberUtils.isBiggerOrEqual(big2, big1)); assertTrue(NumberUtils.isBiggerOrEqual(big1...
/** * Test bigger or equals * * @throws Exception If any unexpected error occurs. */
Test bigger or equals
testIsBiggerOrEqual
{ "repo_name": "adamfisk/littleshoot-util", "path": "src/test/java/org/littleshoot/util/NumberUtilsTest.java", "license": "gpl-2.0", "size": 1252 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,672,515
E dereferenceValue(Object refer) { if (refer == null) return null; Object value = referenceType == ReferenceType.STRONG ? refer : ((Reference) refer).get(); if (value == null) delegate.remove(refer); // old symbol was garbage collected return (E) value; }
E dereferenceValue(Object refer) { if (refer == null) return null; Object value = referenceType == ReferenceType.STRONG ? refer : ((Reference) refer).get(); if (value == null) delegate.remove(refer); return (E) value; }
/** * Converts a reference to a symbol. */
Converts a reference to a symbol
dereferenceValue
{ "repo_name": "allanfish/facetime", "path": "facetime-utils/src/main/java/com/facetime/core/collection/ReferenceList.java", "license": "mit", "size": 3014 }
[ "java.lang.ref.Reference" ]
import java.lang.ref.Reference;
import java.lang.ref.*;
[ "java.lang" ]
java.lang;
1,748,122
public static boolean applyToolSettingsToState(SessionState state, Site site, ParameterParser params) { if (!ENABLED_AT_SYSTEM_LEVEL || state == null || params == null || !isMathJaxAllowedForSite(site, state)) { return false; } Set<String> mathJaxEnabledTools = new H...
static boolean function(SessionState state, Site site, ParameterParser params) { if (!ENABLED_AT_SYSTEM_LEVEL state == null params == null !isMathJaxAllowedForSite(site, state)) { return false; } Set<String> mathJaxEnabledTools = new HashSet<String>(); String[] mathJaxEnabledToolsArray = params.getStrings(PARAM_MATHJAX...
/** * Applies the current mathjax tool settings defined in the given params to the given state * @param state the state * @param params the params * @return true if the state was modified */
Applies the current mathjax tool settings defined in the given params to the given state
applyToolSettingsToState
{ "repo_name": "frasese/sakai", "path": "site-manage/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/MathJaxEnabler.java", "license": "apache-2.0", "size": 14834 }
[ "java.util.Arrays", "java.util.HashSet", "java.util.Set", "org.sakaiproject.event.api.SessionState", "org.sakaiproject.site.api.Site", "org.sakaiproject.util.ParameterParser" ]
import java.util.Arrays; import java.util.HashSet; import java.util.Set; import org.sakaiproject.event.api.SessionState; import org.sakaiproject.site.api.Site; import org.sakaiproject.util.ParameterParser;
import java.util.*; import org.sakaiproject.event.api.*; import org.sakaiproject.site.api.*; import org.sakaiproject.util.*;
[ "java.util", "org.sakaiproject.event", "org.sakaiproject.site", "org.sakaiproject.util" ]
java.util; org.sakaiproject.event; org.sakaiproject.site; org.sakaiproject.util;
1,197,345
public ServiceResponse<Void> post201() throws ErrorException, IOException { final Boolean booleanValue = null; Call<ResponseBody> call = service.post201(booleanValue); return post201Delegate(call.execute()); }
ServiceResponse<Void> function() throws ErrorException, IOException { final Boolean booleanValue = null; Call<ResponseBody> call = service.post201(booleanValue); return post201Delegate(call.execute()); }
/** * Post true Boolean value in request returns 201 (Created). * * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the {@link ServiceResponse} object if successful. */
Post true Boolean value in request returns 201 (Created)
post201
{ "repo_name": "John-Hart/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/implementation/HttpSuccessImpl.java", "license": "mit", "size": 67911 }
[ "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;
2,640,232
public void setTo(String to) throws ParseException { this.to = timeFormat.parse(to); }
void function(String to) throws ParseException { this.to = timeFormat.parse(to); }
/** * Set the end of the time frame to check against. * * @param to The to to set. * @throws ParseException */
Set the end of the time frame to check against
setTo
{ "repo_name": "gaowangyizu/myHeritrix", "path": "myHeritrix/src/org/archive/crawler/settings/refinements/TimespanCriteria.java", "license": "apache-2.0", "size": 4551 }
[ "java.text.ParseException" ]
import java.text.ParseException;
import java.text.*;
[ "java.text" ]
java.text;
1,003,324
public static final IBounds getAbsoluteBounds(IDiagramModelComponent dmc) { if(dmc instanceof IDiagramModelObject) { return getAbsoluteBounds((IDiagramModelObject)dmc); } // TODO - how to calculate the bounds from this????? else if(dmc instanceof IDiagramMo...
static final IBounds function(IDiagramModelComponent dmc) { if(dmc instanceof IDiagramModelObject) { return getAbsoluteBounds((IDiagramModelObject)dmc); } else if(dmc instanceof IDiagramModelConnection) { } return null; }
/** * Return the absolute bounds of a diagram model component * TODO for connections * @param dmc * @return */
Return the absolute bounds of a diagram model component TODO for connections
getAbsoluteBounds
{ "repo_name": "archimatetool/archi", "path": "com.archimatetool.editor/src/com/archimatetool/editor/model/DiagramModelUtils.java", "license": "mit", "size": 25355 }
[ "com.archimatetool.model.IBounds", "com.archimatetool.model.IDiagramModelComponent", "com.archimatetool.model.IDiagramModelConnection", "com.archimatetool.model.IDiagramModelObject" ]
import com.archimatetool.model.IBounds; import com.archimatetool.model.IDiagramModelComponent; import com.archimatetool.model.IDiagramModelConnection; import com.archimatetool.model.IDiagramModelObject;
import com.archimatetool.model.*;
[ "com.archimatetool.model" ]
com.archimatetool.model;
1,740,559
protected void handleChange() { lastTemplateChoice = this.comboTemplateNames.getText(); lastAppIdText = this.appIdText.getText(); Tuple<String, File> description = templateNamesAndDescriptions.get(lastTemplateChoice); templateDescription.setText(description != null ? description.o1 ...
void function() { lastTemplateChoice = this.comboTemplateNames.getText(); lastAppIdText = this.appIdText.getText(); Tuple<String, File> description = templateNamesAndDescriptions.get(lastTemplateChoice); templateDescription.setText(description != null ? description.o1 : STRPlease fill the application id (registered in ...
/** * When the selection changes, we update the last choice, description and the error message. */
When the selection changes, we update the last choice, description and the error message
handleChange
{ "repo_name": "rgom/Pydev", "path": "plugins/org.python.pydev.customizations/src/org/python/pydev/customizations/app_engine/wizards/AppEngineTemplatePage.java", "license": "epl-1.0", "size": 9810 }
[ "java.io.File", "org.python.pydev.shared_core.structure.Tuple" ]
import java.io.File; import org.python.pydev.shared_core.structure.Tuple;
import java.io.*; import org.python.pydev.shared_core.structure.*;
[ "java.io", "org.python.pydev" ]
java.io; org.python.pydev;
1,243,789
public static MCRViewerConfigurationBuilder pdf(HttpServletRequest request) { MCRViewerPDFConfiguration pdfConfig = new MCRViewerPDFConfiguration(); return MCRViewerConfigurationBuilder.build(request).mixin(pdfConfig); }
static MCRViewerConfigurationBuilder function(HttpServletRequest request) { MCRViewerPDFConfiguration pdfConfig = new MCRViewerPDFConfiguration(); return MCRViewerConfigurationBuilder.build(request).mixin(pdfConfig); }
/** * Builds the default pdf configuration without any plugins. */
Builds the default pdf configuration without any plugins
pdf
{ "repo_name": "MyCoRe-Org/mycore", "path": "mycore-viewer/src/main/java/org/mycore/viewer/configuration/MCRViewerConfigurationBuilder.java", "license": "gpl-3.0", "size": 5354 }
[ "javax.servlet.http.HttpServletRequest" ]
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
2,135,980
TfsClient getValidatedClient(String url, String username, Secret password) throws URISyntaxException, VssServiceException;
TfsClient getValidatedClient(String url, String username, Secret password) throws URISyntaxException, VssServiceException;
/** * Create a verified REST client for TFS * * If a valid client can not be constructed, will throw exception * * @param url TFS collection level url * @param username * @param password * @return new REST TFS client * @throws URISyntaxException */
Create a verified REST client for TFS If a valid client can not be constructed, will throw exception
getValidatedClient
{ "repo_name": "Microsoft/vsts-jenkins-build-integration-sample", "path": "src/main/java/com/microsoft/tfs/plugin/TfsClientFactory.java", "license": "mit", "size": 804 }
[ "com.microsoft.tfs.plugin.impl.TfsClient", "com.microsoft.vss.client.core.model.VssServiceException", "hudson.util.Secret", "java.net.URISyntaxException" ]
import com.microsoft.tfs.plugin.impl.TfsClient; import com.microsoft.vss.client.core.model.VssServiceException; import hudson.util.Secret; import java.net.URISyntaxException;
import com.microsoft.tfs.plugin.impl.*; import com.microsoft.vss.client.core.model.*; import hudson.util.*; import java.net.*;
[ "com.microsoft.tfs", "com.microsoft.vss", "hudson.util", "java.net" ]
com.microsoft.tfs; com.microsoft.vss; hudson.util; java.net;
1,868,196
public float readFLOAT16(String name) throws IOException { newDumpLevel(name, "FLOAT16"); int val = readUI16Internal(); int sign = val >> 15; int mantisa = val & 0x3FF; int exp = (val >> 10) & 0x1F; float ret = (sign == 1 ? -1 : 1) * (float) Math.pow(2, exp) * (1 + ((...
float function(String name) throws IOException { newDumpLevel(name, STR); int val = readUI16Internal(); int sign = val >> 15; int mantisa = val & 0x3FF; int exp = (val >> 10) & 0x1F; float ret = (sign == 1 ? -1 : 1) * (float) Math.pow(2, exp) * (1 + ((mantisa) / (float) (1 << 10))); endDumpLevel(ret); return ret; }
/** * Reads one FLOAT16 (16bit floating point value) value from the stream * * @param name * @return FLOAT16 value * @throws IOException */
Reads one FLOAT16 (16bit floating point value) value from the stream
readFLOAT16
{ "repo_name": "crimefire/jpexs-decompiler", "path": "libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java", "license": "gpl-3.0", "size": 128299 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,365,434
long getFileSize(FileSystem fs, String path) throws SpaceLimitingException { final FileStatus status; try { status = fs.getFileStatus(new Path(Objects.requireNonNull(path))); } catch (IOException e) { throw new SpaceLimitingException( getPolicyName(), "Could not verify length of file...
long getFileSize(FileSystem fs, String path) throws SpaceLimitingException { final FileStatus status; try { status = fs.getFileStatus(new Path(Objects.requireNonNull(path))); } catch (IOException e) { throw new SpaceLimitingException( getPolicyName(), STR + path, e); } if (!status.isFile()) { throw new IllegalArgumentE...
/** * Computes the size of a single file on the filesystem. If the size cannot be computed for some * reason, a {@link SpaceLimitingException} is thrown, as the file may violate a quota. If the * provided path does not reference a file, an {@link IllegalArgumentException} is thrown. * * @param fs The Fil...
Computes the size of a single file on the filesystem. If the size cannot be computed for some reason, a <code>SpaceLimitingException</code> is thrown, as the file may violate a quota. If the provided path does not reference a file, an <code>IllegalArgumentException</code> is thrown
getFileSize
{ "repo_name": "ultratendency/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/policies/AbstractViolationPolicyEnforcement.java", "license": "apache-2.0", "size": 3620 }
[ "java.io.IOException", "java.util.Objects", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hbase.quotas.SpaceLimitingException" ]
import java.io.IOException; import java.util.Objects; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.quotas.SpaceLimitingException;
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.quotas.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
902,255
public ServiceCall<Void> deleteClassifier(String classifierId) { Validator.isTrue((classifierId != null) && !classifierId.isEmpty(), "classifierId cannot be null or empty"); RequestBuilder requestBuilder = RequestBuilder.delete(String.format(PATH_CLASSIFIER, classifierId)); requestBuilder.query(VERSION, ...
ServiceCall<Void> function(String classifierId) { Validator.isTrue((classifierId != null) && !classifierId.isEmpty(), STR); RequestBuilder requestBuilder = RequestBuilder.delete(String.format(PATH_CLASSIFIER, classifierId)); requestBuilder.query(VERSION, versionDate); return createServiceCall(requestBuilder.build(), Re...
/** * Deletes a classifier. * * @param classifierId the classifier ID to delete * @return the service call * @see VisualClassifier */
Deletes a classifier
deleteClassifier
{ "repo_name": "JoshSharpe/java-sdk", "path": "visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/VisualRecognition.java", "license": "apache-2.0", "size": 24592 }
[ "com.ibm.watson.developer_cloud.http.RequestBuilder", "com.ibm.watson.developer_cloud.http.ServiceCall", "com.ibm.watson.developer_cloud.util.ResponseConverterUtils", "com.ibm.watson.developer_cloud.util.Validator", "com.ibm.watson.developer_cloud.visual_recognition.v3.model.VisualClassification" ]
import com.ibm.watson.developer_cloud.http.RequestBuilder; import com.ibm.watson.developer_cloud.http.ServiceCall; import com.ibm.watson.developer_cloud.util.ResponseConverterUtils; import com.ibm.watson.developer_cloud.util.Validator; import com.ibm.watson.developer_cloud.visual_recognition.v3.model.VisualClassificati...
import com.ibm.watson.developer_cloud.http.*; import com.ibm.watson.developer_cloud.util.*; import com.ibm.watson.developer_cloud.visual_recognition.v3.model.*;
[ "com.ibm.watson" ]
com.ibm.watson;
2,201,473
private ViewHolder createCourseDetailFieldViewHolder(LayoutInflater inflater, LinearLayout parent) { ViewHolder holder = new ViewHolder(); holder.rowView = inflater.inflate(R.layout.course_detail_field, parent, false); holder.rowIcon = (IconImageView) holder.rowView.findViewById(R.id.course...
ViewHolder function(LayoutInflater inflater, LinearLayout parent) { ViewHolder holder = new ViewHolder(); holder.rowView = inflater.inflate(R.layout.course_detail_field, parent, false); holder.rowIcon = (IconImageView) holder.rowView.findViewById(R.id.course_detail_field_icon); holder.rowFieldName = (TextView) holder.r...
/** * Creates a ViewHolder for a course detail field such as "effort" or "duration" and then adds * it to the top of the list. */
Creates a ViewHolder for a course detail field such as "effort" or "duration" and then adds it to the top of the list
createCourseDetailFieldViewHolder
{ "repo_name": "ahmedaljazzar/edx-app-android", "path": "OpenEdXMobile/src/main/java/org/edx/mobile/view/CourseDetailFragment.java", "license": "apache-2.0", "size": 15209 }
[ "android.view.LayoutInflater", "android.view.View", "android.widget.LinearLayout", "android.widget.TextView", "com.joanzapata.iconify.widget.IconImageView" ]
import android.view.LayoutInflater; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import com.joanzapata.iconify.widget.IconImageView;
import android.view.*; import android.widget.*; import com.joanzapata.iconify.widget.*;
[ "android.view", "android.widget", "com.joanzapata.iconify" ]
android.view; android.widget; com.joanzapata.iconify;
1,356,922
public RestResponse<Cohort> update(String cohorts, CohortUpdateParams data, ObjectMap params) throws ClientException { params = params != null ? params : new ObjectMap(); params.put("body", data); return execute("cohorts", cohorts, null, null, "update", params, POST, Cohort.class); }
RestResponse<Cohort> function(String cohorts, CohortUpdateParams data, ObjectMap params) throws ClientException { params = params != null ? params : new ObjectMap(); params.put("body", data); return execute(STR, cohorts, null, null, STR, params, POST, Cohort.class); }
/** * Update some cohort attributes. * @param cohorts Comma separated list of cohort ids. * @param data params. * @param params Map containing any of the following optional parameters. * study: Study [[user@]project:]study where study and project can be either the ID or UUID. * ...
Update some cohort attributes
update
{ "repo_name": "j-coll/opencga", "path": "opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java", "license": "apache-2.0", "size": 13256 }
[ "org.opencb.commons.datastore.core.ObjectMap", "org.opencb.opencga.client.exceptions.ClientException", "org.opencb.opencga.core.models.cohort.Cohort", "org.opencb.opencga.core.models.cohort.CohortUpdateParams", "org.opencb.opencga.core.response.RestResponse" ]
import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.opencga.client.exceptions.ClientException; import org.opencb.opencga.core.models.cohort.Cohort; import org.opencb.opencga.core.models.cohort.CohortUpdateParams; import org.opencb.opencga.core.response.RestResponse;
import org.opencb.commons.datastore.core.*; import org.opencb.opencga.client.exceptions.*; import org.opencb.opencga.core.models.cohort.*; import org.opencb.opencga.core.response.*;
[ "org.opencb.commons", "org.opencb.opencga" ]
org.opencb.commons; org.opencb.opencga;
1,879,064
Object get(OSecurityUser iUser, String queryText, int iLimit);
Object get(OSecurityUser iUser, String queryText, int iLimit);
/** * Looks up for query result in cache. */
Looks up for query result in cache
get
{ "repo_name": "wouterv/orientdb", "path": "core/src/main/java/com/orientechnologies/orient/core/cache/OCommandCache.java", "license": "apache-2.0", "size": 2522 }
[ "com.orientechnologies.orient.core.metadata.security.OSecurityUser" ]
import com.orientechnologies.orient.core.metadata.security.OSecurityUser;
import com.orientechnologies.orient.core.metadata.security.*;
[ "com.orientechnologies.orient" ]
com.orientechnologies.orient;
1,304,238
protected void initBeanWrapper(BeanWrapper bw) { bw.setConversionService(getConversionService()); registerCustomEditors(bw); }
void function(BeanWrapper bw) { bw.setConversionService(getConversionService()); registerCustomEditors(bw); }
/** * Initialize the given BeanWrapper with the custom editors registered * with this factory. To be called for BeanWrappers that will create * and populate bean instances. * <p>The default implementation delegates to {@link #registerCustomEditors}. * Can be overridden in subclasses. * @param bw the BeanWra...
Initialize the given BeanWrapper with the custom editors registered with this factory. To be called for BeanWrappers that will create and populate bean instances. The default implementation delegates to <code>#registerCustomEditors</code>. Can be overridden in subclasses
initBeanWrapper
{ "repo_name": "deathspeeder/class-guard", "path": "spring-framework-3.2.x/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java", "license": "gpl-2.0", "size": 63194 }
[ "org.springframework.beans.BeanWrapper" ]
import org.springframework.beans.BeanWrapper;
import org.springframework.beans.*;
[ "org.springframework.beans" ]
org.springframework.beans;
206,250
synchronized void setLocalCheckpointOfSafeCommit(long newCheckpoint) { if (newCheckpoint < this.localCheckpointOfSafeCommit) { throw new IllegalArgumentException("Local checkpoint can't go backwards; " + "new checkpoint [" + newCheckpoint + "]," + "current checkpoint [" + localCh...
synchronized void setLocalCheckpointOfSafeCommit(long newCheckpoint) { if (newCheckpoint < this.localCheckpointOfSafeCommit) { throw new IllegalArgumentException(STR + STR + newCheckpoint + "]," + STR + localCheckpointOfSafeCommit + "]"); } this.localCheckpointOfSafeCommit = newCheckpoint; } /** * Acquires a lock on so...
/** * Sets the local checkpoint of the current safe commit */
Sets the local checkpoint of the current safe commit
setLocalCheckpointOfSafeCommit
{ "repo_name": "uschindler/elasticsearch", "path": "server/src/main/java/org/elasticsearch/index/engine/SoftDeletesPolicy.java", "license": "apache-2.0", "size": 7940 }
[ "org.elasticsearch.index.translog.Translog" ]
import org.elasticsearch.index.translog.Translog;
import org.elasticsearch.index.translog.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
1,608,261
default FtpsEndpointConsumerBuilder idempotentKey( Expression idempotentKey) { setProperty("idempotentKey", idempotentKey); return this; }
default FtpsEndpointConsumerBuilder idempotentKey( Expression idempotentKey) { setProperty(STR, idempotentKey); return this; }
/** * To use a custom idempotent key. By default the absolute path of the * file is used. You can use the File Language, for example to use the * file name and file size, you can do: * idempotentKey=${file:name}-${file:size}. * * The option is a: <code>org.apache.c...
To use a custom idempotent key. By default the absolute path of the file is used. You can use the File Language, for example to use the file name and file size, you can do: idempotentKey=${file:name}-${file:size}. The option is a: <code>org.apache.camel.Expression</code> type. Group: filter
idempotentKey
{ "repo_name": "Fabryprog/camel", "path": "core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/FtpsEndpointBuilderFactory.java", "license": "apache-2.0", "size": 228885 }
[ "org.apache.camel.Expression" ]
import org.apache.camel.Expression;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
1,655,468
@Metadata(label = "advanced", description = "Whether to include all JMSXxxx properties when mapping from JMS to Camel Message." + " Setting this to true will include properties such as JMSXAppID, and JMSXUserID etc." + " Note: If you are using a custom headerFilte...
@Metadata(label = STR, description = STR + STR + STR) void function(boolean includeAllJMSXProperties) { getConfiguration().setIncludeAllJMSXProperties(includeAllJMSXProperties); }
/** * Whether to include all JMSXxxx properties when mapping from JMS to Camel Message. * Setting this to true will include properties such as JMSXAppID, and JMSXUserID etc. * Note: If you are using a custom headerFilterStrategy then this option does not apply. */
Whether to include all JMSXxxx properties when mapping from JMS to Camel Message. Setting this to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using a custom headerFilterStrategy then this option does not apply
setIncludeAllJMSXProperties
{ "repo_name": "gilfernandes/camel", "path": "components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java", "license": "apache-2.0", "size": 73583 }
[ "org.apache.camel.spi.Metadata" ]
import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
859,551
public static void removeAlarm(int Id) { Log.d(TAG, "Removing alarm with id: " + Id); AlarmDB.getInstance().deleteAlarm(Id); }
static void function(int Id) { Log.d(TAG, STR + Id); AlarmDB.getInstance().deleteAlarm(Id); }
/** * Removes the alarm from the database that has the given ID. If the database does not have an * alarm with the given ID nothing is removed. * * @param Id The ID of the alarm to remove. */
Removes the alarm from the database that has the given ID. If the database does not have an alarm with the given ID nothing is removed
removeAlarm
{ "repo_name": "AlexanderHederstaf/groupalarm", "path": "GroupAlarm/app/src/main/java/com/groupalarm/asijge/groupalarm/AlarmManaging/AlarmHelper.java", "license": "gpl-2.0", "size": 13370 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,511,258
@Override public JavaClass findClass(final String className) { final SoftReference<JavaClass> ref = loadedClasses.get(className); if (ref == null) { return null; } return ref.get(); }
JavaClass function(final String className) { final SoftReference<JavaClass> ref = loadedClasses.get(className); if (ref == null) { return null; } return ref.get(); }
/** * Find an already defined (cached) JavaClass object by name. */
Find an already defined (cached) JavaClass object by name
findClass
{ "repo_name": "apache/commons-bcel", "path": "src/main/java/org/apache/bcel/util/MemorySensitiveClassPathRepository.java", "license": "apache-2.0", "size": 2691 }
[ "java.lang.ref.SoftReference", "org.apache.bcel.classfile.JavaClass" ]
import java.lang.ref.SoftReference; import org.apache.bcel.classfile.JavaClass;
import java.lang.ref.*; import org.apache.bcel.classfile.*;
[ "java.lang", "org.apache.bcel" ]
java.lang; org.apache.bcel;
2,309,746
this.segment = new Segment(new Vector2(-1.5, 1.0), new Vector2(1.5, -1.0)); this.capsule = new Capsule(1.0, 0.5); this.sapI.clear(); this.sapBF.clear(); this.sapT.clear(); this.dynT.clear(); }
this.segment = new Segment(new Vector2(-1.5, 1.0), new Vector2(1.5, -1.0)); this.capsule = new Capsule(1.0, 0.5); this.sapI.clear(); this.sapBF.clear(); this.sapT.clear(); this.dynT.clear(); }
/** * Sets up the test. */
Sets up the test
setup
{ "repo_name": "diego4522/dyn4j", "path": "junit/org/dyn4j/collision/SegmentCapsuleTest.java", "license": "bsd-3-clause", "size": 17191 }
[ "org.dyn4j.geometry.Capsule", "org.dyn4j.geometry.Segment", "org.dyn4j.geometry.Vector2" ]
import org.dyn4j.geometry.Capsule; import org.dyn4j.geometry.Segment; import org.dyn4j.geometry.Vector2;
import org.dyn4j.geometry.*;
[ "org.dyn4j.geometry" ]
org.dyn4j.geometry;
2,454,270
protected void createContextMenuFor(StructuredViewer viewer) { MenuManager contextMenu = new MenuManager("#PopUp"); contextMenu.add(new Separator("additions")); contextMenu.setRemoveAllWhenShown(true); contextMenu.addMenuListener(this); Menu menu= contextMenu.createContextMenu(viewer.getControl()); ...
void function(StructuredViewer viewer) { MenuManager contextMenu = new MenuManager(STR); contextMenu.add(new Separator(STR)); contextMenu.setRemoveAllWhenShown(true); contextMenu.addMenuListener(this); Menu menu= contextMenu.createContextMenu(viewer.getControl()); viewer.getControl().setMenu(menu); getSite().registerCo...
/** * This creates a context menu for the viewer and adds a listener as well registering the menu for extension. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
createContextMenuFor
{ "repo_name": "FTSRG/mondo-collab-framework", "path": "archive/workspaceTracker/VA/traceModel.editor/src/eu/mondo/collaboration/operationtracemodel/presentation/OperationtracemodelEditor.java", "license": "epl-1.0", "size": 56226 }
[ "org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter", "org.eclipse.emf.edit.ui.dnd.LocalTransfer", "org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter", "org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider", "org.eclipse.jface.action.MenuManager", "org.eclipse.jface.action.Separator", "org.e...
import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter; import org.eclipse.emf.edit.ui.dnd.LocalTransfer; import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter; import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider; import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.action.Sep...
import org.eclipse.emf.edit.ui.dnd.*; import org.eclipse.emf.edit.ui.provider.*; import org.eclipse.jface.action.*; import org.eclipse.jface.util.*; import org.eclipse.jface.viewers.*; import org.eclipse.swt.dnd.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.emf", "org.eclipse.jface", "org.eclipse.swt" ]
org.eclipse.emf; org.eclipse.jface; org.eclipse.swt;
2,228,168
public boolean putImage(String theFolder, String theImageName, Bitmap theBitmap) { if (theFolder == null || theImageName == null || theBitmap == null) return false; this.DEFAULT_APP_IMAGEDATA_DIRECTORY = theFolder; String mFullPath = setupFullPath(theImageName); if (!mF...
boolean function(String theFolder, String theImageName, Bitmap theBitmap) { if (theFolder == null theImageName == null theBitmap == null) return false; this.DEFAULT_APP_IMAGEDATA_DIRECTORY = theFolder; String mFullPath = setupFullPath(theImageName); if (!mFullPath.equals("")) { lastImagePath = mFullPath; return saveBit...
/** * Saves 'theBitmap' into folder 'theFolder' with the name 'theImageName' * @param theFolder the folder path dir you want to save it to e.g "DropBox/WorkImages" * @param theImageName the name you want to assign to the image file e.g "MeAtLunch.png" * @param theBitmap the image you want to save as...
Saves 'theBitmap' into folder 'theFolder' with the name 'theImageName'
putImage
{ "repo_name": "Acidburn0zzz/org.numixproject.hermes", "path": "hermes/src/main/java/org/numixproject/hermes/utils/TinyDB.java", "license": "gpl-2.0", "size": 16320 }
[ "android.graphics.Bitmap" ]
import android.graphics.Bitmap;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
495,251
public BulkRequestBuilder add(DeleteRequest request) { super.request.add(request); return this; }
BulkRequestBuilder function(DeleteRequest request) { super.request.add(request); return this; }
/** * Adds an {@link DeleteRequest} to the list of actions to execute. */
Adds an <code>DeleteRequest</code> to the list of actions to execute
add
{ "repo_name": "Flipkart/elasticsearch", "path": "src/main/java/org/elasticsearch/action/bulk/BulkRequestBuilder.java", "license": "apache-2.0", "size": 5240 }
[ "org.elasticsearch.action.delete.DeleteRequest" ]
import org.elasticsearch.action.delete.DeleteRequest;
import org.elasticsearch.action.delete.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
294,548
public Object execute(final Map<Object, Object> iArgs) { if (role == null) throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet"); role.grant(resource, privilege); role.save(); return role; }
Object function(final Map<Object, Object> iArgs) { if (role == null) throw new OCommandExecutionException(STR); role.grant(resource, privilege); role.save(); return role; }
/** * Execute the GRANT. */
Execute the GRANT
execute
{ "repo_name": "delebash/orientdb-parent", "path": "core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLGrant.java", "license": "apache-2.0", "size": 3561 }
[ "com.orientechnologies.orient.core.exception.OCommandExecutionException", "java.util.Map" ]
import com.orientechnologies.orient.core.exception.OCommandExecutionException; import java.util.Map;
import com.orientechnologies.orient.core.exception.*; import java.util.*;
[ "com.orientechnologies.orient", "java.util" ]
com.orientechnologies.orient; java.util;
1,439,182
public static String getServerConfigurationProperty(String propertyName) { try { ServerConfigurationService serverConfig = CarbonUIServiceComponent.getServerConfiguration(); return serverConfig.getFirstProperty(propertyName); } catch (Exception e) { String msg = "...
static String function(String propertyName) { try { ServerConfigurationService serverConfig = CarbonUIServiceComponent.getServerConfiguration(); return serverConfig.getFirstProperty(propertyName); } catch (Exception e) { String msg = STR; log.error(msg, e); } return null; }
/** * Get a ServerConfiguration Property * * @param propertyName Name of the property * @return the property */
Get a ServerConfiguration Property
getServerConfigurationProperty
{ "repo_name": "lasinducharith/stratos", "path": "dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUIUtil.java", "license": "apache-2.0", "size": 17839 }
[ "org.wso2.carbon.base.api.ServerConfigurationService", "org.wso2.carbon.ui.internal.CarbonUIServiceComponent" ]
import org.wso2.carbon.base.api.ServerConfigurationService; import org.wso2.carbon.ui.internal.CarbonUIServiceComponent;
import org.wso2.carbon.base.api.*; import org.wso2.carbon.ui.internal.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
2,465,098
public void parseConstructorArgElements(Element beanEle, BeanDefinition bd) { NodeList nl = beanEle.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { Node node = nl.item(i); if (isCandidateElement(node) && nodeNameEquals(node, CONSTRUCTOR_ARG_ELEMENT)) { parseConstructorArgElement((Element) n...
void function(Element beanEle, BeanDefinition bd) { NodeList nl = beanEle.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { Node node = nl.item(i); if (isCandidateElement(node) && nodeNameEquals(node, CONSTRUCTOR_ARG_ELEMENT)) { parseConstructorArgElement((Element) node, bd); } } }
/** * Parse constructor-arg sub-elements of the given bean element. */
Parse constructor-arg sub-elements of the given bean element
parseConstructorArgElements
{ "repo_name": "sunpy1106/SpringBeanLifeCycle", "path": "src/main/java/org/springframework/beans/factory/xml/BeanDefinitionParserDelegate.java", "license": "apache-2.0", "size": 55293 }
[ "org.springframework.beans.factory.config.BeanDefinition", "org.w3c.dom.Element", "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import org.springframework.beans.factory.config.BeanDefinition; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import org.springframework.beans.factory.config.*; import org.w3c.dom.*;
[ "org.springframework.beans", "org.w3c.dom" ]
org.springframework.beans; org.w3c.dom;
2,194,583
private void addJobToTopOfList(Job job, List<JobFace> faces) { JobFace newFace = new JobFace(); newFace.setJob(job); // add to the top of the list faces.add(0, newFace); // update the current display updateDisplay(); }
void function(Job job, List<JobFace> faces) { JobFace newFace = new JobFace(); newFace.setJob(job); faces.add(0, newFace); updateDisplay(); }
/** * adds a new JobFace to the top of the given list * * @param job * @param faces */
adds a new JobFace to the top of the given list
addJobToTopOfList
{ "repo_name": "HerbertJordan/JimCat", "path": "src/org/jimcat/gui/jobmanager/JobList.java", "license": "gpl-2.0", "size": 6874 }
[ "java.util.List", "org.jimcat.services.jobs.Job" ]
import java.util.List; import org.jimcat.services.jobs.Job;
import java.util.*; import org.jimcat.services.jobs.*;
[ "java.util", "org.jimcat.services" ]
java.util; org.jimcat.services;
556,643
@Override public Set<String> keySet() { return this.map.keySet(); }
Set<String> function() { return this.map.keySet(); }
/** * Get a set of keys of the JSONObject. Modifying this key Set will also modify the JSONObject. Use with caution. * * @return A keySet. * @see Map#keySet() */
Get a set of keys of the JSONObject. Modifying this key Set will also modify the JSONObject. Use with caution
keySet
{ "repo_name": "ttulka/thistledb", "path": "tson/src/main/java/cz/net21/ttulka/thistledb/tson/TSONObject.java", "license": "apache-2.0", "size": 17583 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,593,506
private HashSet addRegInfoLocators(RegistrationInfo regInfo, LookupLocator[] locators) { HashSet newLocSet = new HashSet(1); for(int i=0;i<locators.length;i++) { newLocSet.add(locators[i]); }//en...
HashSet function(RegistrationInfo regInfo, LookupLocator[] locators) { HashSet newLocSet = new HashSet(1); for(int i=0;i<locators.length;i++) { newLocSet.add(locators[i]); } if( newLocSet.size() > 0 ) { (regInfo.locators).addAll(newLocSet); } return newLocSet; }
/** Augments the registration's managed set of locators with the new * locators. * * @return the set of new locators added to regInfo's desired locators */
Augments the registration's managed set of locators with the new locators
addRegInfoLocators
{ "repo_name": "apache/river", "path": "src/com/sun/jini/fiddler/FiddlerImpl.java", "license": "apache-2.0", "size": 419910 }
[ "java.util.HashSet", "net.jini.core.discovery.LookupLocator" ]
import java.util.HashSet; import net.jini.core.discovery.LookupLocator;
import java.util.*; import net.jini.core.discovery.*;
[ "java.util", "net.jini.core" ]
java.util; net.jini.core;
2,415,264
public Snippet getSnippet(Integer snippetId) throws GitLabApiException { return getSnippet(snippetId, false); }
Snippet function(Integer snippetId) throws GitLabApiException { return getSnippet(snippetId, false); }
/** * Get a specific Snippet. * * @param snippetId the snippet ID to get * @return the snippet with the given id * @throws GitLabApiException if any exception occurs */
Get a specific Snippet
getSnippet
{ "repo_name": "gmessner/gitlab4j-api", "path": "src/main/java/org/gitlab4j/api/SnippetsApi.java", "license": "mit", "size": 7643 }
[ "org.gitlab4j.api.models.Snippet" ]
import org.gitlab4j.api.models.Snippet;
import org.gitlab4j.api.models.*;
[ "org.gitlab4j.api" ]
org.gitlab4j.api;
2,394,124
@SuppressWarnings("fallthrough") static long readVLong(final ChannelBuffer buf) { byte b = buf.readByte(); // Unless the first half of the first byte starts with 0xb1000, we're // dealing with a single-byte value. if ((b & 0xF0) != 0x80) { // 0xF0 = 0b11110000, 0x80 = 0b10000000 return b; ...
@SuppressWarnings(STR) static long readVLong(final ChannelBuffer buf) { byte b = buf.readByte(); if ((b & 0xF0) != 0x80) { return b; } final boolean negate = (b & 0x08) == 0; long result = 0; switch (b & 0x07) { case 0x00: result = buf.readLong(); break; case 0x01: result = buf.readUnsignedInt(); result <<= 32; result ...
/** * Reads a variable-length {@link Long} value. * @param buf The buffer to read from. * @return The value read. */
Reads a variable-length <code>Long</code> value
readVLong
{ "repo_name": "yuzhu712/asynchbase", "path": "src/HBaseRpc.java", "license": "bsd-3-clause", "size": 52138 }
[ "org.jboss.netty.buffer.ChannelBuffer" ]
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.*;
[ "org.jboss.netty" ]
org.jboss.netty;
308,072
private void handleMultiScalesType(ChartOptions base, NativeObject chartOptions, NativeObject scaleOptions) { // checks if scales object is present if (NativeObjectUtils.hasProperty(chartOptions, Property.SCALES.value())) { // if here, the chart has got 2 or more scales // gets the native object for sc...
void function(ChartOptions base, NativeObject chartOptions, NativeObject scaleOptions) { if (NativeObjectUtils.hasProperty(chartOptions, Property.SCALES.value())) { NativeObject scales = NativeObjectUtils.getObjectProperty(chartOptions, Property.SCALES.value()); applyDefaultsOnScales(base.getScales().getAxes(), scales,...
/** * Manages the merge of options for chart with multiple scales. * * @param base base chart options * @param chartOptions default chart options * @param scaleOptions default scale options */
Manages the merge of options for chart with multiple scales
handleMultiScalesType
{ "repo_name": "pepstock-org/Charba", "path": "src/org/pepstock/charba/client/commons/Merger.java", "license": "apache-2.0", "size": 15877 }
[ "org.pepstock.charba.client.ChartOptions" ]
import org.pepstock.charba.client.ChartOptions;
import org.pepstock.charba.client.*;
[ "org.pepstock.charba" ]
org.pepstock.charba;
1,482,203
public synchronized BulkUpload createBulkUploaderTask(MultipartFile file) throws ValidationException{ if(bulkUploaderTask != null){ throw new ValidationException(ValidationException.Reason.ONLY_ONE_BULK_UPLOAD_AT_A_TIME); } BulkUpload bulkUpload = bulkUploadRepository.insert(new BulkUpload(new Date())...
synchronized BulkUpload function(MultipartFile file) throws ValidationException{ if(bulkUploaderTask != null){ throw new ValidationException(ValidationException.Reason.ONLY_ONE_BULK_UPLOAD_AT_A_TIME); } BulkUpload bulkUpload = bulkUploadRepository.insert(new BulkUpload(new Date())); bulkUploaderTask = application.getBe...
/** * Creates a BulkUploaderTask and initializes with given file. * @param file */
Creates a BulkUploaderTask and initializes with given file
createBulkUploaderTask
{ "repo_name": "jsNikos/tanners", "path": "src/main/java/server/business/MiningDataService.java", "license": "mit", "size": 6756 }
[ "java.util.Date", "org.springframework.web.multipart.MultipartFile" ]
import java.util.Date; import org.springframework.web.multipart.MultipartFile;
import java.util.*; import org.springframework.web.multipart.*;
[ "java.util", "org.springframework.web" ]
java.util; org.springframework.web;
441,071
public void restoreWindow(String name, String key) { Object obj = getObject(key); if (obj instanceof Window && getProperties(name) != null) { Window wnd = (Window) obj; try { Rectangle rect = getRectangleProperty(name, key); if (rect != null) { Dimension screen = Toolkit.getDefaultToolkit().ge...
void function(String name, String key) { Object obj = getObject(key); if (obj instanceof Window && getProperties(name) != null) { Window wnd = (Window) obj; try { Rectangle rect = getRectangleProperty(name, key); if (rect != null) { Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); if (rect.getX() > scree...
/** * Restores the window bounds for the window found in objects under * <code>key</code> from the rectangle stored in the properties registered * under <code>name</code> for the <code>key</code> property. This * implementation assumes that the <code>key</code> property is a * rectangle, ie. consists of 4 ent...
Restores the window bounds for the window found in objects under <code>key</code> from the rectangle stored in the properties registered under <code>name</code> for the <code>key</code> property. This implementation assumes that the <code>key</code> property is a rectangle, ie. consists of 4 entries in the file
restoreWindow
{ "repo_name": "harryho/demo-r-java-statistics-prototype", "path": "rm/rm/src/com/rm/app/ui/tool/RMAppDocumentBuilder.java", "license": "mit", "size": 17393 }
[ "java.awt.Dimension", "java.awt.Rectangle", "java.awt.Toolkit", "java.awt.Window" ]
import java.awt.Dimension; import java.awt.Rectangle; import java.awt.Toolkit; import java.awt.Window;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,449,061
EReference getPTUC_RsDlTmms();
EReference getPTUC_RsDlTmms();
/** * Returns the meta object for the reference '{@link gluemodel.substationStandard.LNNodes.LNGroupP.PTUC#getRsDlTmms <em>Rs Dl Tmms</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Rs Dl Tmms</em>'. * @see gluemodel.substationStandard.LNNodes.LNGroup...
Returns the meta object for the reference '<code>gluemodel.substationStandard.LNNodes.LNGroupP.PTUC#getRsDlTmms Rs Dl Tmms</code>'.
getPTUC_RsDlTmms
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/substationStandard/LNNodes/LNGroupP/LNGroupPPackage.java", "license": "mit", "size": 291175 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
555,212
@Test public void testIdentity() { CategoryListParams clParams1 = new CategoryListParams(); // Assert identity is correct - a CategoryListParams equals itself. assertEquals("A CategoryListParams object does not equal itself.", clParams1, clParams1); // For completeness, the object's hashcode...
void function() { CategoryListParams clParams1 = new CategoryListParams(); assertEquals(STR, clParams1, clParams1); assertEquals(STR, clParams1.hashCode(), clParams1.hashCode()); }
/** * Test that the {@link CategoryListParams#hashCode()} and * {@link CategoryListParams#equals(Object)} are consistent. */
Test that the <code>CategoryListParams#hashCode()</code> and <code>CategoryListParams#equals(Object)</code> are consistent
testIdentity
{ "repo_name": "fnp/pylucene", "path": "lucene-java-3.5.0/lucene/contrib/facet/src/test/org/apache/lucene/facet/index/params/CategoryListParamsTest.java", "license": "apache-2.0", "size": 3683 }
[ "org.apache.lucene.facet.index.params.CategoryListParams" ]
import org.apache.lucene.facet.index.params.CategoryListParams;
import org.apache.lucene.facet.index.params.*;
[ "org.apache.lucene" ]
org.apache.lucene;
75,831
@Override @Generated(value = "com.sun.tools.xjc.Driver", date = "2014-09-19T03:09:21-06:00", comment = "JAXB RI v2.2.6") public String toString() { return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.MULTI_LINE_STYLE); } }
@Generated(value = STR, date = STR, comment = STR) String function() { return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.MULTI_LINE_STYLE); } }
/** * Generates a String representation of the contents of this type. * This is an extension method, produced by the 'ts' xjc plugin * */
Generates a String representation of the contents of this type. This is an extension method, produced by the 'ts' xjc plugin
toString
{ "repo_name": "angecab10/travelport-uapi-tutorial", "path": "src/com/travelport/schema/common_v28_0/TransactionType.java", "license": "gpl-3.0", "size": 18095 }
[ "javax.annotation.Generated", "org.apache.commons.lang.builder.ToStringBuilder", "org.apache.cxf.xjc.runtime.JAXBToStringStyle" ]
import javax.annotation.Generated; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.cxf.xjc.runtime.JAXBToStringStyle;
import javax.annotation.*; import org.apache.commons.lang.builder.*; import org.apache.cxf.xjc.runtime.*;
[ "javax.annotation", "org.apache.commons", "org.apache.cxf" ]
javax.annotation; org.apache.commons; org.apache.cxf;
935,399
private void validateConfig(final Map<String, Object> conf) { Preconditions.checkNotNull(conf.get(Config.STORM_ZOOKEEPER_SESSION_TIMEOUT), "%s cannot be null", Config.STORM_ZOOKEEPER_SESSION_TIMEOUT); Preconditions.checkNotNull(conf.get(Config.STORM_ZOOKEEPER_CONNECTION_TIMEOUT), ...
void function(final Map<String, Object> conf) { Preconditions.checkNotNull(conf.get(Config.STORM_ZOOKEEPER_SESSION_TIMEOUT), STR, Config.STORM_ZOOKEEPER_SESSION_TIMEOUT); Preconditions.checkNotNull(conf.get(Config.STORM_ZOOKEEPER_CONNECTION_TIMEOUT), STR, Config.STORM_ZOOKEEPER_CONNECTION_TIMEOUT); Preconditions.checkN...
/** * Validate required parameters in the input configuration Map * @param conf */
Validate required parameters in the input configuration Map
validateConfig
{ "repo_name": "wangcy6/storm_app", "path": "frame/storm-master/external/storm-kafka/src/jvm/org/apache/storm/kafka/DynamicBrokersReader.java", "license": "apache-2.0", "size": 8372 }
[ "com.google.common.base.Preconditions", "java.util.Map", "org.apache.storm.Config" ]
import com.google.common.base.Preconditions; import java.util.Map; import org.apache.storm.Config;
import com.google.common.base.*; import java.util.*; import org.apache.storm.*;
[ "com.google.common", "java.util", "org.apache.storm" ]
com.google.common; java.util; org.apache.storm;
705,745
default Set<RoleGrant> listAllRoleGrants(ConnectorSession session, Optional<Set<String>> roles, Optional<Set<String>> grantees, OptionalLong limit) { throw new PrestoException(NOT_SUPPORTED, "This connector does not support roles"); }
default Set<RoleGrant> listAllRoleGrants(ConnectorSession session, Optional<Set<String>> roles, Optional<Set<String>> grantees, OptionalLong limit) { throw new PrestoException(NOT_SUPPORTED, STR); }
/** * List all role grants in the specified catalog, * optionally filtered by passed role, grantee, and limit predicates. */
List all role grants in the specified catalog, optionally filtered by passed role, grantee, and limit predicates
listAllRoleGrants
{ "repo_name": "martint/presto", "path": "presto-spi/src/main/java/io/prestosql/spi/connector/ConnectorMetadata.java", "license": "apache-2.0", "size": 39854 }
[ "io.prestosql.spi.PrestoException", "io.prestosql.spi.security.RoleGrant", "java.util.Optional", "java.util.OptionalLong", "java.util.Set" ]
import io.prestosql.spi.PrestoException; import io.prestosql.spi.security.RoleGrant; import java.util.Optional; import java.util.OptionalLong; import java.util.Set;
import io.prestosql.spi.*; import io.prestosql.spi.security.*; import java.util.*;
[ "io.prestosql.spi", "java.util" ]
io.prestosql.spi; java.util;
692,041
public CountDownLatch updateSegmentAsync(com.mozu.api.contracts.customer.CustomerSegment segment, Integer id, AsyncCallback<com.mozu.api.contracts.customer.CustomerSegment> callback) throws Exception { return updateSegmentAsync( segment, id, null, callback); }
CountDownLatch function(com.mozu.api.contracts.customer.CustomerSegment segment, Integer id, AsyncCallback<com.mozu.api.contracts.customer.CustomerSegment> callback) throws Exception { return updateSegmentAsync( segment, id, null, callback); }
/** * * <p><pre><code> * CustomerSegment customersegment = new CustomerSegment(); * CountDownLatch latch = customersegment.updateSegment( segment, id, callback ); * latch.await() * </code></pre></p> * @param id Unique identifier of the customer segment to retrieve. * @param callback callback ha...
<code><code> CustomerSegment customersegment = new CustomerSegment(); CountDownLatch latch = customersegment.updateSegment( segment, id, callback ); latch.await() * </code></code>
updateSegmentAsync
{ "repo_name": "Mozu/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/commerce/customer/CustomerSegmentResource.java", "license": "mit", "size": 20915 }
[ "com.mozu.api.AsyncCallback", "java.util.concurrent.CountDownLatch" ]
import com.mozu.api.AsyncCallback; import java.util.concurrent.CountDownLatch;
import com.mozu.api.*; import java.util.concurrent.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
1,024,587
public List<FeedbackSessionAttributes> getSoftDeletedFeedbackSessionsListForInstructors( List<InstructorAttributes> instructorList) { assert instructorList != null; return feedbackSessionsLogic.getSoftDeletedFeedbackSessionsListForInstructors(instructorList); }
List<FeedbackSessionAttributes> function( List<InstructorAttributes> instructorList) { assert instructorList != null; return feedbackSessionsLogic.getSoftDeletedFeedbackSessionsListForInstructors(instructorList); }
/** * Returns a {@code List} of feedback sessions in the Recycle Bin for the instructors. * <br> * Omits sessions if the corresponding courses are archived or in Recycle Bin */
Returns a List of feedback sessions in the Recycle Bin for the instructors. Omits sessions if the corresponding courses are archived or in Recycle Bin
getSoftDeletedFeedbackSessionsListForInstructors
{ "repo_name": "TEAMMATES/teammates", "path": "src/main/java/teammates/logic/api/Logic.java", "license": "gpl-2.0", "size": 53736 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,144,030
@Override public void likeMeme(MemeModel memeModel, OnLikeUnlikeMemeListener listener) { if (mDelegate != null) { mDelegate.likeMeme(memeModel, listener); return; } if (usingToken == null) { listener.onFailure(404 , "You need to login first and set the token parameters"); ...
void function(MemeModel memeModel, OnLikeUnlikeMemeListener listener) { if (mDelegate != null) { mDelegate.likeMeme(memeModel, listener); return; } if (usingToken == null) { listener.onFailure(404 , STR); return; } memeApi.likeMemeByIdAndToken(memeModel.getMemeId() , usingToken.getId()) .subscribeOn(Schedulers.io()) .o...
/** * Like some meme * Remember , before calling this function , you need to login first * Hence you should pass in token parameter before calling this function * @param memeModel The meme model to be liked * @param listener Result callback */
Like some meme Remember , before calling this function , you need to login first Hence you should pass in token parameter before calling this function
likeMeme
{ "repo_name": "zhengqi-big-god-take-me-fly/Tumoji-Android", "path": "app/src/main/java/com/tumoji/tumoji/data/meme/repository/MemeRepository.java", "license": "gpl-3.0", "size": 10232 }
[ "com.tumoji.tumoji.data.meme.model.MemeModel" ]
import com.tumoji.tumoji.data.meme.model.MemeModel;
import com.tumoji.tumoji.data.meme.model.*;
[ "com.tumoji.tumoji" ]
com.tumoji.tumoji;
2,800,163
void attemptDeadServiceRecovery(Exception e) { Log.e(TAG, "NFC Adapter Extras dead - attempting to recover"); sAdapter.attemptDeadServiceRecovery(e); initService(); }
void attemptDeadServiceRecovery(Exception e) { Log.e(TAG, STR); sAdapter.attemptDeadServiceRecovery(e); initService(); }
/** * NFC service dead - attempt best effort recovery */
NFC service dead - attempt best effort recovery
attemptDeadServiceRecovery
{ "repo_name": "lynnlyc/for-honeynet-reviewers", "path": "CallbackDroid/android-environment/src/base/nfc-extras/java/com/android/nfc_extras/NfcAdapterExtras.java", "license": "gpl-3.0", "size": 8105 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
755,404
public static Form getTypeForm(final Type _type) throws EFapsException { return _type.getTypeForm(); }
static Form function(final Type _type) throws EFapsException { return _type.getTypeForm(); }
/** * Returns for given type the type form. If no type form is defined for the * type, it is searched if for parent type a menu is defined. * * @param _type type for which the type form is searched * @return type form for given type if found; otherwise <code>null</code>. * @throws EFapsExc...
Returns for given type the type form. If no type form is defined for the type, it is searched if for parent type a menu is defined
getTypeForm
{ "repo_name": "eFaps/eFaps-Kernel", "path": "src/main/java/org/efaps/admin/ui/Form.java", "license": "apache-2.0", "size": 3345 }
[ "org.efaps.admin.datamodel.Type", "org.efaps.util.EFapsException" ]
import org.efaps.admin.datamodel.Type; import org.efaps.util.EFapsException;
import org.efaps.admin.datamodel.*; import org.efaps.util.*;
[ "org.efaps.admin", "org.efaps.util" ]
org.efaps.admin; org.efaps.util;
592,990
public Observable<ServiceResponseWithHeaders<ProductInner, LROsPutNoHeaderInRetryHeadersInner>> putNoHeaderInRetryAsync() { final ProductInner product = null; Observable<Response<ResponseBody>> observable = service.putNoHeaderInRetry(product, this.client.acceptLanguage(), this.client.userAgent()); ...
Observable<ServiceResponseWithHeaders<ProductInner, LROsPutNoHeaderInRetryHeadersInner>> function() { final ProductInner product = null; Observable<Response<ResponseBody>> observable = service.putNoHeaderInRetry(product, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatc...
/** * Long running put request, service returns a 202 to the initial request with location header. Subsequent calls to operation status do not contain location header. * * @return the observable for the request */
Long running put request, service returns a 202 to the initial request with location header. Subsequent calls to operation status do not contain location header
putNoHeaderInRetryAsync
{ "repo_name": "haocs/autorest", "path": "src/generator/AutoRest.Java.Azure.Fluent.Tests/src/main/java/fixtures/lro/implementation/LROsInner.java", "license": "mit", "size": 313853 }
[ "com.google.common.reflect.TypeToken", "com.microsoft.rest.ServiceResponseWithHeaders" ]
import com.google.common.reflect.TypeToken; import com.microsoft.rest.ServiceResponseWithHeaders;
import com.google.common.reflect.*; import com.microsoft.rest.*;
[ "com.google.common", "com.microsoft.rest" ]
com.google.common; com.microsoft.rest;
2,482,463
private static String processPlaceholder(String placeholder) { String newValue = placeholder; Matcher matcher = PLACEHOLDER_PATTERN.matcher(placeholder); if (matcher.find()) { String key = matcher.group(1).trim(); String value = matcher.group(2).trim(); sw...
static String function(String placeholder) { String newValue = placeholder; Matcher matcher = PLACEHOLDER_PATTERN.matcher(placeholder); if (matcher.find()) { String key = matcher.group(1).trim(); String value = matcher.group(2).trim(); switch (key) { case "env": newValue = System.getenv(value); if (newValue == null) { ...
/** * This method returns the Environment, System, Secure value which correspond to the given placeholder * * @param placeholder Placeholder that needs to be replaced * @return New value which corresponds to placeholder */
This method returns the Environment, System, Secure value which correspond to the given placeholder
processPlaceholder
{ "repo_name": "Shan1024/DeploymentConfig", "path": "core/src/main/java/org/wso2/carbon/kernel/utils/ConfigUtil.java", "license": "mit", "size": 28452 }
[ "java.util.regex.Matcher" ]
import java.util.regex.Matcher;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,572,347
public static boolean equalsIgnoreCase(final CharSequence left, final int leftOffset, final int leftLength, final CharSequence right, final int rightOffset, final int rightLength) { if (leftLength == rightLength) { for (int i = 0; i < rightLength; i+...
static boolean function(final CharSequence left, final int leftOffset, final int leftLength, final CharSequence right, final int rightOffset, final int rightLength) { if (leftLength == rightLength) { for (int i = 0; i < rightLength; i++) { if (toLowerCase(left.charAt(i + leftOffset)) != toLowerCase(right.charAt(i + rig...
/** * Returns true if the specified section of the left CharSequence equals, ignoring case, the specified section of * the right CharSequence. * * @param left the left CharSequence * @param leftOffset start index in the left CharSequence * @param leftLength length of the section in the lef...
Returns true if the specified section of the left CharSequence equals, ignoring case, the specified section of the right CharSequence
equalsIgnoreCase
{ "repo_name": "codescale/logging-log4j2", "path": "log4j-api/src/main/java/org/apache/logging/log4j/util/StringBuilders.java", "license": "apache-2.0", "size": 6823 }
[ "java.lang.Character" ]
import java.lang.Character;
import java.lang.*;
[ "java.lang" ]
java.lang;
947,875
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { FilterInvocation fi = new FilterInvocation(request, response, chain); invoke(fi); }
void function(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { FilterInvocation fi = new FilterInvocation(request, response, chain); invoke(fi); }
/** * Method that is actually called by the filter chain. Simply delegates to the * {@link #invoke(FilterInvocation)} method. * * @param request the servlet request * @param response the servlet response * @param chain the filter chain * * @throws IOException if the filter chain fails * @throws Servle...
Method that is actually called by the filter chain. Simply delegates to the <code>#invoke(FilterInvocation)</code> method
doFilter
{ "repo_name": "eddumelendez/spring-security", "path": "web/src/main/java/org/springframework/security/web/access/intercept/FilterSecurityInterceptor.java", "license": "apache-2.0", "size": 5349 }
[ "java.io.IOException", "javax.servlet.FilterChain", "javax.servlet.ServletException", "javax.servlet.ServletRequest", "javax.servlet.ServletResponse", "org.springframework.security.web.FilterInvocation" ]
import java.io.IOException; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import org.springframework.security.web.FilterInvocation;
import java.io.*; import javax.servlet.*; import org.springframework.security.web.*;
[ "java.io", "javax.servlet", "org.springframework.security" ]
java.io; javax.servlet; org.springframework.security;
1,184,460
@Override public Function loadFunction(FunctionDefinition functionDefinition) { if (!"contains".equals(functionDefinition.getName()) || "KR-SAP".equals(functionDefinition.getNamespace())) { throw new IllegalArgumentException("oops, you have the wrong type service, I can't load this function"...
Function function(FunctionDefinition functionDefinition) { if (!STR.equals(functionDefinition.getName()) STR.equals(functionDefinition.getNamespace())) { throw new IllegalArgumentException(STR); }
/** * Loads the Function object that the KRMS engine can execute during rule evaluation * * @param functionDefinition {@link FunctionDefinition} to create the {@link Function} from. * @return */
Loads the Function object that the KRMS engine can execute during rule evaluation
loadFunction
{ "repo_name": "ricepanda/rice-git3", "path": "rice-middleware/sampleapp/src/main/java/edu/sampleu/krms/impl/ContainsOperator.java", "license": "apache-2.0", "size": 8084 }
[ "org.kuali.rice.krms.api.repository.function.FunctionDefinition", "org.kuali.rice.krms.framework.engine.Function" ]
import org.kuali.rice.krms.api.repository.function.FunctionDefinition; import org.kuali.rice.krms.framework.engine.Function;
import org.kuali.rice.krms.api.repository.function.*; import org.kuali.rice.krms.framework.engine.*;
[ "org.kuali.rice" ]
org.kuali.rice;
2,277,444
protected MockEndpoint mockDirect(final String uri, final String routeId) throws Exception { // precaution: check that URI can be mocked by just providing the other side: org.junit.Assert.assertThat(uri, anyOf( CoreMatchers.startsWith("direct:"), CoreMatchers.startsWi...
MockEndpoint function(final String uri, final String routeId) throws Exception { org.junit.Assert.assertThat(uri, anyOf( CoreMatchers.startsWith(STR), CoreMatchers.startsWith(STR), CoreMatchers.startsWith("seda:"), CoreMatchers.startsWith("vm:")));
/** * Same as {@link #mockDirect(String)}, except with route ID to be able to override an existing route with the mock. * * @param uri the URI a new mock should consume from * @param routeId the route ID for the new mock route * (existing route with this ID will be overridden...
Same as <code>#mockDirect(String)</code>, except with route ID to be able to override an existing route with the mock
mockDirect
{ "repo_name": "OpenWiseSolutions/openhub-framework", "path": "test/src/main/java/org/openhubframework/openhub/test/AbstractTest.java", "license": "apache-2.0", "size": 6308 }
[ "org.apache.camel.component.mock.MockEndpoint", "org.hamcrest.CoreMatchers", "org.junit.Assert" ]
import org.apache.camel.component.mock.MockEndpoint; import org.hamcrest.CoreMatchers; import org.junit.Assert;
import org.apache.camel.component.mock.*; import org.hamcrest.*; import org.junit.*;
[ "org.apache.camel", "org.hamcrest", "org.junit" ]
org.apache.camel; org.hamcrest; org.junit;
2,860,996
this.searchResults = result; adapter.clear(); if (result != null && result.size() > 0) { gridView.setVisibility(View.VISIBLE); txtvEmpty.setVisibility(View.GONE); for (ItunesAdapter.Podcast p : result) { adapter.add(p); } adapte...
this.searchResults = result; adapter.clear(); if (result != null && result.size() > 0) { gridView.setVisibility(View.VISIBLE); txtvEmpty.setVisibility(View.GONE); for (ItunesAdapter.Podcast p : result) { adapter.add(p); } adapter.notifyDataSetInvalidated(); } else { gridView.setVisibility(View.GONE); txtvEmpty.setVisib...
/** * Replace adapter data with provided search results from SearchTask. * @param result List of Podcast objects containing search results */
Replace adapter data with provided search results from SearchTask
updateData
{ "repo_name": "narakai/DemoApp2", "path": "app/src/main/java/com/clem/ipoca1/fragment/ItunesSearchFragment.java", "license": "mit", "size": 16397 }
[ "android.view.View", "com.clem.ipoca1.adapter.itunes.ItunesAdapter" ]
import android.view.View; import com.clem.ipoca1.adapter.itunes.ItunesAdapter;
import android.view.*; import com.clem.ipoca1.adapter.itunes.*;
[ "android.view", "com.clem.ipoca1" ]
android.view; com.clem.ipoca1;
717,447
@Test(expected = IllegalArgumentException.class) public void createZeroLengthVerticalSegment() { Geometry.createVerticalSegment(0.0); }
@Test(expected = IllegalArgumentException.class) void function() { Geometry.createVerticalSegment(0.0); }
/** * Tests the creation of a segment passing a zero length. * @since 2.2.3 */
Tests the creation of a segment passing a zero length
createZeroLengthVerticalSegment
{ "repo_name": "satishbabusee/dyn4j", "path": "junit/org/dyn4j/geometry/GeometryTest.java", "license": "bsd-3-clause", "size": 54121 }
[ "org.dyn4j.geometry.Geometry", "org.junit.Test" ]
import org.dyn4j.geometry.Geometry; import org.junit.Test;
import org.dyn4j.geometry.*; import org.junit.*;
[ "org.dyn4j.geometry", "org.junit" ]
org.dyn4j.geometry; org.junit;
2,796,634
public static<E> Set<E> retainKeys(Counter<E> counter, Collection<E> matchKeys) { Set<E> removed = Generics.newHashSet(); for (E key : counter.keySet()) { boolean matched = matchKeys.contains(key); if (!matched) { removed.add(key); } } for (E key : removed) { counter.re...
static<E> Set<E> function(Counter<E> counter, Collection<E> matchKeys) { Set<E> removed = Generics.newHashSet(); for (E key : counter.keySet()) { boolean matched = matchKeys.contains(key); if (!matched) { removed.add(key); } } for (E key : removed) { counter.remove(key); } return removed; }
/** * Removes all entries with keys that does not match the given set of keys. * * @param counter The counter * @param matchKeys Keys to match * @return The set of discarded entries. */
Removes all entries with keys that does not match the given set of keys
retainKeys
{ "repo_name": "knowlp/CoreNLP", "path": "src/edu/stanford/nlp/stats/Counters.java", "license": "gpl-2.0", "size": 98538 }
[ "edu.stanford.nlp.util.Generics", "java.util.Collection", "java.util.Set" ]
import edu.stanford.nlp.util.Generics; import java.util.Collection; import java.util.Set;
import edu.stanford.nlp.util.*; import java.util.*;
[ "edu.stanford.nlp", "java.util" ]
edu.stanford.nlp; java.util;
608,226
// type parameter <S> lets us avoid the extra <String> in statements like: // Ordering<String> o = Ordering.<String>natural().nullsLast(); @GwtCompatible(serializable = true) public <S extends T> Ordering<S> nullsLast() { return new NullsLastOrdering<S>(this); }
@GwtCompatible(serializable = true) <S extends T> Ordering<S> function() { return new NullsLastOrdering<S>(this); }
/** * Returns an ordering that treats {@code null} as greater than all other * values and uses this ordering to compare non-null values. */
Returns an ordering that treats null as greater than all other values and uses this ordering to compare non-null values
nullsLast
{ "repo_name": "mariusj/org.openntf.domino", "path": "domino/externals/guava/src/main/java/com/google/common/collect/Ordering.java", "license": "apache-2.0", "size": 35790 }
[ "com.google.common.annotations.GwtCompatible" ]
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.*;
[ "com.google.common" ]
com.google.common;
692,109
public java.util.List<fr.lip6.move.pnml.symmetricnet.dots.hlapi.DotConstantHLAPI> getSubterm_dots_DotConstantHLAPI(){ java.util.List<fr.lip6.move.pnml.symmetricnet.dots.hlapi.DotConstantHLAPI> retour = new ArrayList<fr.lip6.move.pnml.symmetricnet.dots.hlapi.DotConstantHLAPI>(); for (Term elemnt : getSubterm(...
java.util.List<fr.lip6.move.pnml.symmetricnet.dots.hlapi.DotConstantHLAPI> function(){ java.util.List<fr.lip6.move.pnml.symmetricnet.dots.hlapi.DotConstantHLAPI> retour = new ArrayList<fr.lip6.move.pnml.symmetricnet.dots.hlapi.DotConstantHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals(fr.lip6.m...
/** * This accessor return a list of encapsulated subelement, only of DotConstantHLAPI kind. * WARNING : this method can creates a lot of new object in memory. */
This accessor return a list of encapsulated subelement, only of DotConstantHLAPI kind. WARNING : this method can creates a lot of new object in memory
getSubterm_dots_DotConstantHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/integers/hlapi/LessThanHLAPI.java", "license": "epl-1.0", "size": 89850 }
[ "fr.lip6.move.pnml.symmetricnet.terms.Term", "java.util.ArrayList", "java.util.List" ]
import fr.lip6.move.pnml.symmetricnet.terms.Term; import java.util.ArrayList; import java.util.List;
import fr.lip6.move.pnml.symmetricnet.terms.*; import java.util.*;
[ "fr.lip6.move", "java.util" ]
fr.lip6.move; java.util;
665,746
public void characteristicsUpdate(BluetoothGattCharacteristic characteristic) { byte [] dataReg = characteristic.getValue(); final Command cmd = new Command( dataReg); final boolean readOperation = Register.isReadOperation(dataReg); final int error = Register.getError(dataReg);
void function(BluetoothGattCharacteristic characteristic) { byte [] dataReg = characteristic.getValue(); final Command cmd = new Command( dataReg); final boolean readOperation = Register.isReadOperation(dataReg); final int error = Register.getError(dataReg);
/** * call the method onRegisterReadResult or onRegisterWriteResult for * each listener that subscribe to this feature. * <p> each call will be run in a different thread</p> * <p> * if you extend the method update you have to call this method after that you update the data * </p> * @...
call the method onRegisterReadResult or onRegisterWriteResult for each listener that subscribe to this feature. each call will be run in a different thread if you extend the method update you have to call this method after that you update the data
characteristicsUpdate
{ "repo_name": "flyloong/BlueSTSDK", "path": "BlueSTSDK/src/main/java/com/st/BlueSTSDK/ConfigControl.java", "license": "bsd-3-clause", "size": 7435 }
[ "android.bluetooth.BluetoothGattCharacteristic", "com.st.BlueSTSDK" ]
import android.bluetooth.BluetoothGattCharacteristic; import com.st.BlueSTSDK;
import android.bluetooth.*; import com.st.*;
[ "android.bluetooth", "com.st" ]
android.bluetooth; com.st;
1,692,364
public static List<QuadBlob> findIsland( QuadBlob seed , List<QuadBlob> all ) { List<QuadBlob> ret = new ArrayList<QuadBlob>(); Stack<QuadBlob> open = new Stack<QuadBlob>(); ret.add(seed); open.push(seed); while( open.size() > 0 ) { QuadBlob s = open.pop(); for( QuadBlob c : s.conn ) { i...
static List<QuadBlob> function( QuadBlob seed , List<QuadBlob> all ) { List<QuadBlob> ret = new ArrayList<QuadBlob>(); Stack<QuadBlob> open = new Stack<QuadBlob>(); ret.add(seed); open.push(seed); while( open.size() > 0 ) { QuadBlob s = open.pop(); for( QuadBlob c : s.conn ) { if( !ret.contains(c) ) { all.remove(c); re...
/** * Given an initial node, it searches for every node which is connect to it. Seed * is assumed to have already been removed from 'all' * */
Given an initial node, it searches for every node which is connect to it. Seed is assumed to have already been removed from 'all'
findIsland
{ "repo_name": "intrack/BoofCV-master", "path": "main/calibration/src/boofcv/alg/feature/detect/grid/ConnectGridSquares.java", "license": "apache-2.0", "size": 5395 }
[ "java.util.ArrayList", "java.util.List", "java.util.Stack" ]
import java.util.ArrayList; import java.util.List; import java.util.Stack;
import java.util.*;
[ "java.util" ]
java.util;
2,081,869
public void setTags(@Nonnull String firewallId, @Nonnull Tag... tags) throws CloudException, InternalException;
void function(@Nonnull String firewallId, @Nonnull Tag... tags) throws CloudException, InternalException;
/** * Set meta-data for a network firewall. Remove any tags that were not provided by the incoming tags, and add or * overwrite any new or pre-existing tags. * * @param firewallId the network firewalls to set * @param tags the meta-data tags to set * @throws CloudException an error occ...
Set meta-data for a network firewall. Remove any tags that were not provided by the incoming tags, and add or overwrite any new or pre-existing tags
setTags
{ "repo_name": "OSS-TheWeatherCompany/dasein-cloud-core", "path": "src/main/java/org/dasein/cloud/network/NetworkFirewallSupport.java", "license": "apache-2.0", "size": 21262 }
[ "javax.annotation.Nonnull", "org.dasein.cloud.CloudException", "org.dasein.cloud.InternalException", "org.dasein.cloud.Tag" ]
import javax.annotation.Nonnull; import org.dasein.cloud.CloudException; import org.dasein.cloud.InternalException; import org.dasein.cloud.Tag;
import javax.annotation.*; import org.dasein.cloud.*;
[ "javax.annotation", "org.dasein.cloud" ]
javax.annotation; org.dasein.cloud;
469,919
private void addJobForCleanup(JobID id) { for (String taskTracker : taskTrackers.keySet()) { LOG.debug("Marking job " + id + " for cleanup by tracker " + taskTracker); synchronized (trackerToJobsToCleanup) { Set<JobID> jobsToKill = trackerToJobsToCleanup.get(taskTracker); if (jobsToKil...
void function(JobID id) { for (String taskTracker : taskTrackers.keySet()) { LOG.debug(STR + id + STR + taskTracker); synchronized (trackerToJobsToCleanup) { Set<JobID> jobsToKill = trackerToJobsToCleanup.get(taskTracker); if (jobsToKill == null) { jobsToKill = new HashSet<JobID>(); trackerToJobsToCleanup.put(taskTrack...
/** * Add a job to cleanup for the tracker. */
Add a job to cleanup for the tracker
addJobForCleanup
{ "repo_name": "rvadali/fb-raid-refactoring", "path": "src/mapred/org/apache/hadoop/mapred/JobTracker.java", "license": "apache-2.0", "size": 155341 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,679,829
protected static void update(String[] ec, Set<String> predicateSet, Map<String,Integer> counter, int cutoff) { for (String s : ec) { Integer i = counter.get(s); if (i == null) { counter.put(s, 1); } else { counter.put(s, i + 1); } if (!predicateSet.contain...
static void function(String[] ec, Set<String> predicateSet, Map<String,Integer> counter, int cutoff) { for (String s : ec) { Integer i = counter.get(s); if (i == null) { counter.put(s, 1); } else { counter.put(s, i + 1); } if (!predicateSet.contains(s) && counter.get(s) >= cutoff) { predicateSet.add(s); } } }
/** * Updates the set of predicated and counter with the specified event contexts and cutoff. * @param ec The contexts/features which occur in a event. * @param predicateSet The set of predicates which will be used for model building. * @param counter The predicate counters. * @param cutoff The cutoff wh...
Updates the set of predicated and counter with the specified event contexts and cutoff
update
{ "repo_name": "manjeetk09/GoogleScrapper", "path": "opennlp/tools/ml/model/AbstractDataIndexer.java", "license": "gpl-2.0", "size": 6639 }
[ "java.util.Map", "java.util.Set" ]
import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
265,134
public static void runSort(String inp) { String outp = sortedFlPth(inp); String cygpath = getSortCmdPath(); String[] cmd = {cygpath, inp, "-o", outp}; try { Runtime.getRuntime().exec(cmd).waitFor(); } catch (InterruptedException ex) { logg.log(Level.SEVERE, "Couldn't create Standard", ex); throw n...
static void function(String inp) { String outp = sortedFlPth(inp); String cygpath = getSortCmdPath(); String[] cmd = {cygpath, inp, "-o", outp}; try { Runtime.getRuntime().exec(cmd).waitFor(); } catch (InterruptedException ex) { logg.log(Level.SEVERE, STR, ex); throw new RuntimeException(ex); } catch (IOException ex) {...
/** * runs sort on the given file and saves to sortedFlPth() named file * * @param inp */
runs sort on the given file and saves to sortedFlPth() named file
runSort
{ "repo_name": "Cisco-Talos/pyrebox", "path": "sleuthkit/bindings/java/test/org/sleuthkit/datamodel/DataModelTestSuite.java", "license": "gpl-2.0", "size": 16738 }
[ "java.io.IOException", "java.util.logging.Level" ]
import java.io.IOException; import java.util.logging.Level;
import java.io.*; import java.util.logging.*;
[ "java.io", "java.util" ]
java.io; java.util;
915,010
public static void testVectorField() { CC.setDefaultOutputFormat(OutputFormat.RedberryConsole); Tensors.addSymmetry("P_\\mu\\nu", IndexType.GreekLower, false, 1, 0); Expression KINV = Tensors.parseExpression("KINV_\\alpha^\\beta=d_\\alpha^\\beta+\\gamma*n_\\alpha*n^\\beta"); Express...
static void function() { CC.setDefaultOutputFormat(OutputFormat.RedberryConsole); Tensors.addSymmetry(STR, IndexType.GreekLower, false, 1, 0); Expression KINV = Tensors.parseExpression(STR); Expression K = Tensors.parseExpression(STR); Expression S = Tensors.parseExpression(STR); Expression W = Tensors.parseExpression(...
/** * This method calculates one-loop counterterms of the vector field in the * non-minimal gauge. */
This method calculates one-loop counterterms of the vector field in the non-minimal gauge
testVectorField
{ "repo_name": "redberry-cas/physics", "path": "src/main/java/cc/redberry/physics/oneloopdiv/Benchmarks.java", "license": "gpl-3.0", "size": 27972 }
[ "cc.redberry.core.context.CC", "cc.redberry.core.context.OutputFormat", "cc.redberry.core.indices.IndexType", "cc.redberry.core.tensor.Expression", "cc.redberry.core.tensor.Tensors" ]
import cc.redberry.core.context.CC; import cc.redberry.core.context.OutputFormat; import cc.redberry.core.indices.IndexType; import cc.redberry.core.tensor.Expression; import cc.redberry.core.tensor.Tensors;
import cc.redberry.core.context.*; import cc.redberry.core.indices.*; import cc.redberry.core.tensor.*;
[ "cc.redberry.core" ]
cc.redberry.core;
2,579,912
protected void registerExceptionHandlerAdvice( MessagingAdviceBean bean, AbstractExceptionHandlerMethodResolver resolver) { this.exceptionHandlerAdviceCache.put(bean, resolver); }
void function( MessagingAdviceBean bean, AbstractExceptionHandlerMethodResolver resolver) { this.exceptionHandlerAdviceCache.put(bean, resolver); }
/** * Subclasses can invoke this method to populate the MessagingAdviceBean cache * (e.g. to support "global" {@code @MessageExceptionHandler}). * @since 4.2 */
Subclasses can invoke this method to populate the MessagingAdviceBean cache (e.g. to support "global" @MessageExceptionHandler)
registerExceptionHandlerAdvice
{ "repo_name": "spring-projects/spring-framework", "path": "spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/AbstractMethodMessageHandler.java", "license": "apache-2.0", "size": 26670 }
[ "org.springframework.messaging.handler.MessagingAdviceBean" ]
import org.springframework.messaging.handler.MessagingAdviceBean;
import org.springframework.messaging.handler.*;
[ "org.springframework.messaging" ]
org.springframework.messaging;
24,015
@SuppressWarnings("unchecked") private final SponsorBuilderService getSponsorBuilderService() { final SponsorBuilderService sponsorBuilderService; final SponsorAffinities result; sponsorBuilderService = Mockito.mock(SponsorBuilderService.class); result = new ImmutableSponsorAff...
@SuppressWarnings(STR) final SponsorBuilderService function() { final SponsorBuilderService sponsorBuilderService; final SponsorAffinities result; sponsorBuilderService = Mockito.mock(SponsorBuilderService.class); result = new ImmutableSponsorAffinities(Collections.emptyList(), 0); captor = ArgumentCaptor.forClass(Coll...
/** * Returns a mocked service. * <p> * It is prepared for using the pagination data argument captor. * * @return a mocked service */
Returns a mocked service. It is prepared for using the pagination data argument captor
getSponsorBuilderService
{ "repo_name": "Bernardo-MG/dreadball-toolkit-webpage", "path": "src/test/java/com/bernardomg/tabletop/dreadball/web/toolkit/test/unit/builder/controller/TestSponsorValidationControllerAffinitiesValues.java", "license": "apache-2.0", "size": 6356 }
[ "com.bernardomg.tabletop.dreadball.build.service.SponsorBuilderService", "com.bernardomg.tabletop.dreadball.model.ImmutableSponsorAffinities", "com.bernardomg.tabletop.dreadball.model.SponsorAffinities", "java.util.Collection", "java.util.Collections", "org.mockito.ArgumentCaptor", "org.mockito.Mockito"...
import com.bernardomg.tabletop.dreadball.build.service.SponsorBuilderService; import com.bernardomg.tabletop.dreadball.model.ImmutableSponsorAffinities; import com.bernardomg.tabletop.dreadball.model.SponsorAffinities; import java.util.Collection; import java.util.Collections; import org.mockito.ArgumentCaptor; import ...
import com.bernardomg.tabletop.dreadball.build.service.*; import com.bernardomg.tabletop.dreadball.model.*; import java.util.*; import org.mockito.*;
[ "com.bernardomg.tabletop", "java.util", "org.mockito" ]
com.bernardomg.tabletop; java.util; org.mockito;
687,503
public void writePacketData(PacketBuffer buf) throws IOException { buf.writeInt(this.soundType); buf.writeBlockPos(this.soundPos); buf.writeInt(this.soundData); buf.writeBoolean(this.serverWide); }
void function(PacketBuffer buf) throws IOException { buf.writeInt(this.soundType); buf.writeBlockPos(this.soundPos); buf.writeInt(this.soundData); buf.writeBoolean(this.serverWide); }
/** * Writes the raw packet data to the data stream. */
Writes the raw packet data to the data stream
writePacketData
{ "repo_name": "TheValarProject/AwakenDreamsClient", "path": "mcp/src/minecraft/net/minecraft/network/play/server/SPacketEffect.java", "license": "gpl-3.0", "size": 2008 }
[ "java.io.IOException", "net.minecraft.network.PacketBuffer" ]
import java.io.IOException; import net.minecraft.network.PacketBuffer;
import java.io.*; import net.minecraft.network.*;
[ "java.io", "net.minecraft.network" ]
java.io; net.minecraft.network;
376,238
@Override protected void configureShell(Shell newShell) { super.configureShell(newShell); newShell.setText(application.getAppName()); }
void function(Shell newShell) { super.configureShell(newShell); newShell.setText(application.getAppName()); }
/** * Configure the shell * * @param newShell */
Configure the shell
configureShell
{ "repo_name": "DamianMcNulty/accounting-nua", "path": "GUILayer/timetrackerImportWindow.java", "license": "gpl-3.0", "size": 7534 }
[ "org.eclipse.swt.widgets.Shell" ]
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,103,501
public ComplexBufferD fill(double value) { Arrays.fill(real, value); Arrays.fill(imag, value); return this; }
ComplexBufferD function(double value) { Arrays.fill(real, value); Arrays.fill(imag, value); return this; }
/** * Fill this buffers real and imaginary elements with the given value. * * @param value Value to be stored in every real and imaginary element. * @return Reference to this buffer. */
Fill this buffers real and imaginary elements with the given value
fill
{ "repo_name": "villoren/FFTConvolution", "path": "src/com/villoren/java/dsp/fft/ComplexBufferD.java", "license": "mit", "size": 31282 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,960,305
SecurityContext securityContext = SecurityContextHolder.getContext(); return Optional.ofNullable(securityContext.getAuthentication()).map(authentication -> { if (authentication.getPrincipal() instanceof UserDetails) { UserDetails springSecurityUser = (UserDetails) authentication.getP...
SecurityContext securityContext = SecurityContextHolder.getContext(); return Optional.ofNullable(securityContext.getAuthentication()).map(authentication -> { if (authentication.getPrincipal() instanceof UserDetails) { UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal(); return springSecurityUse...
/** * Get the login of the current user. * * @return the login of the current user */
Get the login of the current user
getCurrentUserLogin
{ "repo_name": "ls1intum/ArTEMiS", "path": "src/main/java/de/tum/in/www1/artemis/security/SecurityUtils.java", "license": "mit", "size": 4764 }
[ "java.util.Optional", "org.springframework.security.core.context.SecurityContext", "org.springframework.security.core.context.SecurityContextHolder", "org.springframework.security.core.userdetails.UserDetails" ]
import java.util.Optional; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.userdetails.UserDetails;
import java.util.*; import org.springframework.security.core.context.*; import org.springframework.security.core.userdetails.*;
[ "java.util", "org.springframework.security" ]
java.util; org.springframework.security;
2,368,186
method.releaseConnection(); } } private final String urlCharset; private final String userAgent; private final boolean followRedirect; private HeadMethod method; protected HttpFileObject(final AbstractFileName name, final FS fileSystem) { this(name, fileSystem, Http...
method.releaseConnection(); } } private final String urlCharset; private final String userAgent; private final boolean followRedirect; private HeadMethod method; protected HttpFileObject(final AbstractFileName name, final FS fileSystem) { this(name, fileSystem, HttpFileSystemConfigBuilder.getInstance()); } protected Ht...
/** * Called after the stream has been closed. */
Called after the stream has been closed
onClose
{ "repo_name": "seeburger-ag/commons-vfs", "path": "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java", "license": "apache-2.0", "size": 9307 }
[ "org.apache.commons.httpclient.methods.HeadMethod", "org.apache.commons.vfs2.FileSystemOptions", "org.apache.commons.vfs2.provider.AbstractFileName" ]
import org.apache.commons.httpclient.methods.HeadMethod; import org.apache.commons.vfs2.FileSystemOptions; import org.apache.commons.vfs2.provider.AbstractFileName;
import org.apache.commons.httpclient.methods.*; import org.apache.commons.vfs2.*; import org.apache.commons.vfs2.provider.*;
[ "org.apache.commons" ]
org.apache.commons;
940,962
public AS400 getConnection() { AS400 system = null; try { if (LOG.isDebugEnabled()) { LOG.debug("Getting an AS400 object for '{}' from {}.", systemName + '/' + userID, connectionPool); } if (isSecured()) { system = connectionPool.g...
AS400 function() { AS400 system = null; try { if (LOG.isDebugEnabled()) { LOG.debug(STR, systemName + '/' + userID, connectionPool); } if (isSecured()) { system = connectionPool.getSecureConnection(systemName, userID, password); } else { system = connectionPool.getConnection(systemName, userID, password); } if (ccsid !...
/** * Obtains an {@code AS400} object that connects to this endpoint. Since * these objects represent limited resources, clients have the * responsibility of {@link #releaseConnection(AS400) releasing them} when * done. * * @return an {@code AS400} object that connects to this endpoint ...
Obtains an AS400 object that connects to this endpoint. Since these objects represent limited resources, clients have the responsibility of <code>#releaseConnection(AS400) releasing them</code> when done
getConnection
{ "repo_name": "objectiser/camel", "path": "components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400Configuration.java", "license": "apache-2.0", "size": 11234 }
[ "com.ibm.as400.access.ConnectionPoolException", "java.beans.PropertyVetoException", "org.apache.camel.RuntimeCamelException" ]
import com.ibm.as400.access.ConnectionPoolException; import java.beans.PropertyVetoException; import org.apache.camel.RuntimeCamelException;
import com.ibm.as400.access.*; import java.beans.*; import org.apache.camel.*;
[ "com.ibm.as400", "java.beans", "org.apache.camel" ]
com.ibm.as400; java.beans; org.apache.camel;
1,038,630
public StyledText append(final Date date) { final CharSequence time = DateUtils.getRelativeTimeSpanString(date.getTime()); // Un-capitalize time string if there is already a prefix. // So you get "opened in 5 days" instead of "opened In 5 days". final int timeLength = time.length(); ...
StyledText function(final Date date) { final CharSequence time = DateUtils.getRelativeTimeSpanString(date.getTime()); final int timeLength = time.length(); if (length() > 0 && timeLength > 0 && Character.isUpperCase(time.charAt(0))) { append(time.subSequence(0, 1).toString().toLowerCase()); append(time.subSequence(1, t...
/** * Append given date in relative time format * * @param date * @return this text */
Append given date in relative time format
append
{ "repo_name": "soarcn/COCO-Accessory", "path": "views/src/main/java/com/cocosw/accessory/views/textview/StyledText.java", "license": "apache-2.0", "size": 7086 }
[ "android.text.format.DateUtils", "java.util.Date" ]
import android.text.format.DateUtils; import java.util.Date;
import android.text.format.*; import java.util.*;
[ "android.text", "java.util" ]
android.text; java.util;
2,686,395
void enterSingleAlias(@NotNull CQLParser.SingleAliasContext ctx); void exitSingleAlias(@NotNull CQLParser.SingleAliasContext ctx);
void enterSingleAlias(@NotNull CQLParser.SingleAliasContext ctx); void exitSingleAlias(@NotNull CQLParser.SingleAliasContext ctx);
/** * Exit a parse tree produced by {@link CQLParser#singleAlias}. * @param ctx the parse tree */
Exit a parse tree produced by <code>CQLParser#singleAlias</code>
exitSingleAlias
{ "repo_name": "jack6215/StreamCQL", "path": "cql/src/main/java/com/huawei/streaming/cql/semanticanalyzer/parser/CQLParserListener.java", "license": "apache-2.0", "size": 62500 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,115,694
void resolveConnectionResult() { // Try to resolve the problem checkState(TYPE_GAMEHELPER_BUG, "resolveConnectionResult", "resolveConnectionResult should only be called when connecting. Proceeding anyway.", STATE_CONNECTING); if (mExpectingResolution) { ...
void resolveConnectionResult() { checkState(TYPE_GAMEHELPER_BUG, STR, STR, STATE_CONNECTING); if (mExpectingResolution) { debugLog(STR); return; } debugLog(STR + mConnectionResult); if (mConnectionResult.hasResolution()) { debugLog(STR); try { mExpectingResolution = true; mConnectionResult.startResolutionForResult(mAct...
/** * Attempts to resolve a connection failure. This will usually involve * starting a UI flow that lets the user give the appropriate consents * necessary for sign-in to work. */
Attempts to resolve a connection failure. This will usually involve starting a UI flow that lets the user give the appropriate consents necessary for sign-in to work
resolveConnectionResult
{ "repo_name": "manuelsilverio01/JetBird", "path": "play-games-plugin-for-unity-master/source/SupportLib/BaseGameUtils/src/com/google/example/games/basegameutils/GameHelper.java", "license": "unlicense", "size": 46839 }
[ "android.content.IntentSender" ]
import android.content.IntentSender;
import android.content.*;
[ "android.content" ]
android.content;
2,820,177
@Override public void flush(ComputeService service, NodeMetadata node) { String region = AWSUtils.parseHandle(node.getId())[0]; EC2Api ec2Api = service.getContext().unwrapApi(EC2Api.class); String groupName = "jclouds#" + node.getGroup() + "#" + region; Se...
void function(ComputeService service, NodeMetadata node) { String region = AWSUtils.parseHandle(node.getId())[0]; EC2Api ec2Api = service.getContext().unwrapApi(EC2Api.class); String groupName = STR + node.getGroup() + "#" + region; Set<SecurityGroup> matchedSecurityGroups = ec2Api.getSecurityGroupApi().get().describeS...
/** * Removes all rules. */
Removes all rules
flush
{ "repo_name": "alexeev/jboss-fuse-mirror", "path": "fabric/fabric-core-agent-jclouds/src/main/java/io/fabric8/service/jclouds/firewall/internal/Ec2FirewallSupport.java", "license": "apache-2.0", "size": 6310 }
[ "java.util.Set", "org.jclouds.aws.util.AWSUtils", "org.jclouds.compute.ComputeService", "org.jclouds.compute.domain.NodeMetadata", "org.jclouds.ec2.EC2Api", "org.jclouds.ec2.domain.SecurityGroup", "org.jclouds.net.domain.IpPermission", "org.jclouds.net.domain.IpProtocol" ]
import java.util.Set; import org.jclouds.aws.util.AWSUtils; import org.jclouds.compute.ComputeService; import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.ec2.EC2Api; import org.jclouds.ec2.domain.SecurityGroup; import org.jclouds.net.domain.IpPermission; import org.jclouds.net.domain.IpProtocol;
import java.util.*; import org.jclouds.aws.util.*; import org.jclouds.compute.*; import org.jclouds.compute.domain.*; import org.jclouds.ec2.*; import org.jclouds.ec2.domain.*; import org.jclouds.net.domain.*;
[ "java.util", "org.jclouds.aws", "org.jclouds.compute", "org.jclouds.ec2", "org.jclouds.net" ]
java.util; org.jclouds.aws; org.jclouds.compute; org.jclouds.ec2; org.jclouds.net;
338,740
public TimeZone getTimeZone() { return beginDatable.getTimeZone(); }
TimeZone function() { return beginDatable.getTimeZone(); }
/** * The time zone has no meaning for a date. * @return the time zone in which this period is set. */
The time zone has no meaning for a date
getTimeZone
{ "repo_name": "auroreallibe/Silverpeas-Core", "path": "core-api/src/main/java/org/silverpeas/core/date/period/Period.java", "license": "agpl-3.0", "size": 18449 }
[ "java.util.TimeZone" ]
import java.util.TimeZone;
import java.util.*;
[ "java.util" ]
java.util;
2,670,863
public void attemptLogin(IRequestCycle cycle) { String password = getPassword(); // Do a little extra work to clear out the password. setPassword(null); IValidationDelegate delegate = getValidationDelegate(); delegate.setFormComponent((IFormComponent) getComponent("inp...
void function(IRequestCycle cycle) { String password = getPassword(); setPassword(null); IValidationDelegate delegate = getValidationDelegate(); delegate.setFormComponent((IFormComponent) getComponent(STR)); delegate.recordFieldInputValue(null); if (delegate.getHasErrors()) return; VirtualLibraryEngine vengine = (Virtu...
/** * Attempts to login. * * <p>If the user name is not known, or the password is invalid, then an error * message is displayed. * **/
Attempts to login. If the user name is not known, or the password is invalid, then an error message is displayed
attemptLogin
{ "repo_name": "apache/tapestry3", "path": "tapestry-examples/Vlib/src/org/apache/tapestry/vlib/pages/Login.java", "license": "apache-2.0", "size": 5852 }
[ "java.rmi.RemoteException", "org.apache.tapestry.IRequestCycle", "org.apache.tapestry.form.IFormComponent", "org.apache.tapestry.valid.IValidationDelegate", "org.apache.tapestry.vlib.VirtualLibraryEngine", "org.apache.tapestry.vlib.ejb.IOperations", "org.apache.tapestry.vlib.ejb.LoginException", "org....
import java.rmi.RemoteException; import org.apache.tapestry.IRequestCycle; import org.apache.tapestry.form.IFormComponent; import org.apache.tapestry.valid.IValidationDelegate; import org.apache.tapestry.vlib.VirtualLibraryEngine; import org.apache.tapestry.vlib.ejb.IOperations; import org.apache.tapestry.vlib.ejb.Logi...
import java.rmi.*; import org.apache.tapestry.*; import org.apache.tapestry.form.*; import org.apache.tapestry.valid.*; import org.apache.tapestry.vlib.*; import org.apache.tapestry.vlib.ejb.*;
[ "java.rmi", "org.apache.tapestry" ]
java.rmi; org.apache.tapestry;
40,694
protected XBLRecord getRecord(Node n) { XBLManagerData xmd = (XBLManagerData) n; XBLRecord rec = (XBLRecord) xmd.getManagerData(); if (rec == null) { rec = new XBLRecord(); rec.node = n; xmd.setManagerData(rec); } return rec; }
XBLRecord function(Node n) { XBLManagerData xmd = (XBLManagerData) n; XBLRecord rec = (XBLRecord) xmd.getManagerData(); if (rec == null) { rec = new XBLRecord(); rec.node = n; xmd.setManagerData(rec); } return rec; }
/** * Returns the XBL record for the given node. */
Returns the XBL record for the given node
getRecord
{ "repo_name": "shyamalschandra/flex-sdk", "path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/bridge/svg12/DefaultXBLManager.java", "license": "apache-2.0", "size": 70751 }
[ "org.apache.flex.forks.batik.dom.xbl.XBLManagerData", "org.w3c.dom.Node" ]
import org.apache.flex.forks.batik.dom.xbl.XBLManagerData; import org.w3c.dom.Node;
import org.apache.flex.forks.batik.dom.xbl.*; import org.w3c.dom.*;
[ "org.apache.flex", "org.w3c.dom" ]
org.apache.flex; org.w3c.dom;
1,321,945
@SideOnly(Side.CLIENT) @Override public void registerBlockIcons(IIconRegister iiconregister) { this.blockIcon = iiconregister.registerIcon(Halocraft.MODID+":BrokenComputerSide"); this.iconTop = iiconregister.registerIcon(Halocraft.MODID+":BrokenComputerTop"); this.iconSide = iiconregister.registerIcon(Haloc...
@SideOnly(Side.CLIENT) void function(IIconRegister iiconregister) { this.blockIcon = iiconregister.registerIcon(Halocraft.MODID+STR); this.iconTop = iiconregister.registerIcon(Halocraft.MODID+STR); this.iconSide = iiconregister.registerIcon(Halocraft.MODID+STR); this.iconBottom = iiconregister.registerIcon(Halocraft.MO...
/** * When this method is called, your block should register all the icons it needs with the given IconRegister. This * is the only chance you get to register icons. */
When this method is called, your block should register all the icons it needs with the given IconRegister. This is the only chance you get to register icons
registerBlockIcons
{ "repo_name": "KILLER-CHIEF/Halocraft-KCWM", "path": "java/net/killerchief/halocraft/blocks/BlockBrokenComputer.java", "license": "gpl-2.0", "size": 4405 }
[ "net.killerchief.halocraft.Halocraft", "net.minecraft.client.renderer.texture.IIconRegister" ]
import net.killerchief.halocraft.Halocraft; import net.minecraft.client.renderer.texture.IIconRegister;
import net.killerchief.halocraft.*; import net.minecraft.client.renderer.texture.*;
[ "net.killerchief.halocraft", "net.minecraft.client" ]
net.killerchief.halocraft; net.minecraft.client;
1,726,499
protected ChecksumDataForFileTYPE getValidationChecksum() { if(cmdHandler.hasOption(Constants.FILE_ARG)) { return getValidationChecksumDataForFile(findTheFile()); } else { return getValidationChecksumDataFromArgument(Constants.REPLACE_CHECKSUM_ARG); } ...
ChecksumDataForFileTYPE function() { if(cmdHandler.hasOption(Constants.FILE_ARG)) { return getValidationChecksumDataForFile(findTheFile()); } else { return getValidationChecksumDataFromArgument(Constants.REPLACE_CHECKSUM_ARG); } }
/** * Retrieves the Checksum for the pillars to validate, either taken from the actual file, * or from the checksum argument. * It will be in the default checksum spec type from settings. * @return The checksum validation type. */
Retrieves the Checksum for the pillars to validate, either taken from the actual file, or from the checksum argument. It will be in the default checksum spec type from settings
getValidationChecksum
{ "repo_name": "bitrepository/reference", "path": "bitrepository-client/src/main/java/org/bitrepository/commandline/ReplaceFileCmd.java", "license": "lgpl-2.1", "size": 9743 }
[ "org.bitrepository.bitrepositoryelements.ChecksumDataForFileTYPE" ]
import org.bitrepository.bitrepositoryelements.ChecksumDataForFileTYPE;
import org.bitrepository.bitrepositoryelements.*;
[ "org.bitrepository.bitrepositoryelements" ]
org.bitrepository.bitrepositoryelements;
471,317
public List<JSONObject> getHotArticles(final int fetchSize) throws ServiceException { final String id = String.valueOf(DateUtils.addDays(new Date(), -7).getTime()); try { final Query query = new Query().addSort(Article.ARTICLE_COMMENT_CNT, SortDirection.DESCENDING). ...
List<JSONObject> function(final int fetchSize) throws ServiceException { final String id = String.valueOf(DateUtils.addDays(new Date(), -7).getTime()); try { final Query query = new Query().addSort(Article.ARTICLE_COMMENT_CNT, SortDirection.DESCENDING). addSort(Keys.OBJECT_ID, SortDirection.ASCENDING).setCurrentPageNum...
/** * Gets hot articles with the specified fetch size. * * @param fetchSize the specified fetch size * @return recent articles, returns an empty list if not found * @throws ServiceException service exception */
Gets hot articles with the specified fetch size
getHotArticles
{ "repo_name": "FangStarNet/symphonyx", "path": "src/main/java/org/b3log/symphony/service/ArticleQueryService.java", "license": "apache-2.0", "size": 57740 }
[ "java.util.ArrayList", "java.util.Date", "java.util.List", "org.apache.commons.lang.time.DateUtils", "org.b3log.latke.Keys", "org.b3log.latke.logging.Level", "org.b3log.latke.repository.CompositeFilter", "org.b3log.latke.repository.CompositeFilterOperator", "org.b3log.latke.repository.Filter", "or...
import java.util.ArrayList; import java.util.Date; import java.util.List; import org.apache.commons.lang.time.DateUtils; import org.b3log.latke.Keys; import org.b3log.latke.logging.Level; import org.b3log.latke.repository.CompositeFilter; import org.b3log.latke.repository.CompositeFilterOperator; import org.b3log.latke...
import java.util.*; import org.apache.commons.lang.time.*; import org.b3log.latke.*; import org.b3log.latke.logging.*; import org.b3log.latke.repository.*; import org.b3log.latke.service.*; import org.b3log.latke.util.*; import org.b3log.symphony.model.*; import org.json.*;
[ "java.util", "org.apache.commons", "org.b3log.latke", "org.b3log.symphony", "org.json" ]
java.util; org.apache.commons; org.b3log.latke; org.b3log.symphony; org.json;
2,247,480