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
List<SemanticMacro> l = new ArrayList<SemanticMacro>(); SAXBuilder builder = new SAXBuilder(); try { Document doc = builder.build(url.openStream()); Element root = doc.getRootElement(); if (root.getName() == "semmacros") { List<Element> macros = root.getChildren("defmacro"); for (Element m : mac...
List<SemanticMacro> l = new ArrayList<SemanticMacro>(); SAXBuilder builder = new SAXBuilder(); try { Document doc = builder.build(url.openStream()); Element root = doc.getRootElement(); if (root.getName() == STR) { List<Element> macros = root.getChildren(STR); for (Element m : macros) { String longname = m.getAttribute...
/** * Loads a xml specification of semantic macros from a given url. * @param url the specified url of the xml to load * @return the list of semantic macros */
Loads a xml specification of semantic macros from a given url
loadMacros
{ "repo_name": "ONatalia/Masterarbeit", "path": "src/inpro/irmrsc/util/RMRSLoader.java", "license": "bsd-2-clause", "size": 4075 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "org.jdom.Document", "org.jdom.Element", "org.jdom.JDOMException", "org.jdom.input.SAXBuilder" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.jdom.Document; import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder;
import java.io.*; import java.util.*; import org.jdom.*; import org.jdom.input.*;
[ "java.io", "java.util", "org.jdom", "org.jdom.input" ]
java.io; java.util; org.jdom; org.jdom.input;
2,055,557
try { Date date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").parse(givenDate); givenDate = getGenericDateAsStringRepresentation(date, GERMAN_DATE_PATTERN); } catch (Exception e) { Log.e(Dates.class.getSimpleName(), "could not parse date to german representation"); ...
try { Date date = new SimpleDateFormat(STR).parse(givenDate); givenDate = getGenericDateAsStringRepresentation(date, GERMAN_DATE_PATTERN); } catch (Exception e) { Log.e(Dates.class.getSimpleName(), STR); } return givenDate; }
/** * Transforms a date string to the german date string representation * * @param givenDate the date to transform * @return a german string representation of the given date */
Transforms a date string to the german date string representation
getGermanDateByDateString
{ "repo_name": "lidox/nccn-distress-thermometer", "path": "NCCN/app/src/main/java/com/artursworld/nccn/controller/util/Dates.java", "license": "mit", "size": 2681 }
[ "android.util.Log", "java.text.SimpleDateFormat", "java.util.Date" ]
import android.util.Log; import java.text.SimpleDateFormat; import java.util.Date;
import android.util.*; import java.text.*; import java.util.*;
[ "android.util", "java.text", "java.util" ]
android.util; java.text; java.util;
145,520
public void train(TaggedWord tw, int loc, double weight) { IntTaggedWord iTW = new IntTaggedWord(tw.word(), tw.tag(), wordIndex, tagIndex); IntTaggedWord iT = new IntTaggedWord(nullWord, iTW.tag); IntTaggedWord iW = new IntTaggedWord(iTW.word, nullTag); seenCounter.incrementCount(iW, weight); ...
void function(TaggedWord tw, int loc, double weight) { IntTaggedWord iTW = new IntTaggedWord(tw.word(), tw.tag(), wordIndex, tagIndex); IntTaggedWord iT = new IntTaggedWord(nullWord, iTW.tag); IntTaggedWord iW = new IntTaggedWord(iTW.word, nullTag); seenCounter.incrementCount(iW, weight); IntTaggedWord i = NULL_ITW; if...
/** * Trains this lexicon on the Collection of trees. */
Trains this lexicon on the Collection of trees
train
{ "repo_name": "hbbpb/stanford-corenlp-gv", "path": "src/edu/stanford/nlp/parser/lexparser/FrenchUnknownWordModelTrainer.java", "license": "gpl-2.0", "size": 2906 }
[ "edu.stanford.nlp.ling.TaggedWord" ]
import edu.stanford.nlp.ling.TaggedWord;
import edu.stanford.nlp.ling.*;
[ "edu.stanford.nlp" ]
edu.stanford.nlp;
1,499,003
public java.util.List<fr.lip6.move.pnml.hlpn.lists.hlapi.AppendHLAPI> getSubterm_lists_AppendHLAPI(){ java.util.List<fr.lip6.move.pnml.hlpn.lists.hlapi.AppendHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.lists.hlapi.AppendHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals(fr....
java.util.List<fr.lip6.move.pnml.hlpn.lists.hlapi.AppendHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.lists.hlapi.AppendHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.lists.hlapi.AppendHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.lists.impl.AppendImpl....
/** * This accessor return a list of encapsulated subelement, only of AppendHLAPI kind. * WARNING : this method can creates a lot of new object in memory. */
This accessor return a list of encapsulated subelement, only of AppendHLAPI kind. WARNING : this method can creates a lot of new object in memory
getSubterm_lists_AppendHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/lists/hlapi/EmptyListHLAPI.java", "license": "epl-1.0", "size": 113924 }
[ "fr.lip6.move.pnml.hlpn.terms.Term", "java.util.ArrayList", "java.util.List" ]
import fr.lip6.move.pnml.hlpn.terms.Term; import java.util.ArrayList; import java.util.List;
import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*;
[ "fr.lip6.move", "java.util" ]
fr.lip6.move; java.util;
5,425
protected String getTranslatedFile(String fileName) throws IOException { File f = new File(tempDir, fileName); assertTrue(fileName + " not generated", f.exists()); return Files.toString(f, Options.getCharset()); }
String function(String fileName) throws IOException { File f = new File(tempDir, fileName); assertTrue(fileName + STR, f.exists()); return Files.toString(f, Options.getCharset()); }
/** * Return the contents of a previously translated file, made by a call to * {@link #translateMethod} above. */
Return the contents of a previously translated file, made by a call to <code>#translateMethod</code> above
getTranslatedFile
{ "repo_name": "androiddream/j2objc", "path": "translator/src/test/java/com/google/devtools/j2objc/GenerationTest.java", "license": "apache-2.0", "size": 18160 }
[ "com.google.common.io.Files", "java.io.File", "java.io.IOException" ]
import com.google.common.io.Files; import java.io.File; import java.io.IOException;
import com.google.common.io.*; import java.io.*;
[ "com.google.common", "java.io" ]
com.google.common; java.io;
2,770,586
Collection<Warning> getWarnings();
Collection<Warning> getWarnings();
/** * Get the {@link Collection} of warnings. */
Get the <code>Collection</code> of warnings
getWarnings
{ "repo_name": "forcedotcom/aura", "path": "aura/src/main/java/org/auraframework/validation/ErrorAccumulator.java", "license": "apache-2.0", "size": 1803 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
731,611
public PrivateLinkServiceConnection withGroupIds(List<String> groupIds) { if (this.innerProperties() == null) { this.innerProperties = new PrivateLinkServiceConnectionProperties(); } this.innerProperties().withGroupIds(groupIds); return this; }
PrivateLinkServiceConnection function(List<String> groupIds) { if (this.innerProperties() == null) { this.innerProperties = new PrivateLinkServiceConnectionProperties(); } this.innerProperties().withGroupIds(groupIds); return this; }
/** * Set the groupIds property: The ID(s) of the group(s) obtained from the remote resource that this private endpoint * should connect to. * * @param groupIds the groupIds value to set. * @return the PrivateLinkServiceConnection object itself. */
Set the groupIds property: The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to
withGroupIds
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/PrivateLinkServiceConnection.java", "license": "mit", "size": 7601 }
[ "com.azure.resourcemanager.network.fluent.models.PrivateLinkServiceConnectionProperties", "java.util.List" ]
import com.azure.resourcemanager.network.fluent.models.PrivateLinkServiceConnectionProperties; import java.util.List;
import com.azure.resourcemanager.network.fluent.models.*; import java.util.*;
[ "com.azure.resourcemanager", "java.util" ]
com.azure.resourcemanager; java.util;
651,355
public void testSetClasspath() throws SQLException { setDBClasspath("EMC.MAIL_APP"); // Test we don't need a re-boot to see the new classes. CallableStatement cs = prepareCall("CALL EMC.ADDCONTACT(?, ?)"); cs.setInt(1, 0); cs.setString(2, "now@classpathchange.com...
void function() throws SQLException { setDBClasspath(STR); CallableStatement cs = prepareCall(STR); cs.setInt(1, 0); cs.setString(2, STR); cs.executeUpdate(); cs.close(); derby2035Workaround(); }
/** * Set the classpath to include the MAIL_APP jar. * @throws SQLException */
Set the classpath to include the MAIL_APP jar
testSetClasspath
{ "repo_name": "kavin256/Derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/DatabaseClassLoadingTest.java", "license": "apache-2.0", "size": 46217 }
[ "java.sql.CallableStatement", "java.sql.SQLException" ]
import java.sql.CallableStatement; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,382,028
public SerialMessage getMessage(MeterScale meterScale) { logger.debug("NODE {}: Creating new message for application command METER_GET", this.getNode().getNodeId()); SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Re...
SerialMessage function(MeterScale meterScale) { logger.debug(STR, this.getNode().getNodeId()); SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.ApplicationCommandHandler, SerialMessagePriority.Get); byte[] newPayload = { (byt...
/** * Gets a SerialMessage with the METER_GET command * * @return the serial message */
Gets a SerialMessage with the METER_GET command
getMessage
{ "repo_name": "idserda/openhab", "path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/commandclass/ZWaveMeterCommandClass.java", "license": "epl-1.0", "size": 22749 }
[ "org.openhab.binding.zwave.internal.protocol.SerialMessage" ]
import org.openhab.binding.zwave.internal.protocol.SerialMessage;
import org.openhab.binding.zwave.internal.protocol.*;
[ "org.openhab.binding" ]
org.openhab.binding;
788,421
@Test(timeout = 120000) public void testDelegationToken() throws Exception { UserGroupInformation.createRemoteUser("JobTracker"); DistributedFileSystem dfs = cluster.getFileSystem(); KeyProvider keyProvider = Mockito.mock(KeyProvider.class, withSettings().extraInterfaces( DelegationT...
@Test(timeout = 120000) void function() throws Exception { UserGroupInformation.createRemoteUser(STR); DistributedFileSystem dfs = cluster.getFileSystem(); KeyProvider keyProvider = Mockito.mock(KeyProvider.class, withSettings().extraInterfaces( DelegationTokenExtension.class, CryptoExtension.class)); Mockito.when(keyP...
/** * Tests obtaining delegation token from stored key */
Tests obtaining delegation token from stored key
testDelegationToken
{ "repo_name": "wankunde/cloudera_hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestEncryptionZones.java", "license": "apache-2.0", "size": 51631 }
[ "java.util.Arrays", "org.apache.hadoop.crypto.key.KeyProvider", "org.apache.hadoop.crypto.key.KeyProviderCryptoExtension", "org.apache.hadoop.crypto.key.KeyProviderDelegationTokenExtension", "org.apache.hadoop.io.Text", "org.apache.hadoop.security.Credentials", "org.apache.hadoop.security.UserGroupInfor...
import java.util.Arrays; import org.apache.hadoop.crypto.key.KeyProvider; import org.apache.hadoop.crypto.key.KeyProviderCryptoExtension; import org.apache.hadoop.crypto.key.KeyProviderDelegationTokenExtension; import org.apache.hadoop.io.Text; import org.apache.hadoop.security.Credentials; import org.apache.hadoop.sec...
import java.util.*; import org.apache.hadoop.crypto.key.*; import org.apache.hadoop.io.*; import org.apache.hadoop.security.*; import org.apache.hadoop.security.token.*; import org.junit.*; import org.mockito.*;
[ "java.util", "org.apache.hadoop", "org.junit", "org.mockito" ]
java.util; org.apache.hadoop; org.junit; org.mockito;
408,464
private static ILaunchConfiguration createNewLaunchConfiguration(IProject project) throws CoreException, OperationCanceledException { String initialName = calculateLaunchConfigName(project); // Create a new launch config ILaunchConfiguration launchConfig = GwtSuperDevModeCodeServerLaunchUtil.create...
static ILaunchConfiguration function(IProject project) throws CoreException, OperationCanceledException { String initialName = calculateLaunchConfigName(project); ILaunchConfiguration launchConfig = GwtSuperDevModeCodeServerLaunchUtil.createLaunchConfig(initialName, project); return launchConfig; }
/** * Create a new launch configuration. */
Create a new launch configuration
createNewLaunchConfiguration
{ "repo_name": "gwt-plugins/gwt-eclipse-plugin", "path": "plugins/com.gwtplugins.gwt.eclipse.core/src/com/google/gwt/eclipse/core/launch/util/GwtSuperDevModeCodeServerLaunchUtil.java", "license": "epl-1.0", "size": 9412 }
[ "org.eclipse.core.resources.IProject", "org.eclipse.core.runtime.CoreException", "org.eclipse.core.runtime.OperationCanceledException", "org.eclipse.debug.core.ILaunchConfiguration" ]
import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.debug.core.*;
[ "org.eclipse.core", "org.eclipse.debug" ]
org.eclipse.core; org.eclipse.debug;
1,841,665
public void readGroup(AttributeSet attrs) { TypedArray a = mContext.obtainStyledAttributes(attrs, R.styleable.SherlockMenuGroup); groupId = a.getResourceId(R.styleable.SherlockMenuGroup_android_id, defaultGroupId); groupCategory = a.getInt(R.styleabl...
void function(AttributeSet attrs) { TypedArray a = mContext.obtainStyledAttributes(attrs, R.styleable.SherlockMenuGroup); groupId = a.getResourceId(R.styleable.SherlockMenuGroup_android_id, defaultGroupId); groupCategory = a.getInt(R.styleable.SherlockMenuGroup_android_menuCategory, defaultItemCategory); groupOrder = a...
/** * Called when the parser is pointing to a group tag. */
Called when the parser is pointing to a group tag
readGroup
{ "repo_name": "joebowen/landing_zone_project", "path": "openrocket-release-15.03/android-libraries/ActionBarSherlock/src/com/actionbarsherlock/view/MenuInflater.java", "license": "gpl-2.0", "size": 19430 }
[ "android.content.res.TypedArray", "android.util.AttributeSet" ]
import android.content.res.TypedArray; import android.util.AttributeSet;
import android.content.res.*; import android.util.*;
[ "android.content", "android.util" ]
android.content; android.util;
582,477
@Override public AssertionResult getResult(SampleResult inResponse) { log.debug("HTMLAssertions.getResult() called"); if (inResponse.getResponseData().length == 0) { return new AssertionResult(getName()).setResultForNull(); } return runTidy(inResponse); }
AssertionResult function(SampleResult inResponse) { log.debug(STR); if (inResponse.getResponseData().length == 0) { return new AssertionResult(getName()).setResultForNull(); } return runTidy(inResponse); }
/** * Returns the result of the Assertion. If so an AssertionResult containing * a FailureMessage will be returned. Otherwise the returned AssertionResult * will reflect the success of the Sample. */
Returns the result of the Assertion. If so an AssertionResult containing a FailureMessage will be returned. Otherwise the returned AssertionResult will reflect the success of the Sample
getResult
{ "repo_name": "apache/jmeter", "path": "src/components/src/main/java/org/apache/jmeter/assertions/HTMLAssertion.java", "license": "apache-2.0", "size": 12319 }
[ "org.apache.jmeter.samplers.SampleResult" ]
import org.apache.jmeter.samplers.SampleResult;
import org.apache.jmeter.samplers.*;
[ "org.apache.jmeter" ]
org.apache.jmeter;
2,639,619
@Deprecated protected JWT signJWT(SignedJWT signedJWT, String tenantDomain, int tenantId) throws IdentityOAuth2Exception { if (JWSAlgorithm.RS256.equals(signatureAlgorithm) || JWSAlgorithm.RS384.equals(signatureAlgorithm) || JWSAlgorithm.RS512.equals(signatureAlgorithm)) { ...
JWT function(SignedJWT signedJWT, String tenantDomain, int tenantId) throws IdentityOAuth2Exception { if (JWSAlgorithm.RS256.equals(signatureAlgorithm) JWSAlgorithm.RS384.equals(signatureAlgorithm) JWSAlgorithm.RS512.equals(signatureAlgorithm)) { return signJWTWithRSA(signedJWT, signatureAlgorithm, tenantDomain, tenant...
/** * Generic Signing function * * @param signedJWT * @param tenantDomain * @param tenantId * @return * @throws IdentityOAuth2Exception */
Generic Signing function
signJWT
{ "repo_name": "chirankavinda123/identity-inbound-auth-oauth", "path": "components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/authcontext/JWTTokenGenerator.java", "license": "apache-2.0", "size": 23633 }
[ "com.nimbusds.jose.JWSAlgorithm", "com.nimbusds.jwt.SignedJWT", "org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception" ]
import com.nimbusds.jose.JWSAlgorithm; import com.nimbusds.jwt.SignedJWT; import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception;
import com.nimbusds.jose.*; import com.nimbusds.jwt.*; import org.wso2.carbon.identity.oauth2.*;
[ "com.nimbusds.jose", "com.nimbusds.jwt", "org.wso2.carbon" ]
com.nimbusds.jose; com.nimbusds.jwt; org.wso2.carbon;
138,652
private boolean isBreakOnOpcode(Integer opcode) { boolean shouldBreak = false; if (config.isBreakOnPingPong()) { // break on every message type shouldBreak = true; } else { // break only on non-ping/pong boolean isPing = opcode.equals(WebSocket...
boolean function(Integer opcode) { boolean shouldBreak = false; if (config.isBreakOnPingPong()) { shouldBreak = true; } else { boolean isPing = opcode.equals(WebSocketMessage.OPCODE_PING); boolean isPong = opcode.equals(WebSocketMessage.OPCODE_PONG); if (!isPing && !isPong) { shouldBreak = true; } } return shouldBreak;...
/** * Check out if breakpoint should be applied on given {@link WebSocketMessageDTO#opcode}. * * @param opcode * @return True if it should break on given opcode. */
Check out if breakpoint should be applied on given <code>WebSocketMessageDTO#opcode</code>
isBreakOnOpcode
{ "repo_name": "kingthorin/zap-extensions", "path": "addOns/websocket/src/main/java/org/zaproxy/zap/extension/websocket/brk/WebSocketBreakpointMessageHandler.java", "license": "apache-2.0", "size": 4428 }
[ "org.zaproxy.zap.extension.websocket.WebSocketMessage" ]
import org.zaproxy.zap.extension.websocket.WebSocketMessage;
import org.zaproxy.zap.extension.websocket.*;
[ "org.zaproxy.zap" ]
org.zaproxy.zap;
1,541,990
public Module init( StarlarkThread thread, // Map<String, Object> predeclared, @Nullable Object label) // a regrettable Bazelism we needn't widely expose in the API throws EvalException, InterruptedException { // Pseudocode: // module = new module(predeclared, label=label...
Module function( StarlarkThread thread, @Nullable Object label) throws EvalException, InterruptedException { throw new UnsupportedOperationException(); } }
/** * Execute the toplevel function of a compiled program and returns the module populated by its * top-level assignments. * * <p>The keys of predeclared must match the set used when creating the Program. */
Execute the toplevel function of a compiled program and returns the module populated by its top-level assignments. The keys of predeclared must match the set used when creating the Program
init
{ "repo_name": "aehlig/bazel", "path": "src/main/java/com/google/devtools/build/lib/syntax/Starlark.java", "license": "apache-2.0", "size": 10394 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
26,543
void createIndexes(Session session, Collection<? extends Index> indexesToAdd);
void createIndexes(Session session, Collection<? extends Index> indexesToAdd);
/** * Create new indexes on existing table(s). Both Table and Group indexes are supported. Primary * keys can not be created through this interface. Specified index IDs will not be used as they * are recalculated later. Blocks until the actual index data has been created. * * @param indexesToAd...
Create new indexes on existing table(s). Both Table and Group indexes are supported. Primary keys can not be created through this interface. Specified index IDs will not be used as they are recalculated later. Blocks until the actual index data has been created
createIndexes
{ "repo_name": "AydinSakar/sql-layer", "path": "src/main/java/com/foundationdb/server/api/DDLFunctions.java", "license": "agpl-3.0", "size": 10189 }
[ "com.foundationdb.ais.model.Index", "com.foundationdb.server.service.session.Session", "java.util.Collection" ]
import com.foundationdb.ais.model.Index; import com.foundationdb.server.service.session.Session; import java.util.Collection;
import com.foundationdb.ais.model.*; import com.foundationdb.server.service.session.*; import java.util.*;
[ "com.foundationdb.ais", "com.foundationdb.server", "java.util" ]
com.foundationdb.ais; com.foundationdb.server; java.util;
2,648,150
List<VnicProfileView> getAllForNetwork(Guid networkId, Guid userId, boolean filtered);
List<VnicProfileView> getAllForNetwork(Guid networkId, Guid userId, boolean filtered);
/** * Retrieves all vnic profiles associated to the given network. * * @param networkId * the network's ID * @param userId * the id of the user performing the query * @param filtered * does the query should be filtered by the user * @return t...
Retrieves all vnic profiles associated to the given network
getAllForNetwork
{ "repo_name": "jtux270/translate", "path": "ovirt/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/network/VnicProfileViewDao.java", "license": "gpl-3.0", "size": 2670 }
[ "java.util.List", "org.ovirt.engine.core.common.businessentities.network.VnicProfileView", "org.ovirt.engine.core.compat.Guid" ]
import java.util.List; import org.ovirt.engine.core.common.businessentities.network.VnicProfileView; import org.ovirt.engine.core.compat.Guid;
import java.util.*; import org.ovirt.engine.core.common.businessentities.network.*; import org.ovirt.engine.core.compat.*;
[ "java.util", "org.ovirt.engine" ]
java.util; org.ovirt.engine;
2,225,133
public SVGElement getFarthestViewportElement() { return SVGLocatableSupport.getFarthestViewportElement(this); }
SVGElement function() { return SVGLocatableSupport.getFarthestViewportElement(this); }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.svg.SVGLocatable#getFarthestViewportElement()}. */
DOM: Implements <code>org.w3c.dom.svg.SVGLocatable#getFarthestViewportElement()</code>
getFarthestViewportElement
{ "repo_name": "sflyphotobooks/crp-batik", "path": "sources/org/apache/batik/dom/svg/SVGGraphicsElement.java", "license": "apache-2.0", "size": 9292 }
[ "org.w3c.dom.svg.SVGElement" ]
import org.w3c.dom.svg.SVGElement;
import org.w3c.dom.svg.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,461,753
@SuppressWarnings("rawtypes") public static void serialize(Class clazz, Object instance, File output) throws JAXBException { JAXBContext context = JAXBContext.newInstance(clazz); Marshaller m = context.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean....
@SuppressWarnings(STR) static void function(Class clazz, Object instance, File output) throws JAXBException { JAXBContext context = JAXBContext.newInstance(clazz); Marshaller m = context.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); m.marshal(instance, output); }
/** * Serialize an object to XML using JAXB, writing it to the desired file * @param clazz the class of the object to serialize (wtf is wrong with reflection?!) * @param instance the actual object instance to serialize * @param output the file to write the xml into * @throws JAXBException when ...
Serialize an object to XML using JAXB, writing it to the desired file
serialize
{ "repo_name": "Klamann/maps4cim", "path": "maps4cim-core/src/main/java/de/nx42/maps4cim/util/Serializer.java", "license": "apache-2.0", "size": 11518 }
[ "java.io.File", "javax.xml.bind.JAXBContext", "javax.xml.bind.JAXBException", "javax.xml.bind.Marshaller" ]
import java.io.File; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller;
import java.io.*; import javax.xml.bind.*;
[ "java.io", "javax.xml" ]
java.io; javax.xml;
1,638,529
public void setDependencies(List<DependencyNode> dependencies) { if (dependencies == null) { return; } this.dependencies = dependencies; Set<String> allDependencies = new HashSet<>(); dependencies.forEach(dependencyNode -> { allDependencies.add(depend...
void function(List<DependencyNode> dependencies) { if (dependencies == null) { return; } this.dependencies = dependencies; Set<String> allDependencies = new HashSet<>(); dependencies.forEach(dependencyNode -> { allDependencies.add(dependencyNode.artifactId); allDependencies.addAll(dependencyNode.allDependencies); }); t...
/** * Sets the dependencies list of the UUF Component reflected by this node. * * @param dependencies dependencies list to be set */
Sets the dependencies list of the UUF Component reflected by this node
setDependencies
{ "repo_name": "Shan1024/carbon-uuf", "path": "components/uuf-core/src/main/java/org/wso2/carbon/uuf/api/config/DependencyNode.java", "license": "apache-2.0", "size": 4873 }
[ "java.util.HashSet", "java.util.List", "java.util.Set" ]
import java.util.HashSet; import java.util.List; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,579,228
public Set<String> getCASScopes() { final Set<String> scopeSet = new HashSet<>(); for (final Scope defaultScope : this.casScopeHandler.getDefaults()) { scopeSet.add(defaultScope.getName()); } return scopeSet; }
Set<String> function() { final Set<String> scopeSet = new HashSet<>(); for (final Scope defaultScope : this.casScopeHandler.getDefaults()) { scopeSet.add(defaultScope.getName()); } return scopeSet; }
/** * Retrieve a set of scopes specific to the CAS handler. * * @return the set of scopes */
Retrieve a set of scopes specific to the CAS handler
getCASScopes
{ "repo_name": "CenterForOpenScience/cas-overlay", "path": "cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/ScopeManager.java", "license": "apache-2.0", "size": 3150 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,022,156
public Map<HRegionInfo, ServerName> getRegionToRegionServerMap() { return regionToRegionServerMap; }
Map<HRegionInfo, ServerName> function() { return regionToRegionServerMap; }
/** * Get region to region server map * @return region to region server map */
Get region to region server map
getRegionToRegionServerMap
{ "repo_name": "Jackygq1982/hbase_src", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/SnapshotOfRegionAssignmentFromMeta.java", "license": "apache-2.0", "size": 8092 }
[ "java.util.Map", "org.apache.hadoop.hbase.HRegionInfo", "org.apache.hadoop.hbase.ServerName" ]
import java.util.Map; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.ServerName;
import java.util.*; import org.apache.hadoop.hbase.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,077,583
static int hashCodeImpl(Set<?> s) { int hashCode = 0; for (Object o : s) { hashCode += o != null ? o.hashCode() : 0; } return hashCode; }
static int hashCodeImpl(Set<?> s) { int hashCode = 0; for (Object o : s) { hashCode += o != null ? o.hashCode() : 0; } return hashCode; }
/** * An implementation for {@link Set#hashCode()}. */
An implementation for <code>Set#hashCode()</code>
hashCodeImpl
{ "repo_name": "hceylan/guava", "path": "guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Sets.java", "license": "apache-2.0", "size": 47528 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,858,835
public String readXmlHash(ElasticContext ec, String id) throws Exception { return (new XmlContent(ec)).readXmlHash(ec,id); }
String function(ElasticContext ec, String id) throws Exception { return (new XmlContent(ec)).readXmlHash(ec,id); }
/** * Read an xml hash. * @param ec the context * @param id the id * @return the hash * @throws Exception */
Read an xml hash
readXmlHash
{ "repo_name": "usgin/geoportal-server-catalog", "path": "geoportal/src/main/java/com/esri/geoportal/lib/elastic/util/ItemIO.java", "license": "apache-2.0", "size": 7537 }
[ "com.esri.geoportal.lib.elastic.ElasticContext", "com.esri.geoportal.lib.elastic.kvp.XmlContent" ]
import com.esri.geoportal.lib.elastic.ElasticContext; import com.esri.geoportal.lib.elastic.kvp.XmlContent;
import com.esri.geoportal.lib.elastic.*; import com.esri.geoportal.lib.elastic.kvp.*;
[ "com.esri.geoportal" ]
com.esri.geoportal;
908,641
@Override public CloseFuture close() { return null; }
CloseFuture function() { return null; }
/** * Does nothing. * @return */
Does nothing
close
{ "repo_name": "Maxcloud/Mushy", "path": "src/tools/MockIOSession.java", "license": "gpl-3.0", "size": 3972 }
[ "org.apache.mina.common.CloseFuture" ]
import org.apache.mina.common.CloseFuture;
import org.apache.mina.common.*;
[ "org.apache.mina" ]
org.apache.mina;
45,112
public void init() { loadInterfaces(); isAnyNetInterfaceAvailable = (mIfaces.length > 0); mIsConnectivityAvailable = isConnectivityAvailable(); mIsCoreInstalled = System.isCoreInstalled(); mIsDaemonBeating = System.isCoreInitialized(); // check minimum requirements ...
void function() { loadInterfaces(); isAnyNetInterfaceAvailable = (mIfaces.length > 0); mIsConnectivityAvailable = isConnectivityAvailable(); mIsCoreInstalled = System.isCoreInstalled(); mIsDaemonBeating = System.isCoreInitialized(); if (!mIsCoreInstalled) { EMPTY_LIST_MESSAGE = mIsConnectivityAvailable ? getString(R.st...
/** * Performs the firsts actions when the app starts. * called also when the user connects to a wifi from the app, and when the core is updated. */
Performs the firsts actions when the app starts. called also when the user connects to a wifi from the app, and when the core is updated
init
{ "repo_name": "cameronaaron/android", "path": "cSploit/src/main/java/org/csploit/android/MainFragment.java", "license": "gpl-3.0", "size": 49664 }
[ "org.csploit.android.core.Client", "org.csploit.android.core.CrashReporter", "org.csploit.android.core.Logger", "org.csploit.android.core.System" ]
import org.csploit.android.core.Client; import org.csploit.android.core.CrashReporter; import org.csploit.android.core.Logger; import org.csploit.android.core.System;
import org.csploit.android.core.*;
[ "org.csploit.android" ]
org.csploit.android;
2,404,549
public Builder nextId(final int id) { if (!types.isEmpty()) { if (id != FLOATING_ID && id < blockHeadId + types.size()) { if (LOGGER.isWarnEnabled()) { LOGGER.warn("requested nextId {} could potentially overlap " + "with existing registrations {}+{} ", ...
Builder function(final int id) { if (!types.isEmpty()) { if (id != FLOATING_ID && id < blockHeadId + types.size()) { if (LOGGER.isWarnEnabled()) { LOGGER.warn(STR + STR, id, blockHeadId, types.size(), new RuntimeException()); } } blocks.add(new RegistrationBlock(this.blockHeadId, types)); types = new ArrayList<>(); } t...
/** * Sets the next Kryo registration Id for following register entries. * * @param id Kryo registration Id * @return this * @see Kryo#register(Class, Serializer, int) */
Sets the next Kryo registration Id for following register entries
nextId
{ "repo_name": "kuujo/copycat", "path": "utils/src/main/java/io/atomix/utils/serializer/Namespace.java", "license": "apache-2.0", "size": 19312 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
818,778
public Date getAccessDate() { return accessDate; }
Date function() { return accessDate; }
/** * Return the date when the user last issued a client command. * * @return Last access date */
Return the date when the user last issued a client command
getAccessDate
{ "repo_name": "ModelN/build-management", "path": "mn-build-core/src/main/java/com/modeln/build/perforce/User.java", "license": "mit", "size": 10355 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,846,691
public List<TableName> listTableNamesByNamespace(String name) throws IOException;
List<TableName> function(String name) throws IOException;
/** * Get list of table names by namespace * @param name namespace name * @return table names * @throws IOException */
Get list of table names by namespace
listTableNamesByNamespace
{ "repo_name": "vincentpoon/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterServices.java", "license": "apache-2.0", "size": 15223 }
[ "java.io.IOException", "java.util.List", "org.apache.hadoop.hbase.TableName" ]
import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.TableName;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,198,418
public int[] positionFor(int offset) { int line = Arrays.binarySearch(lines.toArray(), offset); int off; if (line < 0) { line = -(line) - 1; // If the offset is not in the lines array off = lines.get(line - 1); // Get offset of previous line } else {...
int[] function(int offset) { int line = Arrays.binarySearch(lines.toArray(), offset); int off; if (line < 0) { line = -(line) - 1; off = lines.get(line - 1); } else { off = lines.get(line) - 1; } int column = offset - off; return new int[] { line, column }; }
/** * Converts a position given as an offset into a (line, column) array. * * @param offset in the associated stream * @return position as (line, column) in the stream */
Converts a position given as an offset into a (line, column) array
positionFor
{ "repo_name": "GumTreeDiff/gumtree", "path": "core/src/main/java/com/github/gumtreediff/io/LineReader.java", "license": "lgpl-3.0", "size": 3010 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,869,552
public Link publish(final String path) throws ServerIOException, IOException { return cloudApi.publish(path); }
Link function(final String path) throws ServerIOException, IOException { return cloudApi.publish(path); }
/** * Publishing a file or folder * * @see <p>API reference <a href="http://api.yandex.com/disk/api/reference/publish.xml">english</a>, * <a href="https://tech.yandex.ru/disk/api/reference/publish-docpage/">russian</a></p> */
Publishing a file or folder
publish
{ "repo_name": "yandex-disk/yandex-disk-restapi-java", "path": "disk-restapi-sdk/src/main/java/com/yandex/disk/rest/RestClient.java", "license": "apache-2.0", "size": 19562 }
[ "com.yandex.disk.rest.exceptions.ServerIOException", "com.yandex.disk.rest.json.Link", "java.io.IOException" ]
import com.yandex.disk.rest.exceptions.ServerIOException; import com.yandex.disk.rest.json.Link; import java.io.IOException;
import com.yandex.disk.rest.exceptions.*; import com.yandex.disk.rest.json.*; import java.io.*;
[ "com.yandex.disk", "java.io" ]
com.yandex.disk; java.io;
307,202
public ServiceCall<Void> postMethodGlobalNotProvidedValidAsync(final ServiceCallback<Void> serviceCallback) { return ServiceCall.create(postMethodGlobalNotProvidedValidWithServiceResponseAsync(), serviceCallback); }
ServiceCall<Void> function(final ServiceCallback<Void> serviceCallback) { return ServiceCall.create(postMethodGlobalNotProvidedValidWithServiceResponseAsync(), serviceCallback); }
/** * POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */
POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed
postMethodGlobalNotProvidedValidAsync
{ "repo_name": "tbombach/autorest", "path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/azurespecials/implementation/SubscriptionInCredentialsImpl.java", "license": "mit", "size": 20911 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,353,587
if ("geometry".equalsIgnoreCase(type)) { return instance.create(GeometryIndexType.TYPE_GEOMETRY, values); } else if ("vertex".equalsIgnoreCase(type)) { return instance.create(GeometryIndexType.TYPE_VERTEX, values); } else if ("edge".equalsIgnoreCase(type)) { return instance.create(GeometryIndexType.TYPE_...
if (STR.equalsIgnoreCase(type)) { return instance.create(GeometryIndexType.TYPE_GEOMETRY, values); } else if (STR.equalsIgnoreCase(type)) { return instance.create(GeometryIndexType.TYPE_VERTEX, values); } else if ("edge".equalsIgnoreCase(type)) { return instance.create(GeometryIndexType.TYPE_EDGE, values); } return nul...
/** * Create a new geometry index instance. * * @param instance * The index service instance to help you create the index. * @param type * The type for the deepest index value. * @param values * A list of values for the children to create. * @return The new index. *...
Create a new geometry index instance
create
{ "repo_name": "geomajas/geomajas-project-client-gwt", "path": "plugin/editing/editing-javascript-api/src/main/java/org/geomajas/plugin/editing/jsapi/client/service/JsGeometryIndexService.java", "license": "agpl-3.0", "size": 11965 }
[ "org.geomajas.plugin.editing.client.service.GeometryIndexType" ]
import org.geomajas.plugin.editing.client.service.GeometryIndexType;
import org.geomajas.plugin.editing.client.service.*;
[ "org.geomajas.plugin" ]
org.geomajas.plugin;
1,299,657
public RexNode makeNewInvocation( RelDataType type, List<RexNode> exprs) { return new RexCall( type, SqlStdOperatorTable.NEW, exprs); }
RexNode function( RelDataType type, List<RexNode> exprs) { return new RexCall( type, SqlStdOperatorTable.NEW, exprs); }
/** * Creates an invocation of the NEW operator. * * @param type Type to be instantiated * @param exprs Arguments to NEW operator * @return Expression invoking NEW operator */
Creates an invocation of the NEW operator
makeNewInvocation
{ "repo_name": "mehant/incubator-calcite", "path": "core/src/main/java/org/apache/calcite/rex/RexBuilder.java", "license": "apache-2.0", "size": 42908 }
[ "java.util.List", "org.apache.calcite.rel.type.RelDataType", "org.apache.calcite.sql.fun.SqlStdOperatorTable" ]
import java.util.List; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.sql.fun.SqlStdOperatorTable;
import java.util.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.sql.fun.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
1,643,901
public static void agentDeparted(Workgroup workgroup, AgentSession agentSession) { for (WorkgroupEventListener listener : listeners) { try { listener.agentDeparted(workgroup, agentSession); } catch (Exception e) { Log.error(e.getMessage(), ...
static void function(Workgroup workgroup, AgentSession agentSession) { for (WorkgroupEventListener listener : listeners) { try { listener.agentDeparted(workgroup, agentSession); } catch (Exception e) { Log.error(e.getMessage(), e); } } }
/** * Notification message that an Agent has left a Workgroup. * * @param workgroup the workgroup where the agent has left. * @param agentSession the session of the agent that has ended. */
Notification message that an Agent has left a Workgroup
agentDeparted
{ "repo_name": "wudingli/openfire", "path": "src/plugins/fastpath/src/java/org/jivesoftware/xmpp/workgroup/event/WorkgroupEventDispatcher.java", "license": "apache-2.0", "size": 8571 }
[ "org.jivesoftware.xmpp.workgroup.AgentSession", "org.jivesoftware.xmpp.workgroup.Workgroup" ]
import org.jivesoftware.xmpp.workgroup.AgentSession; import org.jivesoftware.xmpp.workgroup.Workgroup;
import org.jivesoftware.xmpp.workgroup.*;
[ "org.jivesoftware.xmpp" ]
org.jivesoftware.xmpp;
178,471
@Test(expected = IllegalArgumentException.class) public void invalidXMLConfigurationFileThrowsCheckstyleException() throws IOException, Exception { DefaultConfiguration main = createCheckConfig(TreeWalker.class); final DefaultConfiguration checkConfig = createCheckConfig(StereotypeCheck.class); checkConfig.ad...
@Test(expected = IllegalArgumentException.class) void function() throws IOException, Exception { DefaultConfiguration main = createCheckConfig(TreeWalker.class); final DefaultConfiguration checkConfig = createCheckConfig(StereotypeCheck.class); checkConfig.addAttribute("file", STR); main.addChild(checkConfig); final St...
/** * If the stereotype configuration file is not valid against the XSD. * * @throws IOException * @throws Exception */
If the stereotype configuration file is not valid against the XSD
invalidXMLConfigurationFileThrowsCheckstyleException
{ "repo_name": "NovaTecConsulting/stereotype-check", "path": "stereotype.check.plugin.test/src/test/java/info/novatec/ita/check/config/StereotypeCheckConfigurationReaderTest.java", "license": "apache-2.0", "size": 14856 }
[ "com.puppycrawl.tools.checkstyle.DefaultConfiguration", "com.puppycrawl.tools.checkstyle.TreeWalker", "info.novatec.ita.check.StereotypeCheck", "java.io.IOException", "org.junit.Test" ]
import com.puppycrawl.tools.checkstyle.DefaultConfiguration; import com.puppycrawl.tools.checkstyle.TreeWalker; import info.novatec.ita.check.StereotypeCheck; import java.io.IOException; import org.junit.Test;
import com.puppycrawl.tools.checkstyle.*; import info.novatec.ita.check.*; import java.io.*; import org.junit.*;
[ "com.puppycrawl.tools", "info.novatec.ita", "java.io", "org.junit" ]
com.puppycrawl.tools; info.novatec.ita; java.io; org.junit;
834,325
@Override public @NotNull BigDecimalAssert isNegative() { return isLessThan(ZERO); }
@NotNull BigDecimalAssert function() { return isLessThan(ZERO); }
/** * Verifies that the actual {@code BigDecimal} is negative. * * @return this assertion object. * @throws AssertionError if the actual {@code BigDecimal} value is {@code null}. * @throws AssertionError if the actual {@code BigDecimal} value is not negative. */
Verifies that the actual BigDecimal is negative
isNegative
{ "repo_name": "alexruiz/fest-assert-1.x", "path": "src/main/java/org/fest/assertions/BigDecimalAssert.java", "license": "apache-2.0", "size": 2977 }
[ "org.jetbrains.annotations.NotNull" ]
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
1,479,665
public CodeElementExtractor.ElementDescription getContainerDescription() { return this.container; }
CodeElementExtractor.ElementDescription function() { return this.container; }
/** Replies the container description. * * @return the container description. */
Replies the container description
getContainerDescription
{ "repo_name": "sarl/sarl", "path": "main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/ExpressionBuilderFragment.java", "license": "apache-2.0", "size": 55031 }
[ "io.sarl.lang.mwe2.codebuilder.extractor.CodeElementExtractor" ]
import io.sarl.lang.mwe2.codebuilder.extractor.CodeElementExtractor;
import io.sarl.lang.mwe2.codebuilder.extractor.*;
[ "io.sarl.lang" ]
io.sarl.lang;
459,139
public boolean parse() { try { SAXParser parser = sParserFactory.newSAXParser(); mHandler = new GpxHandler(); parser.parse(new InputSource(new FileReader(mFileName)), mHandler); return mHandler.getSuccess(); } catch (Exception e) { GPLog...
boolean function() { try { SAXParser parser = sParserFactory.newSAXParser(); mHandler = new GpxHandler(); parser.parse(new InputSource(new FileReader(mFileName)), mHandler); return mHandler.getSuccess(); } catch (Exception e) { GPLog.error(this, null, e); } return false; }
/** * Parses the GPX file. * * @return <code>true</code> if success. */
Parses the GPX file
parse
{ "repo_name": "geopaparazzi/geopaparazzi", "path": "geopaparazzi_library/src/main/java/eu/geopaparazzi/library/gpx/parser/GpxParser.java", "license": "gpl-3.0", "size": 15599 }
[ "eu.geopaparazzi.library.database.GPLog", "java.io.FileReader", "javax.xml.parsers.SAXParser", "org.xml.sax.InputSource" ]
import eu.geopaparazzi.library.database.GPLog; import java.io.FileReader; import javax.xml.parsers.SAXParser; import org.xml.sax.InputSource;
import eu.geopaparazzi.library.database.*; import java.io.*; import javax.xml.parsers.*; import org.xml.sax.*;
[ "eu.geopaparazzi.library", "java.io", "javax.xml", "org.xml.sax" ]
eu.geopaparazzi.library; java.io; javax.xml; org.xml.sax;
623,909
public boolean recalculateCreditSplit() { boolean noErrors = true; if(isInstitutionalProposalCreditsLimitApplicable()) { Map<String, Map<String, ScaleTwoDecimal>> totalsMap = calculateCreditSplitTotals(); noErrors = checkIfPersonTotalsAreValid(totalsMap); noErrors...
boolean function() { boolean noErrors = true; if(isInstitutionalProposalCreditsLimitApplicable()) { Map<String, Map<String, ScaleTwoDecimal>> totalsMap = calculateCreditSplitTotals(); noErrors = checkIfPersonTotalsAreValid(totalsMap); noErrors &= checkIfPersonUnitsTotalsAreValid(totalsMap); } return noErrors; }
/** * Apply calculation total rules */
Apply calculation total rules
recalculateCreditSplit
{ "repo_name": "sanjupolus/KC6.oLatest", "path": "coeus-impl/src/main/java/org/kuali/kra/institutionalproposal/contacts/InstitutionalProposalCreditSplitBean.java", "license": "agpl-3.0", "size": 16814 }
[ "java.util.Map", "org.kuali.coeus.sys.api.model.ScaleTwoDecimal" ]
import java.util.Map; import org.kuali.coeus.sys.api.model.ScaleTwoDecimal;
import java.util.*; import org.kuali.coeus.sys.api.model.*;
[ "java.util", "org.kuali.coeus" ]
java.util; org.kuali.coeus;
1,854,788
public static void logVersionInfo() { Log.i(TAG, "vendor : " + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION)); if (false) { int[] values = new int...
static void function() { Log.i(TAG, STR + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, STR + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, STR + GLES20.glGetString(GLES20.GL_VERSION)); if (false) { int[] values = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0); int majorVersion = values[...
/** * Writes GL version info to the log. */
Writes GL version info to the log
logVersionInfo
{ "repo_name": "DisruptiveMind/cineio-broadcast-android", "path": "cineio-broadcast-android-sdk/src/main/java/io/cine/android/streaming/gles/GlUtil.java", "license": "mit", "size": 7198 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,350,369
@Override public Observable<List<IGameDatasource>> search(String query, int offset, int limit) { return netImpl.search(query, offset, limit) .toObservable(); }
Observable<List<IGameDatasource>> function(String query, int offset, int limit) { return netImpl.search(query, offset, limit) .toObservable(); }
/** * Searches game that matches the specified query name * * @param query the name to query. * @param offset the offset of the query * @param limit the max amount of items to return * @return a list of games matching the query. */
Searches game that matches the specified query name
search
{ "repo_name": "Yorxxx/playednext", "path": "app/src/main/java/com/piticlistudio/playednext/game/model/repository/datasource/GamedataRepository.java", "license": "apache-2.0", "size": 1868 }
[ "com.piticlistudio.playednext.game.model.entity.datasource.IGameDatasource", "io.reactivex.Observable", "java.util.List" ]
import com.piticlistudio.playednext.game.model.entity.datasource.IGameDatasource; import io.reactivex.Observable; import java.util.List;
import com.piticlistudio.playednext.game.model.entity.datasource.*; import io.reactivex.*; import java.util.*;
[ "com.piticlistudio.playednext", "io.reactivex", "java.util" ]
com.piticlistudio.playednext; io.reactivex; java.util;
2,734,349
public static String nodeToString(Node node) { return DOM2Writer.nodeToString(node); }
static String function(Node node) { return DOM2Writer.nodeToString(node); }
/** * Serialize the given node to a String. * * @param node Node to be serialized. * @return The serialized node as a java.lang.String instance. */
Serialize the given node to a String
nodeToString
{ "repo_name": "dharshanaw/carbon-identity-framework", "path": "components/identity-core/org.wso2.carbon.identity.core/src/main/java/org/wso2/carbon/identity/core/util/IdentityUtil.java", "license": "apache-2.0", "size": 40688 }
[ "com.ibm.wsdl.util.xml.DOM2Writer", "org.w3c.dom.Node" ]
import com.ibm.wsdl.util.xml.DOM2Writer; import org.w3c.dom.Node;
import com.ibm.wsdl.util.xml.*; import org.w3c.dom.*;
[ "com.ibm.wsdl", "org.w3c.dom" ]
com.ibm.wsdl; org.w3c.dom;
552,370
void done(RegisteredMigrationStep dbMigration);
void done(RegisteredMigrationStep dbMigration);
/** * Saves in persisted migration history the fact that the specified {@link RegisteredMigrationStep} has * been successfully executed. * * @throws RuntimeException if the information can not be persisted (and committed). */
Saves in persisted migration history the fact that the specified <code>RegisteredMigrationStep</code> has been successfully executed
done
{ "repo_name": "Builders-SonarSource/sonarqube-bis", "path": "server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/history/MigrationHistory.java", "license": "lgpl-3.0", "size": 2029 }
[ "org.sonar.server.platform.db.migration.step.RegisteredMigrationStep" ]
import org.sonar.server.platform.db.migration.step.RegisteredMigrationStep;
import org.sonar.server.platform.db.migration.step.*;
[ "org.sonar.server" ]
org.sonar.server;
917,423
private void notifyRegisterChanged() { for (final IRegistersChangedListener listener : reglisteners) { listener.registerDataChanged(); } }
void function() { for (final IRegistersChangedListener listener : reglisteners) { listener.registerDataChanged(); } }
/** * Notifies the register listeners about changes in the register values. */
Notifies the register listeners about changes in the register values
notifyRegisterChanged
{ "repo_name": "AmesianX/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/Gui/Debug/RegisterPanel/CRegisterProvider.java", "license": "apache-2.0", "size": 8519 }
[ "com.google.security.zynamics.zylib.gui.JRegisterView" ]
import com.google.security.zynamics.zylib.gui.JRegisterView;
import com.google.security.zynamics.zylib.gui.*;
[ "com.google.security" ]
com.google.security;
345,770
private void orderTreeModel(List<List> hierarchy){ if(hierarchy != null){ for(List nodeList : hierarchy){ orderTreeModel((List)nodeList.get(1)); } Collections.sort(hierarchy, new NodeListComparator()); } }
void function(List<List> hierarchy){ if(hierarchy != null){ for(List nodeList : hierarchy){ orderTreeModel((List)nodeList.get(1)); } Collections.sort(hierarchy, new NodeListComparator()); } }
/** * takes a list representation of the tree and orders it Alphabetically * @param hierarchy */
takes a list representation of the tree and orders it Alphabetically
orderTreeModel
{ "repo_name": "eemirtekin/Sakai-10.6-TR", "path": "delegatedaccess/impl/src/java/org/sakaiproject/delegatedaccess/logic/ProjectLogicImpl.java", "license": "apache-2.0", "size": 109911 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,185,462
@XmlElement(name = "mimeType") public String getMimeTypeName() { return reference.getMimeType().getName(); }
@XmlElement(name = STR) String function() { return reference.getMimeType().getName(); }
/** * Gets the name of the MIME type for the reference. * @return the name of the MIME type for the reference */
Gets the name of the MIME type for the reference
getMimeTypeName
{ "repo_name": "apache/oodt", "path": "webapp/fmprod/src/main/java/org/apache/oodt/cas/product/jaxrs/resources/TransferResource.java", "license": "apache-2.0", "size": 5099 }
[ "javax.xml.bind.annotation.XmlElement" ]
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.*;
[ "javax.xml" ]
javax.xml;
765,604
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { int index = requestCode>>16; if (index != 0) { index--; if (mFragments.mActive == null || index < 0 || index >= mFragments.mActive.size()) { Log.w(TAG, "Activit...
void function(int requestCode, int resultCode, Intent data) { int index = requestCode>>16; if (index != 0) { index--; if (mFragments.mActive == null index < 0 index >= mFragments.mActive.size()) { Log.w(TAG, STR + Integer.toHexString(requestCode)); return; } Fragment frag = mFragments.mActive.get(index); if (frag == nu...
/** * Dispatch incoming result to the correct fragment. */
Dispatch incoming result to the correct fragment
onActivityResult
{ "repo_name": "beshkenadze/ActionBarSherlock", "path": "plugins/maps/src/android/support/v4/app/FragmentMapActivity.java", "license": "apache-2.0", "size": 48877 }
[ "android.content.Intent", "android.util.Log" ]
import android.content.Intent; import android.util.Log;
import android.content.*; import android.util.*;
[ "android.content", "android.util" ]
android.content; android.util;
246,879
private void readProcMemInfoFile(boolean readAgain) { if (readMemInfoFile && !readAgain) { return; } // Read "/proc/memInfo" file BufferedReader in; InputStreamReader fReader; try { fReader = new InputStreamReader( Files.newInputStream(Paths.get(procfsMemFile)), ...
void function(boolean readAgain) { if (readMemInfoFile && !readAgain) { return; } BufferedReader in; InputStreamReader fReader; try { fReader = new InputStreamReader( Files.newInputStream(Paths.get(procfsMemFile)), Charset.forName("UTF-8")); in = new BufferedReader(fReader); } catch (IOException f) { LOG.warn(STR + pro...
/** * Read /proc/meminfo, parse and compute memory information. * @param readAgain if false, read only on the first time */
Read /proc/meminfo, parse and compute memory information
readProcMemInfoFile
{ "repo_name": "apurtell/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/SysInfoLinux.java", "license": "apache-2.0", "size": 23705 }
[ "java.io.BufferedReader", "java.io.IOException", "java.io.InputStreamReader", "java.nio.charset.Charset", "java.nio.file.Files", "java.nio.file.Paths", "java.util.regex.Matcher" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Paths; import java.util.regex.Matcher;
import java.io.*; import java.nio.charset.*; import java.nio.file.*; import java.util.regex.*;
[ "java.io", "java.nio", "java.util" ]
java.io; java.nio; java.util;
1,237,199
@Test public void testSetName() { String name = "a test name"; QueueConfig queueConfig = new QueueConfig().setName(name); assertEquals(name, queueConfig.getName()); }
void function() { String name = STR; QueueConfig queueConfig = new QueueConfig().setName(name); assertEquals(name, queueConfig.getName()); }
/** * Test method for {@link com.hazelcast.config.QueueConfig#setName(java.lang.String)}. */
Test method for <code>com.hazelcast.config.QueueConfig#setName(java.lang.String)</code>
testSetName
{ "repo_name": "tombujok/hazelcast", "path": "hazelcast/src/test/java/com/hazelcast/config/QueueConfigTest.java", "license": "apache-2.0", "size": 3173 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
595,747
List<String> gitignoreLines = new ArrayList<String>(); try { // default charset should be ok here List<String> jazzignoreLines = Files.readLines(jazzignore, Charset.defaultCharset()); String lineForRegex = ""; boolean needToTransform = false; for (String line : jazzignoreLines) { line = line.trim...
List<String> gitignoreLines = new ArrayList<String>(); try { List<String> jazzignoreLines = Files.readLines(jazzignore, Charset.defaultCharset()); String lineForRegex = STR#STR\\STRSTRunable to read .jazzignore file " + jazzignore.getAbsolutePath(), ioe); } return gitignoreLines; }
/** * Translates a .jazzignore file to .gitignore * * @param jazzignore * the input .jazzignore file * * @return the translation, as a list of lines */
Translates a .jazzignore file to .gitignore
toGitignore
{ "repo_name": "rtcTo/rtc2gitcli", "path": "rtc2git.cli.extension/src/to/rtc/cli/migrate/util/JazzignoreTranslator.java", "license": "mit", "size": 2747 }
[ "java.nio.charset.Charset", "java.util.ArrayList", "java.util.List" ]
import java.nio.charset.Charset; import java.util.ArrayList; import java.util.List;
import java.nio.charset.*; import java.util.*;
[ "java.nio", "java.util" ]
java.nio; java.util;
1,607,423
public static void recordMediumTimesHistogram(String name, long duration, TimeUnit timeUnit) { recordCustomTimesHistogramMilliseconds( name, timeUnit.toMillis(duration), 10, TimeUnit.MINUTES.toMillis(3), 50); }
static void function(String name, long duration, TimeUnit timeUnit) { recordCustomTimesHistogramMilliseconds( name, timeUnit.toMillis(duration), 10, TimeUnit.MINUTES.toMillis(3), 50); }
/** * Records a sample in a histogram of times. Useful for recording medium durations. This is the * Java equivalent of the UMA_HISTOGRAM_MEDIUM_TIMES C++ macro. * @param name name of the histogram * @param duration duration to be recorded * @param timeUnit the unit of the duration argument ...
Records a sample in a histogram of times. Useful for recording medium durations. This is the Java equivalent of the UMA_HISTOGRAM_MEDIUM_TIMES C++ macro
recordMediumTimesHistogram
{ "repo_name": "Teamxrtc/webrtc-streaming-node", "path": "third_party/webrtc/src/chromium/src/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java", "license": "mit", "size": 8722 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,222,847
EReference getIfBranch_Statements();
EReference getIfBranch_Statements();
/** * Returns the meta object for the containment reference list '{@link org.eclectic.frontend.core.IfBranch#getStatements <em>Statements</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference list '<em>Statements</em>'. * @see org.eclectic.frontend.c...
Returns the meta object for the containment reference list '<code>org.eclectic.frontend.core.IfBranch#getStatements Statements</code>'.
getIfBranch_Statements
{ "repo_name": "jesusc/eclectic", "path": "plugins/org.eclectic.frontend.asm/src-gen/org/eclectic/frontend/core/CorePackage.java", "license": "gpl-3.0", "size": 187193 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,635,920
public final ThreadFactory getThreadFactory() { return this.threadFactory; }
final ThreadFactory function() { return this.threadFactory; }
/** * Return the external factory to use for creating new Threads, if any. */
Return the external factory to use for creating new Threads, if any
getThreadFactory
{ "repo_name": "bbossgroups/bbossgroups-3.5", "path": "bboss-core/src/org/frameworkset/schedule/SimpleAsyncTaskExecutor.java", "license": "apache-2.0", "size": 7396 }
[ "java.util.concurrent.ThreadFactory" ]
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,621,599
public boolean isWritable() { LOG.debug("Checking if file exists"); if (file.exists()) { LOG.debug("Checking can write: " + file.canWrite()); return file.canWrite(); } LOG.debug("Authorized"); return true; } private static final Method C...
boolean function() { LOG.debug(STR); if (file.exists()) { LOG.debug(STR + file.canWrite()); return file.canWrite(); } LOG.debug(STR); return true; } private static final Method CAN_EXECUTE_METHOD; static { Method method = null; try { method = File.class.getMethod(STR); } catch (Throwable t) { } CAN_EXECUTE_METHOD = met...
/** * Check file write permission. */
Check file write permission
isWritable
{ "repo_name": "lucastheisen/mina-sshd", "path": "sshd-core/src/main/java/org/apache/sshd/common/file/nativefs/NativeSshFile.java", "license": "apache-2.0", "size": 19484 }
[ "java.io.File", "java.lang.reflect.Method" ]
import java.io.File; import java.lang.reflect.Method;
import java.io.*; import java.lang.reflect.*;
[ "java.io", "java.lang" ]
java.io; java.lang;
2,678,493
public long readVLong() throws IOException { byte b = readByte(); long i = b & 0x7FL; if ((b & 0x80) == 0) return i; b = readByte(); i |= (b & 0x7FL) << 7; if ((b & 0x80) == 0) return i; b = readByte(); i |= (b & 0x7FL) << 14; if ((b & 0x80) == 0) return i; b = readByte();...
long function() throws IOException { byte b = readByte(); long i = b & 0x7FL; if ((b & 0x80) == 0) return i; b = readByte(); i = (b & 0x7FL) << 7; if ((b & 0x80) == 0) return i; b = readByte(); i = (b & 0x7FL) << 14; if ((b & 0x80) == 0) return i; b = readByte(); i = (b & 0x7FL) << 21; if ((b & 0x80) == 0) return i; b ...
/** Reads a long stored in variable-length format. Reads between one and * nine bytes. Smaller values take fewer bytes. Negative numbers are not * supported. */
Reads a long stored in variable-length format. Reads between one and nine bytes. Smaller values take fewer bytes. Negative numbers are not
readVLong
{ "repo_name": "bighaidao/lucene", "path": "lucene-core/src/main/java/org/apache/lucene/store/DataInput.java", "license": "apache-2.0", "size": 8458 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,562,662
public JsonArray getJsonArray(Object source, Object... jpath) { return asJsonArray(get(jsonify(source), newJsonArray(jpath))); }
JsonArray function(Object source, Object... jpath) { return asJsonArray(get(jsonify(source), newJsonArray(jpath))); }
/** * Gets the JsonArray in the specified jpath. * * @param source the source * @param jpath the fully qualified json path to the field required. eg get({'a': {'b': {'c': [1, * 2, 3, 4]}}}, "a", "b" "c", 1]) is '2'. Numerals are presumed to be array indexes * @return the json element returns 'Null...
Gets the JsonArray in the specified jpath
getJsonArray
{ "repo_name": "balajeetm/json-mystique", "path": "json-mystique-utils/gson-utils/src/main/java/com/balajeetm/mystique/util/gson/lever/JsonLever.java", "license": "apache-2.0", "size": 77289 }
[ "com.google.gson.JsonArray" ]
import com.google.gson.JsonArray;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
2,740,921
EEnum getStatus();
EEnum getStatus();
/** * Returns the meta object for enum '{@link fopramodel.Status <em>Status</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for enum '<em>Status</em>'. * @see fopramodel.Status * @generated */
Returns the meta object for enum '<code>fopramodel.Status Status</code>'.
getStatus
{ "repo_name": "ArendtTh/Seminar-Eclipse-WS201415", "path": "de.unimarburg.swt.fopra.model/src/fopramodel/FopramodelPackage.java", "license": "epl-1.0", "size": 43454 }
[ "org.eclipse.emf.ecore.EEnum" ]
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,370,950
public final ClientCache getClientCache(final ClientCacheFactory factory) { synchronized (JUnit4CacheTestCase.class) { InternalCache gemFireCache = GemFireCacheImpl.getInstance(); if (gemFireCache != null && !gemFireCache.isClosed() && gemFireCache.getCancelCriterion().isCancelInProgress()) ...
final ClientCache function(final ClientCacheFactory factory) { synchronized (JUnit4CacheTestCase.class) { InternalCache gemFireCache = GemFireCacheImpl.getInstance(); if (gemFireCache != null && !gemFireCache.isClosed() && gemFireCache.getCancelCriterion().isCancelInProgress()) { await(STR) .until(gemFireCache::isClose...
/** * Creates a client cache from the factory if one does not already exist. * * @since GemFire 6.5 */
Creates a client cache from the factory if one does not already exist
getClientCache
{ "repo_name": "PurelyApplied/geode", "path": "geode-dunit/src/main/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java", "license": "apache-2.0", "size": 18299 }
[ "org.apache.geode.cache.client.ClientCache", "org.apache.geode.cache.client.ClientCacheFactory", "org.apache.geode.internal.cache.GemFireCacheImpl", "org.apache.geode.internal.cache.InternalCache", "org.apache.geode.test.awaitility.GeodeAwaitility", "org.apache.geode.test.dunit.IgnoredException" ]
import org.apache.geode.cache.client.ClientCache; import org.apache.geode.cache.client.ClientCacheFactory; import org.apache.geode.internal.cache.GemFireCacheImpl; import org.apache.geode.internal.cache.InternalCache; import org.apache.geode.test.awaitility.GeodeAwaitility; import org.apache.geode.test.dunit.IgnoredExc...
import org.apache.geode.cache.client.*; import org.apache.geode.internal.cache.*; import org.apache.geode.test.awaitility.*; import org.apache.geode.test.dunit.*;
[ "org.apache.geode" ]
org.apache.geode;
248,752
void loadTypes(IArena arena);
void loadTypes(IArena arena);
/** * Load types for an arena from config. * * <p>For arena manager use.</p> * * @param arena The arena. */
Load types for an arena from config. For arena manager use
loadTypes
{ "repo_name": "JCThePants/PV-StarAPI", "path": "src/com/jcwhatever/pvs/api/points/IPointsManager.java", "license": "mit", "size": 2212 }
[ "com.jcwhatever.pvs.api.arena.IArena" ]
import com.jcwhatever.pvs.api.arena.IArena;
import com.jcwhatever.pvs.api.arena.*;
[ "com.jcwhatever.pvs" ]
com.jcwhatever.pvs;
2,320,262
public interface BatchHandler { public BatchResponsePart handleBatchPart(BatchRequestPart batchRequestPart) throws ODataException;
interface BatchHandler { public BatchResponsePart function(BatchRequestPart batchRequestPart) throws ODataException;
/** * <p>Handles the {@link BatchRequestPart} in a way that it results in a corresponding {@link BatchResponsePart}.</p> * @param batchRequestPart the incoming MIME part * @return the corresponding result * @throws ODataException */
Handles the <code>BatchRequestPart</code> in a way that it results in a corresponding <code>BatchResponsePart</code>
handleBatchPart
{ "repo_name": "SAP/cloud-odata-java", "path": "odata-api/src/main/java/com/sap/core/odata/api/batch/BatchHandler.java", "license": "apache-2.0", "size": 1706 }
[ "com.sap.core.odata.api.exception.ODataException" ]
import com.sap.core.odata.api.exception.ODataException;
import com.sap.core.odata.api.exception.*;
[ "com.sap.core" ]
com.sap.core;
2,788,465
private void publishSchedule(SchedulePublishingData publishingData) { boolean schedulePublished = false; try { // validate input if(publishingData.to < timeService.now()) { log.warning("Optimization time frame in past. Cancelling."); return; } // collect problem data Sc...
void function(SchedulePublishingData publishingData) { boolean schedulePublished = false; try { if(publishingData.to < timeService.now()) { log.warning(STR); return; } SchedulingProblem problem = new SchedulingProblem(); problem.from = ensureTimeIsAtSlotStart(ZonedDateTime.ofInstant(Instant.ofEpochSecond(publishingData...
/** * PublicSchedule publishing * * Starts an optimization and then tries to publish the result. * If publishing fails, another try (including a new optimization) is performed some time in the future. * * @param publishingData */
PublicSchedule publishing Starts an optimization and then tries to publish the result. If publishing fails, another try (including a new optimization) is performed some time in the future
publishSchedule
{ "repo_name": "kfoerderer/gridcontrol-bems", "path": "de.fzi.osh.scheduling/src/de/fzi/osh/scheduling/SchedulerController.java", "license": "mit", "size": 29299 }
[ "de.fzi.osh.com.fms.FmsCommunicationService", "de.fzi.osh.com.fms.PublicSchedule", "de.fzi.osh.core.configuration.BaseConfiguration", "de.fzi.osh.optimization.OptimizationService", "de.fzi.osh.optimization.schedule.SchedulingProblem", "de.fzi.osh.optimization.schedule.SchedulingSolution", "de.fzi.osh.sc...
import de.fzi.osh.com.fms.FmsCommunicationService; import de.fzi.osh.com.fms.PublicSchedule; import de.fzi.osh.core.configuration.BaseConfiguration; import de.fzi.osh.optimization.OptimizationService; import de.fzi.osh.optimization.schedule.SchedulingProblem; import de.fzi.osh.optimization.schedule.SchedulingSolution; ...
import de.fzi.osh.com.fms.*; import de.fzi.osh.core.configuration.*; import de.fzi.osh.optimization.*; import de.fzi.osh.optimization.schedule.*; import de.fzi.osh.scheduling.dataobjects.*; import java.time.*;
[ "de.fzi.osh", "java.time" ]
de.fzi.osh; java.time;
1,670,296
public static void init(String conf_filename, String tracker_server) throws FileNotFoundException, IOException, MyException { IniFileReader iniReader; String[] szTrackerServers; String[] parts; iniReader = new IniFileReader(conf_filename); g_connect_timeout = iniReader.getI...
static void function(String conf_filename, String tracker_server) throws FileNotFoundException, IOException, MyException { IniFileReader iniReader; String[] szTrackerServers; String[] parts; iniReader = new IniFileReader(conf_filename); g_connect_timeout = iniReader.getIntValue(STR, DEFAULT_CONNECT_TIMEOUT); if (g_conn...
/** * load global variables * @param conf_filename config filename */
load global variables
init
{ "repo_name": "babymm/mumu", "path": "mumu-common/mumu-common-fdfs/src/main/java/org/csource/fastdfs/ClientGlobal.java", "license": "apache-2.0", "size": 5782 }
[ "java.io.FileNotFoundException", "java.io.IOException", "java.net.InetSocketAddress", "org.csource.common.IniFileReader", "org.csource.common.MyException" ]
import java.io.FileNotFoundException; import java.io.IOException; import java.net.InetSocketAddress; import org.csource.common.IniFileReader; import org.csource.common.MyException;
import java.io.*; import java.net.*; import org.csource.common.*;
[ "java.io", "java.net", "org.csource.common" ]
java.io; java.net; org.csource.common;
1,927,506
public void makeRevocable(RevocationListener<T> listener, Executor executor);
void function(RevocationListener<T> listener, Executor executor);
/** * Make the lock revocable. Your listener will get called when another process/thread * wants you to release the lock. Revocation is cooperative. * * @param listener the listener * @param executor executor for the listener */
Make the lock revocable. Your listener will get called when another process/thread wants you to release the lock. Revocation is cooperative
makeRevocable
{ "repo_name": "box/curator", "path": "curator-recipes/src/main/java/com/netflix/curator/framework/recipes/locks/Revocable.java", "license": "apache-2.0", "size": 1430 }
[ "java.util.concurrent.Executor" ]
import java.util.concurrent.Executor;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,612,859
private MatrixRunType getTestSuiteFromFile(String buildFileName) throws JAXBException { File buildResultsFile = new File(buildFileName); StreamSource source = new StreamSource(buildResultsFile); JAXBElement<MatrixRunType> root = unmarshaller.unmarshal(source, MatrixRunType.class); return root.getValue(); ...
MatrixRunType function(String buildFileName) throws JAXBException { File buildResultsFile = new File(buildFileName); StreamSource source = new StreamSource(buildResultsFile); JAXBElement<MatrixRunType> root = unmarshaller.unmarshal(source, MatrixRunType.class); return root.getValue(); }
/** * Use JAXB to create a MatrixRunType object from the file * * @param buildFileName Name of the build.xml file with results for a particular test run * @return JAXB representation of the test result * @throws JAXBException */
Use JAXB to create a MatrixRunType object from the file
getTestSuiteFromFile
{ "repo_name": "fusesource/hudson-results", "path": "src/main/java/org/fusesource/hudsonresults/SummarizeBuildResults.java", "license": "apache-2.0", "size": 15613 }
[ "java.io.File", "javax.xml.bind.JAXBElement", "javax.xml.bind.JAXBException", "javax.xml.transform.stream.StreamSource" ]
import java.io.File; import javax.xml.bind.JAXBElement; import javax.xml.bind.JAXBException; import javax.xml.transform.stream.StreamSource;
import java.io.*; import javax.xml.bind.*; import javax.xml.transform.stream.*;
[ "java.io", "javax.xml" ]
java.io; javax.xml;
680,557
public void setPropBuild(PDPropBuild propBuild) { dictionary.setItem(COSName.PROP_BUILD, propBuild); }
void function(PDPropBuild propBuild) { dictionary.setItem(COSName.PROP_BUILD, propBuild); }
/** * PDF signature build dictionary. Provides informations about the signature handler. * * @param propBuild the prop build */
PDF signature build dictionary. Provides informations about the signature handler
setPropBuild
{ "repo_name": "mdamt/PdfBox-Android", "path": "library/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java", "license": "apache-2.0", "size": 11115 }
[ "org.apache.pdfbox.cos.COSName" ]
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
1,194,504
protected void putIntoModel(final Map<String, Object> model, final String key, final Object value) { LOGGER.trace("Adding attribute [{}] into the view model for [{}] with value [{}]", key, getClass().getSimpleName(), value); model.put(key, value); }
void function(final Map<String, Object> model, final String key, final Object value) { LOGGER.trace(STR, key, getClass().getSimpleName(), value); model.put(key, value); }
/** * Put into model. * * @param model the model * @param key the key * @param value the value */
Put into model
putIntoModel
{ "repo_name": "philliprower/cas", "path": "core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java", "license": "apache-2.0", "size": 10513 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
219,616
private String hashToMD5(String password) { String original = password; MessageDigest md; try { md = MessageDigest.getInstance("MD5"); md.update(original.getBytes()); byte[] digest = md.digest(); StringBuffer sb = new StringBuffer(); for (byte b : digest) { sb.append(String.format("%02x", b ...
String function(String password) { String original = password; MessageDigest md; try { md = MessageDigest.getInstance("MD5"); md.update(original.getBytes()); byte[] digest = md.digest(); StringBuffer sb = new StringBuffer(); for (byte b : digest) { sb.append(String.format("%02x", b & 0xff)); } return sb.toString(); } c...
/** * Hash to md5 a plain text password * @param password * @return the md5 hashed password */
Hash to md5 a plain text password
hashToMD5
{ "repo_name": "guillaumemaka/spring-social-betaseries", "path": "spring-social-betaseries/src/main/java/org/springframework/social/betaseries/api/impl/MemberTemplate.java", "license": "apache-2.0", "size": 10699 }
[ "java.security.MessageDigest", "java.security.NoSuchAlgorithmException", "java.util.ArrayList", "org.springframework.social.betaseries.api.Badge", "org.springframework.social.betaseries.api.Member" ]
import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import org.springframework.social.betaseries.api.Badge; import org.springframework.social.betaseries.api.Member;
import java.security.*; import java.util.*; import org.springframework.social.betaseries.api.*;
[ "java.security", "java.util", "org.springframework.social" ]
java.security; java.util; org.springframework.social;
1,844,591
public void onFinish(); } public static final float ANIMATION_DURATION_IN_MILLIS = 850.0f; // About 24 FPS. private static final long DELAY_MILLIS = 41; private static final int MAX_TRANSLATION_Y = 30; private static final float ALPHA_DELIMITER = 0.95f; private static final lo...
void function(); } public static final float ANIMATION_DURATION_IN_MILLIS = 850.0f; private static final long DELAY_MILLIS = 41; private static final int MAX_TRANSLATION_Y = 30; private static final float ALPHA_DELIMITER = 0.95f; private static final long SEC_TO_MILLIS = TimeUnit.SECONDS.toMillis(1); private final Text...
/** * Notified when the countdown is finished. */
Notified when the countdown is finished
onFinish
{ "repo_name": "Munk801/ZGlass", "path": "src/com/google/android/glass/zglass/CountDownView.java", "license": "apache-2.0", "size": 5272 }
[ "android.content.Context", "android.util.AttributeSet", "android.view.LayoutInflater", "android.widget.TextView", "java.util.concurrent.TimeUnit" ]
import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.widget.TextView; import java.util.concurrent.TimeUnit;
import android.content.*; import android.util.*; import android.view.*; import android.widget.*; import java.util.concurrent.*;
[ "android.content", "android.util", "android.view", "android.widget", "java.util" ]
android.content; android.util; android.view; android.widget; java.util;
567,336
private void traverse(ConQATGraphInnerNode node) throws ConQATException { int depth = parentList.size(); parentList.add(node); for (ConQATGraphInnerNode inner : new ArrayList<ConQATGraphInnerNode>( node.getInnerNodes())) { traverse(inner); } for (ConQATVertex vertex : new ArrayList<ConQATVertex>(n...
void function(ConQATGraphInnerNode node) throws ConQATException { int depth = parentList.size(); parentList.add(node); for (ConQATGraphInnerNode inner : new ArrayList<ConQATGraphInnerNode>( node.getInnerNodes())) { traverse(inner); } for (ConQATVertex vertex : new ArrayList<ConQATVertex>(node .getChildVertices())) { in...
/** * Traverse the node hierarchie, relocate the vertices and remove empty * inner nodes. */
Traverse the node hierarchie, relocate the vertices and remove empty inner nodes
traverse
{ "repo_name": "vimaier/conqat", "path": "org.conqat.engine.graph/src/org/conqat/engine/graph/concentrate/HierarchySimplifier.java", "license": "apache-2.0", "size": 5094 }
[ "java.util.ArrayList", "org.conqat.engine.core.core.ConQATException", "org.conqat.engine.graph.nodes.ConQATGraphInnerNode", "org.conqat.engine.graph.nodes.ConQATVertex" ]
import java.util.ArrayList; import org.conqat.engine.core.core.ConQATException; import org.conqat.engine.graph.nodes.ConQATGraphInnerNode; import org.conqat.engine.graph.nodes.ConQATVertex;
import java.util.*; import org.conqat.engine.core.core.*; import org.conqat.engine.graph.nodes.*;
[ "java.util", "org.conqat.engine" ]
java.util; org.conqat.engine;
2,394,854
public void setPartnerId(String partner) throws IOException { write("PARTNER ID=" + partner); String line = read(); if (!"PARTNEROK".equals(line)) throw new IOException("Invalid response " + line); }
void function(String partner) throws IOException { write(STR + partner); String line = read(); if (!STR.equals(line)) throw new IOException(STR + line); }
/** * Sets the partner ID of the beagle * * @param partner * partner id (16 bytes, hex) * @throws IOException */
Sets the partner ID of the beagle
setPartnerId
{ "repo_name": "ligius-/jbeagle", "path": "src/de/schierla/jbeagle/BeagleConnector.java", "license": "gpl-3.0", "size": 9221 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
547,108
public ObjectCodeService getObjectCodeService() { return objectCodeService; }
ObjectCodeService function() { return objectCodeService; }
/** * Gets the objectCodeService attribute. * * @return Returns the objectCodeService. */
Gets the objectCodeService attribute
getObjectCodeService
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-core/src/main/java/org/kuali/kfs/gl/batch/service/impl/EncumbranceClosingOriginEntryGenerationServiceImpl.java", "license": "agpl-3.0", "size": 35661 }
[ "org.kuali.kfs.coa.service.ObjectCodeService" ]
import org.kuali.kfs.coa.service.ObjectCodeService;
import org.kuali.kfs.coa.service.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,557,105
EReference getexportedHeading_FHeading();
EReference getexportedHeading_FHeading();
/** * Returns the meta object for the containment reference '{@link org.xtext.example.delphi.delphi.exportedHeading#getFHeading <em>FHeading</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>FHeading</em>'. * @see org.xtext.example.delphi.d...
Returns the meta object for the containment reference '<code>org.xtext.example.delphi.delphi.exportedHeading#getFHeading FHeading</code>'.
getexportedHeading_FHeading
{ "repo_name": "adolfosbh/cs2as", "path": "org.xtext.example.delphi/src-gen/org/xtext/example/delphi/delphi/DelphiPackage.java", "license": "epl-1.0", "size": 434880 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
416,107
Set<String> getActivatedGroupNames(ObjFace face);
Set<String> getActivatedGroupNames(ObjFace face);
/** * Returns an unmodifiable set containing the names of the groups that * are activated with the given face. If the groups that are * activated with the given face are the same as for the previous face, * then <code>null</code> will be returned. * * @param face The face ...
Returns an unmodifiable set containing the names of the groups that are activated with the given face. If the groups that are activated with the given face are the same as for the previous face, then <code>null</code> will be returned
getActivatedGroupNames
{ "repo_name": "javagl/Obj", "path": "src/main/java/de/javagl/obj/ReadableObj.java", "license": "mit", "size": 6936 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
25,581
public List<DimensionalItemObject> getFilterOptions( String filter ) { int index = filters.indexOf( new BaseDimensionalObject( filter ) ); return index != -1 ? filters.get( index ).getItems() : new ArrayList<DimensionalItemObject>(); }
List<DimensionalItemObject> function( String filter ) { int index = filters.indexOf( new BaseDimensionalObject( filter ) ); return index != -1 ? filters.get( index ).getItems() : new ArrayList<DimensionalItemObject>(); }
/** * Retrieves the options for the given filter. Returns an empty list if the * filter is not present. */
Retrieves the options for the given filter. Returns an empty list if the filter is not present
getFilterOptions
{ "repo_name": "EyeSeeTea/dhis2", "path": "dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java", "license": "gpl-3.0", "size": 60770 }
[ "java.util.ArrayList", "java.util.List", "org.hisp.dhis.common.BaseDimensionalObject", "org.hisp.dhis.common.DimensionalItemObject" ]
import java.util.ArrayList; import java.util.List; import org.hisp.dhis.common.BaseDimensionalObject; import org.hisp.dhis.common.DimensionalItemObject;
import java.util.*; import org.hisp.dhis.common.*;
[ "java.util", "org.hisp.dhis" ]
java.util; org.hisp.dhis;
544,390
public BigDecimal getErrorRate() { return errorRate; }
BigDecimal function() { return errorRate; }
/** * Get the error rate of this evaluation * * @return BigDecimal */
Get the error rate of this evaluation
getErrorRate
{ "repo_name": "sergenguetta/mercury", "path": "src/main/java/mercury/annotation/AnnotationEvaluation.java", "license": "mit", "size": 9388 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
2,556,897
@Test public void testUdpPortCriterionEquals() { new EqualsTester() .addEqualityGroup(matchUdpPort1, sameAsMatchUdpPort1) .addEqualityGroup(matchUdpPort2) .testEquals(); } // TcpFlagsCriterion class
void function() { new EqualsTester() .addEqualityGroup(matchUdpPort1, sameAsMatchUdpPort1) .addEqualityGroup(matchUdpPort2) .testEquals(); }
/** * Test the equals() method of the UdpPortCriterion class. */
Test the equals() method of the UdpPortCriterion class
testUdpPortCriterionEquals
{ "repo_name": "sonu283304/onos", "path": "core/api/src/test/java/org/onosproject/net/flow/criteria/CriteriaTest.java", "license": "apache-2.0", "size": 44713 }
[ "com.google.common.testing.EqualsTester" ]
import com.google.common.testing.EqualsTester;
import com.google.common.testing.*;
[ "com.google.common" ]
com.google.common;
2,223,877
@RequiredScope({download}) @RequestMapping(value = UrlHelpers.FILE_DOWNLOAD, method = RequestMethod.GET) public void fileRedirectURLForAffiliate( @RequestParam(value = AuthorizationConstants.USER_ID_PARAM) Long userId, @PathVariable String id, @RequestParam(required = false) Boolean redirect, @RequestP...
@RequiredScope({download}) @RequestMapping(value = UrlHelpers.FILE_DOWNLOAD, method = RequestMethod.GET) void function( @RequestParam(value = AuthorizationConstants.USER_ID_PARAM) Long userId, @PathVariable String id, @RequestParam(required = false) Boolean redirect, @RequestParam(required = true) FileHandleAssociateTy...
/** * * Get the actual URL of the file from with an associated object . * <p> * Note: This call will result in a HTTP temporary redirect (307), to the * actual file URL if the caller meets all of the download requirements. * </p> * * @param userId * @param id * the ID of the file handle...
Get the actual URL of the file from with an associated object . Note: This call will result in a HTTP temporary redirect (307), to the actual file URL if the caller meets all of the download requirements.
fileRedirectURLForAffiliate
{ "repo_name": "Sage-Bionetworks/Synapse-Repository-Services", "path": "services/repository/src/main/java/org/sagebionetworks/file/controller/UploadController.java", "license": "apache-2.0", "size": 47138 }
[ "java.io.IOException", "javax.servlet.http.HttpServletResponse", "org.sagebionetworks.repo.model.AuthorizationConstants", "org.sagebionetworks.repo.model.DatastoreException", "org.sagebionetworks.repo.model.file.FileHandleAssociateType", "org.sagebionetworks.repo.web.NotFoundException", "org.sagebionetw...
import java.io.IOException; import javax.servlet.http.HttpServletResponse; import org.sagebionetworks.repo.model.AuthorizationConstants; import org.sagebionetworks.repo.model.DatastoreException; import org.sagebionetworks.repo.model.file.FileHandleAssociateType; import org.sagebionetworks.repo.web.NotFoundException; im...
import java.io.*; import javax.servlet.http.*; import org.sagebionetworks.repo.model.*; import org.sagebionetworks.repo.model.file.*; import org.sagebionetworks.repo.web.*; import org.sagebionetworks.repo.web.controller.*; import org.springframework.web.bind.annotation.*;
[ "java.io", "javax.servlet", "org.sagebionetworks.repo", "org.springframework.web" ]
java.io; javax.servlet; org.sagebionetworks.repo; org.springframework.web;
2,383,757
public ActionForward refresh(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { return mapping.findForward(RiceConstants.MAPPING_BASIC); }
ActionForward function(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { return mapping.findForward(RiceConstants.MAPPING_BASIC); }
/** * Default refresh method. Called from returning frameworks. * * @param mapping * @param form * @param request * @param response * @return * @throws Exception */
Default refresh method. Called from returning frameworks
refresh
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-kns/src/main/java/org/kuali/kfs/kns/web/struts/action/KualiAction.java", "license": "agpl-3.0", "size": 56528 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.struts.action.ActionForm", "org.apache.struts.action.ActionForward", "org.apache.struts.action.ActionMapping", "org.kuali.rice.core.api.util.RiceConstants" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.kuali.rice.core.api.util.RiceConstants;
import javax.servlet.http.*; import org.apache.struts.action.*; import org.kuali.rice.core.api.util.*;
[ "javax.servlet", "org.apache.struts", "org.kuali.rice" ]
javax.servlet; org.apache.struts; org.kuali.rice;
1,624,977
checkIterAddAllowed(); DataCursor cursor = null; boolean doAutoCommit = beginAutoCommit(); try { cursor = new DataCursor(view, true); OperationStatus status = cursor.getSearchKey(Long.valueOf(index), null, false); if (status == Operatio...
checkIterAddAllowed(); DataCursor cursor = null; boolean doAutoCommit = beginAutoCommit(); try { cursor = new DataCursor(view, true); OperationStatus status = cursor.getSearchKey(Long.valueOf(index), null, false); if (status == OperationStatus.SUCCESS) { cursor.putBefore(value); closeCursor(cursor); } else { closeCurso...
/** * Inserts the specified element at the specified position in this list * (optional operation). * This method conforms to the {@link List#add(int, Object)} interface. * * @throws UnsupportedOperationException if the collection is a sublist, or * if the collection is indexed, or if the c...
Inserts the specified element at the specified position in this list (optional operation). This method conforms to the <code>List#add(int, Object)</code> interface
add
{ "repo_name": "mxrrow/zaicoin", "path": "src/deps/db/java/src/com/sleepycat/collections/StoredList.java", "license": "mit", "size": 20823 }
[ "com.sleepycat.db.OperationStatus" ]
import com.sleepycat.db.OperationStatus;
import com.sleepycat.db.*;
[ "com.sleepycat.db" ]
com.sleepycat.db;
1,506,598
@Override public Integer save(TMotdBean motdBean) { TMotd tMotd; try { tMotd = BaseTMotd.createTMotd(motdBean); tMotd.save(); return tMotd.getObjectID(); } catch (Exception e) { LOGGER.error("Saving of motd failed with " + e.getMessage()); return null; } }
Integer function(TMotdBean motdBean) { TMotd tMotd; try { tMotd = BaseTMotd.createTMotd(motdBean); tMotd.save(); return tMotd.getObjectID(); } catch (Exception e) { LOGGER.error(STR + e.getMessage()); return null; } }
/** * Saves a motd bean * @param motdBean * @return */
Saves a motd bean
save
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/TMotdPeer.java", "license": "gpl-3.0", "size": 3677 }
[ "com.aurel.track.beans.TMotdBean" ]
import com.aurel.track.beans.TMotdBean;
import com.aurel.track.beans.*;
[ "com.aurel.track" ]
com.aurel.track;
2,446,260
public AFPResourceLevel getResourceLevel(Map foreignAttributes) { AFPResourceLevel resourceLevel = null; if (foreignAttributes != null && !foreignAttributes.isEmpty()) { if (foreignAttributes.containsKey(RESOURCE_LEVEL)) { String levelString = (String)foreignAttributes.ge...
AFPResourceLevel function(Map foreignAttributes) { AFPResourceLevel resourceLevel = null; if (foreignAttributes != null && !foreignAttributes.isEmpty()) { if (foreignAttributes.containsKey(RESOURCE_LEVEL)) { String levelString = (String)foreignAttributes.get(RESOURCE_LEVEL); resourceLevel = AFPResourceLevel.valueOf(lev...
/** * Returns the resource level * * @param foreignAttributes the foreign attributes * @return the resource level */
Returns the resource level
getResourceLevel
{ "repo_name": "pellcorp/fop", "path": "src/java/org/apache/fop/render/afp/AFPForeignAttributeReader.java", "license": "apache-2.0", "size": 5203 }
[ "java.io.File", "java.util.Map", "org.apache.fop.afp.AFPResourceLevel" ]
import java.io.File; import java.util.Map; import org.apache.fop.afp.AFPResourceLevel;
import java.io.*; import java.util.*; import org.apache.fop.afp.*;
[ "java.io", "java.util", "org.apache.fop" ]
java.io; java.util; org.apache.fop;
2,481,406
public static boolean isBlank(final String value) { return StringUtils.isBlank(value); }
static boolean function(final String value) { return StringUtils.isBlank(value); }
/** * Check that value is empty (""), null or whitespace only. * @param value Value * @return true if the String is not empty (""), not null and not whitespace only. */
Check that value is empty (""), null or whitespace only
isBlank
{ "repo_name": "aksivaram2k2/jmeter-trunk", "path": "src/jorphan/org/apache/jorphan/util/JOrphanUtils.java", "license": "apache-2.0", "size": 18915 }
[ "org.apache.commons.lang3.StringUtils" ]
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.*;
[ "org.apache.commons" ]
org.apache.commons;
1,867,873
private ObjectValue convertAndParseDocumentData(Object input, ParseContext context) { String badDocReason = "Invalid data. Data must be a Map<String, Object> or a suitable POJO object, but it was "; // Check Array before calling CustomClassMapper since it'll give you a confusing message // to use...
ObjectValue function(Object input, ParseContext context) { String badDocReason = STR; if (input.getClass().isArray()) { throw new IllegalArgumentException(badDocReason + STR); } Object converted = CustomClassMapper.convertToPlainJavaTypes(input); Value parsedValue = parseData(converted, context); if (parsedValue.getVal...
/** * Converts a POJO to native types and then parses it into model types. It expects the input to * conform to document data (i.e. it must parse into an ObjectValue model type) and will throw an * appropriate error otherwise. */
Converts a POJO to native types and then parses it into model types. It expects the input to conform to document data (i.e. it must parse into an ObjectValue model type) and will throw an appropriate error otherwise
convertAndParseDocumentData
{ "repo_name": "firebase/firebase-android-sdk", "path": "firebase-firestore/src/main/java/com/google/firebase/firestore/UserDataReader.java", "license": "apache-2.0", "size": 20617 }
[ "com.google.firebase.firestore.core.UserData", "com.google.firebase.firestore.model.ObjectValue", "com.google.firebase.firestore.util.CustomClassMapper", "com.google.firebase.firestore.util.Util", "com.google.firestore.v1.Value" ]
import com.google.firebase.firestore.core.UserData; import com.google.firebase.firestore.model.ObjectValue; import com.google.firebase.firestore.util.CustomClassMapper; import com.google.firebase.firestore.util.Util; import com.google.firestore.v1.Value;
import com.google.firebase.firestore.core.*; import com.google.firebase.firestore.model.*; import com.google.firebase.firestore.util.*; import com.google.firestore.v1.*;
[ "com.google.firebase", "com.google.firestore" ]
com.google.firebase; com.google.firestore;
2,573,123
public void testGroupByRollup() throws SQLException { Statement s = createStatement(); s.executeUpdate("create table ru (a int, b int, c int, d int)"); s.executeUpdate("insert into ru values (1,1,1,1), (1,2,3,4),"+ "(1,1,2,2), (4,3,2,1), (4,4,4,4)"); JDBC....
void function() throws SQLException { Statement s = createStatement(); s.executeUpdate(STR); s.executeUpdate(STR+ STR); JDBC.assertUnorderedResultSet( s.executeQuery( STR), new String[][]{ {"1","1","1","1"}, {"1","1","2","2"}, {"1","2","3","4"}, {"4","3","2","1"}, {"4","4","4","4"}, {"1","1",null,"3"}, {"1","2",null,"4...
/** * Basic test of GROUP BY ROLLUP capability. * * This test case has a few basic tests of GROUP BY ROLLUP, both * positive and negative tests. */
Basic test of GROUP BY ROLLUP capability. This test case has a few basic tests of GROUP BY ROLLUP, both positive and negative tests
testGroupByRollup
{ "repo_name": "splicemachine/spliceengine", "path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/lang/OLAPTest.java", "license": "agpl-3.0", "size": 51427 }
[ "com.splicemachine.dbTesting.junit.JDBC", "java.sql.SQLException", "java.sql.Statement" ]
import com.splicemachine.dbTesting.junit.JDBC; import java.sql.SQLException; import java.sql.Statement;
import com.splicemachine.*; import java.sql.*;
[ "com.splicemachine", "java.sql" ]
com.splicemachine; java.sql;
319,761
protected long getHostAppId() { Cursor cursor = null; try { cursor = mContext.getContentResolver().query(HostApp.URI, new String[] { HostAppColumns._ID }, HostAppColumns.PACKAGE_NAME + " = ?", new String[] { mHostAppPackageName }, null); if (cursor != null && cursor.moveToFirst()) { retu...
long function() { Cursor cursor = null; try { cursor = mContext.getContentResolver().query(HostApp.URI, new String[] { HostAppColumns._ID }, HostAppColumns.PACKAGE_NAME + STR, new String[] { mHostAppPackageName }, null); if (cursor != null && cursor.moveToFirst()) { return cursor.getLong(cursor .getColumnIndexOrThrow(H...
/** * Get the host application id for this control. * * @return The host application id. */
Get the host application id for this control
getHostAppId
{ "repo_name": "Ayrat-Salavatovich/Learn_Android_Programming", "path": "Day 114/SmartWatchPlayer/src/com/sonyericsson/extras/liveware/extension/util/control/ControlExtension.java", "license": "unlicense", "size": 22724 }
[ "android.database.Cursor", "android.database.SQLException", "com.sonyericsson.extras.liveware.aef.registration.Registration", "com.sonyericsson.extras.liveware.extension.util.Dbg" ]
import android.database.Cursor; import android.database.SQLException; import com.sonyericsson.extras.liveware.aef.registration.Registration; import com.sonyericsson.extras.liveware.extension.util.Dbg;
import android.database.*; import com.sonyericsson.extras.liveware.aef.registration.*; import com.sonyericsson.extras.liveware.extension.util.*;
[ "android.database", "com.sonyericsson.extras" ]
android.database; com.sonyericsson.extras;
1,561,850
public static long getMaxSequenceIdInList(Collection<StoreFile> sfs) { long max = 0; for (StoreFile sf : sfs) { max = Math.max(max, sf.getMaxSequenceId()); } return max; }
static long function(Collection<StoreFile> sfs) { long max = 0; for (StoreFile sf : sfs) { max = Math.max(max, sf.getMaxSequenceId()); } return max; }
/** * Return the highest sequence ID found across all storefiles in * the given list. * @param sfs * @return 0 if no non-bulk-load files are provided or, this is Store that * does not yet have any store files. */
Return the highest sequence ID found across all storefiles in the given list
getMaxSequenceIdInList
{ "repo_name": "narendragoyal/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java", "license": "apache-2.0", "size": 57432 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
377,494
public void showAbsolute(Component invoker, int x, int y) { GUIHelper.showPopupMenu(this, invoker, x, y); }
void function(Component invoker, int x, int y) { GUIHelper.showPopupMenu(this, invoker, x, y); }
/** * Displays the popup menu using the absolute screen position. * * @param invoker the invoking component * @param x the absolute X position on screen * @param y the absolute Y position on screen */
Displays the popup menu using the absolute screen position
showAbsolute
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/gui/core/BasePopupMenu.java", "license": "gpl-3.0", "size": 4043 }
[ "java.awt.Component" ]
import java.awt.Component;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,650,664
public static String toString(PropertyIdValue o) { return o.getIri() + " (property)"; }
static String function(PropertyIdValue o) { return o.getIri() + STR; }
/** * Returns a human-readable string representation of the given object. * * @see java.lang.Object#toString() * @param o * the object to represent as string * @return a string representation of the object */
Returns a human-readable string representation of the given object
toString
{ "repo_name": "notconfusing/Wikidata-Toolkit", "path": "wdtk-datamodel/src/main/java/org/wikidata/wdtk/datamodel/helpers/ToString.java", "license": "apache-2.0", "size": 15918 }
[ "org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue" ]
import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
import org.wikidata.wdtk.datamodel.interfaces.*;
[ "org.wikidata.wdtk" ]
org.wikidata.wdtk;
697,002
public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> createCluster( com.google.bigtable.admin.v2.CreateClusterRequest request) { return futureUnaryCall( getChannel().newCall(getCreateClusterMethodHelper(), getCallOptions()), request); }
com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> function( com.google.bigtable.admin.v2.CreateClusterRequest request) { return futureUnaryCall( getChannel().newCall(getCreateClusterMethodHelper(), getCallOptions()), request); }
/** * <pre> * Creates a cluster within an instance. * </pre> */
<code> Creates a cluster within an instance. </code>
createCluster
{ "repo_name": "pongad/api-client-staging", "path": "generated/java/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableInstanceAdminGrpc.java", "license": "bsd-3-clause", "size": 106367 }
[ "io.grpc.stub.ClientCalls" ]
import io.grpc.stub.ClientCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
278,352
MastershipService mastership();
MastershipService mastership();
/** * Reference to a mastership service implementation. * * @return mastership service */
Reference to a mastership service implementation
mastership
{ "repo_name": "donNewtonAlpha/onos", "path": "core/api/src/main/java/org/onosproject/ui/model/ServiceBundle.java", "license": "apache-2.0", "size": 2445 }
[ "org.onosproject.mastership.MastershipService" ]
import org.onosproject.mastership.MastershipService;
import org.onosproject.mastership.*;
[ "org.onosproject.mastership" ]
org.onosproject.mastership;
1,747,799
void generateInitialAttributes(final Map<I_M_Attribute, Object> defaultAttributesValue);
void generateInitialAttributes(final Map<I_M_Attribute, Object> defaultAttributesValue);
/** * Generate initial storage attributes * * @param defaultAttributesValue * @throws AdempiereException if attributes were already generated */
Generate initial storage attributes
generateInitialAttributes
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.handlingunits.base/src/main/java/de/metas/handlingunits/attribute/storage/IAttributeStorage.java", "license": "gpl-2.0", "size": 13224 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,452,856
public void setSwipeThreshold(float swipeThreshold) { this.swipeThreshold = swipeThreshold; } class AnimatePanX implements Animation { private Motion motion; private Image replaceImage; private int updatePos; public AnimatePanX(float destPan, Image replaceImage, ...
void function(float swipeThreshold) { this.swipeThreshold = swipeThreshold; } class AnimatePanX implements Animation { private Motion motion; private Image replaceImage; private int updatePos; public AnimatePanX(float destPan, Image replaceImage, int updatePos) { motion = Motion.createEaseInOutMotion((int)(panPositionX...
/** * The swipe threshold is a number between 0 and 1 that indicates the threshold * after which the swiped image moves to the next image. Below that number the image * will bounce back * @param swipeThreshold the swipeThreshold to set */
The swipe threshold is a number between 0 and 1 that indicates the threshold after which the swiped image moves to the next image. Below that number the image will bounce back
setSwipeThreshold
{ "repo_name": "sannysanoff/CodenameOne", "path": "CodenameOne/src/com/codename1/components/ImageViewer.java", "license": "gpl-2.0", "size": 27999 }
[ "com.codename1.ui.Display", "com.codename1.ui.Image", "com.codename1.ui.animations.Animation", "com.codename1.ui.animations.Motion" ]
import com.codename1.ui.Display; import com.codename1.ui.Image; import com.codename1.ui.animations.Animation; import com.codename1.ui.animations.Motion;
import com.codename1.ui.*; import com.codename1.ui.animations.*;
[ "com.codename1.ui" ]
com.codename1.ui;
47,378
public static final SecretKeyFactory getInstance(String algorithm) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NullPointerException(Messages.getString("crypto.02")); //$NON-NLS-1$ } synchronized (engine) { engine.getInstance(...
static final SecretKeyFactory function(String algorithm) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NullPointerException(Messages.getString(STR)); } synchronized (engine) { engine.getInstance(algorithm, null); return new SecretKeyFactory((SecretKeyFactorySpi) engine.spi, engine.provider, algor...
/** * Creates a new {@code SecretKeyFactory} instance for the specified key * algorithm. * * @param algorithm * the name of the key algorithm. * @return a secret key factory for the specified key algorithm. * @throws NoSuchAlgorithmException * if no...
Creates a new SecretKeyFactory instance for the specified key algorithm
getInstance
{ "repo_name": "skyHALud/codenameone", "path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/crypto/src/main/java/javax/crypto/SecretKeyFactory.java", "license": "gpl-2.0", "size": 8801 }
[ "java.security.NoSuchAlgorithmException", "org.apache.harmony.crypto.internal.nls.Messages" ]
import java.security.NoSuchAlgorithmException; import org.apache.harmony.crypto.internal.nls.Messages;
import java.security.*; import org.apache.harmony.crypto.internal.nls.*;
[ "java.security", "org.apache.harmony" ]
java.security; org.apache.harmony;
1,068,846
protected ECSchema getSchema() { return schema; }
ECSchema function() { return schema; }
/** * Get EC schema. * @return */
Get EC schema
getSchema
{ "repo_name": "robzor92/hops", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/grouper/BlockGrouper.java", "license": "apache-2.0", "size": 2879 }
[ "org.apache.hadoop.io.erasurecode.ECSchema" ]
import org.apache.hadoop.io.erasurecode.ECSchema;
import org.apache.hadoop.io.erasurecode.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
943,909
public static Document parse(InputSource inputSource) throws SAXException, IOException { DocumentBuilder db = getBuilder(); return db.parse(inputSource); }
static Document function(InputSource inputSource) throws SAXException, IOException { DocumentBuilder db = getBuilder(); return db.parse(inputSource); }
/** * Parse an XML document located using an {@link InputSource} using the * pooled document builder. */
Parse an XML document located using an <code>InputSource</code> using the pooled document builder
parse
{ "repo_name": "TheRingbearer/HAWKS", "path": "ode/utils/src/main/java/org/apache/ode/utils/DOMUtils.java", "license": "apache-2.0", "size": 40920 }
[ "java.io.IOException", "javax.xml.parsers.DocumentBuilder", "org.w3c.dom.Document", "org.xml.sax.InputSource", "org.xml.sax.SAXException" ]
import java.io.IOException; import javax.xml.parsers.DocumentBuilder; import org.w3c.dom.Document; import org.xml.sax.InputSource; import org.xml.sax.SAXException;
import java.io.*; import javax.xml.parsers.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "java.io", "javax.xml", "org.w3c.dom", "org.xml.sax" ]
java.io; javax.xml; org.w3c.dom; org.xml.sax;
1,402,920
public Unit getValue();
Unit function();
/** * Return the value of this measurement. * * @return The wrapped value (an instance of TheUnit) */
Return the value of this measurement
getValue
{ "repo_name": "openxc/openxc-android", "path": "library/src/main/java/com/openxc/measurements/Measurement.java", "license": "bsd-3-clause", "size": 1877 }
[ "com.openxc.units.Unit" ]
import com.openxc.units.Unit;
import com.openxc.units.*;
[ "com.openxc.units" ]
com.openxc.units;
1,116,870
if (!UrlValidatorUtil.isValid(longURL)) { return Either.left(Constants.INVALID_URL); } Url shortenUrl = getUrlIfAlreadyShortened(longURL); String shortenCode = (shortenUrl != null) ? shortenUrl.getShorthand() : createShortenUrl(longURL); return Either.right(shortenC...
if (!UrlValidatorUtil.isValid(longURL)) { return Either.left(Constants.INVALID_URL); } Url shortenUrl = getUrlIfAlreadyShortened(longURL); String shortenCode = (shortenUrl != null) ? shortenUrl.getShorthand() : createShortenUrl(longURL); return Either.right(shortenCode); }
/** * Check of the given URL is valid, if valid check if it is already shortened, * if not shorten and return the shorten code. * * @param longURL URL that needed to be shortened. * @return String representing Shorten code. */
Check of the given URL is valid, if valid check if it is already shortened, if not shorten and return the shorten code
returnShortenCode
{ "repo_name": "urls/url-shortener", "path": "url-shortener-backend/src/main/java/me/amarpandey/urlshortener/services/UrlShortenerService.java", "license": "mit", "size": 3076 }
[ "io.vavr.control.Either", "me.amarpandey.urlshortener.entity.Url", "me.amarpandey.urlshortener.utils.Constants", "me.amarpandey.urlshortener.validators.UrlValidatorUtil" ]
import io.vavr.control.Either; import me.amarpandey.urlshortener.entity.Url; import me.amarpandey.urlshortener.utils.Constants; import me.amarpandey.urlshortener.validators.UrlValidatorUtil;
import io.vavr.control.*; import me.amarpandey.urlshortener.entity.*; import me.amarpandey.urlshortener.utils.*; import me.amarpandey.urlshortener.validators.*;
[ "io.vavr.control", "me.amarpandey.urlshortener" ]
io.vavr.control; me.amarpandey.urlshortener;
372,037
// [START dialogflow_delete_entity] public static void deleteEntity(String projectId, String entityTypeId, String entityValue) throws Exception { // Instantiates a client try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { // Set the entity type name using the projectID (my...
static void function(String projectId, String entityTypeId, String entityValue) throws Exception { try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { EntityTypeName name = EntityTypeName.of(projectId, entityTypeId); entityTypesClient.batchDeleteEntitiesAsync(name, Arrays.asList(entityValue)) .getI...
/** * Delete entity with the given entity type and entity value * @param projectId Project/agent id. * @param entityTypeId The id of the entity_type. * @param entityValue The value of the entity to delete. */
Delete entity with the given entity type and entity value
deleteEntity
{ "repo_name": "dialogflow/dialogflow-java-client-v2", "path": "samples/src/main/java/com/example/dialogflow/EntityManagement.java", "license": "apache-2.0", "size": 7043 }
[ "com.google.cloud.dialogflow.v2.EntityTypeName", "com.google.cloud.dialogflow.v2.EntityTypesClient", "java.util.Arrays" ]
import com.google.cloud.dialogflow.v2.EntityTypeName; import com.google.cloud.dialogflow.v2.EntityTypesClient; import java.util.Arrays;
import com.google.cloud.dialogflow.v2.*; import java.util.*;
[ "com.google.cloud", "java.util" ]
com.google.cloud; java.util;
2,201,378