method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
private static BigDecimal max(BigDecimal a, BigDecimal b) { if(a==null) return b; if(b==null) return a; return a.max(b); }
static BigDecimal function(BigDecimal a, BigDecimal b) { if(a==null) return b; if(b==null) return a; return a.max(b); }
/** * Returns the maximum value between the two. * @param a * @param b * @return */
Returns the maximum value between the two
max
{ "repo_name": "ebayopensource/turmeric-runtime", "path": "codegen/codegen-tools/src/main/java/org/ebayopensource/turmeric/tools/codegen/fastserformat/protobuf/MapperUtils.java", "license": "apache-2.0", "size": 8476 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
1,040,073
manager .alertRules() .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); }
manager .alertRules() .deleteWithResponse("myRg", STR, STR, Context.NONE); }
/** * Sample code: Delete an alert rule. * * @param manager Entry point to SecurityInsightsManager. */
Sample code: Delete an alert rule
deleteAnAlertRule
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java", "license": "mit", "size": 931 }
[ "com.azure.core.util.Context" ]
import com.azure.core.util.Context;
import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
292,757
public AppMsg setAnimation(int inAnimation, int outAnimation) { return setAnimation(AnimationUtils.loadAnimation(mActivity, inAnimation), AnimationUtils.loadAnimation(mActivity, outAnimation)); }
AppMsg function(int inAnimation, int outAnimation) { return setAnimation(AnimationUtils.loadAnimation(mActivity, inAnimation), AnimationUtils.loadAnimation(mActivity, outAnimation)); }
/** * Sets the Animations to be used when displaying/removing the Crouton. * @param inAnimation the Animation resource ID to be used when displaying. * @param outAnimation the Animation resource ID to be used when removing. */
Sets the Animations to be used when displaying/removing the Crouton
setAnimation
{ "repo_name": "JoaquimLey/validar-portugal-android", "path": "libs/AppMsg Library/src/com/devspark/appmsg/AppMsg.java", "license": "mit", "size": 27020 }
[ "android.view.animation.AnimationUtils" ]
import android.view.animation.AnimationUtils;
import android.view.animation.*;
[ "android.view" ]
android.view;
495,528
public List<AvailableProvidersListCity> cities() { return this.cities; }
List<AvailableProvidersListCity> function() { return this.cities; }
/** * Get list of available cities or towns in the state. * * @return the cities value */
Get list of available cities or towns in the state
cities
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/network/mgmt-v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/AvailableProvidersListState.java", "license": "mit", "size": 2359 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
752,178
public static java.util.List<it.gebhard.qa.model.Answer> findByAccepted( long questionId, boolean accepted) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByAccepted(questionId, accepted); }
static java.util.List<it.gebhard.qa.model.Answer> function( long questionId, boolean accepted) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByAccepted(questionId, accepted); }
/** * Returns all the Answers where questionId = &#63; and accepted = &#63;. * * @param questionId the question ID * @param accepted the accepted * @return the matching Answers * @throws SystemException if a system exception occurred */
Returns all the Answers where questionId = &#63; and accepted = &#63;
findByAccepted
{ "repo_name": "p-gebhard/QuickAnswer", "path": "docroot/WEB-INF/service/it/gebhard/qa/service/persistence/AnswerUtil.java", "license": "gpl-3.0", "size": 33029 }
[ "com.liferay.portal.kernel.exception.SystemException", "it.gebhard.qa.model.Answer", "java.util.List" ]
import com.liferay.portal.kernel.exception.SystemException; import it.gebhard.qa.model.Answer; import java.util.List;
import com.liferay.portal.kernel.exception.*; import it.gebhard.qa.model.*; import java.util.*;
[ "com.liferay.portal", "it.gebhard.qa", "java.util" ]
com.liferay.portal; it.gebhard.qa; java.util;
46,257
public static <T> boolean isInOrder(Iterable<? extends T> iterable, Comparator<T> comparator) { checkNotNull(comparator); Iterator<? extends T> it = iterable.iterator(); if (it.hasNext()) { T prev = it.next(); while (it.hasNext()) { T next = it.next(); if (comparator.compare(pr...
static <T> boolean function(Iterable<? extends T> iterable, Comparator<T> comparator) { checkNotNull(comparator); Iterator<? extends T> it = iterable.iterator(); if (it.hasNext()) { T prev = it.next(); while (it.hasNext()) { T next = it.next(); if (comparator.compare(prev, next) > 0) { return false; } prev = next; } } ...
/** * Returns {@code true} if each element in {@code iterable} after the first is greater than or * equal to the element that preceded it, according to the specified comparator. Note that this is * always true when the iterable has fewer than two elements. */
Returns true if each element in iterable after the first is greater than or equal to the element that preceded it, according to the specified comparator. Note that this is always true when the iterable has fewer than two elements
isInOrder
{ "repo_name": "rgoldberg/guava", "path": "android/guava/src/com/google/common/collect/Comparators.java", "license": "apache-2.0", "size": 4111 }
[ "com.google.common.base.Preconditions", "java.util.Comparator", "java.util.Iterator" ]
import com.google.common.base.Preconditions; import java.util.Comparator; import java.util.Iterator;
import com.google.common.base.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,554,530
public synchronized Map<Integer,URI> getAllSeedRelays() { HashMap<Integer,URI> Result = new HashMap<Integer,URI>(); for (String Key : PropertiesUtil.stringPropertyNames(this)) { if ( Key.startsWith(JXSE_SEED_RELAY_URI)) { int ItemNumber = Integer.parseInt(Key....
synchronized Map<Integer,URI> function() { HashMap<Integer,URI> Result = new HashMap<Integer,URI>(); for (String Key : PropertiesUtil.stringPropertyNames(this)) { if ( Key.startsWith(JXSE_SEED_RELAY_URI)) { int ItemNumber = Integer.parseInt(Key.substring(JXSE_SEED_RELAY_URI.length()+1)); Result.put(ItemNumber, URI.crea...
/** * Provides the complete set of registered seed relays in a map, where the key are * the item numbers. * * @return Map of item number and corresponding seed relay URI. */
Provides the complete set of registered seed relays in a map, where the key are the item numbers
getAllSeedRelays
{ "repo_name": "johnjianfang/jxse", "path": "src/main/java/net/jxse/configuration/JxsePeerConfiguration.java", "license": "apache-2.0", "size": 38745 }
[ "java.net.URI", "java.util.HashMap", "java.util.Map", "net.jxta.configuration.PropertiesUtil" ]
import java.net.URI; import java.util.HashMap; import java.util.Map; import net.jxta.configuration.PropertiesUtil;
import java.net.*; import java.util.*; import net.jxta.configuration.*;
[ "java.net", "java.util", "net.jxta.configuration" ]
java.net; java.util; net.jxta.configuration;
2,292,333
private Node propertyName(Node pn, String name, int memberTypeFlags) throws IOException, ParserException { String namespace = null; if (matchToken(Token.COLONCOLON)) { decompiler.addToken(Token.COLONCOLON); namespace = name; int tt = nextToken(); ...
Node function(Node pn, String name, int memberTypeFlags) throws IOException, ParserException { String namespace = null; if (matchToken(Token.COLONCOLON)) { decompiler.addToken(Token.COLONCOLON); namespace = name; int tt = nextToken(); switch (tt) { case Token.NAME: name = ts.getString(); decompiler.addName(name); break...
/** * Check if :: follows name in which case it becomes qualified name */
Check if :: follows name in which case it becomes qualified name
propertyName
{ "repo_name": "appnativa/rare", "path": "source/rare/android/org/mozilla/javascript/Parser.java", "license": "gpl-3.0", "size": 84852 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,746,135
public void onSuccessfulFlowMirrorPointDelete(String flowId, String flowMirrorPointId) { Map<String, String> data = new HashMap<>(); data.put(DASHBOARD, "flow-mirror-point-delete-successful"); data.put(TAG, "flow-mirror-point-delete-successful"); data.put(FLOW_ID, flowId); da...
void function(String flowId, String flowMirrorPointId) { Map<String, String> data = new HashMap<>(); data.put(DASHBOARD, STR); data.put(TAG, STR); data.put(FLOW_ID, flowId); data.put(EVENT_TYPE, FLOW_MIRROR_POINT_DELETE_RESULT_EVENT); data.put(STR, STR); invokeLogger(Level.INFO, String.format(STR, flowMirrorPointId, fl...
/** * Log a flow-delete-successful event. */
Log a flow-delete-successful event
onSuccessfulFlowMirrorPointDelete
{ "repo_name": "telstra/open-kilda", "path": "src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/logger/FlowOperationsDashboardLogger.java", "license": "apache-2.0", "size": 26173 }
[ "java.util.HashMap", "java.util.Map", "org.slf4j.event.Level" ]
import java.util.HashMap; import java.util.Map; import org.slf4j.event.Level;
import java.util.*; import org.slf4j.event.*;
[ "java.util", "org.slf4j.event" ]
java.util; org.slf4j.event;
525,636
@Test public void testHashcode() { Vector v1 = new Vector(1.0, 2.0); Vector v2 = new Vector(1.0, 2.0); assertTrue(v1.equals(v2)); int h1 = v1.hashCode(); int h2 = v2.hashCode(); assertEquals(h1, h2); }
void function() { Vector v1 = new Vector(1.0, 2.0); Vector v2 = new Vector(1.0, 2.0); assertTrue(v1.equals(v2)); int h1 = v1.hashCode(); int h2 = v2.hashCode(); assertEquals(h1, h2); }
/** * Two objects that are equal are required to return the same hashCode. */
Two objects that are equal are required to return the same hashCode
testHashcode
{ "repo_name": "aaronc/jfreechart", "path": "tests/org/jfree/data/xy/VectorTest.java", "license": "lgpl-2.1", "size": 3226 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,750,404
public String[] getDefaults() { return Arrays.copyOf(this.defaultValues, this.defaultValues.length); }
String[] function() { return Arrays.copyOf(this.defaultValues, this.defaultValues.length); }
/** * Gets the raw String[] default values of this Property. Check for isList() == true first. * * @return the default values String[] */
Gets the raw String[] default values of this Property. Check for isList() == true first
getDefaults
{ "repo_name": "Scrik/Cauldron-1", "path": "eclipse/cauldron/src/main/java/net/minecraftforge/common/config/Property.java", "license": "gpl-3.0", "size": 31806 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,378,287
public void mouseExited (MouseEvent e) { if (!isEnabled()) { return; } if (this != _background_btn && this != _foreground_btn) { undrawHighlight(getGraphics()); } }
void function (MouseEvent e) { if (!isEnabled()) { return; } if (this != _background_btn && this != _foreground_btn) { undrawHighlight(getGraphics()); } }
/** * Invoked when the mouse exits a component. */
Invoked when the mouse exits a component
mouseExited
{ "repo_name": "gmessner/ajf", "path": "src/main/java/com/messners/ajf/ui/ColorChooser.java", "license": "mit", "size": 13200 }
[ "java.awt.event.MouseEvent" ]
import java.awt.event.MouseEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
2,475,027
public void invokeMethodsFromMethodList(String methodNameToCall, Object methodParameter) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException{ String[] stringArrayValue=null; if(methodParameter instanceof String[]){ stringArrayValue = (String[]) methodParameter; } el...
void function(String methodNameToCall, Object methodParameter) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException{ String[] stringArrayValue=null; if(methodParameter instanceof String[]){ stringArrayValue = (String[]) methodParameter; } else if(methodParameter instanceof String){ stringA...
/** * Invokes the method, defined by the methodNameToCall-String. The method that will be invoked * gets more than one parameter, the methodParameter object-Array, which will be casted to the target format. * @param methodNameToCall The name of the method that will be invoked. * @param methodParameter The ...
Invokes the method, defined by the methodNameToCall-String. The method that will be invoked gets more than one parameter, the methodParameter object-Array, which will be casted to the target format
invokeMethodsFromMethodList
{ "repo_name": "tscholze/java-logistics-rfid-cep-ui", "path": "trunk/hw_encapsulater/src/main/java/hw_encapsulator/reflectionMgr/ReflectionManager.java", "license": "gpl-2.0", "size": 5191 }
[ "java.lang.reflect.InvocationTargetException", "java.util.ArrayList" ]
import java.lang.reflect.InvocationTargetException; import java.util.ArrayList;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
2,368,699
protected String getPostInput(Hashtable params) { String lineSeparator = System.getProperty("line.separator"); Enumeration paramNames = params.keys(); StringBuffer postInput = new StringBuffer(""); StringBuffer qs = new StringBuffer(""); if (paramNames...
String function(Hashtable params) { String lineSeparator = System.getProperty(STR); Enumeration paramNames = params.keys(); StringBuffer postInput = new StringBuffer(STRSTR=STR=STR=STR=STR&"); } } } qs.append(lineSeparator); return qs.append(postInput).toString(); } }
/** * Gets a string for input to a POST cgi script * * @param params Hashtable of query parameters to be passed to * the CGI script * @return for use as input to the CGI script */
Gets a string for input to a POST cgi script
getPostInput
{ "repo_name": "jasonleaster/TheWayToJava", "path": "HowTomcatWorks/src/main/java/org/apache/catalina/servlets/CGIServlet.java", "license": "gpl-3.0", "size": 67201 }
[ "java.util.Enumeration", "java.util.Hashtable" ]
import java.util.Enumeration; import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
1,110,639
Properties configuration = new Properties(); configuration.setProperty("org.fax4j.spi.rfax.port.name", "COM1"); configuration.setProperty("org.fax4j.spi.rfax.fax.class", "1"); this.faxClientSpi = (RFaxFaxClientSpi) TestUtil.createFaxClientSpi(RFaxFaxClientSpi.class.getName(), co...
Properties configuration = new Properties(); configuration.setProperty(STR, "COM1"); configuration.setProperty(STR, "1"); this.faxClientSpi = (RFaxFaxClientSpi) TestUtil.createFaxClientSpi(RFaxFaxClientSpi.class.getName(), configuration); }
/** * Sets up the SPI instance. * * @throws Exception * Any exception */
Sets up the SPI instance
setUp
{ "repo_name": "sagiegurari/fax4j", "path": "src/test/java/org/fax4j/spi/java4less/RFaxFaxClientSpiTest.java", "license": "apache-2.0", "size": 2550 }
[ "java.util.Properties", "org.fax4j.test.TestUtil" ]
import java.util.Properties; import org.fax4j.test.TestUtil;
import java.util.*; import org.fax4j.test.*;
[ "java.util", "org.fax4j.test" ]
java.util; org.fax4j.test;
1,860,442
public static short toShort(byte[] bytes, int offset, final int length) { if (length != SIZEOF_SHORT || offset + length > bytes.length) { throw explainWrongLengthOrOffset(bytes, offset, length, SIZEOF_SHORT); } short n = 0; if (CarbonUnsafe.getUnsafe() != null) { if (CarbonUnsafe.ISLITTLEE...
static short function(byte[] bytes, int offset, final int length) { if (length != SIZEOF_SHORT offset + length > bytes.length) { throw explainWrongLengthOrOffset(bytes, offset, length, SIZEOF_SHORT); } short n = 0; if (CarbonUnsafe.getUnsafe() != null) { if (CarbonUnsafe.ISLITTLEENDIAN) { n = Short.reverseBytes( Carbon...
/** * byte[] => short * * @param bytes * @param offset * @param length * @return */
byte[] => short
toShort
{ "repo_name": "jackylk/incubator-carbondata", "path": "core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java", "license": "apache-2.0", "size": 23931 }
[ "org.apache.carbondata.core.memory.CarbonUnsafe" ]
import org.apache.carbondata.core.memory.CarbonUnsafe;
import org.apache.carbondata.core.memory.*;
[ "org.apache.carbondata" ]
org.apache.carbondata;
822,490
public boolean checkAvailability() { if (!context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) { throw new BleNotAvailableException("Bluetooth LE not supported by this device"); } else { if (((BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE)).getAdapter()....
boolean function() { if (!context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) { throw new BleNotAvailableException(STR); } else { if (((BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE)).getAdapter().isEnabled()) { return true; } } return false; }
/** * Check if Bluetooth LE is supported by this Android device, and if so, make sure it is enabled. Throws a * RuntimeException if Bluetooth LE is not supported. (Note: The Android emulator will do this) * * @return false if it is supported and not enabled */
Check if Bluetooth LE is supported by this Android device, and if so, make sure it is enabled. Throws a RuntimeException if Bluetooth LE is not supported. (Note: The Android emulator will do this)
checkAvailability
{ "repo_name": "echosun1996/IPv6SecurityProject", "path": "workspace/Android/Android-iBeacon-Demo-master/iBeacon-Demo/android-ibeacon-service/src/com/radiusnetworks/ibeacon/IBeaconManager.java", "license": "gpl-3.0", "size": 13809 }
[ "android.bluetooth.BluetoothManager", "android.content.Context", "android.content.pm.PackageManager" ]
import android.bluetooth.BluetoothManager; import android.content.Context; import android.content.pm.PackageManager;
import android.bluetooth.*; import android.content.*; import android.content.pm.*;
[ "android.bluetooth", "android.content" ]
android.bluetooth; android.content;
1,002,287
private void removeFromHierarchyWrapper(Object itemId) { LinkedList<Object> oprhanedChildren = children.remove(itemId); if (oprhanedChildren != null) { for (Object object : oprhanedChildren) { // make orphaned children root nodes setParent(object, null); ...
void function(Object itemId) { LinkedList<Object> oprhanedChildren = children.remove(itemId); if (oprhanedChildren != null) { for (Object object : oprhanedChildren) { setParent(object, null); } } roots.remove(itemId); final Object p = parent.get(itemId); if (p != null) { final LinkedList<Object> c = children.get(p); if...
/** * Removes the specified Item from the wrapper's internal hierarchy * structure. * <p> * Note : The Item is not removed from the underlying Container. * </p> * * @param itemId * the ID of the item to remove from the hierarchy. */
Removes the specified Item from the wrapper's internal hierarchy structure. Note : The Item is not removed from the underlying Container.
removeFromHierarchyWrapper
{ "repo_name": "jdahlstrom/vaadin.react", "path": "server/src/main/java/com/vaadin/data/util/ContainerHierarchicalWrapper.java", "license": "apache-2.0", "size": 26836 }
[ "java.util.LinkedList" ]
import java.util.LinkedList;
import java.util.*;
[ "java.util" ]
java.util;
2,748,865
private void checkClosed() throws IOException { if (closed) throw new IOException("Cannot read from stream anymore. It has been closed"); }
void function() throws IOException { if (closed) throw new IOException(STR); }
/** * Check if the stream has been closed. If it has, it will throw an {@link java.io.IOException}. * * @throws java.io.IOException */
Check if the stream has been closed. If it has, it will throw an <code>java.io.IOException</code>
checkClosed
{ "repo_name": "calrissian/mango", "path": "mango-core/src/main/java/org/calrissian/mango/io/AbstractBufferedInputStream.java", "license": "apache-2.0", "size": 2807 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,143,214
protected AnalyticDistributionTemplate getAnalyticDistributionTemplate( Product product, Company company, int configObject) { AccountManagement accountManagement = this.getAccountManagement(product, company, configObject); AnalyticDistributionTemplate analyticDistributionTemplate = null; if (acco...
AnalyticDistributionTemplate function( Product product, Company company, int configObject) { AccountManagement accountManagement = this.getAccountManagement(product, company, configObject); AnalyticDistributionTemplate analyticDistributionTemplate = null; if (accountManagement != null) { analyticDistributionTemplate = ...
/** * Get the product analytic distribution template * * @param product * @param compan * @param configObject Specify if we want get the tax from the product or its product family * <li>1 : product * <li>2 : product family * @return * @throws AxelorException */
Get the product analytic distribution template
getAnalyticDistributionTemplate
{ "repo_name": "ama-axelor/axelor-business-suite", "path": "axelor-account/src/main/java/com/axelor/apps/account/service/AccountManagementServiceAccountImpl.java", "license": "agpl-3.0", "size": 7351 }
[ "com.axelor.apps.account.db.AccountManagement", "com.axelor.apps.account.db.AnalyticDistributionTemplate", "com.axelor.apps.base.db.Company", "com.axelor.apps.base.db.Product" ]
import com.axelor.apps.account.db.AccountManagement; import com.axelor.apps.account.db.AnalyticDistributionTemplate; import com.axelor.apps.base.db.Company; import com.axelor.apps.base.db.Product;
import com.axelor.apps.account.db.*; import com.axelor.apps.base.db.*;
[ "com.axelor.apps" ]
com.axelor.apps;
2,156,801
private void scheduleNextInactivityPeriodElapsedCheck() { final long lastRecMs = lastRecordLoggedMs.get(); final long nextPossibleAutoArchive = (lastRecMs <= 0 ? U.currentTimeMillis() : lastRecMs) + walAutoArchiveAfterInactivity; if (log.isDebugEnabled()) log.debug("Schedule WAL...
void function() { final long lastRecMs = lastRecordLoggedMs.get(); final long nextPossibleAutoArchive = (lastRecMs <= 0 ? U.currentTimeMillis() : lastRecMs) + walAutoArchiveAfterInactivity; if (log.isDebugEnabled()) log.debug(STR + new Time(nextPossibleAutoArchive).toString()); nextAutoArchiveTimeoutObj = new GridTimeo...
/** * Schedules next check of inactivity period expired. Based on current record update timestamp. At timeout method * does check of inactivity period and schedules new launch. */
Schedules next check of inactivity period expired. Based on current record update timestamp. At timeout method does check of inactivity period and schedules new launch
scheduleNextInactivityPeriodElapsedCheck
{ "repo_name": "vladisav/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java", "license": "apache-2.0", "size": 118308 }
[ "java.sql.Time", "org.apache.ignite.internal.processors.timeout.GridTimeoutObject", "org.apache.ignite.internal.util.typedef.internal.U", "org.apache.ignite.lang.IgniteUuid" ]
import java.sql.Time; import org.apache.ignite.internal.processors.timeout.GridTimeoutObject; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteUuid;
import java.sql.*; import org.apache.ignite.internal.processors.timeout.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.lang.*;
[ "java.sql", "org.apache.ignite" ]
java.sql; org.apache.ignite;
2,464,588
void enterRuleOpAdd(@NotNull XtendParser.RuleOpAddContext ctx); void exitRuleOpAdd(@NotNull XtendParser.RuleOpAddContext ctx);
void enterRuleOpAdd(@NotNull XtendParser.RuleOpAddContext ctx); void exitRuleOpAdd(@NotNull XtendParser.RuleOpAddContext ctx);
/** * Exit a parse tree produced by {@link XtendParser#ruleOpAdd}. * @param ctx the parse tree */
Exit a parse tree produced by <code>XtendParser#ruleOpAdd</code>
exitRuleOpAdd
{ "repo_name": "szarnekow/XtendParserGeneratorComparison", "path": "antrl3_vs_antlr4/src/xtend/antlr4_2/XtendListener.java", "license": "epl-1.0", "size": 44107 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
1,197,752
@Override public boolean print(WriteStream out, ELContext env, boolean isEscape) throws IOException, ELException { if (isEscape) toStreamEscaped(out, _value); else out.print(_value); return false; }
boolean function(WriteStream out, ELContext env, boolean isEscape) throws IOException, ELException { if (isEscape) toStreamEscaped(out, _value); else out.print(_value); return false; }
/** * Evalutes directly to the output. */
Evalutes directly to the output
print
{ "repo_name": "christianchristensen/resin", "path": "modules/kernel/src/com/caucho/el/StringLiteral.java", "license": "gpl-2.0", "size": 3764 }
[ "com.caucho.vfs.WriteStream", "java.io.IOException", "javax.el.ELContext", "javax.el.ELException" ]
import com.caucho.vfs.WriteStream; import java.io.IOException; import javax.el.ELContext; import javax.el.ELException;
import com.caucho.vfs.*; import java.io.*; import javax.el.*;
[ "com.caucho.vfs", "java.io", "javax.el" ]
com.caucho.vfs; java.io; javax.el;
990,122
private void calculateCL(double[] x) { if (values != null) { rvfcalculate(x); return; } //System.out.println("Checking at: "+x[0]+" "+x[1]+" "+x[2]); value = 0.0; if (derivative == null) { derivative = new double[x.length]; } else { Arrays.fill(derivative, 0.0...
void function(double[] x) { if (values != null) { rvfcalculate(x); return; } value = 0.0; if (derivative == null) { derivative = new double[x.length]; } else { Arrays.fill(derivative, 0.0); } if (derivativeNumerator == null) { derivativeNumerator = new double[x.length]; if(data != null) { for (int d = 0; d < data.lengt...
/** * Calculate the conditional likelihood of this data by multiplying * conditional estimates. * */
Calculate the conditional likelihood of this data by multiplying conditional estimates
calculateCL
{ "repo_name": "PeterisP/LVTagger", "path": "src/main/java/edu/stanford/nlp/classify/LogConditionalObjectiveFunction.java", "license": "gpl-2.0", "size": 28501 }
[ "edu.stanford.nlp.ling.Datum", "edu.stanford.nlp.math.ArrayMath", "java.util.Arrays", "java.util.Collection", "java.util.Iterator" ]
import edu.stanford.nlp.ling.Datum; import edu.stanford.nlp.math.ArrayMath; import java.util.Arrays; import java.util.Collection; import java.util.Iterator;
import edu.stanford.nlp.ling.*; import edu.stanford.nlp.math.*; import java.util.*;
[ "edu.stanford.nlp", "java.util" ]
edu.stanford.nlp; java.util;
1,294,719
protected Object getMacroBeanValue(Object bean, String property) { Object result = null; if ((bean != null) && CmsStringUtil.isNotEmptyOrWhitespaceOnly(property)) { try { PropertyUtilsBean propBean = BeanUtilsBean.getInstance().getPropertyUtils(); result ...
Object function(Object bean, String property) { Object result = null; if ((bean != null) && CmsStringUtil.isNotEmptyOrWhitespaceOnly(property)) { try { PropertyUtilsBean propBean = BeanUtilsBean.getInstance().getPropertyUtils(); result = propBean.getProperty(bean, property); } catch (Exception e) { LOG.error(STR + prop...
/** * Returns the property value read from the given JavaBean. * * @param bean the JavaBean to read the property from * @param property the property to read * * @return the property value read from the given JavaBean */
Returns the property value read from the given JavaBean
getMacroBeanValue
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/jsp/util/CmsMacroFormatterResolver.java", "license": "lgpl-2.1", "size": 17445 }
[ "org.apache.commons.beanutils.BeanUtilsBean", "org.apache.commons.beanutils.PropertyUtilsBean", "org.opencms.util.CmsStringUtil" ]
import org.apache.commons.beanutils.BeanUtilsBean; import org.apache.commons.beanutils.PropertyUtilsBean; import org.opencms.util.CmsStringUtil;
import org.apache.commons.beanutils.*; import org.opencms.util.*;
[ "org.apache.commons", "org.opencms.util" ]
org.apache.commons; org.opencms.util;
2,031,630
@Test public void testType() { assertEquals("difference", ann.getType()); }
void function() { assertEquals(STR, ann.getType()); }
/** * Test type of annotation. */
Test type of annotation
testType
{ "repo_name": "ProgrammingLife2016/PL1-2016", "path": "src/test/java/io/github/programminglife2016/pl1_2016/parser/metadata/GFFParserTest.java", "license": "apache-2.0", "size": 3174 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,621,447
public Builder accessFudge(final URI uri) { return getClient().resource(uri).type(FudgeRest.MEDIA_TYPE).accept(FudgeRest.MEDIA_TYPE); }
Builder function(final URI uri) { return getClient().resource(uri).type(FudgeRest.MEDIA_TYPE).accept(FudgeRest.MEDIA_TYPE); }
/** * Obtains a class that can be used to call a remote resource synchronously. * <p> * This sets the entity type and accepted type to be Fudge. * * @param uri the URI of the resource, not null * @return a class that can be used to call a remote resource, not null */
Obtains a class that can be used to call a remote resource synchronously. This sets the entity type and accepted type to be Fudge
accessFudge
{ "repo_name": "McLeodMoores/starling", "path": "projects/util-rest-client/src/main/java/com/opengamma/util/rest/FudgeRestClient.java", "license": "apache-2.0", "size": 3648 }
[ "com.opengamma.transport.jaxrs.FudgeRest", "com.sun.jersey.api.client.WebResource" ]
import com.opengamma.transport.jaxrs.FudgeRest; import com.sun.jersey.api.client.WebResource;
import com.opengamma.transport.jaxrs.*; import com.sun.jersey.api.client.*;
[ "com.opengamma.transport", "com.sun.jersey" ]
com.opengamma.transport; com.sun.jersey;
1,647,080
public Node getDOM() { return this.getMessage().getDOM(); }
Node function() { return this.getMessage().getDOM(); }
/** * Convert this tree to a DOM object. * Override this. * @param root The room jaxb item. * @return The dom tree. */
Convert this tree to a DOM object. Override this
getDOM
{ "repo_name": "jbundle/jbundle", "path": "base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/ExternalMapTrxMessageOut.java", "license": "gpl-3.0", "size": 2608 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,891,422
@Contract(pure=true) PsiManager getManager();
@Contract(pure=true) PsiManager getManager();
/** * Returns the PSI manager for the project to which the PSI element belongs. * * @return the PSI manager instance. */
Returns the PSI manager for the project to which the PSI element belongs
getManager
{ "repo_name": "ThiagoGarciaAlves/intellij-community", "path": "platform/core-api/src/com/intellij/psi/PsiElement.java", "license": "apache-2.0", "size": 21409 }
[ "org.jetbrains.annotations.Contract" ]
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
660,153
public static JGConnectionHolder getInstance( ILateralCacheAttributes ilca ) { //throws IOException, NotBoundException //JGConnectionHolder ins = (JGConnectionHolder) instances.get( ilca.getJGChannelProperties() ); JGConnectionHolder ins = (JGConnectionHolder) instances.get( ilca.getCach...
static JGConnectionHolder function( ILateralCacheAttributes ilca ) { JGConnectionHolder ins = (JGConnectionHolder) instances.get( ilca.getCacheName() ); try { synchronized ( JGConnectionHolder.class ) { if ( ins == null ) { ins = new JGConnectionHolder( ilca ); } if ( log.isDebugEnabled() ) { log.debug( STR + ilca.getJ...
/** * Gets the instance attribute of the LateralGroupCacheJGListener class * * @return The instance value * @param ilca */
Gets the instance attribute of the LateralGroupCacheJGListener class
getInstance
{ "repo_name": "apache/commons-jcs", "path": "auxiliary-builds/jdk14/src/java/org/apache/commons/jcs/auxiliary/lateral/javagroups/JGConnectionHolder.java", "license": "apache-2.0", "size": 5001 }
[ "org.apache.commons.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes" ]
import org.apache.commons.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes;
import org.apache.commons.jcs.auxiliary.lateral.behavior.*;
[ "org.apache.commons" ]
org.apache.commons;
350,264
public SearchEngineInfo getSearchEngine(int field, String value) { switch (field) { case SearchEngineInfo.NAME: return getSearchEngineByName(value); case SearchEngineInfo.FAVICON: return getSearchEngineByFavicon(value); default: ...
SearchEngineInfo function(int field, String value) { switch (field) { case SearchEngineInfo.NAME: return getSearchEngineByName(value); case SearchEngineInfo.FAVICON: return getSearchEngineByFavicon(value); default: return null; } }
/** * Get search engine through specified field and value. * @param field the field of SearchEngineInfo * @param value the value of the field * @return the search engine */
Get search engine through specified field and value
getSearchEngine
{ "repo_name": "rex-xxx/mt6572_x201", "path": "mediatek/frameworks/base/search/java/com/mediatek/search/SearchEngineManagerService.java", "license": "gpl-2.0", "size": 10189 }
[ "com.mediatek.common.search.SearchEngineInfo" ]
import com.mediatek.common.search.SearchEngineInfo;
import com.mediatek.common.search.*;
[ "com.mediatek.common" ]
com.mediatek.common;
2,773,505
Promise<WorkspaceDto> getWorkspace(String namespace, String workspaceName);
Promise<WorkspaceDto> getWorkspace(String namespace, String workspaceName);
/** * Gets workspace by namespace and name * * @param namespace * namespace * @param workspaceName * workspace name * @return a promise that resolves to the {@link WorkspaceDto}, or rejects with an error * @see WorkspaceService#getByKey(String) */
Gets workspace by namespace and name
getWorkspace
{ "repo_name": "cdietrich/che", "path": "ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/workspace/WorkspaceServiceClient.java", "license": "epl-1.0", "size": 10657 }
[ "org.eclipse.che.api.promises.client.Promise", "org.eclipse.che.api.workspace.shared.dto.WorkspaceDto" ]
import org.eclipse.che.api.promises.client.Promise; import org.eclipse.che.api.workspace.shared.dto.WorkspaceDto;
import org.eclipse.che.api.promises.client.*; import org.eclipse.che.api.workspace.shared.dto.*;
[ "org.eclipse.che" ]
org.eclipse.che;
1,633,301
public BigDecimal getHoldingMarketValue(HoldingTaxLot holdingTaxLot, String securityId);
BigDecimal function(HoldingTaxLot holdingTaxLot, String securityId);
/** * Gets the holding market value as follows: Class type code = B => MV = Units x Unit value / 100 Class type code = A => Market * Valuation (END_SEC_T: SEC_VAL_BY_MKT) minus the total cash activity (income and principal) since the last value date * (END_SEC_T: SEC_VAL_DT) Class type code = O => Units ...
Gets the holding market value as follows: Class type code = B => MV = Units x Unit value / 100 Class type code = A => Market
getHoldingMarketValue
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/endow/document/service/CurrentTaxLotService.java", "license": "apache-2.0", "size": 6098 }
[ "java.math.BigDecimal", "org.kuali.kfs.module.endow.businessobject.HoldingTaxLot" ]
import java.math.BigDecimal; import org.kuali.kfs.module.endow.businessobject.HoldingTaxLot;
import java.math.*; import org.kuali.kfs.module.endow.businessobject.*;
[ "java.math", "org.kuali.kfs" ]
java.math; org.kuali.kfs;
90,833
protected void doDrawCustomData(Graphics g, PaintMoment moment, XYSequence data, Color color) { AxisPanel xAxis; AxisPanel yAxis; Percentile<Double> perc; double value; xAxis = getPlot().getAxis(Axis.BOTTOM); yAxis = getPlot().getAxis(Axis.LEFT); // calculate percentile perc...
void function(Graphics g, PaintMoment moment, XYSequence data, Color color) { AxisPanel xAxis; AxisPanel yAxis; Percentile<Double> perc; double value; xAxis = getPlot().getAxis(Axis.BOTTOM); yAxis = getPlot().getAxis(Axis.LEFT); perc = new Percentile<>(); for (XYSequencePoint point: data.toList()) perc.add(point.getY()...
/** * Draws the custom data with the given color. * * @param g the graphics context * @param moment the paint moment * @param data the data to draw * @param color the color to draw in */
Draws the custom data with the given color
doDrawCustomData
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/gui/visualization/sequence/PercentileOverlayPaintlet.java", "license": "gpl-3.0", "size": 5996 }
[ "java.awt.Color", "java.awt.Graphics" ]
import java.awt.Color; import java.awt.Graphics;
import java.awt.*;
[ "java.awt" ]
java.awt;
297,363
public static boolean isOverflow(BigDecimal value, Type type) throws AnalysisException { switch (type.getPrimitiveType()) { case TINYINT: return (value.compareTo(BigDecimal.valueOf(Byte.MAX_VALUE)) > 0 || value.compareTo(BigDecimal.valueOf(Byte.MIN_VALUE)) < 0); case SMALLINT...
static boolean function(BigDecimal value, Type type) throws AnalysisException { switch (type.getPrimitiveType()) { case TINYINT: return (value.compareTo(BigDecimal.valueOf(Byte.MAX_VALUE)) > 0 value.compareTo(BigDecimal.valueOf(Byte.MIN_VALUE)) < 0); case SMALLINT: return (value.compareTo(BigDecimal.valueOf(Short.MAX_V...
/** * Check overflow. */
Check overflow
isOverflow
{ "repo_name": "kapilrastogi/Impala", "path": "fe/src/main/java/com/cloudera/impala/analysis/NumericLiteral.java", "license": "apache-2.0", "size": 11893 }
[ "com.cloudera.impala.catalog.Type", "com.cloudera.impala.common.AnalysisException", "java.math.BigDecimal" ]
import com.cloudera.impala.catalog.Type; import com.cloudera.impala.common.AnalysisException; import java.math.BigDecimal;
import com.cloudera.impala.catalog.*; import com.cloudera.impala.common.*; import java.math.*;
[ "com.cloudera.impala", "java.math" ]
com.cloudera.impala; java.math;
1,579,579
if (parsedFormatInfo != null) { return parsedFormatInfo; } // Read top-left format info bits int formatInfoBits1 = 0; for (int i = 0; i < 6; i++) { formatInfoBits1 = copyBit(i, 8, formatInfoBits1); } // .. and skip a bit in the timing pattern ... formatInfoBits1 = copyBit(7,...
if (parsedFormatInfo != null) { return parsedFormatInfo; } int formatInfoBits1 = 0; for (int i = 0; i < 6; i++) { formatInfoBits1 = copyBit(i, 8, formatInfoBits1); } formatInfoBits1 = copyBit(7, 8, formatInfoBits1); formatInfoBits1 = copyBit(8, 8, formatInfoBits1); formatInfoBits1 = copyBit(8, 7, formatInfoBits1); for ...
/** * <p>Reads format information from one of its two locations within the QR Code.</p> * * @return {@link com.google.zxing.qrcode.decoder.FormatInformation} encapsulating the QR Code's format info * @throws com.google.zxing.FormatException if both format information locations cannot be parsed as * the v...
Reads format information from one of its two locations within the QR Code
readFormatInformation
{ "repo_name": "luisnatividad/LectorQR", "path": "app/src/main/java/com/google/zxing/qrcode/decoder/BitMatrixParser.java", "license": "mit", "size": 8455 }
[ "com.google.zxing.FormatException" ]
import com.google.zxing.FormatException;
import com.google.zxing.*;
[ "com.google.zxing" ]
com.google.zxing;
2,271,697
private String getRequest(String apiMethod) throws IOException { HttpURLConnection urlConnection = null; try { URL url = new URL(mApiUrl + '/' + apiMethod); urlConnection = (HttpURLConnection) url.openConnection(); InputStream in = new BufferedInputStream(urlConne...
String function(String apiMethod) throws IOException { HttpURLConnection urlConnection = null; try { URL url = new URL(mApiUrl + '/' + apiMethod); urlConnection = (HttpURLConnection) url.openConnection(); InputStream in = new BufferedInputStream(urlConnection.getInputStream()); String response = convertStreamToString(i...
/** * Performs a get request * @param apiMethod * @return * @throws IOException */
Performs a get request
getRequest
{ "repo_name": "WycliffeAssociates/translationRecorder", "path": "translationRecorder/com.door43.tools.reporting/src/main/java/com/door43/tools/reporting/Github.java", "license": "mit", "size": 4185 }
[ "java.io.BufferedInputStream", "java.io.IOException", "java.io.InputStream", "java.net.HttpURLConnection" ]
import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
1,619,895
private void initialize() { if (mBluetoothLeAdvertiser == null) { BluetoothManager mBluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE); if (mBluetoothManager != null) { BluetoothAdapter mBluetoothAdapter = mBluetoothManager.getAdapter();...
void function() { if (mBluetoothLeAdvertiser == null) { BluetoothManager mBluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE); if (mBluetoothManager != null) { BluetoothAdapter mBluetoothAdapter = mBluetoothManager.getAdapter(); if (mBluetoothAdapter != null) { mBluetoothLeAdvertiser = mBl...
/** * Get references to system Bluetooth objects if we don't have them already. */
Get references to system Bluetooth objects if we don't have them already
initialize
{ "repo_name": "android/connectivity-samples", "path": "BluetoothAdvertisements/Application/src/main/java/com/example/android/bluetoothadvertisements/AdvertiserService.java", "license": "apache-2.0", "size": 8842 }
[ "android.bluetooth.BluetoothAdapter", "android.bluetooth.BluetoothManager", "android.content.Context", "android.widget.Toast" ]
import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothManager; import android.content.Context; import android.widget.Toast;
import android.bluetooth.*; import android.content.*; import android.widget.*;
[ "android.bluetooth", "android.content", "android.widget" ]
android.bluetooth; android.content; android.widget;
50,460
public boolean addRiver(int x1, int y1, int x2, int y2) throws Exception { if (currentWorld == null) throw new Exception(NO_WORLD_EXCEPTION_MESSAGE); if (x1 == x2 && y1 == y2) { return true; } Tile current = currentWorld.getTile(x1, y1); int currElev...
boolean function(int x1, int y1, int x2, int y2) throws Exception { if (currentWorld == null) throw new Exception(NO_WORLD_EXCEPTION_MESSAGE); if (x1 == x2 && y1 == y2) { return true; } Tile current = currentWorld.getTile(x1, y1); int currElevation = (int) current.getProperty(TileProperty.ELEVATION); ArrayList<Tile> ad...
/** * Tries to recursively generate a river from the coordinates given * * @param x1 * x-coord of point marking river start * @param y1 * y-coord of point marking river start * @param x2 * x-coord of point marking river end * @param y2 * ...
Tries to recursively generate a river from the coordinates given
addRiver
{ "repo_name": "UQdeco2800/farmsim", "path": "farmsim/src/main/java/farmsim/world/generators/BasicWorldGenerator.java", "license": "mit", "size": 21142 }
[ "java.util.ArrayList", "java.util.Random" ]
import java.util.ArrayList; import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
120,764
public Font getTickLabelFont() { return this.tickLabelFont; }
Font function() { return this.tickLabelFont; }
/** * Returns the tick label font. * * @return The font (never <code>null</code>). * * @see #setTickLabelFont(Font) */
Returns the tick label font
getTickLabelFont
{ "repo_name": "apetresc/JFreeChart", "path": "src/main/java/org/jfree/chart/plot/MeterPlot.java", "license": "lgpl-2.1", "size": 44804 }
[ "java.awt.Font" ]
import java.awt.Font;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,605,332
@ServiceMethod(returns = ReturnType.SINGLE) public PipelineRunInner get(String resourceGroupName, String factoryName, String runId) { return getAsync(resourceGroupName, factoryName, runId).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) PipelineRunInner function(String resourceGroupName, String factoryName, String runId) { return getAsync(resourceGroupName, factoryName, runId).block(); }
/** * Get a pipeline run by its run ID. * * @param resourceGroupName The resource group name. * @param factoryName The factory name. * @param runId The pipeline run identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException t...
Get a pipeline run by its run ID
get
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/implementation/PipelineRunsClientImpl.java", "license": "mit", "size": 29901 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.datafactory.fluent.models.PipelineRunInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.datafactory.fluent.models.PipelineRunInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.datafactory.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,590,092
static PGPSecretKey readSecretKey(InputStream input) throws IOException, PGPException { PGPSecretKeyRingCollection pgpSec = new PGPSecretKeyRingCollection( PGPUtil.getDecoderStream(input)); // // we just loop through the collection till we find a key suitable for encryption,...
static PGPSecretKey readSecretKey(InputStream input) throws IOException, PGPException { PGPSecretKeyRingCollection pgpSec = new PGPSecretKeyRingCollection( PGPUtil.getDecoderStream(input)); Iterator keyRingIter = pgpSec.getKeyRings(); while (keyRingIter.hasNext()) { PGPSecretKeyRing keyRing = (PGPSecretKeyRing)keyRingI...
/** * A simple routine that opens a key ring file and loads the first available key * suitable for signature generation. * * @param input stream to read the secret key ring collection from. * @return a secret key. * @throws IOException on a problem with using the input stream. * @thr...
A simple routine that opens a key ring file and loads the first available key suitable for signature generation
readSecretKey
{ "repo_name": "sake/bouncycastle-java", "path": "src/org/bouncycastle/openpgp/examples/PGPExampleUtil.java", "license": "mit", "size": 5205 }
[ "java.io.IOException", "java.io.InputStream", "java.util.Iterator", "org.bouncycastle.openpgp.PGPException", "org.bouncycastle.openpgp.PGPSecretKey", "org.bouncycastle.openpgp.PGPSecretKeyRing", "org.bouncycastle.openpgp.PGPSecretKeyRingCollection", "org.bouncycastle.openpgp.PGPUtil" ]
import java.io.IOException; import java.io.InputStream; import java.util.Iterator; import org.bouncycastle.openpgp.PGPException; import org.bouncycastle.openpgp.PGPSecretKey; import org.bouncycastle.openpgp.PGPSecretKeyRing; import org.bouncycastle.openpgp.PGPSecretKeyRingCollection; import org.bouncycastle.openpgp.PGP...
import java.io.*; import java.util.*; import org.bouncycastle.openpgp.*;
[ "java.io", "java.util", "org.bouncycastle.openpgp" ]
java.io; java.util; org.bouncycastle.openpgp;
780,912
protected void configureConnectorFactory() { setConfigProperty(WarEngineConfig.APIMAN_GATEWAY_CONNECTOR_FACTORY_CLASS, HttpConnectorFactory.class.getName()); setConfigProperty(WarEngineConfig.APIMAN_GATEWAY_CONNECTOR_FACTORY_CLASS + ".http.timeouts.read", "25"); setConfigProperty(WarEngineCo...
void function() { setConfigProperty(WarEngineConfig.APIMAN_GATEWAY_CONNECTOR_FACTORY_CLASS, HttpConnectorFactory.class.getName()); setConfigProperty(WarEngineConfig.APIMAN_GATEWAY_CONNECTOR_FACTORY_CLASS + STR, "25"); setConfigProperty(WarEngineConfig.APIMAN_GATEWAY_CONNECTOR_FACTORY_CLASS + STR, "25"); setConfigProper...
/** * The connector factory. */
The connector factory
configureConnectorFactory
{ "repo_name": "cmoulliard/apiman", "path": "gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java", "license": "apache-2.0", "size": 15954 }
[ "io.apiman.gateway.platforms.servlet.connectors.HttpConnectorFactory", "io.apiman.gateway.platforms.war.WarEngineConfig" ]
import io.apiman.gateway.platforms.servlet.connectors.HttpConnectorFactory; import io.apiman.gateway.platforms.war.WarEngineConfig;
import io.apiman.gateway.platforms.servlet.connectors.*; import io.apiman.gateway.platforms.war.*;
[ "io.apiman.gateway" ]
io.apiman.gateway;
1,886,629
public IQualifiedNameConverter getQualifiedNameConverter() { return this.qualifiedNameConverter; }
IQualifiedNameConverter function() { return this.qualifiedNameConverter; }
/** Replies the converter of qualified name. * * @return the converer. */
Replies the converter of qualified name
getQualifiedNameConverter
{ "repo_name": "sarl/sarl", "path": "main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java", "license": "apache-2.0", "size": 26754 }
[ "org.eclipse.xtext.naming.IQualifiedNameConverter" ]
import org.eclipse.xtext.naming.IQualifiedNameConverter;
import org.eclipse.xtext.naming.*;
[ "org.eclipse.xtext" ]
org.eclipse.xtext;
1,507,554
public void setDepth(double depth) { this.depth = SeededVariableAmount.fixed(depth); }
void function(double depth) { this.depth = SeededVariableAmount.fixed(depth); }
/** * Sets the depth of this layer to the given constant value. * * @param depth The new depth */
Sets the depth of this layer to the given constant value
setDepth
{ "repo_name": "JBYoshi/SpongeAPI", "path": "src/main/java/org/spongepowered/api/world/biome/GroundCoverLayer.java", "license": "mit", "size": 5277 }
[ "org.spongepowered.api.util.weighted.SeededVariableAmount" ]
import org.spongepowered.api.util.weighted.SeededVariableAmount;
import org.spongepowered.api.util.weighted.*;
[ "org.spongepowered.api" ]
org.spongepowered.api;
1,310,607
public static void render(JRExporter exporter, JasperPrint print, Writer writer) throws JRException { exporter.setParameter(JRExporterParameter.JASPER_PRINT, print); exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, writer); exporter.exportReport(); }
static void function(JRExporter exporter, JasperPrint print, Writer writer) throws JRException { exporter.setParameter(JRExporterParameter.JASPER_PRINT, print); exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, writer); exporter.exportReport(); }
/** * Render the supplied <code>JasperPrint</code> instance using the * supplied <code>JRAbstractExporter</code> instance and write the results * to the supplied <code>Writer</code>. * <p>Make sure that the <code>JRAbstractExporter</code> implementation * you supply is capable of writing to a <code>Writer</co...
Render the supplied <code>JasperPrint</code> instance using the supplied <code>JRAbstractExporter</code> instance and write the results to the supplied <code>Writer</code>. Make sure that the <code>JRAbstractExporter</code> implementation you supply is capable of writing to a <code>Writer</code>
render
{ "repo_name": "cbeams-archive/spring-framework-2.5.x", "path": "src/org/springframework/ui/jasperreports/JasperReportsUtils.java", "license": "apache-2.0", "size": 12579 }
[ "java.io.Writer", "net.sf.jasperreports.engine.JRException", "net.sf.jasperreports.engine.JRExporter", "net.sf.jasperreports.engine.JRExporterParameter", "net.sf.jasperreports.engine.JasperPrint" ]
import java.io.Writer; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JRExporter; import net.sf.jasperreports.engine.JRExporterParameter; import net.sf.jasperreports.engine.JasperPrint;
import java.io.*; import net.sf.jasperreports.engine.*;
[ "java.io", "net.sf.jasperreports" ]
java.io; net.sf.jasperreports;
1,586,427
public RtfExternalGraphic newImage() throws IOException { return new RtfExternalGraphic(this, writer); }
RtfExternalGraphic function() throws IOException { return new RtfExternalGraphic(this, writer); }
/** * Inserts an image. * @return inserted image * @throws IOException for I/O problems */
Inserts an image
newImage
{ "repo_name": "pellcorp/fop", "path": "src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java", "license": "apache-2.0", "size": 17760 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,468,632
protected JPanel buildButtonsPanel() { JPanel p = new JPanel(new FlowLayout(FlowLayout.RIGHT)); JButton okButton = new JButton(Resources.getString(LABEL_OK)); JButton cancelButton = new JButton(Resources.getString(LABEL_CANCEL)); p.add(okButton); p.add(cancelButton);
JPanel function() { JPanel p = new JPanel(new FlowLayout(FlowLayout.RIGHT)); JButton okButton = new JButton(Resources.getString(LABEL_OK)); JButton cancelButton = new JButton(Resources.getString(LABEL_CANCEL)); p.add(okButton); p.add(cancelButton);
/** * Creates the OK/Cancel button panel. */
Creates the OK/Cancel button panel
buildButtonsPanel
{ "repo_name": "srnsw/xena", "path": "plugins/image/ext/src/batik-1.7/sources/org/apache/batik/apps/svgbrowser/PreferenceDialog.java", "license": "gpl-3.0", "size": 51042 }
[ "java.awt.FlowLayout", "javax.swing.JButton", "javax.swing.JPanel" ]
import java.awt.FlowLayout; import javax.swing.JButton; import javax.swing.JPanel;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,460,467
private boolean matchPrivs(Privilege[] inputPriv, PrincipalPrivilegeSet privileges, boolean[] check) { if (inputPriv == null) { return true; } if (privileges == null) { return false; } Set<String> privSet = new HashSet<String>(); if (privileges.getUserPrivileges() != ...
boolean function(Privilege[] inputPriv, PrincipalPrivilegeSet privileges, boolean[] check) { if (inputPriv == null) { return true; } if (privileges == null) { return false; } Set<String> privSet = new HashSet<String>(); if (privileges.getUserPrivileges() != null && privileges.getUserPrivileges().size() > 0) { Collectio...
/** * try to match an array of privileges from user/groups/roles grants. * */
try to match an array of privileges from user/groups/roles grants
matchPrivs
{ "repo_name": "vineetgarg02/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/security/authorization/BitSetCheckedAuthorizationProvider.java", "license": "apache-2.0", "size": 17191 }
[ "java.util.Collection", "java.util.HashSet", "java.util.List", "java.util.Set", "org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet", "org.apache.hadoop.hive.metastore.api.PrivilegeGrantInfo" ]
import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Set; import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; import org.apache.hadoop.hive.metastore.api.PrivilegeGrantInfo;
import java.util.*; import org.apache.hadoop.hive.metastore.api.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
719,251
public void disable(DisableReason reason) throws HydrationException{ if(!isEnabled) throw new IllegalStateException("Operation not allowed. The attendee is disabled"); applyChange(new AttendeeDisabled(this.getId(), reason)); }
void function(DisableReason reason) throws HydrationException{ if(!isEnabled) throw new IllegalStateException(STR); applyChange(new AttendeeDisabled(this.getId(), reason)); }
/** * Disable the attendee * * @param reason * @throws HydrationException */
Disable the attendee
disable
{ "repo_name": "dannormington/appengine-cqrs", "path": "src/main/java/com/cqrs/appengine/sample/domain/Attendee.java", "license": "apache-2.0", "size": 5482 }
[ "com.cqrs.appengine.core.exceptions.HydrationException" ]
import com.cqrs.appengine.core.exceptions.HydrationException;
import com.cqrs.appengine.core.exceptions.*;
[ "com.cqrs.appengine" ]
com.cqrs.appengine;
452,605
public boolean isTransferring() { if (this.sendingConnections.size() > 0) { return true; // sending something } if (this.getHost().getConnections().size() == 0) { return false; // not connected } List<Connection> connections = getConnections(); for (int i=0, n=connections.size(); i<...
boolean function() { if (this.sendingConnections.size() > 0) { return true; } if (this.getHost().getConnections().size() == 0) { return false; } List<Connection> connections = getConnections(); for (int i=0, n=connections.size(); i<n; i++) { Connection con = connections.get(i); if (!con.isReadyForTransfer()) { return t...
/** * Returns true if this router is transferring something at the moment or * some transfer has not been finalized. * @return true if this router is transferring something */
Returns true if this router is transferring something at the moment or some transfer has not been finalized
isTransferring
{ "repo_name": "FrankYFHsu/theonesimulator", "path": "src/routing/ActiveRouter.java", "license": "gpl-3.0", "size": 18644 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
955,194
public void startManager(DiskInterface disk, DiskDeviceContext ctx) throws QuotaManagerException { if(logger.isDebugEnabled()) { logger.debug("Start Quota Manager"); } // Save the filesystem driver details m_filesys = disk; // Allocate the live usage table ...
void function(DiskInterface disk, DiskDeviceContext ctx) throws QuotaManagerException { if(logger.isDebugEnabled()) { logger.debug(STR); } m_filesys = disk; m_liveUsage = new HashMap<String, UserQuotaDetails>(); m_thread = new Thread(this); m_thread.setDaemon(true); m_thread.setName(STR); m_thread.start(); }
/** * Start the quota manager. * * @param disk DiskInterface * @param ctx DiskDeviceContext * @exception QuotaManagerException */
Start the quota manager
startManager
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/repository/source/java/org/alfresco/filesys/repo/ContentQuotaManager.java", "license": "lgpl-3.0", "size": 16820 }
[ "java.util.HashMap", "org.alfresco.jlan.server.filesys.DiskDeviceContext", "org.alfresco.jlan.server.filesys.DiskInterface", "org.alfresco.jlan.server.filesys.quota.QuotaManagerException" ]
import java.util.HashMap; import org.alfresco.jlan.server.filesys.DiskDeviceContext; import org.alfresco.jlan.server.filesys.DiskInterface; import org.alfresco.jlan.server.filesys.quota.QuotaManagerException;
import java.util.*; import org.alfresco.jlan.server.filesys.*; import org.alfresco.jlan.server.filesys.quota.*;
[ "java.util", "org.alfresco.jlan" ]
java.util; org.alfresco.jlan;
824,477
protected void addCurrent_12_reacPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Triplex_meter_current_12_reac_feature"), getString("_UI_Pro...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), VisGridPackage.eINSTANCE.getTriplex_meter_Current_12_reac(), true, false, false, ItemPropertyDesc...
/** * This adds a property descriptor for the Current 12 reac feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Current 12 reac feature.
addCurrent_12_reacPropertyDescriptor
{ "repo_name": "mikesligo/visGrid", "path": "ie.tcd.gmf.visGrid.edit/src/visGrid/provider/Triplex_meterItemProvider.java", "license": "gpl-3.0", "size": 76922 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,071,546
public static List<String> newlineStringToList(final String newlineString, final int limit) { if (newlineString == null) return null; final List<String> l = new ArrayList<String>(); for (final String s: newlineString.split("\\n")) { final String sTrimmed = s.trim(); if (sTrimmed.length() > 0) { l...
static List<String> function(final String newlineString, final int limit) { if (newlineString == null) return null; final List<String> l = new ArrayList<String>(); for (final String s: newlineString.split("\\n")) { final String sTrimmed = s.trim(); if (sTrimmed.length() > 0) { l.add(sTrimmed); if (limit > 0 && l.size()...
/** * Converts a string separated by newlines into a List object. Leading and trailing whitespace is stripped from each * line, and lines with no text are ignored. * @param newlineString a string with newlines separating sub-strings * @param limit maximum number of lines to include in the list (zero for no limi...
Converts a string separated by newlines into a List object. Leading and trailing whitespace is stripped from each line, and lines with no text are ignored
newlineStringToList
{ "repo_name": "pushinginertia/pushinginertia-commons", "path": "pushinginertia-commons-lang/src/main/java/com/pushinginertia/commons/lang/StringUtils.java", "license": "apache-2.0", "size": 18665 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
664,066
public void setCurrentFile(File value) { m_CurrentFile = value; }
void function(File value) { m_CurrentFile = value; }
/** * Sets the current file. * * @param value the file */
Sets the current file
setCurrentFile
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-imaging/src/main/java/adams/gui/tools/previewbrowser/AnnotateImage.java", "license": "gpl-3.0", "size": 17785 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,939,645
private Field actionBomberman() { Random ran = new Random(); int fieldLength = this.getFields().length - 1; // generate random field Field bombField = new Field(ran.nextInt(fieldLength), ran.nextInt(fieldLength)); // set every field, included the bomb to empty field ...
Field function() { Random ran = new Random(); int fieldLength = this.getFields().length - 1; Field bombField = new Field(ran.nextInt(fieldLength), ran.nextInt(fieldLength)); for (int x_direction = -1; x_direction < 1; x_direction++) { for (int y_direction = -1; y_direction < 1; y_direction++) { int x = bombField.getX()...
/** * Destroy random 9 Fields and set them to emtpy. * * OOO * OXO * OOO * * @return Middle Field of the explostion */
Destroy random 9 Fields and set them to emtpy. OOO OXO OOO
actionBomberman
{ "repo_name": "HoboOthello/HoboOthello", "path": "src/main/java/de/htw_berlin/HoboOthello/Core/HoboMode.java", "license": "mit", "size": 2419 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
1,656,299
public void commandFailed(ImapCommand command, String reason) { commandFailed(command, null, reason); }
void function(ImapCommand command, String reason) { commandFailed(command, null, reason); }
/** * Writes a standard NO response on command failure, together with a * descriptive message. * Response is writen as: * <pre> a01 NO COMMAND_NAME failed. <reason></pre> * * @param command The ImapCommand which failed. * @param reason A message describing why the command ...
Writes a standard NO response on command failure, together with a descriptive message. Response is writen as: <code> a01 NO COMMAND_NAME failed. </code>
commandFailed
{ "repo_name": "buildscientist/greenmail", "path": "greenmail-core/src/main/java/com/icegreen/greenmail/imap/ImapResponse.java", "license": "apache-2.0", "size": 7093 }
[ "com.icegreen.greenmail.imap.commands.ImapCommand" ]
import com.icegreen.greenmail.imap.commands.ImapCommand;
import com.icegreen.greenmail.imap.commands.*;
[ "com.icegreen.greenmail" ]
com.icegreen.greenmail;
1,057,214
private void requestPermission(final String frob) { HashMap<String, String> arguments = new HashMap<String, String>(); arguments.put("api_key", this.credentials.getKey()); arguments.put("perms", this.perms.toString()); arguments.put("frob", frob); UrlBuilder.sign(arguments, "api_sig", this.creden...
void function(final String frob) { HashMap<String, String> arguments = new HashMap<String, String>(); arguments.put(STR, this.credentials.getKey()); arguments.put("perms", this.perms.toString()); arguments.put("frob", frob); UrlBuilder.sign(arguments, STR, this.credentials.getSecret()); Window.open(UrlBuilder.getUri(AU...
/** * Opens an authentification popup. * @param frob Previously returned frob from the API */
Opens an authentification popup
requestPermission
{ "repo_name": "ghusse/Dolomite", "path": "src/com/ghusse/dolomite/flickr/auth/Authentification.java", "license": "gpl-3.0", "size": 5917 }
[ "com.ghusse.dolomite.core.UrlBuilder", "com.google.gwt.user.client.Window", "java.util.HashMap" ]
import com.ghusse.dolomite.core.UrlBuilder; import com.google.gwt.user.client.Window; import java.util.HashMap;
import com.ghusse.dolomite.core.*; import com.google.gwt.user.client.*; import java.util.*;
[ "com.ghusse.dolomite", "com.google.gwt", "java.util" ]
com.ghusse.dolomite; com.google.gwt; java.util;
2,900,259
public static void handleShutdownTimeout(ConfigurableApplicationContext context, Class<?> testClass) throws Exception { final int shutdownTimeout; final TimeUnit shutdownTimeUnit; if (testClass.isAnnotationPresent(ShutdownTimeout.class)) { shutdownTimeout = testClass.getAnnotatio...
static void function(ConfigurableApplicationContext context, Class<?> testClass) throws Exception { final int shutdownTimeout; final TimeUnit shutdownTimeUnit; if (testClass.isAnnotationPresent(ShutdownTimeout.class)) { shutdownTimeout = testClass.getAnnotation(ShutdownTimeout.class).value(); shutdownTimeUnit = testCla...
/** * Handles updating shutdown timeouts on Camel contexts based on {@link ShutdownTimeout}. * * @param context the initialized Spring context * @param testClass the test class being executed */
Handles updating shutdown timeouts on Camel contexts based on <code>ShutdownTimeout</code>
handleShutdownTimeout
{ "repo_name": "kevinearls/camel", "path": "components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelAnnotationsHandler.java", "license": "apache-2.0", "size": 17813 }
[ "java.util.concurrent.TimeUnit", "org.springframework.context.ConfigurableApplicationContext" ]
import java.util.concurrent.TimeUnit; import org.springframework.context.ConfigurableApplicationContext;
import java.util.concurrent.*; import org.springframework.context.*;
[ "java.util", "org.springframework.context" ]
java.util; org.springframework.context;
1,443,528
public void register(Subscriber sub) { checkNotNull(sub); getOrCreateList(sub.getPriority()).add(sub); }
void function(Subscriber sub) { checkNotNull(sub); getOrCreateList(sub.getPriority()).add(sub); }
/** * Registers a new {@link Subscriber} with this list. * * @param sub The new subscriber */
Registers a new <code>Subscriber</code> with this list
register
{ "repo_name": "Featherblade/VoxelGunsmith", "path": "src/main/java/com/voxelplugineering/voxelsniper/service/eventbus/SubscriberList.java", "license": "mit", "size": 3915 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,220,256
private Object getPropertyValueIfAvailable(XPropertySet propSet, String propertyName) throws UnknownPropertyException, WrappedTargetException { if (propSet.getPropertySetInfo().hasPropertyByName(propertyName)) { return propSet.getPropertyValue(propertyName); } ...
Object function(XPropertySet propSet, String propertyName) throws UnknownPropertyException, WrappedTargetException { if (propSet.getPropertySetInfo().hasPropertyByName(propertyName)) { return propSet.getPropertyValue(propertyName); } else { return null; } } } class ResultsCallback { private Map<String, Serializable> re...
/** * OOo throws exceptions if we ask for properties that aren't there, so we'll tread carefully. * * @param propSet * @param propertyName property name as used by the OOo API. * @return the propertyValue if it's there, else null. * @throws UnknownPropertyException * @throws WrappedT...
OOo throws exceptions if we ask for properties that aren't there, so we'll tread carefully
getPropertyValueIfAvailable
{ "repo_name": "loftuxab/alfresco-community-loftux", "path": "projects/repository/source/java/org/alfresco/repo/content/metadata/JodConverterMetadataExtracterWorker.java", "license": "lgpl-3.0", "size": 10075 }
[ "com.sun.star.beans.UnknownPropertyException", "com.sun.star.beans.XPropertySet", "com.sun.star.lang.WrappedTargetException", "java.io.Serializable", "java.util.HashMap", "java.util.Map" ]
import com.sun.star.beans.UnknownPropertyException; import com.sun.star.beans.XPropertySet; import com.sun.star.lang.WrappedTargetException; import java.io.Serializable; import java.util.HashMap; import java.util.Map;
import com.sun.star.beans.*; import com.sun.star.lang.*; import java.io.*; import java.util.*;
[ "com.sun.star", "java.io", "java.util" ]
com.sun.star; java.io; java.util;
2,414,387
public Element toXML () { Element e = new Element ("user"); e.addContent (new Comment ("id " +Long.toString (getId()))); e.addContent (new Element ("nick").setText (getNick())); e.addContent (new Element ("name").setText (getName())); Iterator iter = getPermissions().iterator...
Element function () { Element e = new Element ("user"); e.addContent (new Comment (STR +Long.toString (getId()))); e.addContent (new Element ("nick").setText (getNick())); e.addContent (new Element ("name").setText (getName())); Iterator iter = getPermissions().iterator(); while (iter.hasNext()) { GLPermission p = (GLP...
/** * Creates a JDOM Element as defined in * <a href="http://jpos.org/minigl.dtd">minigl.dtd</a> */
Creates a JDOM Element as defined in minigl.dtd
toXML
{ "repo_name": "phamthaithinh/jposee", "path": "modules/minigl/src/main/java/org/jpos/gl/GLUser.java", "license": "agpl-3.0", "size": 6291 }
[ "java.util.Iterator", "org.jdom.Comment", "org.jdom.Element" ]
import java.util.Iterator; import org.jdom.Comment; import org.jdom.Element;
import java.util.*; import org.jdom.*;
[ "java.util", "org.jdom" ]
java.util; org.jdom;
334,293
@Override public CurrencyNameProvider getCurrencyNameProvider() { if (currencyNameProvider == null) { CurrencyNameProvider provider = AccessController.doPrivileged( (PrivilegedAction<CurrencyNameProvider>) () -> new CurrencyNameProviderImpl( ...
CurrencyNameProvider function() { if (currencyNameProvider == null) { CurrencyNameProvider provider = AccessController.doPrivileged( (PrivilegedAction<CurrencyNameProvider>) () -> new CurrencyNameProviderImpl( getAdapterType(), getLanguageTagSet(STR))); synchronized (this) { if (currencyNameProvider == null) { currency...
/** * Getter methods for java.util.spi.* providers */
Getter methods for java.util.spi.* providers
getCurrencyNameProvider
{ "repo_name": "google/desugar_jdk_libs", "path": "jdk11/src/java.base/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java", "license": "gpl-2.0", "size": 20123 }
[ "java.security.AccessController", "java.security.PrivilegedAction", "java.util.spi.CurrencyNameProvider" ]
import java.security.AccessController; import java.security.PrivilegedAction; import java.util.spi.CurrencyNameProvider;
import java.security.*; import java.util.spi.*;
[ "java.security", "java.util" ]
java.security; java.util;
750,225
public void show() { if (!Display.isCreated()) { return; } if (!Mouse.isCreated()) { try { Mouse.create(); } catch (Throwable t) { Log.log.log(Level.WARNING, "Problem creating mouse", t); return; ...
void function() { if (!Display.isCreated()) { return; } if (!Mouse.isCreated()) { try { Mouse.create(); } catch (Throwable t) { Log.log.log(Level.WARNING, STR, t); return; } } if (_image != null) { setCursor(_image, _hx, _hy); } if (Mouse.getNativeCursor() != _cursor) { try { Mouse.setNativeCursor(_cursor); } catch (Th...
/** * Display this cursor. */
Display this cursor
show
{ "repo_name": "cdrchops/gbui", "path": "src/java/com/jmex/bui/BCursor.java", "license": "lgpl-2.1", "size": 3701 }
[ "java.awt.image.BufferedImage", "java.util.logging.Level", "org.lwjgl.input.Cursor", "org.lwjgl.input.Mouse", "org.lwjgl.opengl.Display" ]
import java.awt.image.BufferedImage; import java.util.logging.Level; import org.lwjgl.input.Cursor; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.Display;
import java.awt.image.*; import java.util.logging.*; import org.lwjgl.input.*; import org.lwjgl.opengl.*;
[ "java.awt", "java.util", "org.lwjgl.input", "org.lwjgl.opengl" ]
java.awt; java.util; org.lwjgl.input; org.lwjgl.opengl;
1,787,841
public boolean addRemovePermissionsDescriptor( boolean add, PermissionsDescriptor perm, String grantee, TransactionController tc) throws StandardException { ...
boolean function( boolean add, PermissionsDescriptor perm, String grantee, TransactionController tc) throws StandardException { int catalogNumber = perm.getCatalogNumber(); perm.setUUID(null); perm.setGrantee( grantee); TabInfoImpl ti = getNonCoreTI( catalogNumber); PermissionsCatalogRowFactory rf = (PermissionsCatalog...
/** * Add or remove a permission to/from the permission database. * * @param add if true then the permission is added, if false the permission is removed * @param perm * @param grantee * @param tc * * @return True means revoke has removed a privilege from system * table and ...
Add or remove a permission to/from the permission database
addRemovePermissionsDescriptor
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/sql/catalog/DataDictionaryImpl.java", "license": "apache-2.0", "size": 403048 }
[ "com.pivotal.gemfirexd.internal.iapi.error.StandardException", "com.pivotal.gemfirexd.internal.iapi.services.sanity.SanityManager", "com.pivotal.gemfirexd.internal.iapi.sql.dictionary.PermissionsDescriptor", "com.pivotal.gemfirexd.internal.iapi.sql.dictionary.TupleDescriptor", "com.pivotal.gemfirexd.interna...
import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import com.pivotal.gemfirexd.internal.iapi.services.sanity.SanityManager; import com.pivotal.gemfirexd.internal.iapi.sql.dictionary.PermissionsDescriptor; import com.pivotal.gemfirexd.internal.iapi.sql.dictionary.TupleDescriptor; import com.pivotal.gem...
import com.pivotal.gemfirexd.internal.iapi.error.*; import com.pivotal.gemfirexd.internal.iapi.services.sanity.*; import com.pivotal.gemfirexd.internal.iapi.sql.dictionary.*; import com.pivotal.gemfirexd.internal.iapi.sql.execute.*; import com.pivotal.gemfirexd.internal.iapi.store.access.*; import com.pivotal.gemfirexd...
[ "com.pivotal.gemfirexd" ]
com.pivotal.gemfirexd;
1,057,464
public void loadData(final DataService dataService) { dataService.credentials.getStorage().setStorage(this); dataService.connections.getStorage().setStorage(this); dataService.executables.getStorage().setStorage(this); dataService.groups.getStorage().setStorage(this); dataSer...
void function(final DataService dataService) { dataService.credentials.getStorage().setStorage(this); dataService.connections.getStorage().setStorage(this); dataService.executables.getStorage().setStorage(this); dataService.groups.getStorage().setStorage(this); dataService.favourites.getStorage().setStorage(this); new ...
/** * Call this to reload all data from disk. This is useful after NFC/Neighbour/GDrive sync. * * @param dataService Notify all observers of the RuntimeDataControllerState that we * reloaded data. This should invalidate all caches (icons etc). */
Call this to reload all data from disk. This is useful after NFC/Neighbour/GDrive sync
loadData
{ "repo_name": "davidgraeff/Android-NetPowerctrl", "path": "app/src/main/java/oly/netpowerctrl/data/LoadStoreCollections.java", "license": "gpl-2.0", "size": 8447 }
[ "android.os.AsyncTask" ]
import android.os.AsyncTask;
import android.os.*;
[ "android.os" ]
android.os;
1,703,694
@Test public void testDownArrowChangesSelection() { sm.clearAndSelect(0); keyboard.doDownArrowPress(); assertFalse(sm.isSelected(0)); assertTrue(sm.isSelected(1)); }
@Test void function() { sm.clearAndSelect(0); keyboard.doDownArrowPress(); assertFalse(sm.isSelected(0)); assertTrue(sm.isSelected(1)); }
/*************************************************************************** * Tests for row-based single selection **************************************************************************/
Tests for row-based single selection
testDownArrowChangesSelection
{ "repo_name": "maiklos-mirrors/jfx78", "path": "modules/controls/src/test/java/javafx/scene/control/TreeViewKeyInputTest.java", "license": "gpl-2.0", "size": 82217 }
[ "org.junit.Assert", "org.junit.Test" ]
import org.junit.Assert; import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,444,939
public static String getIcalAuthToken(String calendarType, String calendarID, Identity identity, boolean createToken) { if (!calendarType.equals(ICalFileCalendarManager.TYPE_USER)) { // get the resourceable OLATResourceable resourceable = getResourceable(calendarType, calendarID); if (resourceable ...
static String function(String calendarType, String calendarID, Identity identity, boolean createToken) { if (!calendarType.equals(ICalFileCalendarManager.TYPE_USER)) { OLATResourceable resourceable = getResourceable(calendarType, calendarID); if (resourceable == null) { return null; } return getIcalAuthToken(resourceab...
/** * returns the authentication token for the calendar type and calendar id. * authentication token is stored as a property. * @param calendarType * @param calendarID * @param identity * @param createToken createToken create a new token if it doesn't exist * @return authentication token */
returns the authentication token for the calendar type and calendar id. authentication token is stored as a property
getIcalAuthToken
{ "repo_name": "stevenhva/InfoLearn_OpenOLAT", "path": "src/main/java/org/olat/commons/calendar/ICalTokenGenerator.java", "license": "apache-2.0", "size": 13320 }
[ "org.olat.core.id.Identity", "org.olat.core.id.OLATResourceable" ]
import org.olat.core.id.Identity; import org.olat.core.id.OLATResourceable;
import org.olat.core.id.*;
[ "org.olat.core" ]
org.olat.core;
1,739,440
@Test public final void testWrongBicIbanRelationBicIsWrong() { for (final BankCountryTestBean testBean : BankCountryTestCases.getWrongBicForIbanTestBeans()) { super.validationTest(testBean, false, "de.knightsoftnet.validators.shared.impl.BankCountryValidator"); } }
final void function() { for (final BankCountryTestBean testBean : BankCountryTestCases.getWrongBicForIbanTestBeans()) { super.validationTest(testBean, false, STR); } }
/** * correct bank, iban and bic with bic doesn't match iban. */
correct bank, iban and bic with bic doesn't match iban
testWrongBicIbanRelationBicIsWrong
{ "repo_name": "ManfredTremmel/mt-bean-validators", "path": "src/test/java/de/knightsoftnet/validators/server/BankCountryTest.java", "license": "apache-2.0", "size": 3114 }
[ "de.knightsoftnet.validators.shared.beans.BankCountryTestBean", "de.knightsoftnet.validators.shared.testcases.BankCountryTestCases" ]
import de.knightsoftnet.validators.shared.beans.BankCountryTestBean; import de.knightsoftnet.validators.shared.testcases.BankCountryTestCases;
import de.knightsoftnet.validators.shared.beans.*; import de.knightsoftnet.validators.shared.testcases.*;
[ "de.knightsoftnet.validators" ]
de.knightsoftnet.validators;
1,380,033
@SuppressWarnings("unchecked") private Set<Class<? extends BaseDto>> getInheritedClasses(Class<? extends BaseDto> dtoClass, IdmExportImportDto manifest) { if (!(dtoClass.isAnnotationPresent(Inheritable.class))) { return Sets.newHashSet(dtoClass); } Class<? extends BaseDto> parentClass = dtoClass.getAn...
@SuppressWarnings(STR) Set<Class<? extends BaseDto>> function(Class<? extends BaseDto> dtoClass, IdmExportImportDto manifest) { if (!(dtoClass.isAnnotationPresent(Inheritable.class))) { return Sets.newHashSet(dtoClass); } Class<? extends BaseDto> parentClass = dtoClass.getAnnotation(Inheritable.class).dtoService(); ret...
/** * Find all inherited classes for given dtoClass * * @param dtoClass * @param manifest * @return */
Find all inherited classes for given dtoClass
getInheritedClasses
{ "repo_name": "bcvsolutions/CzechIdMng", "path": "Realization/backend/core/core-impl/src/main/java/eu/bcvsolutions/idm/core/model/service/impl/DefaultImportManager.java", "license": "mit", "size": 41800 }
[ "com.google.common.collect.Sets", "eu.bcvsolutions.idm.core.api.domain.Inheritable", "eu.bcvsolutions.idm.core.api.dto.BaseDto", "eu.bcvsolutions.idm.core.api.dto.ExportDescriptorDto", "eu.bcvsolutions.idm.core.api.dto.IdmExportImportDto", "java.util.Set", "java.util.stream.Collectors" ]
import com.google.common.collect.Sets; import eu.bcvsolutions.idm.core.api.domain.Inheritable; import eu.bcvsolutions.idm.core.api.dto.BaseDto; import eu.bcvsolutions.idm.core.api.dto.ExportDescriptorDto; import eu.bcvsolutions.idm.core.api.dto.IdmExportImportDto; import java.util.Set; import java.util.stream.Collector...
import com.google.common.collect.*; import eu.bcvsolutions.idm.core.api.domain.*; import eu.bcvsolutions.idm.core.api.dto.*; import java.util.*; import java.util.stream.*;
[ "com.google.common", "eu.bcvsolutions.idm", "java.util" ]
com.google.common; eu.bcvsolutions.idm; java.util;
37,041
public CcLibraryHelper fromCommon(CcCommon common) { this .addCopts(common.getCopts()) .addDefines(common.getDefines()) .addDeps(ruleContext.getPrerequisites("deps", Mode.TARGET)) .addIncludeDirs(common.getIncludeDirs()) .addLooseIncludeDirs(common.getLooseIncludeDirs()) ...
CcLibraryHelper function(CcCommon common) { this .addCopts(common.getCopts()) .addDefines(common.getDefines()) .addDeps(ruleContext.getPrerequisites("deps", Mode.TARGET)) .addIncludeDirs(common.getIncludeDirs()) .addLooseIncludeDirs(common.getLooseIncludeDirs()) .addPicIndependentObjectFiles(common.getLinkerScripts()) ...
/** * Sets fields that overlap for cc_library and cc_binary rules. */
Sets fields that overlap for cc_library and cc_binary rules
fromCommon
{ "repo_name": "wakashige/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java", "license": "apache-2.0", "size": 40893 }
[ "com.google.devtools.build.lib.analysis.RuleConfiguredTarget" ]
import com.google.devtools.build.lib.analysis.RuleConfiguredTarget;
import com.google.devtools.build.lib.analysis.*;
[ "com.google.devtools" ]
com.google.devtools;
2,741
public static <R, C, V> TreeBasedTable<R, C, V> create(Comparator<? super R> rowComparator, Comparator<? super C> columnComparator) { checkNotNull(rowComparator); checkNotNull(columnComparator); return new TreeBasedTable<R, C, V>(rowComparator, columnComparator); }
static <R, C, V> TreeBasedTable<R, C, V> function(Comparator<? super R> rowComparator, Comparator<? super C> columnComparator) { checkNotNull(rowComparator); checkNotNull(columnComparator); return new TreeBasedTable<R, C, V>(rowComparator, columnComparator); }
/** * Creates an empty {@code TreeBasedTable} that is ordered by the specified * comparators. * * @param rowComparator the comparator that orders the row keys * @param columnComparator the comparator that orders the column keys */
Creates an empty TreeBasedTable that is ordered by the specified comparators
create
{ "repo_name": "antlr/codebuff", "path": "output/java_guava/1.4.19/TreeBasedTable.java", "license": "bsd-2-clause", "size": 12179 }
[ "com.google.common.base.Preconditions", "java.util.Comparator" ]
import com.google.common.base.Preconditions; import java.util.Comparator;
import com.google.common.base.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,544,132
public void future(@Nullable IgniteInternalFuture fut) { this.fut = fut; } } protected abstract static class CacheExpiryPolicy implements IgniteCacheExpiryPolicy { private Map<KeyCacheObject, GridCacheVersion> entries; private Map<UUID, Collec...
void function(@Nullable IgniteInternalFuture fut) { this.fut = fut; } } protected abstract static class CacheExpiryPolicy implements IgniteCacheExpiryPolicy { private Map<KeyCacheObject, GridCacheVersion> entries; private Map<UUID, Collection<IgniteBiTuple<KeyCacheObject, GridCacheVersion>>> rdrsMap;
/** * Sets future. * * @param fut Future. */
Sets future
future
{ "repo_name": "mcherkasov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java", "license": "apache-2.0", "size": 215084 }
[ "java.util.Collection", "java.util.Map", "org.apache.ignite.internal.IgniteInternalFuture", "org.apache.ignite.internal.processors.cache.version.GridCacheVersion", "org.apache.ignite.lang.IgniteBiTuple", "org.jetbrains.annotations.Nullable" ]
import java.util.Collection; import java.util.Map; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.apache.ignite.lang.IgniteBiTuple; import org.jetbrains.annotations.Nullable;
import java.util.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.version.*; import org.apache.ignite.lang.*; import org.jetbrains.annotations.*;
[ "java.util", "org.apache.ignite", "org.jetbrains.annotations" ]
java.util; org.apache.ignite; org.jetbrains.annotations;
131,420
private void addMapFragment(double[] locations, String[] crimeInfo) { SharedPreferences settings = getSharedPreferences("crimeInfo", 0); SharedPreferences.Editor editor = settings.edit(); // Save current crime info in SharedPreferences, we need this in order to restart MyActivity // ...
void function(double[] locations, String[] crimeInfo) { SharedPreferences settings = getSharedPreferences(STR, 0); SharedPreferences.Editor editor = settings.edit(); StringBuilder data = new StringBuilder(); for (int i = 0; i < offCampusCrimes.length; i++) { data.append(offCampusCrimes[i]).append("~"); } editor.remove(...
/** * Start Map Fragment. * * @param locations Array holding latitude & longitude corresponding to each crime * @param crimeInfo Array holding type of crime, corresponds to locations (ex. Assult, Robbery, etc.) */
Start Map Fragment
addMapFragment
{ "repo_name": "CailinPitt/AwareOSUAndroid", "path": "app/src/main/java/awareosu/example/cailin/awareosu/MyActivity.java", "license": "mit", "size": 41277 }
[ "android.content.SharedPreferences", "android.os.Bundle", "android.support.v4.app.FragmentTransaction" ]
import android.content.SharedPreferences; import android.os.Bundle; import android.support.v4.app.FragmentTransaction;
import android.content.*; import android.os.*; import android.support.v4.app.*;
[ "android.content", "android.os", "android.support" ]
android.content; android.os; android.support;
2,815,183
@Override protected final void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // determine URL of resource to include String resourceUrl = determineResourceUrl(request); if (resourceUrl != null) { try { doInclude(request, response, resourceUrl...
final void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String resourceUrl = determineResourceUrl(request); if (resourceUrl != null) { try { doInclude(request, response, resourceUrl); } catch (ServletException ex) { if (logger.isWarnEnabled()) { logger.warn(S...
/** * Determine the URL of the target resource and include it. * @see #determineResourceUrl */
Determine the URL of the target resource and include it
doGet
{ "repo_name": "kingtang/spring-learn", "path": "spring-webmvc/src/main/java/org/springframework/web/servlet/ResourceServlet.java", "license": "gpl-3.0", "size": 12842 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
1,366,427
public Translation getTranslation(String terminologyId, String terminology, String version, String branch) throws Exception;
Translation function(String terminologyId, String terminology, String version, String branch) throws Exception;
/** * Returns the translation. * * @param terminologyId the terminology id * @param terminology the terminology * @param version the version * @param branch the branch * @return the translation * @throws Exception the exception */
Returns the translation
getTranslation
{ "repo_name": "WestCoastInformatics/ihtsdo-refset-tool", "path": "services/src/main/java/org/ihtsdo/otf/refset/services/ProjectService.java", "license": "apache-2.0", "size": 10024 }
[ "org.ihtsdo.otf.refset.Translation" ]
import org.ihtsdo.otf.refset.Translation;
import org.ihtsdo.otf.refset.*;
[ "org.ihtsdo.otf" ]
org.ihtsdo.otf;
1,219,264
public void postLike(String postId) throws IOException { postLike(postId, null); }
void function(String postId) throws IOException { postLike(postId, null); }
/** * Post like on a given post * * @param postId the post Id */
Post like on a given post
postLike
{ "repo_name": "sdwolf/CodenameOne", "path": "CodenameOne/src/com/codename1/facebook/FaceBookAccess.java", "license": "gpl-2.0", "size": 55119 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,524,659
@Test public void shouldGetNeighborsReturnFourNeighborsCase7() { int rows = 2 ; int columns = 2 ; L5<IntegerSolution> neighborhood = new L5<IntegerSolution>(rows, columns) ; List<IntegerSolution> list = new ArrayList<>(rows*columns) ; for (int i = 0 ; i < rows*columns; i++) { list.add(moc...
void function() { int rows = 2 ; int columns = 2 ; L5<IntegerSolution> neighborhood = new L5<IntegerSolution>(rows, columns) ; List<IntegerSolution> list = new ArrayList<>(rows*columns) ; for (int i = 0 ; i < rows*columns; i++) { list.add(mock(IntegerSolution.class)) ; } List<IntegerSolution> result = neighborhood.getN...
/** * Case 7 * * Solution list: * 0 1 * 2 3 * * The solution location is 3, the neighborhood is 1, 2 */
Case 7 Solution list: 0 1 2 3 The solution location is 3, the neighborhood is 1, 2
shouldGetNeighborsReturnFourNeighborsCase7
{ "repo_name": "tarunchhabra26/fss16dst", "path": "project/jMetal/jmetal-core/src/test/java/org/uma/jmetal/util/neighborhood/impl/L5Test.java", "license": "apache-2.0", "size": 7479 }
[ "java.util.ArrayList", "java.util.List", "org.hamcrest.CoreMatchers", "org.hamcrest.MatcherAssert", "org.junit.Assert", "org.uma.jmetal.solution.IntegerSolution" ]
import java.util.ArrayList; import java.util.List; import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert; import org.junit.Assert; import org.uma.jmetal.solution.IntegerSolution;
import java.util.*; import org.hamcrest.*; import org.junit.*; import org.uma.jmetal.solution.*;
[ "java.util", "org.hamcrest", "org.junit", "org.uma.jmetal" ]
java.util; org.hamcrest; org.junit; org.uma.jmetal;
408,149
public static VBox createLinkedMenuBar(final Surface surface, final SurfaceData data, final Stage stage, final Syncable syncable, final SyncableSet menuSync, final Map<String, Plugin> plugins, final Notifications notify) { final VBox top = new VBox(); final MenuBar menuBar = new MenuBar(); f...
static VBox function(final Surface surface, final SurfaceData data, final Stage stage, final Syncable syncable, final SyncableSet menuSync, final Map<String, Plugin> plugins, final Notifications notify) { final VBox top = new VBox(); final MenuBar menuBar = new MenuBar(); final Menu top_file = new Menu("File"); final M...
/** * create the menu bar * * @param surface * the surface we need to update when actions happen * @param data * the client's surface data that we talk to * @param stage * the window that owns us * @param syncable * consumers ...
create the menu bar
createLinkedMenuBar
{ "repo_name": "jeffrey-io/zer", "path": "src/main/java/io/jeffrey/zer/SurfaceLinkageToStage.java", "license": "apache-2.0", "size": 13846 }
[ "io.jeffrey.zer.SurfaceData", "io.jeffrey.zer.plugin.Plugin", "java.io.File", "java.util.Map" ]
import io.jeffrey.zer.SurfaceData; import io.jeffrey.zer.plugin.Plugin; import java.io.File; import java.util.Map;
import io.jeffrey.zer.*; import io.jeffrey.zer.plugin.*; import java.io.*; import java.util.*;
[ "io.jeffrey.zer", "java.io", "java.util" ]
io.jeffrey.zer; java.io; java.util;
2,141,271
public void subscribeForCustomApplication() throws RWESmarthomeSessionExpiredException { subscribeForNotifications("CustomApplication"); }
void function() throws RWESmarthomeSessionExpiredException { subscribeForNotifications(STR); }
/** * Subscribes for custom application notifications. * * @throws RWESmarthomeSessionExpiredException */
Subscribes for custom application notifications
subscribeForCustomApplication
{ "repo_name": "cschneider/openhab", "path": "bundles/binding/org.openhab.binding.rwesmarthome/src/main/java/org/openhab/binding/rwesmarthome/internal/communicator/RWESmarthomeCommunicator.java", "license": "epl-1.0", "size": 29616 }
[ "org.openhab.binding.rwesmarthome.internal.communicator.exceptions.RWESmarthomeSessionExpiredException" ]
import org.openhab.binding.rwesmarthome.internal.communicator.exceptions.RWESmarthomeSessionExpiredException;
import org.openhab.binding.rwesmarthome.internal.communicator.exceptions.*;
[ "org.openhab.binding" ]
org.openhab.binding;
1,751,750
@Override public ItemStream getMQLinkPubSubBridgeItemStream(String mqLinkUuidStr) throws SIException { MQLinkHandler mqLinkHandler = null; ItemStream mqLinkPubSubBridgeItemStream = null; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) ...
ItemStream function(String mqLinkUuidStr) throws SIException { MQLinkHandler mqLinkHandler = null; ItemStream mqLinkPubSubBridgeItemStream = null; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry( tc, STR, mqLinkUuidStr); checkNotClosed(); if (mqLinkUuidStr == null) { SIIncorrectCallExceptio...
/** * Retrieves the MQLink's PubSubBridge ItemStream * * @param name of the MQLink */
Retrieves the MQLink's PubSubBridge ItemStream
getMQLinkPubSubBridgeItemStream
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/ConnectionImpl.java", "license": "epl-1.0", "size": 384319 }
[ "com.ibm.websphere.ras.TraceComponent", "com.ibm.websphere.sib.exception.SIException", "com.ibm.websphere.sib.exception.SIIncorrectCallException", "com.ibm.websphere.sib.exception.SINotPossibleInCurrentConfigurationException", "com.ibm.ws.sib.msgstore.ItemStream", "com.ibm.ws.sib.utils.SIBUuid8", "com.i...
import com.ibm.websphere.ras.TraceComponent; import com.ibm.websphere.sib.exception.SIException; import com.ibm.websphere.sib.exception.SIIncorrectCallException; import com.ibm.websphere.sib.exception.SINotPossibleInCurrentConfigurationException; import com.ibm.ws.sib.msgstore.ItemStream; import com.ibm.ws.sib.utils.SI...
import com.ibm.websphere.ras.*; import com.ibm.websphere.sib.exception.*; import com.ibm.ws.sib.msgstore.*; import com.ibm.ws.sib.utils.*; import com.ibm.ws.sib.utils.ras.*;
[ "com.ibm.websphere", "com.ibm.ws" ]
com.ibm.websphere; com.ibm.ws;
183,425
@Test public void testTriangleClosingOutMsgs() throws Exception { // this guy should end up with an array value of 4 SimpleTriangleClosingVertex vertex = new SimpleTriangleClosingVertex(); vertex.initialize(null, null, null, null); vertex.addEdge(new IntWritable(5), NullWritable.get()); vertex.a...
void function() throws Exception { SimpleTriangleClosingVertex vertex = new SimpleTriangleClosingVertex(); vertex.initialize(null, null, null, null); vertex.addEdge(new IntWritable(5), NullWritable.get()); vertex.addEdge(new IntWritable(7), NullWritable.get()); IntArrayWritable iaw = new IntArrayWritable(); iaw.set(new...
/** * Test the behavior of the triangle closing algorithm: * does it send all its out edge values to all neighbors? */
Test the behavior of the triangle closing algorithm: does it send all its out edge values to all neighbors
testTriangleClosingOutMsgs
{ "repo_name": "LiuJianan/giraphpp-1", "path": "target/munged/test/org/apache/giraph/examples/SimpleTriangleClosingVertexTest.java", "license": "apache-2.0", "size": 4483 }
[ "com.google.common.collect.Lists", "org.apache.giraph.examples.SimpleTriangleClosingVertex", "org.apache.giraph.utils.MockUtils", "org.apache.hadoop.io.IntWritable", "org.apache.hadoop.io.NullWritable" ]
import com.google.common.collect.Lists; import org.apache.giraph.examples.SimpleTriangleClosingVertex; import org.apache.giraph.utils.MockUtils; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.NullWritable;
import com.google.common.collect.*; import org.apache.giraph.examples.*; import org.apache.giraph.utils.*; import org.apache.hadoop.io.*;
[ "com.google.common", "org.apache.giraph", "org.apache.hadoop" ]
com.google.common; org.apache.giraph; org.apache.hadoop;
187,267
public void onFileDelete(final File file) { }
void function(final File file) { }
/** * File deleted Event. * * @param file The file deleted (ignored) */
File deleted Event
onFileDelete
{ "repo_name": "Jakegogo/concurrent", "path": "concur/src-basesource/basesource/convertor/files/monitor/FileAlterationListenerAdaptor.java", "license": "bsd-3-clause", "size": 2574 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
841,678
Collection<V> values();
Collection<V> values();
/** * Returns a view collection containing the <i>value</i> from each key-value * pair contained in this multimap, without collapsing duplicates (so {@code * values().size() == size()}). * * <p>Changes to the returned collection will update the underlying multimap, * and vice versa. Howeve...
Returns a view collection containing the value from each key-value pair contained in this multimap, without collapsing duplicates (so values().size() == size()). Changes to the returned collection will update the underlying multimap, and vice versa. However, adding to the returned collection is not possible
values
{ "repo_name": "binave/common", "path": "common-collect/src/main/java/com/google/common/collect/Multimap.java", "license": "apache-2.0", "size": 15156 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,682,215
public static String addKost2(final TaskTree taskTree, final TaskDO task, final Kost2DO kost) { if (kost == null) { return task.getKost2BlackWhiteList(); } final StringBuffer buf = new StringBuffer(); if (StringUtils.isNotBlank(task.getKost2BlackWhiteList()) == true) { buf.append(task.ge...
static String function(final TaskTree taskTree, final TaskDO task, final Kost2DO kost) { if (kost == null) { return task.getKost2BlackWhiteList(); } final StringBuffer buf = new StringBuffer(); if (StringUtils.isNotBlank(task.getKost2BlackWhiteList()) == true) { buf.append(task.getKost2BlackWhiteList()).append(","); } ...
/** * Adds the given kost to the kost2BlackWhiteList string and returns the normalized string. * @param taskTree * @param task * @param kost * @return * @see #normalizeKost2BlackWhiteList(String) */
Adds the given kost to the kost2BlackWhiteList string and returns the normalized string
addKost2
{ "repo_name": "FlowsenAusMonotown/projectforge", "path": "projectforge-business/src/main/java/org/projectforge/business/task/TaskHelper.java", "license": "gpl-3.0", "size": 3769 }
[ "org.apache.commons.lang.StringUtils", "org.projectforge.business.fibu.ProjektDO", "org.projectforge.business.fibu.kost.Kost2DO", "org.projectforge.common.StringHelper" ]
import org.apache.commons.lang.StringUtils; import org.projectforge.business.fibu.ProjektDO; import org.projectforge.business.fibu.kost.Kost2DO; import org.projectforge.common.StringHelper;
import org.apache.commons.lang.*; import org.projectforge.business.fibu.*; import org.projectforge.business.fibu.kost.*; import org.projectforge.common.*;
[ "org.apache.commons", "org.projectforge.business", "org.projectforge.common" ]
org.apache.commons; org.projectforge.business; org.projectforge.common;
290,789
public void redefineTableCellRenderers() { moTableCellRendererDefault = new STableCellRendererDefault(); moTableCellRendererBoolean = new STableCellRendererBoolean(); moTableCellRendererSimpleInteger = new STableCellRendererNumber(moSimpleIntegerFormat); moTableCellRendererNumberLong...
void function() { moTableCellRendererDefault = new STableCellRendererDefault(); moTableCellRendererBoolean = new STableCellRendererBoolean(); moTableCellRendererSimpleInteger = new STableCellRendererNumber(moSimpleIntegerFormat); moTableCellRendererNumberLong = new STableCellRendererNumber(moNumberLongFormat); moTableC...
/** * Create again server side created table cell renderers, in order to use client specific format. */
Create again server side created table cell renderers, in order to use client specific format
redefineTableCellRenderers
{ "repo_name": "swaplicado/siie32", "path": "src/erp/server/SFormatters.java", "license": "mit", "size": 41390 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,331,606
public SystemColumn[] buildColumnList() { return new SystemColumn[] { SystemColumnImpl.getUUIDColumn("TIMING_ID", false), SystemColumnImpl.getColumn("PARSE_TIME", Types.BIGINT, false), SystemColumnImpl.getColumn("BIND_TIME", Types.BIGINT, false), SystemColumnI...
SystemColumn[] function() { return new SystemColumn[] { SystemColumnImpl.getUUIDColumn(STR, false), SystemColumnImpl.getColumn(STR, Types.BIGINT, false), SystemColumnImpl.getColumn(STR, Types.BIGINT, false), SystemColumnImpl.getColumn(STR, Types.BIGINT, false), SystemColumnImpl.getColumn(STR, Types.BIGINT, false), Syst...
/** * Builds a list of columns suitable for creating this Catalog. * * @return array of SystemColumn suitable for making this catalog. */
Builds a list of columns suitable for creating this Catalog
buildColumnList
{ "repo_name": "SnappyDataInc/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/sql/catalog/XPLAINStatementTimingsDescriptor.java", "license": "apache-2.0", "size": 6679 }
[ "com.pivotal.gemfirexd.internal.iapi.sql.dictionary.SystemColumn", "com.pivotal.gemfirexd.internal.impl.sql.catalog.SystemColumnImpl", "java.sql.Types" ]
import com.pivotal.gemfirexd.internal.iapi.sql.dictionary.SystemColumn; import com.pivotal.gemfirexd.internal.impl.sql.catalog.SystemColumnImpl; import java.sql.Types;
import com.pivotal.gemfirexd.internal.iapi.sql.dictionary.*; import com.pivotal.gemfirexd.internal.impl.sql.catalog.*; import java.sql.*;
[ "com.pivotal.gemfirexd", "java.sql" ]
com.pivotal.gemfirexd; java.sql;
52,460
public void addDestination(ObjectName value) { destinations.add(value); }
void function(ObjectName value) { destinations.add(value); }
/** * Adds the <code>ObjectName</code> of a destination registered with the managed service. * * @param value The <code>ObjectName</code> of a destination registered with the managed service. */
Adds the <code>ObjectName</code> of a destination registered with the managed service
addDestination
{ "repo_name": "SOASTA/BlazeDS", "path": "modules/core/src/java/flex/management/runtime/messaging/services/ServiceControl.java", "license": "lgpl-3.0", "size": 4563 }
[ "javax.management.ObjectName" ]
import javax.management.ObjectName;
import javax.management.*;
[ "javax.management" ]
javax.management;
936,535
public void setSubType(StringCriteriaField subType) { this.subType = subType; }
void function(StringCriteriaField subType) { this.subType = subType; }
/** * Setter for property subType. * @param subType Value of property subType. */
Setter for property subType
setSubType
{ "repo_name": "snavaneethan1/jaffa-framework", "path": "jaffa-soa/source/java/org/jaffa/transaction/apis/data/TransactionCriteria.java", "license": "gpl-3.0", "size": 11307 }
[ "org.jaffa.components.finder.StringCriteriaField" ]
import org.jaffa.components.finder.StringCriteriaField;
import org.jaffa.components.finder.*;
[ "org.jaffa.components" ]
org.jaffa.components;
1,145,750
@Nonnull public SettingStateDeviceSummaryRequestBuilder deviceSettingStateSummaries(@Nonnull final String id) { return new SettingStateDeviceSummaryRequestBuilder(getRequestUrlWithAdditionalSegment("deviceSettingStateSummaries") + "/" + id, getClient(), null); }
SettingStateDeviceSummaryRequestBuilder function(@Nonnull final String id) { return new SettingStateDeviceSummaryRequestBuilder(getRequestUrlWithAdditionalSegment(STR) + "/" + id, getClient(), null); }
/** * Gets a request builder for the SettingStateDeviceSummary item * * @return the request builder * @param id the item identifier */
Gets a request builder for the SettingStateDeviceSummary item
deviceSettingStateSummaries
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/AndroidGeneralDeviceConfigurationRequestBuilder.java", "license": "mit", "size": 8027 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,826,570
int queryMapSize = queryMap.size(); if (queryMapSize == 0) { return StringPool.EMPTY; } StringBand query = new StringBand(queryMapSize * 4); int count = 0; for (Map.Entry<String, Object[]> entry : queryMap.entrySet()) { String key = entry.getKey(); Object[] values = entry.getValue(); key = U...
int queryMapSize = queryMap.size(); if (queryMapSize == 0) { return StringPool.EMPTY; } StringBand query = new StringBand(queryMapSize * 4); int count = 0; for (Map.Entry<String, Object[]> entry : queryMap.entrySet()) { String key = entry.getKey(); Object[] values = entry.getValue(); key = URLCoder.encodeQueryParam(key...
/** * Builds a query string from given query map. */
Builds a query string from given query map
buildQuery
{ "repo_name": "007slm/jodd", "path": "jodd-http/src/main/java/jodd/http/HttpUtil.java", "license": "bsd-3-clause", "size": 4683 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,129,324
return Arrays.stream(values()).filter(value -> value.algorithm.equalsIgnoreCase(alg) || value.algorithm.replace("-", "").equalsIgnoreCase(alg) ).findFirst().orElse(MISSING).scheme; }
return Arrays.stream(values()).filter(value -> value.algorithm.equalsIgnoreCase(alg) value.algorithm.replace("-", "").equalsIgnoreCase(alg) ).findFirst().orElse(MISSING).scheme; }
/** * Return the scheme associated with the provided algorithm (e.g. SHA-1 returns urn:sha1) * * @param alg for which scheme is requested * @return scheme */
Return the scheme associated with the provided algorithm (e.g. SHA-1 returns urn:sha1)
getScheme
{ "repo_name": "whikloj/fcrepo4", "path": "fcrepo-kernel-api/src/main/java/org/fcrepo/kernel/api/utils/ContentDigest.java", "license": "apache-2.0", "size": 7068 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,500,516
public void setOnDismissListener(QuickAction.OnDismissListener listener) { setOnDismissListener(this); mDismissListener = listener; }
void function(QuickAction.OnDismissListener listener) { setOnDismissListener(this); mDismissListener = listener; }
/** * Set listener for window dismissed. This listener will only be fired if the quicakction dialog is dismissed * by clicking outside the dialog or clicking on sticky item. */
Set listener for window dismissed. This listener will only be fired if the quicakction dialog is dismissed by clicking outside the dialog or clicking on sticky item
setOnDismissListener
{ "repo_name": "olimpotec/busaoapp", "path": "mobile/android/src/com/olimpotec/busaoapp/action/QuickAction.java", "license": "bsd-2-clause", "size": 11104 }
[ "android.widget.PopupWindow" ]
import android.widget.PopupWindow;
import android.widget.*;
[ "android.widget" ]
android.widget;
1,632,303
protected boolean doProcessConsumedRoles(TClass object) { return doProcess(object.getImplementedInterfaceRefs()); }
boolean function(TClass object) { return doProcess(object.getImplementedInterfaceRefs()); }
/** * Process the consumed roles of a class. */
Process the consumed roles of a class
doProcessConsumedRoles
{ "repo_name": "lbeurerkellner/n4js", "path": "plugins/org.eclipse.n4js.ts.model/src/org/eclipse/n4js/ts/types/util/AbstractHierachyTraverser.java", "license": "epl-1.0", "size": 8181 }
[ "org.eclipse.n4js.ts.types.TClass" ]
import org.eclipse.n4js.ts.types.TClass;
import org.eclipse.n4js.ts.types.*;
[ "org.eclipse.n4js" ]
org.eclipse.n4js;
1,176,216
this.stream = stream; this.writer = new PrintWriter(this.stream); }
this.stream = stream; this.writer = new PrintWriter(this.stream); }
/** * Sets the output stream. * * @param stream * Output stream. */
Sets the output stream
setStream
{ "repo_name": "jdepend/cooper", "path": "cooper-standalone/src/main/java/jdepend/client/report/way/textui/Printer.java", "license": "apache-2.0", "size": 557 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,311,471
Future<Collection<JobID>> listJobs( @RpcTimeout Time timeout);
Future<Collection<JobID>> listJobs( @RpcTimeout Time timeout);
/** * Lists the current set of submitted jobs. * * @param timeout RPC timeout * @return A future collection of currently submitted jobs */
Lists the current set of submitted jobs
listJobs
{ "repo_name": "mtunique/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/DispatcherGateway.java", "license": "apache-2.0", "size": 1812 }
[ "java.util.Collection", "org.apache.flink.api.common.JobID", "org.apache.flink.api.common.time.Time", "org.apache.flink.runtime.concurrent.Future", "org.apache.flink.runtime.rpc.RpcTimeout" ]
import java.util.Collection; import org.apache.flink.api.common.JobID; import org.apache.flink.api.common.time.Time; import org.apache.flink.runtime.concurrent.Future; import org.apache.flink.runtime.rpc.RpcTimeout;
import java.util.*; import org.apache.flink.api.common.*; import org.apache.flink.api.common.time.*; import org.apache.flink.runtime.concurrent.*; import org.apache.flink.runtime.rpc.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
1,077,722
@Test public void processDecimal64WithoutFraction() throws IOException, ParserException, DataModelException { thrown.expect(ParserException.class); thrown.expectMessage("YANG file error : a type decimal64 must have fraction-digits statement."); manager.getDataModel("src/test/resources/d...
void function() throws IOException, ParserException, DataModelException { thrown.expect(ParserException.class); thrown.expectMessage(STR); manager.getDataModel(STR); }
/** * Validation of decimal64 without fraction-digits. Fraction-digits must be present for decimal64. */
Validation of decimal64 without fraction-digits. Fraction-digits must be present for decimal64
processDecimal64WithoutFraction
{ "repo_name": "VinodKumarS-Huawei/ietf96yang", "path": "utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/parser/impl/listeners/Decimal64ListenerTest.java", "license": "apache-2.0", "size": 30784 }
[ "java.io.IOException", "org.onosproject.yangutils.datamodel.exceptions.DataModelException", "org.onosproject.yangutils.parser.exceptions.ParserException" ]
import java.io.IOException; import org.onosproject.yangutils.datamodel.exceptions.DataModelException; import org.onosproject.yangutils.parser.exceptions.ParserException;
import java.io.*; import org.onosproject.yangutils.datamodel.exceptions.*; import org.onosproject.yangutils.parser.exceptions.*;
[ "java.io", "org.onosproject.yangutils" ]
java.io; org.onosproject.yangutils;
1,315,799
private long[] searchFirstAndLast(Reference value, Comparator<Reference> c, long low, long high) { if (low > high) { // The not found position, long nf_pos = -(low + 1); return new long[] { nf_pos, nf_pos }; } while (true) { // If low is the sa...
long[] function(Reference value, Comparator<Reference> c, long low, long high) { if (low > high) { long nf_pos = -(low + 1); return new long[] { nf_pos, nf_pos }; } while (true) { if ((high - low) <= 4) { long r0 = searchFirst(value, c, low, high); long r1 = searchLast(value, c, low, high); return new long[] { r0, r1 }...
/** * Searches for the first and last positions of the given value in the * set over the given comparator. */
Searches for the first and last positions of the given value in the set over the given comparator
searchFirstAndLast
{ "repo_name": "Mckoi/mckoiddb", "path": "src/main/java/com/mckoi/odb/OrderedReferenceList.java", "license": "apache-2.0", "size": 32882 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
2,869,976
private void visitFunction(NodeTraversal traversal, Node node, Node parent, Node gramp) { Preconditions.checkArgument(!functionSideEffectMap.containsKey(node)); FunctionInformation sideEffectInfo = new Function...
void function(NodeTraversal traversal, Node node, Node parent, Node gramp) { Preconditions.checkArgument(!functionSideEffectMap.containsKey(node)); FunctionInformation sideEffectInfo = new FunctionInformation(inExterns); functionSideEffectMap.put(node, sideEffectInfo); if (inExterns) { JSType jstype = node.getJSType();...
/** * Record function and check for @nosideeffects annotations. */
Record function and check for @nosideeffects annotations
visitFunction
{ "repo_name": "knutwalker/google-closure-compiler", "path": "src/com/google/javascript/jscomp/PureFunctionIdentifier.java", "license": "apache-2.0", "size": 36081 }
[ "com.google.common.base.Preconditions", "com.google.javascript.rhino.JSDocInfo", "com.google.javascript.rhino.Node", "com.google.javascript.rhino.jstype.FunctionType", "com.google.javascript.rhino.jstype.JSType" ]
import com.google.common.base.Preconditions; import com.google.javascript.rhino.JSDocInfo; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.FunctionType; import com.google.javascript.rhino.jstype.JSType;
import com.google.common.base.*; import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*;
[ "com.google.common", "com.google.javascript" ]
com.google.common; com.google.javascript;
1,342,308
protected static void output(ARCReader reader, String format) throws IOException, java.text.ParseException { if (!reader.output(format)) { throw new IOException("Unsupported format: " + format); } }
static void function(ARCReader reader, String format) throws IOException, java.text.ParseException { if (!reader.output(format)) { throw new IOException(STR + format); } }
/** * Write out the arcfile. * * @param reader * @param format Format to use outputting. * @throws IOException * @throws java.text.ParseException */
Write out the arcfile
output
{ "repo_name": "gaowangyizu/myHeritrix", "path": "myHeritrix/src/org/archive/io/arc/ARCReader.java", "license": "apache-2.0", "size": 31028 }
[ "java.io.IOException", "org.apache.commons.cli.ParseException" ]
import java.io.IOException; import org.apache.commons.cli.ParseException;
import java.io.*; import org.apache.commons.cli.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
2,546,919