method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public com.squareup.okhttp.Call getUniverseStargatesStargateIdAsync(Integer stargateId, String datasource, String userAgent, String xUserAgent, final ApiCallback<GetUniverseStargatesStargateIdOk> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
com.squareup.okhttp.Call function(Integer stargateId, String datasource, String userAgent, String xUserAgent, final ApiCallback<GetUniverseStargatesStargateIdOk> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
/** * Get stargate information (asynchronously) * Get information on a stargate --- Alternate route: &#x60;/v1/universe/stargates/{stargate_id}/&#x60; Alternate route: &#x60;/legacy/universe/stargates/{stargate_id}/&#x60; Alternate route: &#x60;/dev/universe/stargates/{stargate_id}/&#x60; --- This route expires daily at 11:05 * @param stargateId stargate_id integer (required) * @param datasource The server name you would like data from (optional, default to tranquility) * @param userAgent Client identifier, takes precedence over headers (optional) * @param xUserAgent Client identifier, takes precedence over User-Agent (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */
Get stargate information (asynchronously) Get information on a stargate --- Alternate route: &#x60;/v1/universe/stargates/{stargate_id}/&#x60; Alternate route: &#x60;/legacy/universe/stargates/{stargate_id}/&#x60; Alternate route: &#x60;/dev/universe/stargates/{stargate_id}/&#x60; --- This route expires daily at 11:05
getUniverseStargatesStargateIdAsync
{ "repo_name": "Tmin10/EVE-Security-Service", "path": "server-api/src/main/java/ru/tmin10/EVESecurityService/serverApi/api/UniverseApi.java", "license": "gpl-3.0", "size": 215688 }
[ "ru.tmin10.EVESecurityService" ]
import ru.tmin10.EVESecurityService;
import ru.tmin10.*;
[ "ru.tmin10" ]
ru.tmin10;
1,873,909
public Context createSubcontext(Name subContext) throws NamingException { try { org.omg.CORBA.Object subcontext = service.bind_new_context( toGiop(subContext)); Hashtable clonedProps = new Hashtable(); clonedProps.putAll(properties); // Nulls are passed both for orb and factory, as the child contexts // need not to do any cleanup. return new ContextContinuation(subcontext, clonedProps, null, null); } catch (AlreadyBound e) { throw new NameAlreadyBoundException(); } catch (InvalidName e) { throw new InvalidNameException(); } catch (Exception ex) { throw new NamingException(ex.toString()); } }
Context function(Name subContext) throws NamingException { try { org.omg.CORBA.Object subcontext = service.bind_new_context( toGiop(subContext)); Hashtable clonedProps = new Hashtable(); clonedProps.putAll(properties); return new ContextContinuation(subcontext, clonedProps, null, null); } catch (AlreadyBound e) { throw new NameAlreadyBoundException(); } catch (InvalidName e) { throw new InvalidNameException(); } catch (Exception ex) { throw new NamingException(ex.toString()); } }
/** * Creates the new naming subcontext and binds it to the current (this) * context. The returned object will wrap around the newly created CORBA * subcontext * * @param subContext * the name of the new context being created * @return the newly created context, bound to the instance of the context on * that the method has been called * @throws NameAlreadyBoundException * if this name is already bound * @throws InvalidAttributesException * if the creation of the new context requires the missing mandatory * attributes * @throws NamingException */
Creates the new naming subcontext and binds it to the current (this) context. The returned object will wrap around the newly created CORBA subcontext
createSubcontext
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/gnu/javax/naming/giop/ContextContinuation.java", "license": "gpl-2.0", "size": 29695 }
[ "java.util.Hashtable", "javax.naming.Context", "javax.naming.InvalidNameException", "javax.naming.Name", "javax.naming.NameAlreadyBoundException", "javax.naming.NamingException", "org.omg.CosNaming" ]
import java.util.Hashtable; import javax.naming.Context; import javax.naming.InvalidNameException; import javax.naming.Name; import javax.naming.NameAlreadyBoundException; import javax.naming.NamingException; import org.omg.CosNaming;
import java.util.*; import javax.naming.*; import org.omg.*;
[ "java.util", "javax.naming", "org.omg" ]
java.util; javax.naming; org.omg;
2,794,638
protected boolean getNextPath() { try { if (this.currentPath == null) { this.currentPath = queue.poll(this.sleepForRetries, TimeUnit.MILLISECONDS); this.metrics.setSizeOfLogQueue(queue.size()); } } catch (InterruptedException e) { LOG.warn("Interrupted while reading edits", e); } return this.currentPath != null; }
boolean function() { try { if (this.currentPath == null) { this.currentPath = queue.poll(this.sleepForRetries, TimeUnit.MILLISECONDS); this.metrics.setSizeOfLogQueue(queue.size()); } } catch (InterruptedException e) { LOG.warn(STR, e); } return this.currentPath != null; }
/** * Poll for the next path * @return true if a path was obtained, false if not */
Poll for the next path
getNextPath
{ "repo_name": "jyates/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java", "license": "apache-2.0", "size": 31481 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,506,787
private static String format( final String resourceBundleName, final String key, final Object[] arguments) { String pattern; if (resourceBundleName != null) { try { ResourceBundle bundle = ResourceBundle.getBundle(resourceBundleName); pattern = bundle.getString(key); } catch (Exception ex) { pattern = key; } } else { pattern = key; } return format(pattern, arguments); } private static final String FQCN = LogMF.class.getName();
static String function( final String resourceBundleName, final String key, final Object[] arguments) { String pattern; if (resourceBundleName != null) { try { ResourceBundle bundle = ResourceBundle.getBundle(resourceBundleName); pattern = bundle.getString(key); } catch (Exception ex) { pattern = key; } } else { pattern = key; } return format(pattern, arguments); } private static final String FQCN = LogMF.class.getName();
/** * Formats arguments using MessageFormat using a pattern from * a resource bundle. * @param resourceBundleName name of resource bundle, may be null. * @param key key for pattern in resource bundle, may be null. * @param arguments arguments, may be null or mismatched. * @return Message string or null */
Formats arguments using MessageFormat using a pattern from a resource bundle
format
{ "repo_name": "Mark-Booth/daq-eclipse", "path": "uk.ac.diamond.org.apache.activemq/org/apache/log4j/LogMF.java", "license": "epl-1.0", "size": 61295 }
[ "java.util.ResourceBundle" ]
import java.util.ResourceBundle;
import java.util.*;
[ "java.util" ]
java.util;
1,073,859
private static void validateMethod(Method method) { String desc = method.toString(); assertTrue(desc, isAnyEnter(method) || isWaitFor(method)); switch (method.getParameterTypes().length) { case 0: assertFalse(desc, isGuarded(method)); assertFalse(desc, isTimed(method)); break; case 1: assertTrue(desc, isGuarded(method)); assertFalse(desc, isTimed(method)); break; case 2: assertFalse(desc, isGuarded(method)); assertTrue(desc, isTimed(method)); break; case 3: assertTrue(desc, isGuarded(method)); assertTrue(desc, isTimed(method)); break; default: fail(desc); } if (method.getReturnType() == void.class) { assertFalse(desc, isBoolean(method)); } else { assertTrue(desc, isBoolean(method)); } switch (method.getExceptionTypes().length) { case 0: assertFalse(desc, isInterruptible(method)); break; case 1: assertTrue(desc, isInterruptible(method)); break; default: fail(desc); } if (isEnterIf(method)) { assertTrue(desc, isGuarded(method)); assertTrue(desc, isBoolean(method)); } else if (isTryEnter(method)) { assertFalse(desc, isTimed(method)); assertTrue(desc, isBoolean(method)); assertFalse(desc, isInterruptible(method)); } else if (isWaitFor(method)) { assertTrue(desc, isGuarded(method)); assertEquals(desc, isTimed(method), isBoolean(method)); } else { // any other enterXxx method assertEquals(desc, isTimed(method), isBoolean(method)); } }
static void function(Method method) { String desc = method.toString(); assertTrue(desc, isAnyEnter(method) isWaitFor(method)); switch (method.getParameterTypes().length) { case 0: assertFalse(desc, isGuarded(method)); assertFalse(desc, isTimed(method)); break; case 1: assertTrue(desc, isGuarded(method)); assertFalse(desc, isTimed(method)); break; case 2: assertFalse(desc, isGuarded(method)); assertTrue(desc, isTimed(method)); break; case 3: assertTrue(desc, isGuarded(method)); assertTrue(desc, isTimed(method)); break; default: fail(desc); } if (method.getReturnType() == void.class) { assertFalse(desc, isBoolean(method)); } else { assertTrue(desc, isBoolean(method)); } switch (method.getExceptionTypes().length) { case 0: assertFalse(desc, isInterruptible(method)); break; case 1: assertTrue(desc, isInterruptible(method)); break; default: fail(desc); } if (isEnterIf(method)) { assertTrue(desc, isGuarded(method)); assertTrue(desc, isBoolean(method)); } else if (isTryEnter(method)) { assertFalse(desc, isTimed(method)); assertTrue(desc, isBoolean(method)); assertFalse(desc, isInterruptible(method)); } else if (isWaitFor(method)) { assertTrue(desc, isGuarded(method)); assertEquals(desc, isTimed(method), isBoolean(method)); } else { assertEquals(desc, isTimed(method), isBoolean(method)); } }
/** * Validates that the given method's signature meets all of our assumptions. */
Validates that the given method's signature meets all of our assumptions
validateMethod
{ "repo_name": "DavesMan/guava", "path": "guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java", "license": "apache-2.0", "size": 26452 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,591,813
synchronized InputStream top(int msg, int n) throws IOException { Response r = multilineCommand("TOP " + msg + " " + n, 0); return r.bytes; }
synchronized InputStream top(int msg, int n) throws IOException { Response r = multilineCommand(STR + msg + " " + n, 0); return r.bytes; }
/** * Return the message header and the first n lines of the message. */
Return the message header and the first n lines of the message
top
{ "repo_name": "arthurzaczek/kolab-android", "path": "javamail/com/sun/mail/pop3/Protocol.java", "license": "gpl-3.0", "size": 13521 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,555,870
private boolean handleStartBtnClick() { Xlog.v(TAG, "-->handleStartBtnClick"); // BLEResult_String = "Response:"; // judge if Rx or Tx test is selected int cmdLen = 4; char[] cmd = new char[cmdLen]; char[] response = null; int i = 0; cmd[0] = 0x01; cmd[1] = 0x03; cmd[2] = 0x0C; cmd[3] = 0x00; // HCI reset command response = mBtTest.hciCommandRun(cmd, cmdLen); if (response == null) { Xlog.i(TAG, "HCICommandRun failed"); return false; } else { String s = null; for (i = 0; i < response.length; i++) { s = String.format("response[%d] = 0x%x", i, (long) response[i]); Xlog.v(TAG, s); } } response = null; if (mTxTest) { return handleTxTestStart(); } else { return handleRxTestStart(); } }
boolean function() { Xlog.v(TAG, STR); int cmdLen = 4; char[] cmd = new char[cmdLen]; char[] response = null; int i = 0; cmd[0] = 0x01; cmd[1] = 0x03; cmd[2] = 0x0C; cmd[3] = 0x00; response = mBtTest.hciCommandRun(cmd, cmdLen); if (response == null) { Xlog.i(TAG, STR); return false; } else { String s = null; for (i = 0; i < response.length; i++) { s = String.format(STR, i, (long) response[i]); Xlog.v(TAG, s); } } response = null; if (mTxTest) { return handleTxTestStart(); } else { return handleRxTestStart(); } }
/** * Do test after push "start" button * * @return 0 success */
Do test after push "start" button
handleStartBtnClick
{ "repo_name": "rex-xxx/mt6572_x201", "path": "mediatek/packages/apps/EngineerMode/src/com/mediatek/engineermode/bluetooth/BleTestMode.java", "license": "gpl-2.0", "size": 22930 }
[ "com.mediatek.xlog.Xlog" ]
import com.mediatek.xlog.Xlog;
import com.mediatek.xlog.*;
[ "com.mediatek.xlog" ]
com.mediatek.xlog;
1,419,779
public void setRestTemplate(RestTemplate restTemplate) { this.restTemplate = restTemplate; }
void function(RestTemplate restTemplate) { this.restTemplate = restTemplate; }
/** * Sets the rest template. * * @param restTemplate the new rest template */
Sets the rest template
setRestTemplate
{ "repo_name": "lkhusid/oneops", "path": "controller/src/main/java/com/oneops/controller/cms/CMSClient.java", "license": "apache-2.0", "size": 44045 }
[ "org.springframework.web.client.RestTemplate" ]
import org.springframework.web.client.RestTemplate;
import org.springframework.web.client.*;
[ "org.springframework.web" ]
org.springframework.web;
1,413,479
protected void keyPressed() { if ( !isEnabled() || !isClickable() ) { return; } Drawable selector = mSelector; Rect selectorRect = mSelectorRect; if ( selector != null && ( isFocused() || touchModeDrawsInPressedState() ) && !selectorRect.isEmpty() ) { final View v = getChildAt( mSelectedPosition - mFirstPosition ); if ( v != null ) { if ( v.hasFocusable() ) return; v.setPressed( true ); } setPressed( true ); final boolean longClickable = isLongClickable(); Drawable d = selector.getCurrent(); if ( d != null && d instanceof TransitionDrawable ) { if ( longClickable ) { ( (TransitionDrawable) d ).startTransition( ViewConfiguration.getLongPressTimeout() ); } else { ( (TransitionDrawable) d ).resetTransition(); } } if ( longClickable && !mDataChanged ) { if ( mPendingCheckForKeyLongPress == null ) { mPendingCheckForKeyLongPress = new CheckForKeyLongPress(); } mPendingCheckForKeyLongPress.rememberWindowAttachCount(); postDelayed( mPendingCheckForKeyLongPress, ViewConfiguration.getLongPressTimeout() ); } } }
void function() { if ( !isEnabled() !isClickable() ) { return; } Drawable selector = mSelector; Rect selectorRect = mSelectorRect; if ( selector != null && ( isFocused() touchModeDrawsInPressedState() ) && !selectorRect.isEmpty() ) { final View v = getChildAt( mSelectedPosition - mFirstPosition ); if ( v != null ) { if ( v.hasFocusable() ) return; v.setPressed( true ); } setPressed( true ); final boolean longClickable = isLongClickable(); Drawable d = selector.getCurrent(); if ( d != null && d instanceof TransitionDrawable ) { if ( longClickable ) { ( (TransitionDrawable) d ).startTransition( ViewConfiguration.getLongPressTimeout() ); } else { ( (TransitionDrawable) d ).resetTransition(); } } if ( longClickable && !mDataChanged ) { if ( mPendingCheckForKeyLongPress == null ) { mPendingCheckForKeyLongPress = new CheckForKeyLongPress(); } mPendingCheckForKeyLongPress.rememberWindowAttachCount(); postDelayed( mPendingCheckForKeyLongPress, ViewConfiguration.getLongPressTimeout() ); } } }
/** * Sets the selector state to "pressed" and posts a CheckForKeyLongPress to see if this is a long press. */
Sets the selector state to "pressed" and posts a CheckForKeyLongPress to see if this is a long press
keyPressed
{ "repo_name": "jonathangerbaud/Klyph", "path": "Klyph/libs_ext/HorizontalVariableListView-master/HorizontalVariableListView/src/it/sephiroth/android/library/widget/AbsHListView.java", "license": "mit", "size": 175073 }
[ "android.graphics.Rect", "android.graphics.drawable.Drawable", "android.graphics.drawable.TransitionDrawable", "android.view.View", "android.view.ViewConfiguration" ]
import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.graphics.drawable.TransitionDrawable; import android.view.View; import android.view.ViewConfiguration;
import android.graphics.*; import android.graphics.drawable.*; import android.view.*;
[ "android.graphics", "android.view" ]
android.graphics; android.view;
2,072,793
private void setKafkaJaasConfig(Map<Object, Object> mapToPopulate, PropertyContext context) { String keytab; String principal; final String explicitPrincipal = context.getProperty(KERBEROS_PRINCIPAL).evaluateAttributeExpressions().getValue(); final String explicitKeytab = context.getProperty(KERBEROS_KEYTAB).evaluateAttributeExpressions().getValue(); final KerberosCredentialsService credentialsService = context.getProperty(ReportLineageToAtlas.KERBEROS_CREDENTIALS_SERVICE).asControllerService(KerberosCredentialsService.class); if (credentialsService == null) { principal = explicitPrincipal; keytab = explicitKeytab; } else { principal = credentialsService.getPrincipal(); keytab = credentialsService.getKeytab(); } String serviceName = context.getProperty(KAFKA_KERBEROS_SERVICE_NAME).evaluateAttributeExpressions().getValue(); if(StringUtils.isNotBlank(keytab) && StringUtils.isNotBlank(principal) && StringUtils.isNotBlank(serviceName)) { mapToPopulate.put("atlas.jaas.KafkaClient.loginModuleControlFlag", "required"); mapToPopulate.put("atlas.jaas.KafkaClient.loginModuleName", "com.sun.security.auth.module.Krb5LoginModule"); mapToPopulate.put("atlas.jaas.KafkaClient.option.keyTab", keytab); mapToPopulate.put("atlas.jaas.KafkaClient.option.principal", principal); mapToPopulate.put("atlas.jaas.KafkaClient.option.serviceName", serviceName); mapToPopulate.put("atlas.jaas.KafkaClient.option.storeKey", "True"); mapToPopulate.put("atlas.jaas.KafkaClient.option.useKeyTab", "True"); mapToPopulate.put("atlas.jaas.ticketBased-KafkaClient.loginModuleControlFlag", "required"); mapToPopulate.put("atlas.jaas.ticketBased-KafkaClient.loginModuleName", "com.sun.security.auth.module.Krb5LoginModule"); mapToPopulate.put("atlas.jaas.ticketBased-KafkaClient.option.useTicketCache", "true"); mapToPopulate.put(ATLAS_KAFKA_PREFIX + "sasl.kerberos.service.name", serviceName); } }
void function(Map<Object, Object> mapToPopulate, PropertyContext context) { String keytab; String principal; final String explicitPrincipal = context.getProperty(KERBEROS_PRINCIPAL).evaluateAttributeExpressions().getValue(); final String explicitKeytab = context.getProperty(KERBEROS_KEYTAB).evaluateAttributeExpressions().getValue(); final KerberosCredentialsService credentialsService = context.getProperty(ReportLineageToAtlas.KERBEROS_CREDENTIALS_SERVICE).asControllerService(KerberosCredentialsService.class); if (credentialsService == null) { principal = explicitPrincipal; keytab = explicitKeytab; } else { principal = credentialsService.getPrincipal(); keytab = credentialsService.getKeytab(); } String serviceName = context.getProperty(KAFKA_KERBEROS_SERVICE_NAME).evaluateAttributeExpressions().getValue(); if(StringUtils.isNotBlank(keytab) && StringUtils.isNotBlank(principal) && StringUtils.isNotBlank(serviceName)) { mapToPopulate.put(STR, STR); mapToPopulate.put(STR, STR); mapToPopulate.put(STR, keytab); mapToPopulate.put(STR, principal); mapToPopulate.put(STR, serviceName); mapToPopulate.put(STR, "True"); mapToPopulate.put(STR, "True"); mapToPopulate.put(STR, STR); mapToPopulate.put(STR, STR); mapToPopulate.put(STR, "true"); mapToPopulate.put(ATLAS_KAFKA_PREFIX + STR, serviceName); } }
/** * Populate Kafka JAAS properties for Atlas notification. * Since Atlas 0.8.1 uses Kafka client 0.10.0.0, we can not use 'sasl.jaas.config' property * as it is available since 0.10.2, implemented by KAFKA-4259. * Instead, this method uses old property names. * @param mapToPopulate Map of configuration properties * @param context Context */
Populate Kafka JAAS properties for Atlas notification. Since Atlas 0.8.1 uses Kafka client 0.10.0.0, we can not use 'sasl.jaas.config' property as it is available since 0.10.2, implemented by KAFKA-4259. Instead, this method uses old property names
setKafkaJaasConfig
{ "repo_name": "YolandaMDavis/nifi", "path": "nifi-nar-bundles/nifi-atlas-bundle/nifi-atlas-reporting-task/src/main/java/org/apache/nifi/atlas/reporting/ReportLineageToAtlas.java", "license": "apache-2.0", "size": 47525 }
[ "java.util.Map", "org.apache.commons.lang3.StringUtils", "org.apache.nifi.context.PropertyContext", "org.apache.nifi.kerberos.KerberosCredentialsService" ]
import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.apache.nifi.context.PropertyContext; import org.apache.nifi.kerberos.KerberosCredentialsService;
import java.util.*; import org.apache.commons.lang3.*; import org.apache.nifi.context.*; import org.apache.nifi.kerberos.*;
[ "java.util", "org.apache.commons", "org.apache.nifi" ]
java.util; org.apache.commons; org.apache.nifi;
2,680,100
List<M2ModelDiff> diffModel(M2Model model);
List<M2ModelDiff> diffModel(M2Model model);
/** * Return diffs between input model and model in the Dictionary. * * If the input model does not exist in the Dictionary then no diffs will be * returned. * * @param model M2Model * @return model diffs (if any) */
Return diffs between input model and model in the Dictionary. If the input model does not exist in the Dictionary then no diffs will be returned
diffModel
{ "repo_name": "Alfresco/community-edition", "path": "projects/data-model/source/java/org/alfresco/repo/dictionary/DictionaryDAO.java", "license": "lgpl-3.0", "size": 9384 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
182,839
public static String getFeedbackText(final QTIObject object, final String sIdent) { final Feedback feedback = getFeedback(object, sIdent); try { final Material mat = (Material) feedback.getMaterials().get(0); return mat.renderAsText(); } catch (final Exception e) { // } return ""; }
static String function(final QTIObject object, final String sIdent) { final Feedback feedback = getFeedback(object, sIdent); try { final Material mat = (Material) feedback.getMaterials().get(0); return mat.renderAsText(); } catch (final Exception e) { return ""; }
/** * Get feedback * * @param object * @param sIdent * @return feedback */
Get feedback
getFeedbackText
{ "repo_name": "huihoo/olat", "path": "olat7.8/src/main/java/org/olat/lms/ims/qti/editor/QTIEditHelperEBL.java", "license": "apache-2.0", "size": 36199 }
[ "org.olat.lms.ims.qti.objects.Feedback", "org.olat.lms.ims.qti.objects.Material", "org.olat.lms.ims.qti.objects.QTIObject" ]
import org.olat.lms.ims.qti.objects.Feedback; import org.olat.lms.ims.qti.objects.Material; import org.olat.lms.ims.qti.objects.QTIObject;
import org.olat.lms.ims.qti.objects.*;
[ "org.olat.lms" ]
org.olat.lms;
2,226,705
public List<DataBean> traverseLinks(Link[] types, Traversal traversal) {
List<DataBean> function(Link[] types, Traversal traversal) {
/** * Convenience method which includes all beans into result. * * @see #traverseLinks(fi.csc.microarray.databeans.DataBean.Link, fi.csc.microarray.databeans.DataBean.Traversal, DataBeanSelector) */
Convenience method which includes all beans into result
traverseLinks
{ "repo_name": "ilarischeinin/chipster", "path": "src/main/java/fi/csc/microarray/databeans/DataBean.java", "license": "gpl-3.0", "size": 17469 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,898,990
@FIXVersion(introduced="4.1") @TagNumRef(tagNum=TagNum.LastMkt) public String getLastMkt() { return lastMkt; }
@FIXVersion(introduced="4.1") @TagNumRef(tagNum=TagNum.LastMkt) String function() { return lastMkt; }
/** * Message field getter. * @return field value */
Message field getter
getLastMkt
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/AdvertisementMsg.java", "license": "gpl-3.0", "size": 49255 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
2,496,298
public void open() throws IOException { Configuration conf = configuration != null ? configuration : FileFactory.getConfiguration(); dataInputStream = FileFactory.getDataInputStream(fileName, conf); binaryIn = new TCompactProtocol(new TIOStreamTransport(dataInputStream)); }
void function() throws IOException { Configuration conf = configuration != null ? configuration : FileFactory.getConfiguration(); dataInputStream = FileFactory.getDataInputStream(fileName, conf); binaryIn = new TCompactProtocol(new TIOStreamTransport(dataInputStream)); }
/** * Opens the fileName for reading. */
Opens the fileName for reading
open
{ "repo_name": "zzcclp/carbondata", "path": "core/src/main/java/org/apache/carbondata/core/reader/ThriftReader.java", "license": "apache-2.0", "size": 4811 }
[ "java.io.IOException", "org.apache.carbondata.core.datastore.impl.FileFactory", "org.apache.hadoop.conf.Configuration", "org.apache.thrift.protocol.TCompactProtocol", "org.apache.thrift.transport.TIOStreamTransport" ]
import java.io.IOException; import org.apache.carbondata.core.datastore.impl.FileFactory; import org.apache.hadoop.conf.Configuration; import org.apache.thrift.protocol.TCompactProtocol; import org.apache.thrift.transport.TIOStreamTransport;
import java.io.*; import org.apache.carbondata.core.datastore.impl.*; import org.apache.hadoop.conf.*; import org.apache.thrift.protocol.*; import org.apache.thrift.transport.*;
[ "java.io", "org.apache.carbondata", "org.apache.hadoop", "org.apache.thrift" ]
java.io; org.apache.carbondata; org.apache.hadoop; org.apache.thrift;
2,613,808
private void checkForSameTypeWarning(ConstraintSyntaxTree lhs, String op, ConstraintSyntaxTree rhs, EObject cause, EStructuralFeature feature) { if (IvmlKeyWords.UNEQUALS.equals(op) || IvmlKeyWords.UNEQUALS_ALIAS.equals(op)) { // == is handled by OCLFeatureCall try { IDatatype lhsType = lhs.inferDatatype(); IDatatype rhsType = rhs.inferDatatype(); if (!(lhsType.isAssignableFrom(rhsType) || rhsType.isAssignableFrom(lhsType))) { warning("Evaluation may not be as expected, because types on both sides are different.", cause, feature, ErrorCodes.WARNING_DIFFERENT_TYPES); } } catch (CSTSemanticException e) { // as we head only for a warning, an exception is not a problem here and shall be reported by the caller } } }
void function(ConstraintSyntaxTree lhs, String op, ConstraintSyntaxTree rhs, EObject cause, EStructuralFeature feature) { if (IvmlKeyWords.UNEQUALS.equals(op) IvmlKeyWords.UNEQUALS_ALIAS.equals(op)) { try { IDatatype lhsType = lhs.inferDatatype(); IDatatype rhsType = rhs.inferDatatype(); if (!(lhsType.isAssignableFrom(rhsType) rhsType.isAssignableFrom(lhsType))) { warning(STR, cause, feature, ErrorCodes.WARNING_DIFFERENT_TYPES); } } catch (CSTSemanticException e) { } } }
/** * Checks whether the operation {@code op} may return wrong results if types on both sides are not somehow * assignable. * * @param lhs the left hand side expression * @param op the operator * @param rhs the right hand side expression * @param cause the causing grammar object * @param feature the causing grammar feature */
Checks whether the operation op may return wrong results if types on both sides are not somehow assignable
checkForSameTypeWarning
{ "repo_name": "SSEHUB/EASyProducer", "path": "Plugins/IVML/de.uni_hildesheim.sse.ivml/src/de/uni_hildesheim/sse/translation/ExpressionTranslator.java", "license": "apache-2.0", "size": 86257 }
[ "net.ssehub.easy.varModel.cst.CSTSemanticException", "net.ssehub.easy.varModel.cst.ConstraintSyntaxTree", "net.ssehub.easy.varModel.model.IvmlKeyWords", "net.ssehub.easy.varModel.model.datatypes.IDatatype", "org.eclipse.emf.ecore.EObject", "org.eclipse.emf.ecore.EStructuralFeature" ]
import net.ssehub.easy.varModel.cst.CSTSemanticException; import net.ssehub.easy.varModel.cst.ConstraintSyntaxTree; import net.ssehub.easy.varModel.model.IvmlKeyWords; import net.ssehub.easy.varModel.model.datatypes.IDatatype; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EStructuralFeature;
import net.ssehub.easy.*; import org.eclipse.emf.ecore.*;
[ "net.ssehub.easy", "org.eclipse.emf" ]
net.ssehub.easy; org.eclipse.emf;
636,017
public static Method getSubListOriginalListSetAffectsSubListMethod() { return Platform .getMethod(ListSubListTester.class, "testSubList_originalListSetAffectsSubList"); }
static Method function() { return Platform .getMethod(ListSubListTester.class, STR); }
/** * Returns the {@link Method} instance for * {@link #testSubList_originalListSetAffectsSubList()} so that tests * of {@link CopyOnWriteArrayList} can suppress them with * {@code FeatureSpecificTestSuiteBuilder.suppressing()} until <a * href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6570631">Sun bug * 6570631</a> is fixed. */
Returns the <code>Method</code> instance for <code>#testSubList_originalListSetAffectsSubList()</code> so that tests of <code>CopyOnWriteArrayList</code> can suppress them with FeatureSpecificTestSuiteBuilder.suppressing() until Sun bug 6570631 is fixed
getSubListOriginalListSetAffectsSubListMethod
{ "repo_name": "lshain-android-source/external-guava", "path": "guava-testlib/src/com/google/common/collect/testing/testers/ListSubListTester.java", "license": "apache-2.0", "size": 12593 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
441,043
SystemOps.connPoolStart(); try { GUI.start(); } catch (Exception e) { logger.log( Level.INFO, e.toString(), e ); } }
SystemOps.connPoolStart(); try { GUI.start(); } catch (Exception e) { logger.log( Level.INFO, e.toString(), e ); } }
/** * This method - first run and initialize all * <br> Note : Args not using.. * @param args String[] */
This method - first run and initialize all Note : Args not using.
main
{ "repo_name": "muratti66/netstatgui-turkish", "path": "src/com/muratti66/netstatgui/Main.java", "license": "gpl-3.0", "size": 1308 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
651,643
protected void runSQL(String sql) throws SystemException { try { DataSource dataSource = mission_lkpPersistence.getDataSource(); SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql, new int[0]); sqlUpdate.update(); } catch (Exception e) { throw new SystemException(e); } } @BeanReference(type = active_conservation_projectsLocalService.class) protected active_conservation_projectsLocalService active_conservation_projectsLocalService; @BeanReference(type = active_conservation_projectsPersistence.class) protected active_conservation_projectsPersistence active_conservation_projectsPersistence; @BeanReference(type = advance_query_assessmentLocalService.class) protected advance_query_assessmentLocalService advance_query_assessmentLocalService; @BeanReference(type = advance_query_assessmentPersistence.class) protected advance_query_assessmentPersistence advance_query_assessmentPersistence; @BeanReference(type = advance_query_siteLocalService.class) protected advance_query_siteLocalService advance_query_siteLocalService; @BeanReference(type = advance_query_sitePersistence.class) protected advance_query_sitePersistence advance_query_sitePersistence; @BeanReference(type = assessing_threats_currentLocalService.class) protected assessing_threats_currentLocalService assessing_threats_currentLocalService; @BeanReference(type = assessing_threats_currentPersistence.class) protected assessing_threats_currentPersistence assessing_threats_currentPersistence; @BeanReference(type = assessing_threats_potentialLocalService.class) protected assessing_threats_potentialLocalService assessing_threats_potentialLocalService; @BeanReference(type = assessing_threats_potentialPersistence.class) protected assessing_threats_potentialPersistence assessing_threats_potentialPersistence; @BeanReference(type = assessment_lang_lkpLocalService.class) protected assessment_lang_lkpLocalService assessment_lang_lkpLocalService; @BeanReference(type = assessment_lang_lkpPersistence.class) protected assessment_lang_lkpPersistence assessment_lang_lkpPersistence; @BeanReference(type = assessment_lang_versionLocalService.class) protected assessment_lang_versionLocalService assessment_lang_versionLocalService; @BeanReference(type = assessment_lang_versionPersistence.class) protected assessment_lang_versionPersistence assessment_lang_versionPersistence; @BeanReference(type = assessment_stagesLocalService.class) protected assessment_stagesLocalService assessment_stagesLocalService; @BeanReference(type = assessment_stagesPersistence.class) protected assessment_stagesPersistence assessment_stagesPersistence; @BeanReference(type = assessment_statusLocalService.class) protected assessment_statusLocalService assessment_statusLocalService; @BeanReference(type = assessment_statusPersistence.class) protected assessment_statusPersistence assessment_statusPersistence; @BeanReference(type = assessment_validationLocalService.class) protected assessment_validationLocalService assessment_validationLocalService; @BeanReference(type = assessment_validationPersistence.class) protected assessment_validationPersistence assessment_validationPersistence; @BeanReference(type = assessment_whvaluesLocalService.class) protected assessment_whvaluesLocalService assessment_whvaluesLocalService; @BeanReference(type = assessment_whvaluesPersistence.class) protected assessment_whvaluesPersistence assessment_whvaluesPersistence; @BeanReference(type = assessment_whvalues_whcriterionLocalService.class) protected assessment_whvalues_whcriterionLocalService assessment_whvalues_whcriterionLocalService; @BeanReference(type = assessment_whvalues_whcriterionPersistence.class) protected assessment_whvalues_whcriterionPersistence assessment_whvalues_whcriterionPersistence; @BeanReference(type = benefit_checksubtype_lkpLocalService.class) protected benefit_checksubtype_lkpLocalService benefit_checksubtype_lkpLocalService; @BeanReference(type = benefit_checksubtype_lkpPersistence.class) protected benefit_checksubtype_lkpPersistence benefit_checksubtype_lkpPersistence; @BeanReference(type = benefit_checktype_lkpLocalService.class) protected benefit_checktype_lkpLocalService benefit_checktype_lkpLocalService; @BeanReference(type = benefit_checktype_lkpPersistence.class) protected benefit_checktype_lkpPersistence benefit_checktype_lkpPersistence; @BeanReference(type = benefit_rating_lkpLocalService.class) protected benefit_rating_lkpLocalService benefit_rating_lkpLocalService; @BeanReference(type = benefit_rating_lkpPersistence.class) protected benefit_rating_lkpPersistence benefit_rating_lkpPersistence; @BeanReference(type = benefitsLocalService.class) protected benefitsLocalService benefitsLocalService; @BeanReference(type = benefitsPersistence.class) protected benefitsPersistence benefitsPersistence; @BeanReference(type = benefits_summaryLocalService.class) protected benefits_summaryLocalService benefits_summaryLocalService; @BeanReference(type = benefits_summaryPersistence.class) protected benefits_summaryPersistence benefits_summaryPersistence; @BeanReference(type = benefits_type_refLocalService.class) protected benefits_type_refLocalService benefits_type_refLocalService; @BeanReference(type = benefits_type_refPersistence.class) protected benefits_type_refPersistence benefits_type_refPersistence; @BeanReference(type = biodiversity_valuesLocalService.class) protected biodiversity_valuesLocalService biodiversity_valuesLocalService; @BeanReference(type = biodiversity_valuesPersistence.class) protected biodiversity_valuesPersistence biodiversity_valuesPersistence; @BeanReference(type = boundary_modification_type_lkpLocalService.class) protected boundary_modification_type_lkpLocalService boundary_modification_type_lkpLocalService; @BeanReference(type = boundary_modification_type_lkpPersistence.class) protected boundary_modification_type_lkpPersistence boundary_modification_type_lkpPersistence; @BeanReference(type = conservation_outlookLocalService.class) protected conservation_outlookLocalService conservation_outlookLocalService; @BeanReference(type = conservation_outlookPersistence.class) protected conservation_outlookPersistence conservation_outlookPersistence; @BeanReference(type = conservation_outlook_rating_lkpLocalService.class) protected conservation_outlook_rating_lkpLocalService conservation_outlook_rating_lkpLocalService; @BeanReference(type = conservation_outlook_rating_lkpPersistence.class) protected conservation_outlook_rating_lkpPersistence conservation_outlook_rating_lkpPersistence; @BeanReference(type = contact_categoryLocalService.class) protected contact_categoryLocalService contact_categoryLocalService; @BeanReference(type = contact_categoryPersistence.class) protected contact_categoryPersistence contact_categoryPersistence; @BeanReference(type = country_lkpLocalService.class) protected country_lkpLocalService country_lkpLocalService; @BeanReference(type = country_lkpPersistence.class) protected country_lkpPersistence country_lkpPersistence; @BeanReference(type = current_state_trendLocalService.class) protected current_state_trendLocalService current_state_trendLocalService; @BeanReference(type = current_state_trendPersistence.class) protected current_state_trendPersistence current_state_trendPersistence; @BeanReference(type = current_state_trend_valuesLocalService.class) protected current_state_trend_valuesLocalService current_state_trend_valuesLocalService; @BeanReference(type = current_state_trend_valuesPersistence.class) protected current_state_trend_valuesPersistence current_state_trend_valuesPersistence; @BeanReference(type = current_threat_assessment_catLocalService.class) protected current_threat_assessment_catLocalService current_threat_assessment_catLocalService; @BeanReference(type = current_threat_assessment_catPersistence.class) protected current_threat_assessment_catPersistence current_threat_assessment_catPersistence; @BeanReference(type = current_threat_valuesLocalService.class) protected current_threat_valuesLocalService current_threat_valuesLocalService; @BeanReference(type = current_threat_valuesPersistence.class) protected current_threat_valuesPersistence current_threat_valuesPersistence; @BeanReference(type = danger_list_status_lkpLocalService.class) protected danger_list_status_lkpLocalService danger_list_status_lkpLocalService; @BeanReference(type = danger_list_status_lkpPersistence.class) protected danger_list_status_lkpPersistence danger_list_status_lkpPersistence; @BeanReference(type = docs_customDataLocalService.class) protected docs_customDataLocalService docs_customDataLocalService; @BeanReference(type = docs_customDataPersistence.class) protected docs_customDataPersistence docs_customDataPersistence; @BeanReference(type = docs_customDataFinder.class) protected docs_customDataFinder docs_customDataFinder; @BeanReference(type = docs_sitedataLocalService.class) protected docs_sitedataLocalService docs_sitedataLocalService; @BeanReference(type = docs_sitedataPersistence.class) protected docs_sitedataPersistence docs_sitedataPersistence; @BeanReference(type = effective_prot_mgmt_iothreatsLocalService.class) protected effective_prot_mgmt_iothreatsLocalService effective_prot_mgmt_iothreatsLocalService; @BeanReference(type = effective_prot_mgmt_iothreatsPersistence.class) protected effective_prot_mgmt_iothreatsPersistence effective_prot_mgmt_iothreatsPersistence; @BeanReference(type = flagship_species_lkpLocalService.class) protected flagship_species_lkpLocalService flagship_species_lkpLocalService; @BeanReference(type = flagship_species_lkpPersistence.class) protected flagship_species_lkpPersistence flagship_species_lkpPersistence; @BeanReference(type = inscription_criteria_lkpLocalService.class) protected inscription_criteria_lkpLocalService inscription_criteria_lkpLocalService; @BeanReference(type = inscription_criteria_lkpPersistence.class) protected inscription_criteria_lkpPersistence inscription_criteria_lkpPersistence; @BeanReference(type = inscription_type_lkpLocalService.class) protected inscription_type_lkpLocalService inscription_type_lkpLocalService; @BeanReference(type = inscription_type_lkpPersistence.class) protected inscription_type_lkpPersistence inscription_type_lkpPersistence; @BeanReference(type = iucn_pa_lkp_categoryLocalService.class) protected iucn_pa_lkp_categoryLocalService iucn_pa_lkp_categoryLocalService; @BeanReference(type = iucn_pa_lkp_categoryPersistence.class) protected iucn_pa_lkp_categoryPersistence iucn_pa_lkp_categoryPersistence; @BeanReference(type = iucn_regionLocalService.class) protected iucn_regionLocalService iucn_regionLocalService; @BeanReference(type = iucn_regionPersistence.class) protected iucn_regionPersistence iucn_regionPersistence; @BeanReference(type = iucn_region_countryLocalService.class) protected iucn_region_countryLocalService iucn_region_countryLocalService; @BeanReference(type = iucn_region_countryPersistence.class) protected iucn_region_countryPersistence iucn_region_countryPersistence; @BeanReference(type = key_conservation_issuesLocalService.class) protected key_conservation_issuesLocalService key_conservation_issuesLocalService; @BeanReference(type = key_conservation_issuesPersistence.class) protected key_conservation_issuesPersistence key_conservation_issuesPersistence; @BeanReference(type = key_conservation_scale_lkpLocalService.class) protected key_conservation_scale_lkpLocalService key_conservation_scale_lkpLocalService; @BeanReference(type = key_conservation_scale_lkpPersistence.class) protected key_conservation_scale_lkpPersistence key_conservation_scale_lkpPersistence; @BeanReference(type = mission_lkpLocalService.class) protected mission_lkpLocalService mission_lkpLocalService; @BeanReference(type = mission_lkpPersistence.class) protected mission_lkpPersistence mission_lkpPersistence; @BeanReference(type = negative_factors_level_impactLocalService.class) protected negative_factors_level_impactLocalService negative_factors_level_impactLocalService; @BeanReference(type = negative_factors_level_impactPersistence.class) protected negative_factors_level_impactPersistence negative_factors_level_impactPersistence; @BeanReference(type = negative_factors_trendLocalService.class) protected negative_factors_trendLocalService negative_factors_trendLocalService; @BeanReference(type = negative_factors_trendPersistence.class) protected negative_factors_trendPersistence negative_factors_trendPersistence; @BeanReference(type = other_designation_lkpLocalService.class) protected other_designation_lkpLocalService other_designation_lkpLocalService; @BeanReference(type = other_designation_lkpPersistence.class) protected other_designation_lkpPersistence other_designation_lkpPersistence; @BeanReference(type = potential_project_needsLocalService.class) protected potential_project_needsLocalService potential_project_needsLocalService; @BeanReference(type = potential_project_needsPersistence.class) protected potential_project_needsPersistence potential_project_needsPersistence; @BeanReference(type = potential_threat_assessment_catLocalService.class) protected potential_threat_assessment_catLocalService potential_threat_assessment_catLocalService; @BeanReference(type = potential_threat_assessment_catPersistence.class) protected potential_threat_assessment_catPersistence potential_threat_assessment_catPersistence; @BeanReference(type = potential_threat_valuesLocalService.class) protected potential_threat_valuesLocalService potential_threat_valuesLocalService; @BeanReference(type = potential_threat_valuesPersistence.class) protected potential_threat_valuesPersistence potential_threat_valuesPersistence; @BeanReference(type = prot_mgmt_best_practicesLocalService.class) protected prot_mgmt_best_practicesLocalService prot_mgmt_best_practicesLocalService; @BeanReference(type = prot_mgmt_best_practicesPersistence.class) protected prot_mgmt_best_practicesPersistence prot_mgmt_best_practicesPersistence; @BeanReference(type = prot_mgmt_overallLocalService.class) protected prot_mgmt_overallLocalService prot_mgmt_overallLocalService; @BeanReference(type = prot_mgmt_overallPersistence.class) protected prot_mgmt_overallPersistence prot_mgmt_overallPersistence; @BeanReference(type = protection_managementLocalService.class) protected protection_managementLocalService protection_managementLocalService; @BeanReference(type = protection_managementPersistence.class) protected protection_managementPersistence protection_managementPersistence; @BeanReference(type = protection_management_ratings_lkpLocalService.class) protected protection_management_ratings_lkpLocalService protection_management_ratings_lkpLocalService; @BeanReference(type = protection_management_ratings_lkpPersistence.class) protected protection_management_ratings_lkpPersistence protection_management_ratings_lkpPersistence; @BeanReference(type = protection_mgmt_checklist_lkpLocalService.class) protected protection_mgmt_checklist_lkpLocalService protection_mgmt_checklist_lkpLocalService; @BeanReference(type = protection_mgmt_checklist_lkpPersistence.class) protected protection_mgmt_checklist_lkpPersistence protection_mgmt_checklist_lkpPersistence; @BeanReference(type = recommendation_type_lkpLocalService.class) protected recommendation_type_lkpLocalService recommendation_type_lkpLocalService; @BeanReference(type = recommendation_type_lkpPersistence.class) protected recommendation_type_lkpPersistence recommendation_type_lkpPersistence; @BeanReference(type = referencesLocalService.class) protected referencesLocalService referencesLocalService; @BeanReference(type = referencesPersistence.class) protected referencesPersistence referencesPersistence; @BeanReference(type = reinforced_monitoringLocalService.class) protected reinforced_monitoringLocalService reinforced_monitoringLocalService; @BeanReference(type = reinforced_monitoringPersistence.class) protected reinforced_monitoringPersistence reinforced_monitoringPersistence; @BeanReference(type = site_assessmentLocalService.class) protected site_assessmentLocalService site_assessmentLocalService; @BeanReference(type = site_assessmentPersistence.class) protected site_assessmentPersistence site_assessmentPersistence; @BeanReference(type = site_assessmentFinder.class) protected site_assessmentFinder site_assessmentFinder; @BeanReference(type = site_assessment_versionsLocalService.class) protected site_assessment_versionsLocalService site_assessment_versionsLocalService; @BeanReference(type = site_assessment_versionsPersistence.class) protected site_assessment_versionsPersistence site_assessment_versionsPersistence; @BeanReference(type = site_assessment_versionsFinder.class) protected site_assessment_versionsFinder site_assessment_versionsFinder; @BeanReference(type = sites_thematicLocalService.class) protected sites_thematicLocalService sites_thematicLocalService; @BeanReference(type = sites_thematicPersistence.class) protected sites_thematicPersistence sites_thematicPersistence; @BeanReference(type = state_lkpLocalService.class) protected state_lkpLocalService state_lkpLocalService; @BeanReference(type = state_lkpPersistence.class) protected state_lkpPersistence state_lkpPersistence; @BeanReference(type = state_trend_biodivvalsLocalService.class) protected state_trend_biodivvalsLocalService state_trend_biodivvalsLocalService; @BeanReference(type = state_trend_biodivvalsPersistence.class) protected state_trend_biodivvalsPersistence state_trend_biodivvalsPersistence; @BeanReference(type = state_trend_whvaluesLocalService.class) protected state_trend_whvaluesLocalService state_trend_whvaluesLocalService; @BeanReference(type = state_trend_whvaluesPersistence.class) protected state_trend_whvaluesPersistence state_trend_whvaluesPersistence; @BeanReference(type = thematic_lkpLocalService.class) protected thematic_lkpLocalService thematic_lkpLocalService; @BeanReference(type = thematic_lkpPersistence.class) protected thematic_lkpPersistence thematic_lkpPersistence; @BeanReference(type = threat_categories_lkpLocalService.class) protected threat_categories_lkpLocalService threat_categories_lkpLocalService; @BeanReference(type = threat_categories_lkpPersistence.class) protected threat_categories_lkpPersistence threat_categories_lkpPersistence; @BeanReference(type = threat_rating_lkpLocalService.class) protected threat_rating_lkpLocalService threat_rating_lkpLocalService; @BeanReference(type = threat_rating_lkpPersistence.class) protected threat_rating_lkpPersistence threat_rating_lkpPersistence; @BeanReference(type = threat_subcategories_lkpLocalService.class) protected threat_subcategories_lkpLocalService threat_subcategories_lkpLocalService; @BeanReference(type = threat_subcategories_lkpPersistence.class) protected threat_subcategories_lkpPersistence threat_subcategories_lkpPersistence; @BeanReference(type = threat_summary_currentLocalService.class) protected threat_summary_currentLocalService threat_summary_currentLocalService; @BeanReference(type = threat_summary_currentPersistence.class) protected threat_summary_currentPersistence threat_summary_currentPersistence; @BeanReference(type = threat_summary_overallLocalService.class) protected threat_summary_overallLocalService threat_summary_overallLocalService; @BeanReference(type = threat_summary_overallPersistence.class) protected threat_summary_overallPersistence threat_summary_overallPersistence; @BeanReference(type = threat_summary_potentialLocalService.class) protected threat_summary_potentialLocalService threat_summary_potentialLocalService; @BeanReference(type = threat_summary_potentialPersistence.class) protected threat_summary_potentialPersistence threat_summary_potentialPersistence; @BeanReference(type = trend_lkpLocalService.class) protected trend_lkpLocalService trend_lkpLocalService; @BeanReference(type = trend_lkpPersistence.class) protected trend_lkpPersistence trend_lkpPersistence; @BeanReference(type = unesco_regionLocalService.class) protected unesco_regionLocalService unesco_regionLocalService; @BeanReference(type = unesco_regionPersistence.class) protected unesco_regionPersistence unesco_regionPersistence; @BeanReference(type = unesco_region_countryLocalService.class) protected unesco_region_countryLocalService unesco_region_countryLocalService; @BeanReference(type = unesco_region_countryPersistence.class) protected unesco_region_countryPersistence unesco_region_countryPersistence; @BeanReference(type = whp_contactLocalService.class) protected whp_contactLocalService whp_contactLocalService; @BeanReference(type = whp_contactPersistence.class) protected whp_contactPersistence whp_contactPersistence; @BeanReference(type = whp_criteria_lkpLocalService.class) protected whp_criteria_lkpLocalService whp_criteria_lkpLocalService; @BeanReference(type = whp_criteria_lkpPersistence.class) protected whp_criteria_lkpPersistence whp_criteria_lkpPersistence; @BeanReference(type = whp_site_danger_listLocalService.class) protected whp_site_danger_listLocalService whp_site_danger_listLocalService; @BeanReference(type = whp_site_danger_listService.class) protected whp_site_danger_listService whp_site_danger_listService; @BeanReference(type = whp_site_danger_listPersistence.class) protected whp_site_danger_listPersistence whp_site_danger_listPersistence; @BeanReference(type = whp_sitesLocalService.class) protected whp_sitesLocalService whp_sitesLocalService; @BeanReference(type = whp_sitesService.class) protected whp_sitesService whp_sitesService; @BeanReference(type = whp_sitesPersistence.class) protected whp_sitesPersistence whp_sitesPersistence; @BeanReference(type = whp_sitesFinder.class) protected whp_sitesFinder whp_sitesFinder; @BeanReference(type = whp_sites_boundary_modificationLocalService.class) protected whp_sites_boundary_modificationLocalService whp_sites_boundary_modificationLocalService; @BeanReference(type = whp_sites_boundary_modificationPersistence.class) protected whp_sites_boundary_modificationPersistence whp_sites_boundary_modificationPersistence; @BeanReference(type = whp_sites_budgetLocalService.class) protected whp_sites_budgetLocalService whp_sites_budgetLocalService; @BeanReference(type = whp_sites_budgetPersistence.class) protected whp_sites_budgetPersistence whp_sites_budgetPersistence; @BeanReference(type = whp_sites_componentLocalService.class) protected whp_sites_componentLocalService whp_sites_componentLocalService; @BeanReference(type = whp_sites_componentPersistence.class) protected whp_sites_componentPersistence whp_sites_componentPersistence; @BeanReference(type = whp_sites_contactsLocalService.class) protected whp_sites_contactsLocalService whp_sites_contactsLocalService; @BeanReference(type = whp_sites_contactsPersistence.class) protected whp_sites_contactsPersistence whp_sites_contactsPersistence; @BeanReference(type = whp_sites_countryLocalService.class) protected whp_sites_countryLocalService whp_sites_countryLocalService; @BeanReference(type = whp_sites_countryPersistence.class) protected whp_sites_countryPersistence whp_sites_countryPersistence; @BeanReference(type = whp_sites_dsocrLocalService.class) protected whp_sites_dsocrLocalService whp_sites_dsocrLocalService; @BeanReference(type = whp_sites_dsocrPersistence.class) protected whp_sites_dsocrPersistence whp_sites_dsocrPersistence; @BeanReference(type = whp_sites_external_documentsLocalService.class) protected whp_sites_external_documentsLocalService whp_sites_external_documentsLocalService; @BeanReference(type = whp_sites_external_documentsPersistence.class) protected whp_sites_external_documentsPersistence whp_sites_external_documentsPersistence; @BeanReference(type = whp_sites_flagship_speciesLocalService.class) protected whp_sites_flagship_speciesLocalService whp_sites_flagship_speciesLocalService; @BeanReference(type = whp_sites_flagship_speciesPersistence.class) protected whp_sites_flagship_speciesPersistence whp_sites_flagship_speciesPersistence; @BeanReference(type = whp_sites_indigenous_communitiesLocalService.class) protected whp_sites_indigenous_communitiesLocalService whp_sites_indigenous_communitiesLocalService; @BeanReference(type = whp_sites_indigenous_communitiesPersistence.class) protected whp_sites_indigenous_communitiesPersistence whp_sites_indigenous_communitiesPersistence; @BeanReference(type = whp_sites_inscription_criteriaLocalService.class) protected whp_sites_inscription_criteriaLocalService whp_sites_inscription_criteriaLocalService; @BeanReference(type = whp_sites_inscription_criteriaPersistence.class) protected whp_sites_inscription_criteriaPersistence whp_sites_inscription_criteriaPersistence; @BeanReference(type = whp_sites_inscription_dateLocalService.class) protected whp_sites_inscription_dateLocalService whp_sites_inscription_dateLocalService; @BeanReference(type = whp_sites_inscription_datePersistence.class) protected whp_sites_inscription_datePersistence whp_sites_inscription_datePersistence; @BeanReference(type = whp_sites_iucn_pa_categoryLocalService.class) protected whp_sites_iucn_pa_categoryLocalService whp_sites_iucn_pa_categoryLocalService; @BeanReference(type = whp_sites_iucn_pa_categoryPersistence.class) protected whp_sites_iucn_pa_categoryPersistence whp_sites_iucn_pa_categoryPersistence; @BeanReference(type = whp_sites_iucn_recommendationLocalService.class) protected whp_sites_iucn_recommendationLocalService whp_sites_iucn_recommendationLocalService; @BeanReference(type = whp_sites_iucn_recommendationService.class) protected whp_sites_iucn_recommendationService whp_sites_iucn_recommendationService; @BeanReference(type = whp_sites_iucn_recommendationPersistence.class) protected whp_sites_iucn_recommendationPersistence whp_sites_iucn_recommendationPersistence; @BeanReference(type = whp_sites_meeLocalService.class) protected whp_sites_meeLocalService whp_sites_meeLocalService; @BeanReference(type = whp_sites_meePersistence.class) protected whp_sites_meePersistence whp_sites_meePersistence; @BeanReference(type = whp_sites_mgmt_plan_stateLocalService.class) protected whp_sites_mgmt_plan_stateLocalService whp_sites_mgmt_plan_stateLocalService; @BeanReference(type = whp_sites_mgmt_plan_statePersistence.class) protected whp_sites_mgmt_plan_statePersistence whp_sites_mgmt_plan_statePersistence; @BeanReference(type = whp_sites_missionLocalService.class) protected whp_sites_missionLocalService whp_sites_missionLocalService; @BeanReference(type = whp_sites_missionPersistence.class) protected whp_sites_missionPersistence whp_sites_missionPersistence; @BeanReference(type = whp_sites_other_designationsLocalService.class) protected whp_sites_other_designationsLocalService whp_sites_other_designationsLocalService; @BeanReference(type = whp_sites_other_designationsPersistence.class) protected whp_sites_other_designationsPersistence whp_sites_other_designationsPersistence; @BeanReference(type = whp_sites_soc_reportsLocalService.class) protected whp_sites_soc_reportsLocalService whp_sites_soc_reportsLocalService; @BeanReference(type = whp_sites_soc_reportsPersistence.class) protected whp_sites_soc_reportsPersistence whp_sites_soc_reportsPersistence; @BeanReference(type = whp_sites_soouvLocalService.class) protected whp_sites_soouvLocalService whp_sites_soouvLocalService; @BeanReference(type = whp_sites_soouvPersistence.class) protected whp_sites_soouvPersistence whp_sites_soouvPersistence; @BeanReference(type = whp_sites_visitorsLocalService.class) protected whp_sites_visitorsLocalService whp_sites_visitorsLocalService; @BeanReference(type = whp_sites_visitorsPersistence.class) protected whp_sites_visitorsPersistence whp_sites_visitorsPersistence; @BeanReference(type = CounterLocalService.class) protected CounterLocalService counterLocalService; @BeanReference(type = ResourceLocalService.class) protected ResourceLocalService resourceLocalService; @BeanReference(type = ResourceService.class) protected ResourceService resourceService; @BeanReference(type = ResourcePersistence.class) protected ResourcePersistence resourcePersistence; @BeanReference(type = UserLocalService.class) protected UserLocalService userLocalService; @BeanReference(type = UserService.class) protected UserService userService; @BeanReference(type = UserPersistence.class) protected UserPersistence userPersistence; private String _beanIdentifier; private mission_lkpLocalServiceClpInvoker _clpInvoker = new mission_lkpLocalServiceClpInvoker();
void function(String sql) throws SystemException { try { DataSource dataSource = mission_lkpPersistence.getDataSource(); SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql, new int[0]); sqlUpdate.update(); } catch (Exception e) { throw new SystemException(e); } } @BeanReference(type = active_conservation_projectsLocalService.class) protected active_conservation_projectsLocalService active_conservation_projectsLocalService; @BeanReference(type = active_conservation_projectsPersistence.class) protected active_conservation_projectsPersistence active_conservation_projectsPersistence; @BeanReference(type = advance_query_assessmentLocalService.class) protected advance_query_assessmentLocalService advance_query_assessmentLocalService; @BeanReference(type = advance_query_assessmentPersistence.class) protected advance_query_assessmentPersistence advance_query_assessmentPersistence; @BeanReference(type = advance_query_siteLocalService.class) protected advance_query_siteLocalService advance_query_siteLocalService; @BeanReference(type = advance_query_sitePersistence.class) protected advance_query_sitePersistence advance_query_sitePersistence; @BeanReference(type = assessing_threats_currentLocalService.class) protected assessing_threats_currentLocalService assessing_threats_currentLocalService; @BeanReference(type = assessing_threats_currentPersistence.class) protected assessing_threats_currentPersistence assessing_threats_currentPersistence; @BeanReference(type = assessing_threats_potentialLocalService.class) protected assessing_threats_potentialLocalService assessing_threats_potentialLocalService; @BeanReference(type = assessing_threats_potentialPersistence.class) protected assessing_threats_potentialPersistence assessing_threats_potentialPersistence; @BeanReference(type = assessment_lang_lkpLocalService.class) protected assessment_lang_lkpLocalService assessment_lang_lkpLocalService; @BeanReference(type = assessment_lang_lkpPersistence.class) protected assessment_lang_lkpPersistence assessment_lang_lkpPersistence; @BeanReference(type = assessment_lang_versionLocalService.class) protected assessment_lang_versionLocalService assessment_lang_versionLocalService; @BeanReference(type = assessment_lang_versionPersistence.class) protected assessment_lang_versionPersistence assessment_lang_versionPersistence; @BeanReference(type = assessment_stagesLocalService.class) protected assessment_stagesLocalService assessment_stagesLocalService; @BeanReference(type = assessment_stagesPersistence.class) protected assessment_stagesPersistence assessment_stagesPersistence; @BeanReference(type = assessment_statusLocalService.class) protected assessment_statusLocalService assessment_statusLocalService; @BeanReference(type = assessment_statusPersistence.class) protected assessment_statusPersistence assessment_statusPersistence; @BeanReference(type = assessment_validationLocalService.class) protected assessment_validationLocalService assessment_validationLocalService; @BeanReference(type = assessment_validationPersistence.class) protected assessment_validationPersistence assessment_validationPersistence; @BeanReference(type = assessment_whvaluesLocalService.class) protected assessment_whvaluesLocalService assessment_whvaluesLocalService; @BeanReference(type = assessment_whvaluesPersistence.class) protected assessment_whvaluesPersistence assessment_whvaluesPersistence; @BeanReference(type = assessment_whvalues_whcriterionLocalService.class) protected assessment_whvalues_whcriterionLocalService assessment_whvalues_whcriterionLocalService; @BeanReference(type = assessment_whvalues_whcriterionPersistence.class) protected assessment_whvalues_whcriterionPersistence assessment_whvalues_whcriterionPersistence; @BeanReference(type = benefit_checksubtype_lkpLocalService.class) protected benefit_checksubtype_lkpLocalService benefit_checksubtype_lkpLocalService; @BeanReference(type = benefit_checksubtype_lkpPersistence.class) protected benefit_checksubtype_lkpPersistence benefit_checksubtype_lkpPersistence; @BeanReference(type = benefit_checktype_lkpLocalService.class) protected benefit_checktype_lkpLocalService benefit_checktype_lkpLocalService; @BeanReference(type = benefit_checktype_lkpPersistence.class) protected benefit_checktype_lkpPersistence benefit_checktype_lkpPersistence; @BeanReference(type = benefit_rating_lkpLocalService.class) protected benefit_rating_lkpLocalService benefit_rating_lkpLocalService; @BeanReference(type = benefit_rating_lkpPersistence.class) protected benefit_rating_lkpPersistence benefit_rating_lkpPersistence; @BeanReference(type = benefitsLocalService.class) protected benefitsLocalService benefitsLocalService; @BeanReference(type = benefitsPersistence.class) protected benefitsPersistence benefitsPersistence; @BeanReference(type = benefits_summaryLocalService.class) protected benefits_summaryLocalService benefits_summaryLocalService; @BeanReference(type = benefits_summaryPersistence.class) protected benefits_summaryPersistence benefits_summaryPersistence; @BeanReference(type = benefits_type_refLocalService.class) protected benefits_type_refLocalService benefits_type_refLocalService; @BeanReference(type = benefits_type_refPersistence.class) protected benefits_type_refPersistence benefits_type_refPersistence; @BeanReference(type = biodiversity_valuesLocalService.class) protected biodiversity_valuesLocalService biodiversity_valuesLocalService; @BeanReference(type = biodiversity_valuesPersistence.class) protected biodiversity_valuesPersistence biodiversity_valuesPersistence; @BeanReference(type = boundary_modification_type_lkpLocalService.class) protected boundary_modification_type_lkpLocalService boundary_modification_type_lkpLocalService; @BeanReference(type = boundary_modification_type_lkpPersistence.class) protected boundary_modification_type_lkpPersistence boundary_modification_type_lkpPersistence; @BeanReference(type = conservation_outlookLocalService.class) protected conservation_outlookLocalService conservation_outlookLocalService; @BeanReference(type = conservation_outlookPersistence.class) protected conservation_outlookPersistence conservation_outlookPersistence; @BeanReference(type = conservation_outlook_rating_lkpLocalService.class) protected conservation_outlook_rating_lkpLocalService conservation_outlook_rating_lkpLocalService; @BeanReference(type = conservation_outlook_rating_lkpPersistence.class) protected conservation_outlook_rating_lkpPersistence conservation_outlook_rating_lkpPersistence; @BeanReference(type = contact_categoryLocalService.class) protected contact_categoryLocalService contact_categoryLocalService; @BeanReference(type = contact_categoryPersistence.class) protected contact_categoryPersistence contact_categoryPersistence; @BeanReference(type = country_lkpLocalService.class) protected country_lkpLocalService country_lkpLocalService; @BeanReference(type = country_lkpPersistence.class) protected country_lkpPersistence country_lkpPersistence; @BeanReference(type = current_state_trendLocalService.class) protected current_state_trendLocalService current_state_trendLocalService; @BeanReference(type = current_state_trendPersistence.class) protected current_state_trendPersistence current_state_trendPersistence; @BeanReference(type = current_state_trend_valuesLocalService.class) protected current_state_trend_valuesLocalService current_state_trend_valuesLocalService; @BeanReference(type = current_state_trend_valuesPersistence.class) protected current_state_trend_valuesPersistence current_state_trend_valuesPersistence; @BeanReference(type = current_threat_assessment_catLocalService.class) protected current_threat_assessment_catLocalService current_threat_assessment_catLocalService; @BeanReference(type = current_threat_assessment_catPersistence.class) protected current_threat_assessment_catPersistence current_threat_assessment_catPersistence; @BeanReference(type = current_threat_valuesLocalService.class) protected current_threat_valuesLocalService current_threat_valuesLocalService; @BeanReference(type = current_threat_valuesPersistence.class) protected current_threat_valuesPersistence current_threat_valuesPersistence; @BeanReference(type = danger_list_status_lkpLocalService.class) protected danger_list_status_lkpLocalService danger_list_status_lkpLocalService; @BeanReference(type = danger_list_status_lkpPersistence.class) protected danger_list_status_lkpPersistence danger_list_status_lkpPersistence; @BeanReference(type = docs_customDataLocalService.class) protected docs_customDataLocalService docs_customDataLocalService; @BeanReference(type = docs_customDataPersistence.class) protected docs_customDataPersistence docs_customDataPersistence; @BeanReference(type = docs_customDataFinder.class) protected docs_customDataFinder docs_customDataFinder; @BeanReference(type = docs_sitedataLocalService.class) protected docs_sitedataLocalService docs_sitedataLocalService; @BeanReference(type = docs_sitedataPersistence.class) protected docs_sitedataPersistence docs_sitedataPersistence; @BeanReference(type = effective_prot_mgmt_iothreatsLocalService.class) protected effective_prot_mgmt_iothreatsLocalService effective_prot_mgmt_iothreatsLocalService; @BeanReference(type = effective_prot_mgmt_iothreatsPersistence.class) protected effective_prot_mgmt_iothreatsPersistence effective_prot_mgmt_iothreatsPersistence; @BeanReference(type = flagship_species_lkpLocalService.class) protected flagship_species_lkpLocalService flagship_species_lkpLocalService; @BeanReference(type = flagship_species_lkpPersistence.class) protected flagship_species_lkpPersistence flagship_species_lkpPersistence; @BeanReference(type = inscription_criteria_lkpLocalService.class) protected inscription_criteria_lkpLocalService inscription_criteria_lkpLocalService; @BeanReference(type = inscription_criteria_lkpPersistence.class) protected inscription_criteria_lkpPersistence inscription_criteria_lkpPersistence; @BeanReference(type = inscription_type_lkpLocalService.class) protected inscription_type_lkpLocalService inscription_type_lkpLocalService; @BeanReference(type = inscription_type_lkpPersistence.class) protected inscription_type_lkpPersistence inscription_type_lkpPersistence; @BeanReference(type = iucn_pa_lkp_categoryLocalService.class) protected iucn_pa_lkp_categoryLocalService iucn_pa_lkp_categoryLocalService; @BeanReference(type = iucn_pa_lkp_categoryPersistence.class) protected iucn_pa_lkp_categoryPersistence iucn_pa_lkp_categoryPersistence; @BeanReference(type = iucn_regionLocalService.class) protected iucn_regionLocalService iucn_regionLocalService; @BeanReference(type = iucn_regionPersistence.class) protected iucn_regionPersistence iucn_regionPersistence; @BeanReference(type = iucn_region_countryLocalService.class) protected iucn_region_countryLocalService iucn_region_countryLocalService; @BeanReference(type = iucn_region_countryPersistence.class) protected iucn_region_countryPersistence iucn_region_countryPersistence; @BeanReference(type = key_conservation_issuesLocalService.class) protected key_conservation_issuesLocalService key_conservation_issuesLocalService; @BeanReference(type = key_conservation_issuesPersistence.class) protected key_conservation_issuesPersistence key_conservation_issuesPersistence; @BeanReference(type = key_conservation_scale_lkpLocalService.class) protected key_conservation_scale_lkpLocalService key_conservation_scale_lkpLocalService; @BeanReference(type = key_conservation_scale_lkpPersistence.class) protected key_conservation_scale_lkpPersistence key_conservation_scale_lkpPersistence; @BeanReference(type = mission_lkpLocalService.class) protected mission_lkpLocalService mission_lkpLocalService; @BeanReference(type = mission_lkpPersistence.class) protected mission_lkpPersistence mission_lkpPersistence; @BeanReference(type = negative_factors_level_impactLocalService.class) protected negative_factors_level_impactLocalService negative_factors_level_impactLocalService; @BeanReference(type = negative_factors_level_impactPersistence.class) protected negative_factors_level_impactPersistence negative_factors_level_impactPersistence; @BeanReference(type = negative_factors_trendLocalService.class) protected negative_factors_trendLocalService negative_factors_trendLocalService; @BeanReference(type = negative_factors_trendPersistence.class) protected negative_factors_trendPersistence negative_factors_trendPersistence; @BeanReference(type = other_designation_lkpLocalService.class) protected other_designation_lkpLocalService other_designation_lkpLocalService; @BeanReference(type = other_designation_lkpPersistence.class) protected other_designation_lkpPersistence other_designation_lkpPersistence; @BeanReference(type = potential_project_needsLocalService.class) protected potential_project_needsLocalService potential_project_needsLocalService; @BeanReference(type = potential_project_needsPersistence.class) protected potential_project_needsPersistence potential_project_needsPersistence; @BeanReference(type = potential_threat_assessment_catLocalService.class) protected potential_threat_assessment_catLocalService potential_threat_assessment_catLocalService; @BeanReference(type = potential_threat_assessment_catPersistence.class) protected potential_threat_assessment_catPersistence potential_threat_assessment_catPersistence; @BeanReference(type = potential_threat_valuesLocalService.class) protected potential_threat_valuesLocalService potential_threat_valuesLocalService; @BeanReference(type = potential_threat_valuesPersistence.class) protected potential_threat_valuesPersistence potential_threat_valuesPersistence; @BeanReference(type = prot_mgmt_best_practicesLocalService.class) protected prot_mgmt_best_practicesLocalService prot_mgmt_best_practicesLocalService; @BeanReference(type = prot_mgmt_best_practicesPersistence.class) protected prot_mgmt_best_practicesPersistence prot_mgmt_best_practicesPersistence; @BeanReference(type = prot_mgmt_overallLocalService.class) protected prot_mgmt_overallLocalService prot_mgmt_overallLocalService; @BeanReference(type = prot_mgmt_overallPersistence.class) protected prot_mgmt_overallPersistence prot_mgmt_overallPersistence; @BeanReference(type = protection_managementLocalService.class) protected protection_managementLocalService protection_managementLocalService; @BeanReference(type = protection_managementPersistence.class) protected protection_managementPersistence protection_managementPersistence; @BeanReference(type = protection_management_ratings_lkpLocalService.class) protected protection_management_ratings_lkpLocalService protection_management_ratings_lkpLocalService; @BeanReference(type = protection_management_ratings_lkpPersistence.class) protected protection_management_ratings_lkpPersistence protection_management_ratings_lkpPersistence; @BeanReference(type = protection_mgmt_checklist_lkpLocalService.class) protected protection_mgmt_checklist_lkpLocalService protection_mgmt_checklist_lkpLocalService; @BeanReference(type = protection_mgmt_checklist_lkpPersistence.class) protected protection_mgmt_checklist_lkpPersistence protection_mgmt_checklist_lkpPersistence; @BeanReference(type = recommendation_type_lkpLocalService.class) protected recommendation_type_lkpLocalService recommendation_type_lkpLocalService; @BeanReference(type = recommendation_type_lkpPersistence.class) protected recommendation_type_lkpPersistence recommendation_type_lkpPersistence; @BeanReference(type = referencesLocalService.class) protected referencesLocalService referencesLocalService; @BeanReference(type = referencesPersistence.class) protected referencesPersistence referencesPersistence; @BeanReference(type = reinforced_monitoringLocalService.class) protected reinforced_monitoringLocalService reinforced_monitoringLocalService; @BeanReference(type = reinforced_monitoringPersistence.class) protected reinforced_monitoringPersistence reinforced_monitoringPersistence; @BeanReference(type = site_assessmentLocalService.class) protected site_assessmentLocalService site_assessmentLocalService; @BeanReference(type = site_assessmentPersistence.class) protected site_assessmentPersistence site_assessmentPersistence; @BeanReference(type = site_assessmentFinder.class) protected site_assessmentFinder site_assessmentFinder; @BeanReference(type = site_assessment_versionsLocalService.class) protected site_assessment_versionsLocalService site_assessment_versionsLocalService; @BeanReference(type = site_assessment_versionsPersistence.class) protected site_assessment_versionsPersistence site_assessment_versionsPersistence; @BeanReference(type = site_assessment_versionsFinder.class) protected site_assessment_versionsFinder site_assessment_versionsFinder; @BeanReference(type = sites_thematicLocalService.class) protected sites_thematicLocalService sites_thematicLocalService; @BeanReference(type = sites_thematicPersistence.class) protected sites_thematicPersistence sites_thematicPersistence; @BeanReference(type = state_lkpLocalService.class) protected state_lkpLocalService state_lkpLocalService; @BeanReference(type = state_lkpPersistence.class) protected state_lkpPersistence state_lkpPersistence; @BeanReference(type = state_trend_biodivvalsLocalService.class) protected state_trend_biodivvalsLocalService state_trend_biodivvalsLocalService; @BeanReference(type = state_trend_biodivvalsPersistence.class) protected state_trend_biodivvalsPersistence state_trend_biodivvalsPersistence; @BeanReference(type = state_trend_whvaluesLocalService.class) protected state_trend_whvaluesLocalService state_trend_whvaluesLocalService; @BeanReference(type = state_trend_whvaluesPersistence.class) protected state_trend_whvaluesPersistence state_trend_whvaluesPersistence; @BeanReference(type = thematic_lkpLocalService.class) protected thematic_lkpLocalService thematic_lkpLocalService; @BeanReference(type = thematic_lkpPersistence.class) protected thematic_lkpPersistence thematic_lkpPersistence; @BeanReference(type = threat_categories_lkpLocalService.class) protected threat_categories_lkpLocalService threat_categories_lkpLocalService; @BeanReference(type = threat_categories_lkpPersistence.class) protected threat_categories_lkpPersistence threat_categories_lkpPersistence; @BeanReference(type = threat_rating_lkpLocalService.class) protected threat_rating_lkpLocalService threat_rating_lkpLocalService; @BeanReference(type = threat_rating_lkpPersistence.class) protected threat_rating_lkpPersistence threat_rating_lkpPersistence; @BeanReference(type = threat_subcategories_lkpLocalService.class) protected threat_subcategories_lkpLocalService threat_subcategories_lkpLocalService; @BeanReference(type = threat_subcategories_lkpPersistence.class) protected threat_subcategories_lkpPersistence threat_subcategories_lkpPersistence; @BeanReference(type = threat_summary_currentLocalService.class) protected threat_summary_currentLocalService threat_summary_currentLocalService; @BeanReference(type = threat_summary_currentPersistence.class) protected threat_summary_currentPersistence threat_summary_currentPersistence; @BeanReference(type = threat_summary_overallLocalService.class) protected threat_summary_overallLocalService threat_summary_overallLocalService; @BeanReference(type = threat_summary_overallPersistence.class) protected threat_summary_overallPersistence threat_summary_overallPersistence; @BeanReference(type = threat_summary_potentialLocalService.class) protected threat_summary_potentialLocalService threat_summary_potentialLocalService; @BeanReference(type = threat_summary_potentialPersistence.class) protected threat_summary_potentialPersistence threat_summary_potentialPersistence; @BeanReference(type = trend_lkpLocalService.class) protected trend_lkpLocalService trend_lkpLocalService; @BeanReference(type = trend_lkpPersistence.class) protected trend_lkpPersistence trend_lkpPersistence; @BeanReference(type = unesco_regionLocalService.class) protected unesco_regionLocalService unesco_regionLocalService; @BeanReference(type = unesco_regionPersistence.class) protected unesco_regionPersistence unesco_regionPersistence; @BeanReference(type = unesco_region_countryLocalService.class) protected unesco_region_countryLocalService unesco_region_countryLocalService; @BeanReference(type = unesco_region_countryPersistence.class) protected unesco_region_countryPersistence unesco_region_countryPersistence; @BeanReference(type = whp_contactLocalService.class) protected whp_contactLocalService whp_contactLocalService; @BeanReference(type = whp_contactPersistence.class) protected whp_contactPersistence whp_contactPersistence; @BeanReference(type = whp_criteria_lkpLocalService.class) protected whp_criteria_lkpLocalService whp_criteria_lkpLocalService; @BeanReference(type = whp_criteria_lkpPersistence.class) protected whp_criteria_lkpPersistence whp_criteria_lkpPersistence; @BeanReference(type = whp_site_danger_listLocalService.class) protected whp_site_danger_listLocalService whp_site_danger_listLocalService; @BeanReference(type = whp_site_danger_listService.class) protected whp_site_danger_listService whp_site_danger_listService; @BeanReference(type = whp_site_danger_listPersistence.class) protected whp_site_danger_listPersistence whp_site_danger_listPersistence; @BeanReference(type = whp_sitesLocalService.class) protected whp_sitesLocalService whp_sitesLocalService; @BeanReference(type = whp_sitesService.class) protected whp_sitesService whp_sitesService; @BeanReference(type = whp_sitesPersistence.class) protected whp_sitesPersistence whp_sitesPersistence; @BeanReference(type = whp_sitesFinder.class) protected whp_sitesFinder whp_sitesFinder; @BeanReference(type = whp_sites_boundary_modificationLocalService.class) protected whp_sites_boundary_modificationLocalService whp_sites_boundary_modificationLocalService; @BeanReference(type = whp_sites_boundary_modificationPersistence.class) protected whp_sites_boundary_modificationPersistence whp_sites_boundary_modificationPersistence; @BeanReference(type = whp_sites_budgetLocalService.class) protected whp_sites_budgetLocalService whp_sites_budgetLocalService; @BeanReference(type = whp_sites_budgetPersistence.class) protected whp_sites_budgetPersistence whp_sites_budgetPersistence; @BeanReference(type = whp_sites_componentLocalService.class) protected whp_sites_componentLocalService whp_sites_componentLocalService; @BeanReference(type = whp_sites_componentPersistence.class) protected whp_sites_componentPersistence whp_sites_componentPersistence; @BeanReference(type = whp_sites_contactsLocalService.class) protected whp_sites_contactsLocalService whp_sites_contactsLocalService; @BeanReference(type = whp_sites_contactsPersistence.class) protected whp_sites_contactsPersistence whp_sites_contactsPersistence; @BeanReference(type = whp_sites_countryLocalService.class) protected whp_sites_countryLocalService whp_sites_countryLocalService; @BeanReference(type = whp_sites_countryPersistence.class) protected whp_sites_countryPersistence whp_sites_countryPersistence; @BeanReference(type = whp_sites_dsocrLocalService.class) protected whp_sites_dsocrLocalService whp_sites_dsocrLocalService; @BeanReference(type = whp_sites_dsocrPersistence.class) protected whp_sites_dsocrPersistence whp_sites_dsocrPersistence; @BeanReference(type = whp_sites_external_documentsLocalService.class) protected whp_sites_external_documentsLocalService whp_sites_external_documentsLocalService; @BeanReference(type = whp_sites_external_documentsPersistence.class) protected whp_sites_external_documentsPersistence whp_sites_external_documentsPersistence; @BeanReference(type = whp_sites_flagship_speciesLocalService.class) protected whp_sites_flagship_speciesLocalService whp_sites_flagship_speciesLocalService; @BeanReference(type = whp_sites_flagship_speciesPersistence.class) protected whp_sites_flagship_speciesPersistence whp_sites_flagship_speciesPersistence; @BeanReference(type = whp_sites_indigenous_communitiesLocalService.class) protected whp_sites_indigenous_communitiesLocalService whp_sites_indigenous_communitiesLocalService; @BeanReference(type = whp_sites_indigenous_communitiesPersistence.class) protected whp_sites_indigenous_communitiesPersistence whp_sites_indigenous_communitiesPersistence; @BeanReference(type = whp_sites_inscription_criteriaLocalService.class) protected whp_sites_inscription_criteriaLocalService whp_sites_inscription_criteriaLocalService; @BeanReference(type = whp_sites_inscription_criteriaPersistence.class) protected whp_sites_inscription_criteriaPersistence whp_sites_inscription_criteriaPersistence; @BeanReference(type = whp_sites_inscription_dateLocalService.class) protected whp_sites_inscription_dateLocalService whp_sites_inscription_dateLocalService; @BeanReference(type = whp_sites_inscription_datePersistence.class) protected whp_sites_inscription_datePersistence whp_sites_inscription_datePersistence; @BeanReference(type = whp_sites_iucn_pa_categoryLocalService.class) protected whp_sites_iucn_pa_categoryLocalService whp_sites_iucn_pa_categoryLocalService; @BeanReference(type = whp_sites_iucn_pa_categoryPersistence.class) protected whp_sites_iucn_pa_categoryPersistence whp_sites_iucn_pa_categoryPersistence; @BeanReference(type = whp_sites_iucn_recommendationLocalService.class) protected whp_sites_iucn_recommendationLocalService whp_sites_iucn_recommendationLocalService; @BeanReference(type = whp_sites_iucn_recommendationService.class) protected whp_sites_iucn_recommendationService whp_sites_iucn_recommendationService; @BeanReference(type = whp_sites_iucn_recommendationPersistence.class) protected whp_sites_iucn_recommendationPersistence whp_sites_iucn_recommendationPersistence; @BeanReference(type = whp_sites_meeLocalService.class) protected whp_sites_meeLocalService whp_sites_meeLocalService; @BeanReference(type = whp_sites_meePersistence.class) protected whp_sites_meePersistence whp_sites_meePersistence; @BeanReference(type = whp_sites_mgmt_plan_stateLocalService.class) protected whp_sites_mgmt_plan_stateLocalService whp_sites_mgmt_plan_stateLocalService; @BeanReference(type = whp_sites_mgmt_plan_statePersistence.class) protected whp_sites_mgmt_plan_statePersistence whp_sites_mgmt_plan_statePersistence; @BeanReference(type = whp_sites_missionLocalService.class) protected whp_sites_missionLocalService whp_sites_missionLocalService; @BeanReference(type = whp_sites_missionPersistence.class) protected whp_sites_missionPersistence whp_sites_missionPersistence; @BeanReference(type = whp_sites_other_designationsLocalService.class) protected whp_sites_other_designationsLocalService whp_sites_other_designationsLocalService; @BeanReference(type = whp_sites_other_designationsPersistence.class) protected whp_sites_other_designationsPersistence whp_sites_other_designationsPersistence; @BeanReference(type = whp_sites_soc_reportsLocalService.class) protected whp_sites_soc_reportsLocalService whp_sites_soc_reportsLocalService; @BeanReference(type = whp_sites_soc_reportsPersistence.class) protected whp_sites_soc_reportsPersistence whp_sites_soc_reportsPersistence; @BeanReference(type = whp_sites_soouvLocalService.class) protected whp_sites_soouvLocalService whp_sites_soouvLocalService; @BeanReference(type = whp_sites_soouvPersistence.class) protected whp_sites_soouvPersistence whp_sites_soouvPersistence; @BeanReference(type = whp_sites_visitorsLocalService.class) protected whp_sites_visitorsLocalService whp_sites_visitorsLocalService; @BeanReference(type = whp_sites_visitorsPersistence.class) protected whp_sites_visitorsPersistence whp_sites_visitorsPersistence; @BeanReference(type = CounterLocalService.class) protected CounterLocalService counterLocalService; @BeanReference(type = ResourceLocalService.class) protected ResourceLocalService resourceLocalService; @BeanReference(type = ResourceService.class) protected ResourceService resourceService; @BeanReference(type = ResourcePersistence.class) protected ResourcePersistence resourcePersistence; @BeanReference(type = UserLocalService.class) protected UserLocalService userLocalService; @BeanReference(type = UserService.class) protected UserService userService; @BeanReference(type = UserPersistence.class) protected UserPersistence userPersistence; private String _beanIdentifier; private mission_lkpLocalServiceClpInvoker _clpInvoker = new mission_lkpLocalServiceClpInvoker();
/** * Performs an SQL query. * * @param sql the sql query */
Performs an SQL query
runSQL
{ "repo_name": "iucn-whp/world-heritage-outlook", "path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/base/mission_lkpLocalServiceBaseImpl.java", "license": "gpl-2.0", "size": 175113 }
[ "com.liferay.counter.service.CounterLocalService", "com.liferay.portal.kernel.bean.BeanReference", "com.liferay.portal.kernel.dao.jdbc.SqlUpdate", "com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil", "com.liferay.portal.kernel.exception.SystemException", "com.liferay.portal.service.ResourceLocalServ...
import com.liferay.counter.service.CounterLocalService; import com.liferay.portal.kernel.bean.BeanReference; import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.service.ResourceLocalService; import com.liferay.portal.service.ResourceService; import com.liferay.portal.service.UserLocalService; import com.liferay.portal.service.UserService; import com.liferay.portal.service.persistence.ResourcePersistence; import com.liferay.portal.service.persistence.UserPersistence; import javax.sql.DataSource;
import com.liferay.counter.service.*; import com.liferay.portal.kernel.bean.*; import com.liferay.portal.kernel.dao.jdbc.*; import com.liferay.portal.kernel.exception.*; import com.liferay.portal.service.*; import com.liferay.portal.service.persistence.*; import javax.sql.*;
[ "com.liferay.counter", "com.liferay.portal", "javax.sql" ]
com.liferay.counter; com.liferay.portal; javax.sql;
232,076
public void setIntents(List<Intent> intents) { this.intents = intents; }
void function(List<Intent> intents) { this.intents = intents; }
/** * Sets a list of intents as detected by the service. * * @param intents an array of intents */
Sets a list of intents as detected by the service
setIntents
{ "repo_name": "JoshSharpe/java-sdk", "path": "conversation/src/main/java/com/ibm/watson/developer_cloud/conversation/v1/model/MessageResponse.java", "license": "apache-2.0", "size": 5133 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,931,519
private static void attachToContent(Activity activity, MenuDrawer menuDrawer) { ViewGroup content = (ViewGroup) activity.findViewById(android.R.id.content); content.removeAllViews(); content.addView(menuDrawer, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); }
static void function(Activity activity, MenuDrawer menuDrawer) { ViewGroup content = (ViewGroup) activity.findViewById(android.R.id.content); content.removeAllViews(); content.addView(menuDrawer, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); }
/** * Attaches the menu drawer to the content view. */
Attaches the menu drawer to the content view
attachToContent
{ "repo_name": "xuwakao/mixtureProject", "path": "menudrawer/src/net/simonvt/menudrawer/MenuDrawer.java", "license": "gpl-2.0", "size": 47581 }
[ "android.app.Activity", "android.view.ViewGroup" ]
import android.app.Activity; import android.view.ViewGroup;
import android.app.*; import android.view.*;
[ "android.app", "android.view" ]
android.app; android.view;
1,389,325
public Date getCreatedtime() { return createdtime; }
Date function() { return createdtime; }
/** * This method was generated by MyBatis Generator. * This method returns the value of the database column m_crm_opportunities_leads.createdTime * * @return the value of m_crm_opportunities_leads.createdTime * * @mbggenerated Thu Jul 16 10:50:10 ICT 2015 */
This method was generated by MyBatis Generator. This method returns the value of the database column m_crm_opportunities_leads.createdTime
getCreatedtime
{ "repo_name": "uniteddiversity/mycollab", "path": "mycollab-services/src/main/java/com/esofthead/mycollab/module/crm/domain/OpportunityLead.java", "license": "agpl-3.0", "size": 6671 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
940,406
public static StringValue chr(Env env, long value) { if (! env.isUnicodeSemantics()) value = value & 0xFF; StringValue sb = env.createUnicodeBuilder(); sb.append((char) value); return sb; }
static StringValue function(Env env, long value) { if (! env.isUnicodeSemantics()) value = value & 0xFF; StringValue sb = env.createUnicodeBuilder(); sb.append((char) value); return sb; }
/** * converts a number to its character equivalent * * @param value the integer value * * @return the string equivalent */
converts a number to its character equivalent
chr
{ "repo_name": "dwango/quercus", "path": "src/main/java/com/caucho/quercus/lib/string/StringModule.java", "license": "gpl-2.0", "size": 150561 }
[ "com.caucho.quercus.env.Env", "com.caucho.quercus.env.StringValue" ]
import com.caucho.quercus.env.Env; import com.caucho.quercus.env.StringValue;
import com.caucho.quercus.env.*;
[ "com.caucho.quercus" ]
com.caucho.quercus;
93,338
public InterMineObject getObjectById(Integer id) throws ObjectStoreException { return osw.getObjectById(id); }
InterMineObject function(Integer id) throws ObjectStoreException { return osw.getObjectById(id); }
/** * Search database for object matching the given object id * * @param id the object ID * @return the retrieved object * @throws ObjectStoreException if an error occurs retieving the object */
Search database for object matching the given object id
getObjectById
{ "repo_name": "JoeCarlson/intermine", "path": "intermine/integrate/main/src/org/intermine/dataloader/IntegrationWriterAbstractImpl.java", "license": "lgpl-2.1", "size": 29364 }
[ "org.intermine.model.InterMineObject", "org.intermine.objectstore.ObjectStoreException" ]
import org.intermine.model.InterMineObject; import org.intermine.objectstore.ObjectStoreException;
import org.intermine.model.*; import org.intermine.objectstore.*;
[ "org.intermine.model", "org.intermine.objectstore" ]
org.intermine.model; org.intermine.objectstore;
2,680,905
@Generated @Selector("configurationItems") public native NSArray<?> configurationItems();
@Selector(STR) native NSArray<?> function();
/** * Subclasses should implement this, and return an array of SLComposeSheetConfigurationItem instances, if if needs to display configuration items in the sheet. Defaults to nil. */
Subclasses should implement this, and return an array of SLComposeSheetConfigurationItem instances, if if needs to display configuration items in the sheet. Defaults to nil
configurationItems
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/social/SLComposeServiceViewController.java", "license": "apache-2.0", "size": 18380 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
74,751
private FPTree getFPTree(ExampleSet exampleSet, Attribute[] attributes, double[] positiveIndices, Map<Attribute, Item> mapping) { FPTree tree = new FPTree(); for (Example currentExample : exampleSet) { List<Item> itemSet = new ArrayList<Item>(); int i = 0; for (Attribute currentAttribute : attributes) { if (currentExample.getValue(currentAttribute) == positiveIndices[i]) { itemSet.add(mapping.get(currentAttribute)); } i++; } Collections.sort(itemSet); tree.addItemSet(itemSet, 1); } return tree; }
FPTree function(ExampleSet exampleSet, Attribute[] attributes, double[] positiveIndices, Map<Attribute, Item> mapping) { FPTree tree = new FPTree(); for (Example currentExample : exampleSet) { List<Item> itemSet = new ArrayList<Item>(); int i = 0; for (Attribute currentAttribute : attributes) { if (currentExample.getValue(currentAttribute) == positiveIndices[i]) { itemSet.add(mapping.get(currentAttribute)); } i++; } Collections.sort(itemSet); tree.addItemSet(itemSet, 1); } return tree; }
/** * Returns a new FPTree, representing the complete ExampleSet. * * @param exampleSet * is the exampleSet, which shall be represented * @param mapping * is the mapping of attributes of the exampleSet to items */
Returns a new FPTree, representing the complete ExampleSet
getFPTree
{ "repo_name": "aborg0/RapidMiner-Unuk", "path": "src/com/rapidminer/operator/learner/associations/fpgrowth/FPGrowth.java", "license": "agpl-3.0", "size": 22408 }
[ "com.rapidminer.example.Attribute", "com.rapidminer.example.Example", "com.rapidminer.example.ExampleSet", "com.rapidminer.operator.learner.associations.Item", "java.util.ArrayList", "java.util.Collections", "java.util.List", "java.util.Map" ]
import com.rapidminer.example.Attribute; import com.rapidminer.example.Example; import com.rapidminer.example.ExampleSet; import com.rapidminer.operator.learner.associations.Item; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map;
import com.rapidminer.example.*; import com.rapidminer.operator.learner.associations.*; import java.util.*;
[ "com.rapidminer.example", "com.rapidminer.operator", "java.util" ]
com.rapidminer.example; com.rapidminer.operator; java.util;
82,098
@ServiceMethod(returns = ReturnType.SINGLE) NameAvailabilityInner checkNameAvailability(String location, NameAvailabilityParameters parameters);
@ServiceMethod(returns = ReturnType.SINGLE) NameAvailabilityInner checkNameAvailability(String location, NameAvailabilityParameters parameters);
/** * Checks that the resource name is valid and is not already in use. * * @param location the region. * @param parameters Parameters supplied to the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the request to check name availability. */
Checks that the resource name is valid and is not already in use
checkNameAvailability
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRsClient.java", "license": "mit", "size": 28775 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.signalr.fluent.models.NameAvailabilityInner", "com.azure.resourcemanager.signalr.models.NameAvailabilityParameters" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.signalr.fluent.models.NameAvailabilityInner; import com.azure.resourcemanager.signalr.models.NameAvailabilityParameters;
import com.azure.core.annotation.*; import com.azure.resourcemanager.signalr.fluent.models.*; import com.azure.resourcemanager.signalr.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,429,305
private synchronized Schema getInputPathAvroSchema() throws IOException { if (inputPathAvroSchema == null) { // No need to query Hadoop more than once as this shouldn't change mid-run, // thus, we can lazily initialize and cache the result. inputPathAvroSchema = AvroUtils.getAvroSchemaFromPath(getInputPath()); } return inputPathAvroSchema; }
synchronized Schema function() throws IOException { if (inputPathAvroSchema == null) { inputPathAvroSchema = AvroUtils.getAvroSchemaFromPath(getInputPath()); } return inputPathAvroSchema; }
/** * Get the Avro Schema of the input path, assuming the path contains just one * schema version in all files under that path. */
Get the Avro Schema of the input path, assuming the path contains just one schema version in all files under that path
getInputPathAvroSchema
{ "repo_name": "stotch/voldemort", "path": "contrib/hadoop-store-builder/src/java/voldemort/store/readonly/mr/azkaban/VoldemortBuildAndPushJob.java", "license": "apache-2.0", "size": 45160 }
[ "java.io.IOException", "org.apache.avro.Schema" ]
import java.io.IOException; import org.apache.avro.Schema;
import java.io.*; import org.apache.avro.*;
[ "java.io", "org.apache.avro" ]
java.io; org.apache.avro;
257,354
public RoundingParams setBorder(@ColorInt int color, float width) { Preconditions.checkArgument(width >= 0, "the border width cannot be < 0"); mBorderWidth = width; mBorderColor = color; return this; } /** * Sets the padding on rounded drawable. Works only with {@code RoundingMethod.BITMAP_ONLY}
RoundingParams function(@ColorInt int color, float width) { Preconditions.checkArgument(width >= 0, STR); mBorderWidth = width; mBorderColor = color; return this; } /** * Sets the padding on rounded drawable. Works only with {@code RoundingMethod.BITMAP_ONLY}
/** * Sets the border around the rounded drawable * @param color of the border * @param width of the width */
Sets the border around the rounded drawable
setBorder
{ "repo_name": "weiwenqiang/GitHub", "path": "expert/fresco/drawee/src/main/java/com/facebook/drawee/generic/RoundingParams.java", "license": "apache-2.0", "size": 8681 }
[ "android.support.annotation.ColorInt", "com.facebook.common.internal.Preconditions" ]
import android.support.annotation.ColorInt; import com.facebook.common.internal.Preconditions;
import android.support.annotation.*; import com.facebook.common.internal.*;
[ "android.support", "com.facebook.common" ]
android.support; com.facebook.common;
1,834,898
public void addToHistory(List<RegInfo> history);
void function(List<RegInfo> history);
/** * Adds to the List by treating List as a Set. * Thus adds only if not already exists in the List and avoids duplication. * See appendToHistory to append to List. */
Adds to the List by treating List as a Set. Thus adds only if not already exists in the List and avoids duplication. See appendToHistory to append to List
addToHistory
{ "repo_name": "pdd/mongoj", "path": "samples/PortletAndService/UsedCarService/src/java/service/org/mongoj/samples/model/CarModel.java", "license": "mit", "size": 4912 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
515,866
public Map<String, String> getNodeTypes() { return nodeTypes; }
Map<String, String> function() { return nodeTypes; }
/** * Gets the node types. * * @return the node types */
Gets the node types
getNodeTypes
{ "repo_name": "exodev/social", "path": "component/core/src/main/java/org/exoplatform/social/core/service/ProfileConfig.java", "license": "lgpl-3.0", "size": 4102 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
512,039
private Map retrieveEditingModes(String cashManagementDocId, TransactionalDocumentPresentationController presentationController, TransactionalDocumentAuthorizer docAuthorizer) { Map editModeMap = null; try { final CashManagementDocument cmDoc = (CashManagementDocument)SpringContext.getBean(DocumentService.class).getByDocumentHeaderId(cashManagementDocId); Set<String> editModes = presentationController.getEditModes(cmDoc); editModes = docAuthorizer.getEditModes(cmDoc, GlobalVariables.getUserSession().getPerson(), editModes); editModeMap = convertSetToMap(editModes); } catch (WorkflowException we) { throw new RuntimeException("Workflow exception while retrieving document " + cashManagementDocId, we); } return editModeMap; }
Map function(String cashManagementDocId, TransactionalDocumentPresentationController presentationController, TransactionalDocumentAuthorizer docAuthorizer) { Map editModeMap = null; try { final CashManagementDocument cmDoc = (CashManagementDocument)SpringContext.getBean(DocumentService.class).getByDocumentHeaderId(cashManagementDocId); Set<String> editModes = presentationController.getEditModes(cmDoc); editModes = docAuthorizer.getEditModes(cmDoc, GlobalVariables.getUserSession().getPerson(), editModes); editModeMap = convertSetToMap(editModes); } catch (WorkflowException we) { throw new RuntimeException(STR + cashManagementDocId, we); } return editModeMap; }
/** * Retrieves the edit modes for the given cash management document * @param cashManagementDocId the id of the cash management document to check * @param presentationController the presentation controller of the cash management document * @param docAuthorizer the cash management document authorizer * @return a Map of edit modes */
Retrieves the edit modes for the given cash management document
retrieveEditingModes
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/fp/document/web/struts/DepositWizardAction.java", "license": "apache-2.0", "size": 49629 }
[ "java.util.Map", "java.util.Set", "org.kuali.kfs.fp.document.CashManagementDocument", "org.kuali.kfs.sys.context.SpringContext", "org.kuali.rice.kew.api.exception.WorkflowException", "org.kuali.rice.kns.document.authorization.TransactionalDocumentAuthorizer", "org.kuali.rice.kns.document.authorization.T...
import java.util.Map; import java.util.Set; import org.kuali.kfs.fp.document.CashManagementDocument; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.rice.kew.api.exception.WorkflowException; import org.kuali.rice.kns.document.authorization.TransactionalDocumentAuthorizer; import org.kuali.rice.kns.document.authorization.TransactionalDocumentPresentationController; import org.kuali.rice.krad.service.DocumentService; import org.kuali.rice.krad.util.GlobalVariables;
import java.util.*; import org.kuali.kfs.fp.document.*; import org.kuali.kfs.sys.context.*; import org.kuali.rice.kew.api.exception.*; import org.kuali.rice.kns.document.authorization.*; import org.kuali.rice.krad.service.*; import org.kuali.rice.krad.util.*;
[ "java.util", "org.kuali.kfs", "org.kuali.rice" ]
java.util; org.kuali.kfs; org.kuali.rice;
2,086,633
protected boolean isSummarizeDetailLinesRendered(CertificationReportForm certificationReportForm) { populateAuthorizationFields(certificationReportForm); //super.populateAuthorizationFields(certificationReportForm); return certificationReportForm.getEditingMode().containsKey(EffortCertificationEditMode.SUMMARY_TAB_ENTRY); }
boolean function(CertificationReportForm certificationReportForm) { populateAuthorizationFields(certificationReportForm); return certificationReportForm.getEditingMode().containsKey(EffortCertificationEditMode.SUMMARY_TAB_ENTRY); }
/** * determine whether the summarized detail lines need to be rendered * * @param certificationReportForm the action form * @return true if the summarized detail lines need to be rendered; otherwise, false */
determine whether the summarized detail lines need to be rendered
isSummarizeDetailLinesRendered
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-ec/src/main/java/org/kuali/kfs/module/ec/document/web/struts/CertificationReportAction.java", "license": "agpl-3.0", "size": 34115 }
[ "org.kuali.kfs.module.ec.EffortConstants" ]
import org.kuali.kfs.module.ec.EffortConstants;
import org.kuali.kfs.module.ec.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
2,867,218
public static String[] getFieldOrder(Class model) { // the annotation lists fields by their SerializedName, // except for the constant fields, which are listed by field name JsonPropertyOrder ordering = (JsonPropertyOrder) model.getAnnotation(JsonPropertyOrder.class); boolean isConstants = false; if (DriverConstantFields.class.equals(model)) { isConstants = true; Log.d(LOG_LABEL, "Getting field order for constants form class, by field name."); } Field[] fields = model.getDeclaredFields(); ArrayList<String> fieldOrder = new ArrayList<>(fields.length); if (ordering != null) { String[] serializedNameOrder = ordering.value(); // map the fields' pretty names (SerializedName) to the POJO field name HashMap<String, String> nameMap = new HashMap<>(fields.length); for (Field field: fields) { String fieldName = field.getName(); String fieldLabel = fieldName; if (isConstants) { fieldLabel = fieldName; } else { SerializedName serializedNameAnnotation = field.getAnnotation(SerializedName.class); if (serializedNameAnnotation != null) { fieldLabel = serializedNameAnnotation.value(); } } nameMap.put(fieldLabel, fieldName); } for (String nextName: serializedNameOrder) { String nextField = nameMap.get(nextName); if (nextField != null) { fieldOrder.add(nextField); } else { // JsonPropertyOrder annotation should list fields by their serialized names Log.e(LOG_LABEL, "Found no field with serialized name " + nextName); } } // Sanity check that all fields have an order and that all ordered fields have been found. // If not, add the remaining fields after those that did have an order defined, // in the order of declaration. // For non-section fields, there will be a hidden ID field that doesn't get listed in the order. int fieldOrderSize = fieldOrder.size(); if ((fieldOrderSize != serializedNameOrder.length) || (fieldOrderSize < fields.length - 1)) { for (Field field: fields) { String fieldName = field.getName(); if (!fieldOrder.contains(fieldName)) { Log.w(LOG_LABEL, "Adding field without explicit ordering declared: " + fieldName); fieldOrder.add(fieldName); } } } } else { Log.d(LOG_LABEL, "Class " + model.getSimpleName() + " has no JsonPropertyOrder defined; using order of declaration"); // Return in order found by getDeclaredFields if no ordering defined in schema. for (Field field: fields) { fieldOrder.add(field.getName()); } } return fieldOrder.toArray(new String[fieldOrder.size()]); }
static String[] function(Class model) { JsonPropertyOrder ordering = (JsonPropertyOrder) model.getAnnotation(JsonPropertyOrder.class); boolean isConstants = false; if (DriverConstantFields.class.equals(model)) { isConstants = true; Log.d(LOG_LABEL, STR); } Field[] fields = model.getDeclaredFields(); ArrayList<String> fieldOrder = new ArrayList<>(fields.length); if (ordering != null) { String[] serializedNameOrder = ordering.value(); HashMap<String, String> nameMap = new HashMap<>(fields.length); for (Field field: fields) { String fieldName = field.getName(); String fieldLabel = fieldName; if (isConstants) { fieldLabel = fieldName; } else { SerializedName serializedNameAnnotation = field.getAnnotation(SerializedName.class); if (serializedNameAnnotation != null) { fieldLabel = serializedNameAnnotation.value(); } } nameMap.put(fieldLabel, fieldName); } for (String nextName: serializedNameOrder) { String nextField = nameMap.get(nextName); if (nextField != null) { fieldOrder.add(nextField); } else { Log.e(LOG_LABEL, STR + nextName); } } int fieldOrderSize = fieldOrder.size(); if ((fieldOrderSize != serializedNameOrder.length) (fieldOrderSize < fields.length - 1)) { for (Field field: fields) { String fieldName = field.getName(); if (!fieldOrder.contains(fieldName)) { Log.w(LOG_LABEL, STR + fieldName); fieldOrder.add(fieldName); } } } } else { Log.d(LOG_LABEL, STR + model.getSimpleName() + STR); for (Field field: fields) { fieldOrder.add(field.getName()); } } return fieldOrder.toArray(new String[fieldOrder.size()]); }
/** * Returns the ordered list of field names for the given schema model. * @param model Class built by jsonschema2pojo with the json editor annotations * @return Array of the names of the fields on the class, ordered according to the JsonPropertyOrder annotation */
Returns the ordered list of field names for the given schema model
getFieldOrder
{ "repo_name": "WorldBank-Transport/DRIVER-Android", "path": "app/src/main/java/org/worldbank/transport/driver/utilities/DriverUtilities.java", "license": "gpl-3.0", "size": 10991 }
[ "android.util.Log", "com.fasterxml.jackson.annotation.JsonPropertyOrder", "com.google.gson.annotations.SerializedName", "java.lang.reflect.Field", "java.util.ArrayList", "java.util.HashMap", "org.worldbank.transport.driver.staticmodels.DriverConstantFields" ]
import android.util.Log; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.google.gson.annotations.SerializedName; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.HashMap; import org.worldbank.transport.driver.staticmodels.DriverConstantFields;
import android.util.*; import com.fasterxml.jackson.annotation.*; import com.google.gson.annotations.*; import java.lang.reflect.*; import java.util.*; import org.worldbank.transport.driver.staticmodels.*;
[ "android.util", "com.fasterxml.jackson", "com.google.gson", "java.lang", "java.util", "org.worldbank.transport" ]
android.util; com.fasterxml.jackson; com.google.gson; java.lang; java.util; org.worldbank.transport;
2,717,491
public static void writeLines(final File file, final String encoding, final Collection<?> lines, final String lineEnding, final boolean append) throws IOException { try (OutputStream out = new BufferedOutputStream(openOutputStream(file, append))) { IOUtils.writeLines(lines, lineEnding, out, encoding); } }
static void function(final File file, final String encoding, final Collection<?> lines, final String lineEnding, final boolean append) throws IOException { try (OutputStream out = new BufferedOutputStream(openOutputStream(file, append))) { IOUtils.writeLines(lines, lineEnding, out, encoding); } }
/** * Writes the <code>toString()</code> value of each item in a collection to * the specified <code>File</code> line by line. * The specified character encoding and the line ending will be used. * * @param file the file to write to * @param encoding the encoding to use, {@code null} means platform default * @param lines the lines to write, {@code null} entries produce blank lines * @param lineEnding the line separator to use, {@code null} is system default * @param append if {@code true}, then the lines will be added to the * end of the file rather than overwriting * @throws IOException in case of an I/O error * @throws java.io.UnsupportedEncodingException if the encoding is not supported by the VM * @since 2.1 */
Writes the <code>toString()</code> value of each item in a collection to the specified <code>File</code> line by line. The specified character encoding and the line ending will be used
writeLines
{ "repo_name": "pimtegelaar/commons-io-test3", "path": "src/main/java/org/apache/commons/io/FileUtils.java", "license": "apache-2.0", "size": 129505 }
[ "java.io.BufferedOutputStream", "java.io.File", "java.io.IOException", "java.io.OutputStream", "java.util.Collection" ]
import java.io.BufferedOutputStream; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.util.Collection;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,030,971
public static URL[] pathToURLs(String path) { StringTokenizer st = new StringTokenizer(path, File.pathSeparator); URL[] urls = new URL[st.countTokens()]; int count = 0; while (st.hasMoreTokens()) { URL url = fileToURL(new File(st.nextToken())); if (url != null) { urls[count++] = url; } } if (urls.length != count) { URL[] tmp = new URL[count]; System.arraycopy(urls, 0, tmp, 0, count); urls = tmp; } return urls; }
static URL[] function(String path) { StringTokenizer st = new StringTokenizer(path, File.pathSeparator); URL[] urls = new URL[st.countTokens()]; int count = 0; while (st.hasMoreTokens()) { URL url = fileToURL(new File(st.nextToken())); if (url != null) { urls[count++] = url; } } if (urls.length != count) { URL[] tmp = new URL[count]; System.arraycopy(urls, 0, tmp, 0, count); urls = tmp; } return urls; }
/** * Utility method for converting a search path string to an array * of directory and JAR file URLs. * * @param path the search path string * @return the resulting array of directory and JAR file URLs */
Utility method for converting a search path string to an array of directory and JAR file URLs
pathToURLs
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "src/java.base/share/classes/sun/security/tools/PathList.java", "license": "gpl-2.0", "size": 3791 }
[ "java.io.File", "java.lang.String", "java.util.StringTokenizer" ]
import java.io.File; import java.lang.String; import java.util.StringTokenizer;
import java.io.*; import java.lang.*; import java.util.*;
[ "java.io", "java.lang", "java.util" ]
java.io; java.lang; java.util;
84,977
public HLAnnotationHLAPI getContainerHLAnnotationHLAPI(){ if(item.getContainerHLAnnotation() == null) return null; return new HLAnnotationHLAPI(item.getContainerHLAnnotation()); }
HLAnnotationHLAPI function(){ if(item.getContainerHLAnnotation() == null) return null; return new HLAnnotationHLAPI(item.getContainerHLAnnotation()); }
/** * This accessor automatically encapsulate an element of the current object. * WARNING : this creates a new object in memory. * @return : null if the element is null */
This accessor automatically encapsulate an element of the current object. WARNING : this creates a new object in memory
getContainerHLAnnotationHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/lists/hlapi/LengthHLAPI.java", "license": "epl-1.0", "size": 108262 }
[ "fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.HLAnnotationHLAPI" ]
import fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.HLAnnotationHLAPI;
import fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.*;
[ "fr.lip6.move" ]
fr.lip6.move;
379,218
public GenericResult changePassword(Locale locale, String login, byte[] oldPwHash, byte[] newPwHash);
GenericResult function(Locale locale, String login, byte[] oldPwHash, byte[] newPwHash);
/** * Change the users password. * @param locale * @param login * @param oldPwHash * @param newPwHash * @return */
Change the users password
changePassword
{ "repo_name": "CircleOrg/circles", "path": "circle_api/src/main/java/net/circleorg/circles/api/Users.java", "license": "mit", "size": 1355 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
96,587
@SideOnly(Side.CLIENT) public boolean addPartDestroyEffects(int part, EffectRenderer er);
@SideOnly(Side.CLIENT) boolean function(int part, EffectRenderer er);
/** * Creates particles when a part is destroyed. * If the part number is invalid, returns false. * Otherwise, creates particles if applicable, and returns true. */
Creates particles when a part is destroyed. If the part number is invalid, returns false. Otherwise, creates particles if applicable, and returns true
addPartDestroyEffects
{ "repo_name": "kremnev8/AdvancedSpaceStaion-mod", "path": "src/main/java/mods/immibis/core/api/multipart/IPartContainer.java", "license": "mit", "size": 4388 }
[ "net.minecraft.client.particle.EffectRenderer" ]
import net.minecraft.client.particle.EffectRenderer;
import net.minecraft.client.particle.*;
[ "net.minecraft.client" ]
net.minecraft.client;
1,123,090
private void tryMinimizeIfBlockExits(Node srcBlock, Node destBlock, Node ifNode, int exitType, @Nullable String labelName) { Node exitNodeParent = null; Node exitNode = null; // Pick an exit node candidate. if (srcBlock.isBlock()) { if (!srcBlock.hasChildren()) { return; } exitNodeParent = srcBlock; exitNode = exitNodeParent.getLastChild(); } else { // Just a single statement, if it isn't an exit bail. exitNodeParent = ifNode; exitNode = srcBlock; } // Verify the candidate. if (!matchingExitNode(exitNode, exitType, labelName)) { return; } // Take case of the if nodes siblings, if any. if (ifNode.getNext() != null) { // Move siblings of the if block into the opposite // logic block of the exit. Node newDestBlock = IR.block().srcref(ifNode); if (destBlock == null) { // Only possible if this is the false block. ifNode.addChildToBack(newDestBlock); } else if (destBlock.isEmpty()) { // Use the new block. ifNode.replaceChild(destBlock, newDestBlock); } else if (destBlock.isBlock()) { // Reuse the existing block. newDestBlock = destBlock; } else { // Add the existing statement to the new block. ifNode.replaceChild(destBlock, newDestBlock); newDestBlock.addChildToBack(destBlock); } // Move all the if node's following siblings. moveAllFollowing(ifNode, ifNode.getParent(), newDestBlock); compiler.reportChangeToEnclosingScope(ifNode); } }
void function(Node srcBlock, Node destBlock, Node ifNode, int exitType, @Nullable String labelName) { Node exitNodeParent = null; Node exitNode = null; if (srcBlock.isBlock()) { if (!srcBlock.hasChildren()) { return; } exitNodeParent = srcBlock; exitNode = exitNodeParent.getLastChild(); } else { exitNodeParent = ifNode; exitNode = srcBlock; } if (!matchingExitNode(exitNode, exitType, labelName)) { return; } if (ifNode.getNext() != null) { Node newDestBlock = IR.block().srcref(ifNode); if (destBlock == null) { ifNode.addChildToBack(newDestBlock); } else if (destBlock.isEmpty()) { ifNode.replaceChild(destBlock, newDestBlock); } else if (destBlock.isBlock()) { newDestBlock = destBlock; } else { ifNode.replaceChild(destBlock, newDestBlock); newDestBlock.addChildToBack(destBlock); } moveAllFollowing(ifNode, ifNode.getParent(), newDestBlock); compiler.reportChangeToEnclosingScope(ifNode); } }
/** * Look for exits (returns, breaks, or continues, depending on the context) at * the end of a block and removes them by moving the if node's siblings, * if any, into the opposite condition block. * * @param srcBlock The block to inspect. * @param destBlock The block to move sibling nodes into. * @param ifNode The if node to work with. * @param exitType The type of exit to look for. * @param labelName The name associated with the exit, if any. null for anything excepted for * named-break associated with a label. */
Look for exits (returns, breaks, or continues, depending on the context) at the end of a block and removes them by moving the if node's siblings, if any, into the opposite condition block
tryMinimizeIfBlockExits
{ "repo_name": "lgeorgieff/closure-compiler", "path": "src/com/google/javascript/jscomp/MinimizeExitPoints.java", "license": "apache-2.0", "size": 10335 }
[ "com.google.javascript.rhino.IR", "com.google.javascript.rhino.Node", "javax.annotation.Nullable" ]
import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node; import javax.annotation.Nullable;
import com.google.javascript.rhino.*; import javax.annotation.*;
[ "com.google.javascript", "javax.annotation" ]
com.google.javascript; javax.annotation;
1,471,009
public Player getPlayer() { return player; }
Player function() { return player; }
/** * Gets the player who cast the spell * * @return The player who cast the spell */
Gets the player who cast the spell
getPlayer
{ "repo_name": "minnymin3/Zephyrus", "path": "Zephyrus-Core/src/main/java/net/lordsofcode/zephyrus/events/PlayerPostCastSpellEvent.java", "license": "gpl-3.0", "size": 1025 }
[ "org.bukkit.entity.Player" ]
import org.bukkit.entity.Player;
import org.bukkit.entity.*;
[ "org.bukkit.entity" ]
org.bukkit.entity;
2,482,854
void write(byte... data) throws IOException { mUartDevice.write(data, data.length); }
void write(byte... data) throws IOException { mUartDevice.write(data, data.length); }
/** * Writes commands directly to the printer. * * @param data An array of bytes */
Writes commands directly to the printer
write
{ "repo_name": "androidthings/contrib-drivers", "path": "thermalprinter/src/main/java/com/google/android/things/contrib/driver/thermalprinter/CsnA2.java", "license": "apache-2.0", "size": 35410 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,371,778
if (isStandAlone) { try { // get the current path String path = new java.io.File("").getAbsolutePath(); path = path.substring(0, path.lastIndexOf(File.separator)); // create the command line String absoluteFile = path + File.separator + "run" + File.separator + jarName; // String command = // "java -jar " + absoluteFile + " " + PORT; // System.out.println(command); // Run the server in a separate system process ProcessBuilder processBuilder = new ProcessBuilder("java", "-jar", absoluteFile, Integer.toString(PORT)); processBuilder.redirectErrorStream(true); serverProcess = processBuilder.start(); } catch (IOException e) { e.printStackTrace(); System.exit(-1); } // // Then retrieve the process output // InputStream in = serverProcess.getInputStream(); // InputStream err = serverProcess.getErrorStream(); } }
if (isStandAlone) { try { String path = new java.io.File(STRrunSTRjavaSTR-jar", absoluteFile, Integer.toString(PORT)); processBuilder.redirectErrorStream(true); serverProcess = processBuilder.start(); } catch (IOException e) { e.printStackTrace(); System.exit(-1); } } }
/** * Sets the up before class. */
Sets the up before class
setUpBeforeClass
{ "repo_name": "curioustechizen/Californium", "path": "cf-proxy/src/test/java/ch/ethz/inf/vs/californium/test/CoapServerTest.java", "license": "bsd-3-clause", "size": 15080 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,758,014
public JcrNode node(String repository, String workspace, String path) throws RemoteException;
JcrNode function(String repository, String workspace, String path) throws RemoteException;
/** * Gets node at the given path. * * @param repository * @param workspace * @param path * @return * @throws RemoteException */
Gets node at the given path
node
{ "repo_name": "okulikov/modeshape", "path": "web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/JcrService.java", "license": "apache-2.0", "size": 11507 }
[ "org.modeshape.web.shared.JcrNode", "org.modeshape.web.shared.RemoteException" ]
import org.modeshape.web.shared.JcrNode; import org.modeshape.web.shared.RemoteException;
import org.modeshape.web.shared.*;
[ "org.modeshape.web" ]
org.modeshape.web;
2,844,211
private SwipeMode computeInputMode(long time, float x, float y, float dx, float dy) { if (!mStacks[1].isDisplayable()) return SwipeMode.SEND_TO_STACK; int currentIndex = getTabStackIndex(); if (currentIndex != getViewportParameters().getStackIndexAt(x, y)) { return SwipeMode.SWITCH_STACK; } float relativeX = mLastOnDownX - (x + dx); float relativeY = mLastOnDownY - (y + dy); float distanceToDownSqr = dx * dx + dy * dy; float switchDelta = getOrientation() == Orientation.PORTRAIT ? relativeX : relativeY; float otherDelta = getOrientation() == Orientation.PORTRAIT ? relativeY : relativeX; // Dragging in the opposite direction of the stack switch if (distanceToDownSqr > mMinDirectionThreshold * mMinDirectionThreshold && Math.abs(otherDelta) > Math.abs(switchDelta)) { return SwipeMode.SEND_TO_STACK; } // Dragging in a direction the stack cannot switch if (Math.abs(switchDelta) > mMinDirectionThreshold) { if ((currentIndex == 0) ^ (switchDelta > 0) ^ (getOrientation() == Orientation.PORTRAIT && LocalizationUtils.isLayoutRtl())) { return SwipeMode.SEND_TO_STACK; } } if (isDraggingStackInWrongDirection( mLastOnDownX, mLastOnDownY, x, y, dx, dy, getOrientation(), currentIndex)) { return SwipeMode.SWITCH_STACK; } // Not moving the finger if (time - mLastOnDownTimeStamp > THRESHOLD_TIME_TO_SWITCH_STACK_INPUT_MODE) { return SwipeMode.SEND_TO_STACK; } // Dragging fast if (distanceToDownSqr > mMinShortPressThresholdSqr) { return SwipeMode.SWITCH_STACK; } return SwipeMode.NONE; } class PortraitViewport { protected float mWidth, mHeight; PortraitViewport() { mWidth = StackLayout.this.getWidth(); mHeight = StackLayout.this.getHeightMinusBrowserControls(); }
SwipeMode function(long time, float x, float y, float dx, float dy) { if (!mStacks[1].isDisplayable()) return SwipeMode.SEND_TO_STACK; int currentIndex = getTabStackIndex(); if (currentIndex != getViewportParameters().getStackIndexAt(x, y)) { return SwipeMode.SWITCH_STACK; } float relativeX = mLastOnDownX - (x + dx); float relativeY = mLastOnDownY - (y + dy); float distanceToDownSqr = dx * dx + dy * dy; float switchDelta = getOrientation() == Orientation.PORTRAIT ? relativeX : relativeY; float otherDelta = getOrientation() == Orientation.PORTRAIT ? relativeY : relativeX; if (distanceToDownSqr > mMinDirectionThreshold * mMinDirectionThreshold && Math.abs(otherDelta) > Math.abs(switchDelta)) { return SwipeMode.SEND_TO_STACK; } if (Math.abs(switchDelta) > mMinDirectionThreshold) { if ((currentIndex == 0) ^ (switchDelta > 0) ^ (getOrientation() == Orientation.PORTRAIT && LocalizationUtils.isLayoutRtl())) { return SwipeMode.SEND_TO_STACK; } } if (isDraggingStackInWrongDirection( mLastOnDownX, mLastOnDownY, x, y, dx, dy, getOrientation(), currentIndex)) { return SwipeMode.SWITCH_STACK; } if (time - mLastOnDownTimeStamp > THRESHOLD_TIME_TO_SWITCH_STACK_INPUT_MODE) { return SwipeMode.SEND_TO_STACK; } if (distanceToDownSqr > mMinShortPressThresholdSqr) { return SwipeMode.SWITCH_STACK; } return SwipeMode.NONE; } class PortraitViewport { protected float mWidth, mHeight; PortraitViewport() { mWidth = StackLayout.this.getWidth(); mHeight = StackLayout.this.getHeightMinusBrowserControls(); }
/** * Computes the input mode for drag and fling based on the first event position. * @param time The current time of the app in ms. * @param x The x layout position of the mouse (without the displacement). * @param y The y layout position of the mouse (without the displacement). * @param dx The x displacement happening this frame. * @param dy The y displacement happening this frame. * @return The input mode to select. */
Computes the input mode for drag and fling based on the first event position
computeInputMode
{ "repo_name": "mogoweb/365browser", "path": "app/src/main/java/org/chromium/chrome/browser/compositor/layouts/phone/StackLayout.java", "license": "apache-2.0", "size": 51520 }
[ "org.chromium.ui.base.LocalizationUtils" ]
import org.chromium.ui.base.LocalizationUtils;
import org.chromium.ui.base.*;
[ "org.chromium.ui" ]
org.chromium.ui;
641,399
public Table getSystemTable(Session session, String name) { return null; }
Table function(Session session, String name) { return null; }
/** * Retrieves a table with the specified name whose content may depend on * the execution context indicated by the session argument as well as the * current value of <code>withContent</code>. <p> * * @param session the context in which to produce the table * @param name the name of the table to produce * @return a table corresponding to the name and session arguments, or * <code>null</code> if there is no such table to be produced */
Retrieves a table with the specified name whose content may depend on the execution context indicated by the session argument as well as the current value of <code>withContent</code>.
getSystemTable
{ "repo_name": "RabadanLab/Pegasus", "path": "resources/hsqldb-2.2.7/hsqldb/src/org/hsqldb/dbinfo/DatabaseInformation.java", "license": "mit", "size": 19987 }
[ "org.hsqldb.Session", "org.hsqldb.Table" ]
import org.hsqldb.Session; import org.hsqldb.Table;
import org.hsqldb.*;
[ "org.hsqldb" ]
org.hsqldb;
312,074
@Override public Adapter createProxyServiceSequenceAndEndpointContainerAdapter() { if (proxyServiceSequenceAndEndpointContainerItemProvider == null) { proxyServiceSequenceAndEndpointContainerItemProvider = new ProxyServiceSequenceAndEndpointContainerItemProvider(this); } return proxyServiceSequenceAndEndpointContainerItemProvider; } protected ProxyServiceFaultContainerItemProvider proxyServiceFaultContainerItemProvider;
Adapter function() { if (proxyServiceSequenceAndEndpointContainerItemProvider == null) { proxyServiceSequenceAndEndpointContainerItemProvider = new ProxyServiceSequenceAndEndpointContainerItemProvider(this); } return proxyServiceSequenceAndEndpointContainerItemProvider; } protected ProxyServiceFaultContainerItemProvider proxyServiceFaultContainerItemProvider;
/** * This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.ProxyServiceSequenceAndEndpointContainer}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.ProxyServiceSequenceAndEndpointContainer</code>.
createProxyServiceSequenceAndEndpointContainerAdapter
{ "repo_name": "prabushi/devstudio-tooling-esb", "path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java", "license": "apache-2.0", "size": 339597 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,300,253
@Test public void execute_eventFlagsShuffled_reminderAdded() { assertChangeBy(() -> getSearchResult("Event").get(0).getReminders().size(), 1, () -> this.remindCommand.execute("remind Event n/Attend Workshop t/2000-01-01 05.00PM")); ArrayList<Reminder> reminders = getSearchResult("Event").get(0).getReminders(); Reminder addedReminder = reminders.get(reminders.size() - 1); assertEquals(LocalDateTime.of(2000, 1, 1, 17, 0), addedReminder.getTimeOfReminder()); assertEquals("Attend Workshop", addedReminder.getNote()); }
void function() { assertChangeBy(() -> getSearchResult("Event").get(0).getReminders().size(), 1, () -> this.remindCommand.execute(STR)); ArrayList<Reminder> reminders = getSearchResult("Event").get(0).getReminders(); Reminder addedReminder = reminders.get(reminders.size() - 1); assertEquals(LocalDateTime.of(2000, 1, 1, 17, 0), addedReminder.getTimeOfReminder()); assertEquals(STR, addedReminder.getNote()); }
/** * Test that executing adding reminder in different order to a Event should * return correct result. */
Test that executing adding reminder in different order to a Event should return correct result
execute_eventFlagsShuffled_reminderAdded
{ "repo_name": "CS2103AUG2016-W11-C1/main", "path": "src/test/java/linenux/command/RemindCommandTest.java", "license": "mit", "size": 13338 }
[ "java.time.LocalDateTime", "java.util.ArrayList", "org.junit.Assert" ]
import java.time.LocalDateTime; import java.util.ArrayList; import org.junit.Assert;
import java.time.*; import java.util.*; import org.junit.*;
[ "java.time", "java.util", "org.junit" ]
java.time; java.util; org.junit;
640,360
factory.addClass(Chmod.class, "-chmod"); factory.addClass(Chown.class, "-chown"); factory.addClass(Chgrp.class, "-chgrp"); } public static class Chmod extends FsShellPermissions { public static final String NAME = "chmod"; public static final String USAGE = "[-R] <MODE[,MODE]... | OCTALMODE> PATH..."; public static final String DESCRIPTION = "Changes permissions of a file. " + "This works similar to the shell's chmod command with a few exceptions.\n" + "-R: modifies the files recursively. This is the only option" + " currently supported.\n" + "<MODE>: Mode is the same as mode used for the shell's command. " + "The only letters recognized are 'rwxXt', e.g. +t,a+r,g-w,+rwx,o=r.\n" + "<OCTALMODE>: Mode specifed in 3 or 4 digits. If 4 digits, the first " + "may be 1 or 0 to turn the sticky bit on or off, respectively. Unlike " + "the shell command, it is not possible to specify only part of the " + "mode, e.g. 754 is same as u=rwx,g=rx,o=r.\n\n" + "If none of 'augo' is specified, 'a' is assumed and unlike the " + "shell command, no umask is applied."; protected ChmodParser pp;
factory.addClass(Chmod.class, STR); factory.addClass(Chown.class, STR); factory.addClass(Chgrp.class, STR); } public static class Chmod extends FsShellPermissions { public static final String NAME = "chmod"; public static final String USAGE = STR; public static final String DESCRIPTION = STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR; protected ChmodParser pp;
/** * Register the permission related commands with the factory * @param factory the command factory */
Register the permission related commands with the factory
registerCommands
{ "repo_name": "lukmajercak/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FsShellPermissions.java", "license": "apache-2.0", "size": 8541 }
[ "org.apache.hadoop.fs.permission.ChmodParser" ]
import org.apache.hadoop.fs.permission.ChmodParser;
import org.apache.hadoop.fs.permission.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,166,930
public void setRaster(WritableRaster r) { raster = r; DataBuffer db = r.getDataBuffer(); data = ba.getData(db); ba.addDataBufferListener(db, this); if (surfaceDataPtr != 0) { setImageSize(surfaceDataPtr, r.getWidth(), r.getHeight()); } this.width = r.getWidth(); this.height = r.getHeight(); }
void function(WritableRaster r) { raster = r; DataBuffer db = r.getDataBuffer(); data = ba.getData(db); ba.addDataBufferListener(db, this); if (surfaceDataPtr != 0) { setImageSize(surfaceDataPtr, r.getWidth(), r.getHeight()); } this.width = r.getWidth(); this.height = r.getHeight(); }
/** * Supposes that new raster is compatible with an old one * @param r */
Supposes that new raster is compatible with an old one
setRaster
{ "repo_name": "shannah/cn1", "path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/ImageSurface.java", "license": "gpl-2.0", "size": 11173 }
[ "java.awt.image.DataBuffer", "java.awt.image.WritableRaster" ]
import java.awt.image.DataBuffer; import java.awt.image.WritableRaster;
import java.awt.image.*;
[ "java.awt" ]
java.awt;
122,401
int maxFieldFound = getMaxDeclaredFieldNumber(DecryptedGroupChange.class); assertEquals("DecryptedGroupUtil and its tests need updating to account for new fields on " + DecryptedGroupChange.class.getName(), 21, maxFieldFound); }
int maxFieldFound = getMaxDeclaredFieldNumber(DecryptedGroupChange.class); assertEquals(STR + DecryptedGroupChange.class.getName(), 21, maxFieldFound); }
/** * Reflects over the generated protobuf class and ensures that no new fields have been added since we wrote this. * <p> * If we didn't, newly added fields would easily affect {@link DecryptedGroupUtil}'s ability to detect non-empty change states. */
Reflects over the generated protobuf class and ensures that no new fields have been added since we wrote this. If we didn't, newly added fields would easily affect <code>DecryptedGroupUtil</code>'s ability to detect non-empty change states
ensure_DecryptedGroupUtil_knows_about_all_fields_of_DecryptedGroupChange
{ "repo_name": "Turasa/libsignal-service-java", "path": "service/src/test/java/org/whispersystems/signalservice/api/groupsv2/DecryptedGroupUtil_empty_Test.java", "license": "gpl-3.0", "size": 11133 }
[ "org.junit.Assert", "org.signal.storageservice.protos.groups.local.DecryptedGroupChange", "org.whispersystems.signalservice.api.groupsv2.ProtobufTestUtils" ]
import org.junit.Assert; import org.signal.storageservice.protos.groups.local.DecryptedGroupChange; import org.whispersystems.signalservice.api.groupsv2.ProtobufTestUtils;
import org.junit.*; import org.signal.storageservice.protos.groups.local.*; import org.whispersystems.signalservice.api.groupsv2.*;
[ "org.junit", "org.signal.storageservice", "org.whispersystems.signalservice" ]
org.junit; org.signal.storageservice; org.whispersystems.signalservice;
256,222
public static String toUnicode(String s) { if (s == null) return null; try { s = new String(s.getBytes(COMMON_ENCODING), UNICODE); } catch (UnsupportedEncodingException e) { log.error(e); } return s.trim(); }
static String function(String s) { if (s == null) return null; try { s = new String(s.getBytes(COMMON_ENCODING), UNICODE); } catch (UnsupportedEncodingException e) { log.error(e); } return s.trim(); }
/** * Converts a string to unicode * @param s * @return */
Converts a string to unicode
toUnicode
{ "repo_name": "TeamCohen/SEAL", "path": "src/com/rcwang/seal/util/Helper.java", "license": "apache-2.0", "size": 16751 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
1,374,930
@POST @Path("mappers") @Consumes(MediaType.APPLICATION_JSON) public Response addMapper(UserFederationMapperRepresentation mapper) { auth.requireManage(); if (federationProviderModel == null) { throw new NotFoundException("Could not find federation provider"); } UserFederationMapperModel model = RepresentationToModel.toModel(realm, mapper); validateModel(model); model = realm.addUserFederationMapper(model); adminEvent.operation(OperationType.CREATE).resourcePath(uriInfo, model.getId()) .representation(mapper).success(); return Response.created(uriInfo.getAbsolutePathBuilder().path(model.getId()).build()).build(); }
@Path(STR) @Consumes(MediaType.APPLICATION_JSON) Response function(UserFederationMapperRepresentation mapper) { auth.requireManage(); if (federationProviderModel == null) { throw new NotFoundException(STR); } UserFederationMapperModel model = RepresentationToModel.toModel(realm, mapper); validateModel(model); model = realm.addUserFederationMapper(model); adminEvent.operation(OperationType.CREATE).resourcePath(uriInfo, model.getId()) .representation(mapper).success(); return Response.created(uriInfo.getAbsolutePathBuilder().path(model.getId()).build()).build(); }
/** * Create a mapper * * @param mapper * @return */
Create a mapper
addMapper
{ "repo_name": "dbarentine/keycloak", "path": "services/src/main/java/org/keycloak/services/resources/admin/UserFederationProviderResource.java", "license": "apache-2.0", "size": 17097 }
[ "javax.ws.rs.Consumes", "javax.ws.rs.Path", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.jboss.resteasy.spi.NotFoundException", "org.keycloak.events.admin.OperationType", "org.keycloak.models.UserFederationMapperModel", "org.keycloak.models.utils.RepresentationToModel", "org.keycl...
import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.jboss.resteasy.spi.NotFoundException; import org.keycloak.events.admin.OperationType; import org.keycloak.models.UserFederationMapperModel; import org.keycloak.models.utils.RepresentationToModel; import org.keycloak.representations.idm.UserFederationMapperRepresentation;
import javax.ws.rs.*; import javax.ws.rs.core.*; import org.jboss.resteasy.spi.*; import org.keycloak.events.admin.*; import org.keycloak.models.*; import org.keycloak.models.utils.*; import org.keycloak.representations.idm.*;
[ "javax.ws", "org.jboss.resteasy", "org.keycloak.events", "org.keycloak.models", "org.keycloak.representations" ]
javax.ws; org.jboss.resteasy; org.keycloak.events; org.keycloak.models; org.keycloak.representations;
757,433
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "MenthorTools/ontouml-metamodel", "path": "net.menthor.onto2.ontouml.edit/src-gen/net/menthor/onto2/ontouml/provider/EndPointItemProvider.java", "license": "mit", "size": 6879 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,396,092
@Test @WithSystemProperty(key = IGNITE_CLUSTER_NAME, value = "TEST_CLUSTER_NAME") public void testDeactivateWithCheckClusterNameInConfirmationBySystemProperty() throws Exception { IgniteEx igniteEx = startGrid(0); assertFalse(igniteEx.cluster().active()); deactivateActiveOrNotClusterWithCheckClusterNameInConfirmation(igniteEx, "TEST_CLUSTER_NAME"); }
@WithSystemProperty(key = IGNITE_CLUSTER_NAME, value = STR) void function() throws Exception { IgniteEx igniteEx = startGrid(0); assertFalse(igniteEx.cluster().active()); deactivateActiveOrNotClusterWithCheckClusterNameInConfirmation(igniteEx, STR); }
/** * Test the deactivation command on the active and no cluster with checking * the cluster name(which is set through the system property) in * confirmation. * * @throws Exception If failed. * */
Test the deactivation command on the active and no cluster with checking the cluster name(which is set through the system property) in confirmation
testDeactivateWithCheckClusterNameInConfirmationBySystemProperty
{ "repo_name": "andrey-kuznetsov/ignite", "path": "modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java", "license": "apache-2.0", "size": 67072 }
[ "org.apache.ignite.internal.IgniteEx", "org.apache.ignite.testframework.junits.WithSystemProperty" ]
import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.testframework.junits.WithSystemProperty;
import org.apache.ignite.internal.*; import org.apache.ignite.testframework.junits.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,718,168
public void write(byte[] b) throws IOException { write(b, 0, b.length); }
void function(byte[] b) throws IOException { write(b, 0, b.length); }
/** * Delegates to the three-arg version. * @param b the bytearray to write. * @throws IOException if there is a problem. */
Delegates to the three-arg version
write
{ "repo_name": "BIORIMP/biorimp", "path": "BIO-RIMP/test_data/code/antapache/src/main/org/apache/tools/ant/util/LazyFileOutputStream.java", "license": "gpl-2.0", "size": 4944 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,882,692
public boolean hit(Rectangle rect, Shape s, boolean onStroke) { return s.intersects(rect); }
boolean function(Rectangle rect, Shape s, boolean onStroke) { return s.intersects(rect); }
/** * Checks whether or not the specified Shape intersects the specified * Rectangle, which is in device space. */
Checks whether or not the specified Shape intersects the specified Rectangle, which is in device space
hit
{ "repo_name": "OpenSourcePhysics/osp", "path": "src/org/jibble/epsgraphics/EpsGraphics2D.java", "license": "gpl-3.0", "size": 40716 }
[ "java.awt.Rectangle", "java.awt.Shape" ]
import java.awt.Rectangle; import java.awt.Shape;
import java.awt.*;
[ "java.awt" ]
java.awt;
117,300
public Map<String, String> getSystemProperties() { return ImmutableMap.copyOf(systemProperties); }
Map<String, String> function() { return ImmutableMap.copyOf(systemProperties); }
/** * Retrieves Java <code>-D</code> style options as map * @return a map for Java options */
Retrieves Java <code>-D</code> style options as map
getSystemProperties
{ "repo_name": "wavesoftware/java-gasper", "path": "src/main/java/pl/wavesoftware/gasper/internal/Settings.java", "license": "apache-2.0", "size": 3104 }
[ "com.google.common.collect.ImmutableMap", "java.util.Map" ]
import com.google.common.collect.ImmutableMap; import java.util.Map;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
967,735
private void applyDemoOptionsToClusterkrafOptions( com.twotoasters.clusterkraf.Options options) { options.setTransitionDuration(this.options.transitionDuration); Interpolator interpolator = null; try { interpolator = (Interpolator) Class.forName( this.options.transitionInterpolator).newInstance(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } options.setTransitionInterpolator(interpolator); options.setPixelDistanceToJoinCluster(getPixelDistanceToJoinCluster()); options.setZoomToBoundsAnimationDuration(this.options.zoomToBoundsAnimationDuration); options.setShowInfoWindowAnimationDuration(this.options.showInfoWindowAnimationDuration); options.setExpandBoundsFactor(this.options.expandBoundsFactor); options.setSinglePointClickBehavior(this.options.singlePointClickBehavior); options.setClusterClickBehavior(this.options.clusterClickBehavior); options.setClusterInfoWindowClickBehavior(this.options.clusterInfoWindowClickBehavior); options.setZoomToBoundsPadding(getResources().getDrawable( R.drawable.ic_map_pin_cluster).getIntrinsicHeight()); options.setMarkerOptionsChooser(new ToastedMarkerOptionsChooser(this, inputPoints.get(0))); options.setOnMarkerClickDownstreamListener(new ToastedOnMarkerClickDownstreamListener( this)); options.setProcessingListener(this); }
void function( com.twotoasters.clusterkraf.Options options) { options.setTransitionDuration(this.options.transitionDuration); Interpolator interpolator = null; try { interpolator = (Interpolator) Class.forName( this.options.transitionInterpolator).newInstance(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } options.setTransitionInterpolator(interpolator); options.setPixelDistanceToJoinCluster(getPixelDistanceToJoinCluster()); options.setZoomToBoundsAnimationDuration(this.options.zoomToBoundsAnimationDuration); options.setShowInfoWindowAnimationDuration(this.options.showInfoWindowAnimationDuration); options.setExpandBoundsFactor(this.options.expandBoundsFactor); options.setSinglePointClickBehavior(this.options.singlePointClickBehavior); options.setClusterClickBehavior(this.options.clusterClickBehavior); options.setClusterInfoWindowClickBehavior(this.options.clusterInfoWindowClickBehavior); options.setZoomToBoundsPadding(getResources().getDrawable( R.drawable.ic_map_pin_cluster).getIntrinsicHeight()); options.setMarkerOptionsChooser(new ToastedMarkerOptionsChooser(this, inputPoints.get(0))); options.setOnMarkerClickDownstreamListener(new ToastedOnMarkerClickDownstreamListener( this)); options.setProcessingListener(this); }
/** * Applies the sample.SampleActivity.Options chosen in Normal or Advanced * mode menus to the clusterkraf.Options which will be used to construct our * Clusterkraf instance * * @param options */
Applies the sample.SampleActivity.Options chosen in Normal or Advanced mode menus to the clusterkraf.Options which will be used to construct our Clusterkraf instance
applyDemoOptionsToClusterkrafOptions
{ "repo_name": "actgov/Mobile-Canberra", "path": "Mobile Canberra Android/src/com/imagineteam/mobilecanberraphase2/MapActivity.java", "license": "mit", "size": 37541 }
[ "android.view.animation.Interpolator", "com.imagineteam.dataobjects.ToastedMarkerOptionsChooser", "com.imagineteam.dataobjects.ToastedOnMarkerClickDownstreamListener" ]
import android.view.animation.Interpolator; import com.imagineteam.dataobjects.ToastedMarkerOptionsChooser; import com.imagineteam.dataobjects.ToastedOnMarkerClickDownstreamListener;
import android.view.animation.*; import com.imagineteam.dataobjects.*;
[ "android.view", "com.imagineteam.dataobjects" ]
android.view; com.imagineteam.dataobjects;
1,626,085
public File getPath() { return path; }
File function() { return path; }
/** * Returns the path of the music folder. * * @return The path of the music folder. */
Returns the path of the music folder
getPath
{ "repo_name": "Booksonic-Server/madsonic-main", "path": "src/main/java/org/madsonic/domain/MusicFolder.java", "license": "gpl-3.0", "size": 7928 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,504,055
public Vertex vertexFromJson(final JsonNode json) throws IOException { final Map<String, Object> props = readProperties(json, true, this.hasEmbeddedTypes); final Object vertexId = getTypedValueFromJsonNode(json.get(GraphSONTokens._ID)); final Vertex v = factory.createVertex(vertexId); for (Map.Entry<String, Object> entry : props.entrySet()) { //if (this.vertexPropertyKeys == null || vertexPropertyKeys.contains(entry.getKey())) { if (includeKey(entry.getKey(), vertexPropertyKeys, this.vertexPropertiesRule)) { v.setProperty(entry.getKey(), entry.getValue()); } } return v; }
Vertex function(final JsonNode json) throws IOException { final Map<String, Object> props = readProperties(json, true, this.hasEmbeddedTypes); final Object vertexId = getTypedValueFromJsonNode(json.get(GraphSONTokens._ID)); final Vertex v = factory.createVertex(vertexId); for (Map.Entry<String, Object> entry : props.entrySet()) { if (includeKey(entry.getKey(), vertexPropertyKeys, this.vertexPropertiesRule)) { v.setProperty(entry.getKey(), entry.getValue()); } } return v; }
/** * Creates a vertex from GraphSON using settings supplied in the constructor. */
Creates a vertex from GraphSON using settings supplied in the constructor
vertexFromJson
{ "repo_name": "echinopsii/net.echinopsii.3rdparty.blueprints", "path": "blueprints-core/src/main/java/com/tinkerpop/blueprints/util/io/graphson/GraphSONUtility.java", "license": "bsd-3-clause", "size": 37947 }
[ "com.fasterxml.jackson.databind.JsonNode", "com.tinkerpop.blueprints.Vertex", "java.io.IOException", "java.util.Map" ]
import com.fasterxml.jackson.databind.JsonNode; import com.tinkerpop.blueprints.Vertex; import java.io.IOException; import java.util.Map;
import com.fasterxml.jackson.databind.*; import com.tinkerpop.blueprints.*; import java.io.*; import java.util.*;
[ "com.fasterxml.jackson", "com.tinkerpop.blueprints", "java.io", "java.util" ]
com.fasterxml.jackson; com.tinkerpop.blueprints; java.io; java.util;
383,317
private void authenticateClient(OAuthClientAuthenticator oAuthClientAuthenticator, OAuthClientAuthnContext oAuthClientAuthnContext, HttpServletRequest request, Map<String, List> bodyContentMap) throws OAuthClientAuthnException { boolean isAuthenticated = oAuthClientAuthenticator.authenticateClient(request, bodyContentMap, oAuthClientAuthnContext); if (log.isDebugEnabled()) { log.debug("Authentication result from OAuth client authenticator " + oAuthClientAuthenticator.getName() + " is : " + isAuthenticated); } oAuthClientAuthnContext.setAuthenticated(isAuthenticated); if (!isAuthenticated) { setErrorToContext(OAuth2ErrorCodes.INVALID_CLIENT, "Client credentials are invalid.", oAuthClientAuthnContext); } }
void function(OAuthClientAuthenticator oAuthClientAuthenticator, OAuthClientAuthnContext oAuthClientAuthnContext, HttpServletRequest request, Map<String, List> bodyContentMap) throws OAuthClientAuthnException { boolean isAuthenticated = oAuthClientAuthenticator.authenticateClient(request, bodyContentMap, oAuthClientAuthnContext); if (log.isDebugEnabled()) { log.debug(STR + oAuthClientAuthenticator.getName() + STR + isAuthenticated); } oAuthClientAuthnContext.setAuthenticated(isAuthenticated); if (!isAuthenticated) { setErrorToContext(OAuth2ErrorCodes.INVALID_CLIENT, STR, oAuthClientAuthnContext); } }
/** * Authenticate an OAuth client using a given client authenticator. * * @param oAuthClientAuthenticator OAuth client authenticator. * @param oAuthClientAuthnContext OAuth client authentication context. * @param request Incoming HttpServletRequest. * @param bodyContentMap Content of the body as a parameter map. * @throws OAuthClientAuthnException OAuth Client Authentication Exception. */
Authenticate an OAuth client using a given client authenticator
authenticateClient
{ "repo_name": "darshanasbg/identity-inbound-auth-oauth", "path": "components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/client/authentication/OAuthClientAuthnService.java", "license": "apache-2.0", "size": 11682 }
[ "java.util.List", "java.util.Map", "javax.servlet.http.HttpServletRequest", "org.wso2.carbon.identity.oauth.common.OAuth2ErrorCodes", "org.wso2.carbon.identity.oauth2.bean.OAuthClientAuthnContext" ]
import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.wso2.carbon.identity.oauth.common.OAuth2ErrorCodes; import org.wso2.carbon.identity.oauth2.bean.OAuthClientAuthnContext;
import java.util.*; import javax.servlet.http.*; import org.wso2.carbon.identity.oauth.common.*; import org.wso2.carbon.identity.oauth2.bean.*;
[ "java.util", "javax.servlet", "org.wso2.carbon" ]
java.util; javax.servlet; org.wso2.carbon;
2,348,608
private static Scene dbToScene(Cursor c) throws Exception { long id = c.getLong(0); long apartmentId = c.getLong(1); String name = c.getString(2); int position = c.getInt(3); Scene scene = new Scene(id, apartmentId, name); for (SceneItem item : SceneItemHandler.getSceneItems(scene.getId())) { scene.addSceneItem(item); } return scene; }
static Scene function(Cursor c) throws Exception { long id = c.getLong(0); long apartmentId = c.getLong(1); String name = c.getString(2); int position = c.getInt(3); Scene scene = new Scene(id, apartmentId, name); for (SceneItem item : SceneItemHandler.getSceneItems(scene.getId())) { scene.addSceneItem(item); } return scene; }
/** * Creates a Scene Object out of Database information * * @param c cursor pointing to a Scene database entry * @return Scene */
Creates a Scene Object out of Database information
dbToScene
{ "repo_name": "Power-Switch/PowerSwitch_Android", "path": "Smartphone/src/main/java/eu/power_switch/database/handler/SceneHandler.java", "license": "gpl-3.0", "size": 6134 }
[ "android.database.Cursor", "eu.power_switch.obj.Scene", "eu.power_switch.obj.SceneItem" ]
import android.database.Cursor; import eu.power_switch.obj.Scene; import eu.power_switch.obj.SceneItem;
import android.database.*; import eu.power_switch.obj.*;
[ "android.database", "eu.power_switch.obj" ]
android.database; eu.power_switch.obj;
161,707
public boolean containsInterval(ExecutionInterval begin, ExecutionInterval end) { if (begin.isAfterOrEquals(getBeginExecutionPeriod())) { return (getEndExecutionPeriod() == null) || (end != null && !end.isAfter(getEndExecutionPeriod())); } else { return false; } }
boolean function(ExecutionInterval begin, ExecutionInterval end) { if (begin.isAfterOrEquals(getBeginExecutionPeriod())) { return (getEndExecutionPeriod() == null) (end != null && !end.isAfter(getEndExecutionPeriod())); } else { return false; } }
/** * * Beware of {@link #contains(ExecutionSemester, ExecutionSemester)} method because it only checks for intersection, not a * full * contains. * * This method ensures that begin and end are contained within context interval * * @return */
Beware of <code>#contains(ExecutionSemester, ExecutionSemester)</code> method because it only checks for intersection, not a full contains. This method ensures that begin and end are contained within context interval
containsInterval
{ "repo_name": "cfscosta/fenix", "path": "src/main/java/org/fenixedu/academic/domain/degreeStructure/Context.java", "license": "lgpl-3.0", "size": 21159 }
[ "org.fenixedu.academic.domain.ExecutionInterval" ]
import org.fenixedu.academic.domain.ExecutionInterval;
import org.fenixedu.academic.domain.*;
[ "org.fenixedu.academic" ]
org.fenixedu.academic;
2,602,015
public List<Itinerary> getItineraries() { return _type.getItineraries(); }
List<Itinerary> function() { return _type.getItineraries(); }
/** * Gets all itineraries the passenger has * * @return an read-only list of itineraries * @see Passenger.PassengerType#getItineraries() */
Gets all itineraries the passenger has
getItineraries
{ "repo_name": "RafaelPAndrade/LEIC-A-IST", "path": "PO/Proj/mmt-core/src/mmt/Passenger.java", "license": "mit", "size": 9473 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
697,628
public NetworkInterfaceLoadBalancersClient getNetworkInterfaceLoadBalancers() { return this.networkInterfaceLoadBalancers; } private final NetworkInterfaceTapConfigurationsClient networkInterfaceTapConfigurations;
NetworkInterfaceLoadBalancersClient function() { return this.networkInterfaceLoadBalancers; } private final NetworkInterfaceTapConfigurationsClient networkInterfaceTapConfigurations;
/** * Gets the NetworkInterfaceLoadBalancersClient object to access its operations. * * @return the NetworkInterfaceLoadBalancersClient object. */
Gets the NetworkInterfaceLoadBalancersClient object to access its operations
getNetworkInterfaceLoadBalancers
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagementClientImpl.java", "license": "mit", "size": 60665 }
[ "com.azure.resourcemanager.network.fluent.NetworkInterfaceLoadBalancersClient", "com.azure.resourcemanager.network.fluent.NetworkInterfaceTapConfigurationsClient" ]
import com.azure.resourcemanager.network.fluent.NetworkInterfaceLoadBalancersClient; import com.azure.resourcemanager.network.fluent.NetworkInterfaceTapConfigurationsClient;
import com.azure.resourcemanager.network.fluent.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
1,107,360
static Session fromSessionToken(UUID sesTokId) { return new Session(UUID.randomUUID(), sesTokId); }
static Session fromSessionToken(UUID sesTokId) { return new Session(UUID.randomUUID(), sesTokId); }
/** * Static constructor. * * @param sesTokId Session token ID. * @return New session instance with random client ID and given session ID. */
Static constructor
fromSessionToken
{ "repo_name": "NSAmelchev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java", "license": "apache-2.0", "size": 43655 }
[ "java.util.UUID" ]
import java.util.UUID;
import java.util.*;
[ "java.util" ]
java.util;
2,915,781
public DocTemplateFinder getDocTemplateFinder() { return docTemplateFinder; }
DocTemplateFinder function() { return docTemplateFinder; }
/** * Returns the doc template finder. * * @return the doc template finder */
Returns the doc template finder
getDocTemplateFinder
{ "repo_name": "openegovplatform/OEPv2", "path": "oep-core-dossiermgt-portlet/docroot/WEB-INF/src/org/oep/core/dossiermgt/service/base/DocTemplateServiceBaseImpl.java", "license": "apache-2.0", "size": 52581 }
[ "org.oep.core.dossiermgt.service.persistence.DocTemplateFinder" ]
import org.oep.core.dossiermgt.service.persistence.DocTemplateFinder;
import org.oep.core.dossiermgt.service.persistence.*;
[ "org.oep.core" ]
org.oep.core;
1,742,201
@Override public synchronized void onGetCompleted(List<OcHeaderOption> headerOptionList, OcRepresentation ocRepresentation) { logMessage("Got a response from " + ocRepresentation.getUri()); }
synchronized void function(List<OcHeaderOption> headerOptionList, OcRepresentation ocRepresentation) { logMessage(STR + ocRepresentation.getUri()); }
/** * An event handler to be executed whenever a "get" request completes successfully * * @param headerOptionList list of the header options * @param ocRepresentation representation of a resource */
An event handler to be executed whenever a "get" request completes successfully
onGetCompleted
{ "repo_name": "kadasaikumar/iotivity-1.2.1", "path": "android/examples/fridgeclient/src/main/java/org/iotivity/base/examples/FridgeClient.java", "license": "gpl-3.0", "size": 9998 }
[ "java.util.List", "org.iotivity.base.OcHeaderOption", "org.iotivity.base.OcRepresentation" ]
import java.util.List; import org.iotivity.base.OcHeaderOption; import org.iotivity.base.OcRepresentation;
import java.util.*; import org.iotivity.base.*;
[ "java.util", "org.iotivity.base" ]
java.util; org.iotivity.base;
2,072,507
public Timestamp getDateLastRun () { return (Timestamp)get_Value(COLUMNNAME_DateLastRun); }
Timestamp function () { return (Timestamp)get_Value(COLUMNNAME_DateLastRun); }
/** Get Date last run. @return Date the process was last run. */
Get Date last run
getDateLastRun
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/X_AD_LdapProcessor.java", "license": "gpl-2.0", "size": 7195 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,114,313
int prepareTestSession(final TestTree tree);
int prepareTestSession(final TestTree tree);
/** * Prepares a test session with the given {@link TestTree test tree} argument. * * @param tree * the test tree for the test session. * @return port number used */
Prepares a test session with the given <code>TestTree test tree</code> argument
prepareTestSession
{ "repo_name": "lbeurerkellner/n4js", "path": "plugins/org.eclipse.n4js.tester/src/org/eclipse/n4js/tester/TesterFacade.java", "license": "epl-1.0", "size": 1320 }
[ "org.eclipse.n4js.tester.domain.TestTree" ]
import org.eclipse.n4js.tester.domain.TestTree;
import org.eclipse.n4js.tester.domain.*;
[ "org.eclipse.n4js" ]
org.eclipse.n4js;
2,103,279
@Nullable public static Symbol getDeclaredSymbol(Tree tree) { if (tree instanceof PackageTree) { return getSymbol((PackageTree) tree); } if (tree instanceof TypeParameterTree) { Type type = ((JCTypeParameter) tree).type; return type == null ? null : type.tsym; } if (tree instanceof ClassTree) { return getSymbol((ClassTree) tree); } if (tree instanceof MethodTree) { return getSymbol((MethodTree) tree); } if (tree instanceof VariableTree) { return getSymbol((VariableTree) tree); } return null; }
static Symbol function(Tree tree) { if (tree instanceof PackageTree) { return getSymbol((PackageTree) tree); } if (tree instanceof TypeParameterTree) { Type type = ((JCTypeParameter) tree).type; return type == null ? null : type.tsym; } if (tree instanceof ClassTree) { return getSymbol((ClassTree) tree); } if (tree instanceof MethodTree) { return getSymbol((MethodTree) tree); } if (tree instanceof VariableTree) { return getSymbol((VariableTree) tree); } return null; }
/** * Gets the symbol declared by a tree. Returns null if {@code tree} does not declare a symbol or * is null. */
Gets the symbol declared by a tree. Returns null if tree does not declare a symbol or is null
getDeclaredSymbol
{ "repo_name": "google/error-prone", "path": "check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java", "license": "apache-2.0", "size": 89646 }
[ "com.sun.source.tree.ClassTree", "com.sun.source.tree.MethodTree", "com.sun.source.tree.PackageTree", "com.sun.source.tree.Tree", "com.sun.source.tree.TypeParameterTree", "com.sun.source.tree.VariableTree", "com.sun.tools.javac.code.Symbol", "com.sun.tools.javac.code.Type", "com.sun.tools.javac.tree...
import com.sun.source.tree.ClassTree; import com.sun.source.tree.MethodTree; import com.sun.source.tree.PackageTree; import com.sun.source.tree.Tree; import com.sun.source.tree.TypeParameterTree; import com.sun.source.tree.VariableTree; import com.sun.tools.javac.code.Symbol; import com.sun.tools.javac.code.Type; import com.sun.tools.javac.tree.JCTree;
import com.sun.source.tree.*; import com.sun.tools.javac.code.*; import com.sun.tools.javac.tree.*;
[ "com.sun.source", "com.sun.tools" ]
com.sun.source; com.sun.tools;
1,305,128
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> listRoutesTableWithResponseAsync( String resourceGroupName, String circuitName, String peeringName, String devicePath, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (circuitName == null) { return Mono.error(new IllegalArgumentException("Parameter circuitName is required and cannot be null.")); } if (peeringName == null) { return Mono.error(new IllegalArgumentException("Parameter peeringName is required and cannot be null.")); } if (devicePath == null) { return Mono.error(new IllegalArgumentException("Parameter devicePath is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service .listRoutesTable( this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, devicePath, apiVersion, this.client.getSubscriptionId(), accept, context); }
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String circuitName, String peeringName, String devicePath, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException(STR)); } if (circuitName == null) { return Mono.error(new IllegalArgumentException(STR)); } if (peeringName == null) { return Mono.error(new IllegalArgumentException(STR)); } if (devicePath == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String apiVersion = STR; final String accept = STR; context = this.client.mergeContext(context); return service .listRoutesTable( this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, devicePath, apiVersion, this.client.getSubscriptionId(), accept, context); }
/** * Gets the currently advertised routes table associated with the express route circuit in a resource group. * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @param peeringName The name of the peering. * @param devicePath The path of the device. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the currently advertised routes table associated with the express route circuit in a resource group along * with {@link Response} on successful completion of {@link Mono}. */
Gets the currently advertised routes table associated with the express route circuit in a resource group
listRoutesTableWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitsClientImpl.java", "license": "mit", "size": 143721 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "java.nio.ByteBuffer" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import java.nio.*;
[ "com.azure.core", "java.nio" ]
com.azure.core; java.nio;
2,427,413
public K header(String name, String value) { if (headers == null) { headers = new HashMap<String, String>(); } headers.put(name, value); return self(); }
K function(String name, String value) { if (headers == null) { headers = new HashMap<String, String>(); } headers.put(name, value); return self(); }
/** * Set the header fields for the http request. * * @param name the name * @param value the value * @return self */
Set the header fields for the http request
header
{ "repo_name": "bblue000/ExoPlayerDemo", "path": "vsbase/src/main/java/com/androidquery/callback/AbstractAjaxCallback.java", "license": "apache-2.0", "size": 60679 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
779,158
@Test public void whenFindItemByNameThenShowsItems() { ByteArrayOutputStream out = new ByteArrayOutputStream(); System.setOut(new PrintStream(out)); ITracker tracker = new Tracker(); Item item1 = new Item("name", "desc1", 1); Item item2 = new Item("name", "desc2", 1); tracker.add(item1); tracker.add(item2); Input input = mock(Input.class); when(input.ask(any(String.class))).thenReturn("name"); MenuTracker menuTracker = new MenuTracker(input, tracker); menuTracker.fillActions(); menuTracker.select(5); assertThat( out.toString().split("\n")[0], is(String.format("id: %s, name: %s, description: %s, created date: %d", item1.getId(), item1.getName(), item1.getDesctiption(), item1.getCreate() )) ); assertThat( out.toString().split("\n")[1], is(String.format("id: %s, name: %s, description: %s, created date: %d", item2.getId(), item2.getName(), item2.getDesctiption(), item2.getCreate() )) ); }
void function() { ByteArrayOutputStream out = new ByteArrayOutputStream(); System.setOut(new PrintStream(out)); ITracker tracker = new Tracker(); Item item1 = new Item("name", "desc1", 1); Item item2 = new Item("name", "desc2", 1); tracker.add(item1); tracker.add(item2); Input input = mock(Input.class); when(input.ask(any(String.class))).thenReturn("name"); MenuTracker menuTracker = new MenuTracker(input, tracker); menuTracker.fillActions(); menuTracker.select(5); assertThat( out.toString().split("\n")[0], is(String.format(STR, item1.getId(), item1.getName(), item1.getDesctiption(), item1.getCreate() )) ); assertThat( out.toString().split("\n")[1], is(String.format(STR, item2.getId(), item2.getName(), item2.getDesctiption(), item2.getCreate() )) ); }
/** * Test for FindItemByName action. */
Test for FindItemByName action
whenFindItemByNameThenShowsItems
{ "repo_name": "IvanBelyaev/ibelyaev", "path": "chapter_002/src/test/java/ru/job4j/tracker/MenuTrackerTest.java", "license": "apache-2.0", "size": 4705 }
[ "java.io.ByteArrayOutputStream", "java.io.PrintStream", "org.hamcrest.MatcherAssert", "org.hamcrest.core.Is", "org.mockito.Mockito" ]
import java.io.ByteArrayOutputStream; import java.io.PrintStream; import org.hamcrest.MatcherAssert; import org.hamcrest.core.Is; import org.mockito.Mockito;
import java.io.*; import org.hamcrest.*; import org.hamcrest.core.*; import org.mockito.*;
[ "java.io", "org.hamcrest", "org.hamcrest.core", "org.mockito" ]
java.io; org.hamcrest; org.hamcrest.core; org.mockito;
1,958,809
@SystemApi(client = MODULE_LIBRARIES) public static void setreuid(int ruid, int euid) throws ErrnoException { Libcore.os.setreuid(ruid, euid); }
@SystemApi(client = MODULE_LIBRARIES) public static void setreuid(int ruid, int euid) throws ErrnoException { Libcore.os.setreuid(ruid, euid); }
/** * Set real and/or effective group ID of the calling process. * * See <a href="http://man7.org/linux/man-pages/man2/setregid.2.html">setregid(2)</a>. * * @param rgid real group ID * @param egid effective group ID * @throws ErrnoException one or more of the target group IDs is not valid * in this user namespace; or the calling process is * not privileged * * @hide */
Set real and/or effective group ID of the calling process. See setregid(2)
setregid
{ "repo_name": "google/desugar_jdk_libs", "path": "jdk11/src/libcore/luni/src/main/java/android/system/Os.java", "license": "gpl-2.0", "size": 48512 }
[ "android.annotation.SystemApi" ]
import android.annotation.SystemApi;
import android.annotation.*;
[ "android.annotation" ]
android.annotation;
1,131,273
static public String getIntentAction(Intent aIntent) { if (aIntent!=null) return aIntent.getAction(); else return null; }
static String function(Intent aIntent) { if (aIntent!=null) return aIntent.getAction(); else return null; }
/** * Get the intent's action, if any * * @param aIntent - the intent to extract the information from. * @return Returns the action defined in the intent */
Get the intent's action, if any
getIntentAction
{ "repo_name": "baracudda/androidBits", "path": "lib_androidBits/src/main/java/com/blackmoonit/androidbits/content/BitsIntent.java", "license": "apache-2.0", "size": 9815 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
951,439
private void unwindPendingAcks(WalStateDistributedProcess proc) { assert Thread.holdsLock(mux); Iterator<WalStateAckMessage> iter = pendingAcks.iterator(); while (iter.hasNext()) { WalStateAckMessage ackMsg = iter.next(); if (F.eq(proc.operationId(), ackMsg.operationId())) { proc.onNodeFinished(ackMsg.senderNodeId(), ackMsg); iter.remove(); } } }
void function(WalStateDistributedProcess proc) { assert Thread.holdsLock(mux); Iterator<WalStateAckMessage> iter = pendingAcks.iterator(); while (iter.hasNext()) { WalStateAckMessage ackMsg = iter.next(); if (F.eq(proc.operationId(), ackMsg.operationId())) { proc.onNodeFinished(ackMsg.senderNodeId(), ackMsg); iter.remove(); } } }
/** * Unwind pending ack messages for the given distributed process. * * @param proc Process. */
Unwind pending ack messages for the given distributed process
unwindPendingAcks
{ "repo_name": "psadusumilli/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/WalStateManager.java", "license": "apache-2.0", "size": 31670 }
[ "java.util.Iterator", "org.apache.ignite.internal.util.typedef.F" ]
import java.util.Iterator; import org.apache.ignite.internal.util.typedef.F;
import java.util.*; import org.apache.ignite.internal.util.typedef.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
153,930
public StorageAccount withLastGeoFailoverTime(DateTime lastGeoFailoverTime) { this.lastGeoFailoverTime = lastGeoFailoverTime; return this; }
StorageAccount function(DateTime lastGeoFailoverTime) { this.lastGeoFailoverTime = lastGeoFailoverTime; return this; }
/** * Set the lastGeoFailoverTime value. * * @param lastGeoFailoverTime the lastGeoFailoverTime value to set * @return the StorageAccount object itself. */
Set the lastGeoFailoverTime value
withLastGeoFailoverTime
{ "repo_name": "dsgouda/autorest", "path": "Samples/3c-guards/OtherClient/models/StorageAccount.java", "license": "mit", "size": 9214 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
2,211,241
public static String getMimeType(final File file) { if (file != null) { return ImportDataFileInfo.getMimeType(file.getName()); } else { return null; } }
static String function(final File file) { if (file != null) { return ImportDataFileInfo.getMimeType(file.getName()); } else { return null; } }
/** * Returns mime type for an extension. * @param file the file to check * @return the mimeType; */
Returns mime type for an extension
getMimeType
{ "repo_name": "specify/specify6", "path": "src/edu/ku/brc/specify/tasks/subpane/wb/ImportDataFileInfo.java", "license": "gpl-2.0", "size": 7636 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,897,840
@Test(expected = ParseException.class) public void testIllustrateShortcutNoAliasDefined() throws Throwable { String cmd = "\\i"; ByteArrayInputStream cmdstream = new ByteArrayInputStream(cmd.getBytes()); InputStreamReader reader = new InputStreamReader(cmdstream); Grunt grunt = new Grunt(new BufferedReader(reader), context); grunt.exec(); }
@Test(expected = ParseException.class) void function() throws Throwable { String cmd = "\\i"; ByteArrayInputStream cmdstream = new ByteArrayInputStream(cmd.getBytes()); InputStreamReader reader = new InputStreamReader(cmdstream); Grunt grunt = new Grunt(new BufferedReader(reader), context); grunt.exec(); }
/** * When no alias is defined, exception is expected * * @throws Throwable */
When no alias is defined, exception is expected
testIllustrateShortcutNoAliasDefined
{ "repo_name": "miyakawataku/piggybank-ltsv", "path": "test/org/apache/pig/test/TestShortcuts.java", "license": "apache-2.0", "size": 11180 }
[ "java.io.BufferedReader", "java.io.ByteArrayInputStream", "java.io.InputStreamReader", "org.apache.pig.tools.grunt.Grunt", "org.apache.pig.tools.pigscript.parser.ParseException", "org.junit.Test" ]
import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.InputStreamReader; import org.apache.pig.tools.grunt.Grunt; import org.apache.pig.tools.pigscript.parser.ParseException; import org.junit.Test;
import java.io.*; import org.apache.pig.tools.grunt.*; import org.apache.pig.tools.pigscript.parser.*; import org.junit.*;
[ "java.io", "org.apache.pig", "org.junit" ]
java.io; org.apache.pig; org.junit;
1,469,324
final public void Text() throws ParseException { ASTText jjtn000 = new ASTText(this, JJTTEXT); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TEXT: jj_consume_token(TEXT); break; case DOT: jj_consume_token(DOT); break; case RPAREN: jj_consume_token(RPAREN); break; case LPAREN: jj_consume_token(LPAREN); break; case INTEGER_LITERAL: jj_consume_token(INTEGER_LITERAL); break; case FLOATING_POINT_LITERAL: jj_consume_token(FLOATING_POINT_LITERAL); break; case STRING_LITERAL: jj_consume_token(STRING_LITERAL); break; case ESCAPE: jj_consume_token(ESCAPE); break; case LCURLY: jj_consume_token(LCURLY); break; case RCURLY: jj_consume_token(RCURLY); break; case EMPTY_INDEX: jj_consume_token(EMPTY_INDEX); break; default: jj_la1[41] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } }
final void function() throws ParseException { ASTText jjtn000 = new ASTText(this, JJTTEXT); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TEXT: jj_consume_token(TEXT); break; case DOT: jj_consume_token(DOT); break; case RPAREN: jj_consume_token(RPAREN); break; case LPAREN: jj_consume_token(LPAREN); break; case INTEGER_LITERAL: jj_consume_token(INTEGER_LITERAL); break; case FLOATING_POINT_LITERAL: jj_consume_token(FLOATING_POINT_LITERAL); break; case STRING_LITERAL: jj_consume_token(STRING_LITERAL); break; case ESCAPE: jj_consume_token(ESCAPE); break; case LCURLY: jj_consume_token(LCURLY); break; case RCURLY: jj_consume_token(RCURLY); break; case EMPTY_INDEX: jj_consume_token(EMPTY_INDEX); break; default: jj_la1[41] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } }
/** * This method is responsible for allowing * all non-grammar text to pass through * unscathed. */
This method is responsible for allowing all non-grammar text to pass through unscathed
Text
{ "repo_name": "dotCMS/core", "path": "dotCMS/src/main/java/org/apache/velocity/runtime/parser/Parser.java", "license": "gpl-3.0", "size": 105896 }
[ "org.apache.velocity.runtime.parser.node.ASTText" ]
import org.apache.velocity.runtime.parser.node.ASTText;
import org.apache.velocity.runtime.parser.node.*;
[ "org.apache.velocity" ]
org.apache.velocity;
603,737
public static float getFloat(Context context, String key) { return getFloat(context, key, -1); }
static float function(Context context, String key) { return getFloat(context, key, -1); }
/** * get float preferences * * @param context * @param key The name of the preference to retrieve * @return The preference value if it exists, or -1. Throws ClassCastException if there is a preference with this * name that is not a float * @see #getFloat(Context, String, float) */
get float preferences
getFloat
{ "repo_name": "a616707902/Commoner", "path": "Commoner/library/src/main/java/com/example/chenpan/library/util/PreferencesUtils.java", "license": "apache-2.0", "size": 9751 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
2,306,652
public boolean subscribe(String mailboxName) throws IOException { return doCommand (IMAPCommand.SUBSCRIBE, mailboxName); }
boolean function(String mailboxName) throws IOException { return doCommand (IMAPCommand.SUBSCRIBE, mailboxName); }
/** * Send a SUBSCRIBE command to the server. * @param mailboxName The mailbox name to subscribe to. * @return {@code true} if the command was successful,{@code false} if not. * @exception IOException If a network I/O error occurs. */
Send a SUBSCRIBE command to the server
subscribe
{ "repo_name": "mohanaraosv/commons-net", "path": "src/main/java/org/apache/commons/net/imap/IMAPClient.java", "license": "apache-2.0", "size": 21900 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
984,262
public void setRefEntityTypeValue(String refEntityTypeValue) throws JNCException { setRefEntityTypeValue(new YangString(refEntityTypeValue)); }
void function(String refEntityTypeValue) throws JNCException { setRefEntityTypeValue(new YangString(refEntityTypeValue)); }
/** * Sets the value for child leaf "ref-entity-type", * using a String value. * @param refEntityTypeValue used during instantiation. */
Sets the value for child leaf "ref-entity-type", using a String value
setRefEntityTypeValue
{ "repo_name": "jnpr-shinma/yangfile", "path": "hitel/src/hctaEpc/mmeSgsn/statistics/gtpv2/Tunnel.java", "license": "apache-2.0", "size": 11327 }
[ "com.tailf.jnc.YangString" ]
import com.tailf.jnc.YangString;
import com.tailf.jnc.*;
[ "com.tailf.jnc" ]
com.tailf.jnc;
1,534,704
protected void fireHierarchyChangeEvt(HierarchyChangeEvent evt) { for (HierarchyChangeListener l : hierarchyListeners) { l.hierarchyChangePerformed(evt); } }
void function(HierarchyChangeEvent evt) { for (HierarchyChangeListener l : hierarchyListeners) { l.hierarchyChangePerformed(evt); } }
/** * Notify listeners of changes to this hierarchy */
Notify listeners of changes to this hierarchy
fireHierarchyChangeEvt
{ "repo_name": "manuel-freire/ac2", "path": "clover/src/main/java/es/ucm/fdi/clover/model/ClusterHierarchy.java", "license": "gpl-3.0", "size": 21005 }
[ "es.ucm.fdi.clover.event.HierarchyChangeEvent", "es.ucm.fdi.clover.event.HierarchyChangeListener" ]
import es.ucm.fdi.clover.event.HierarchyChangeEvent; import es.ucm.fdi.clover.event.HierarchyChangeListener;
import es.ucm.fdi.clover.event.*;
[ "es.ucm.fdi" ]
es.ucm.fdi;
1,167,605
void filterConsumer(Exchange exchange, WebServiceMessage response);
void filterConsumer(Exchange exchange, WebServiceMessage response);
/** * Calls filter for a consumer * * @param exchange the exchange * @param response provided by the consumer */
Calls filter for a consumer
filterConsumer
{ "repo_name": "YMartsynkevych/camel", "path": "components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/filter/MessageFilter.java", "license": "apache-2.0", "size": 1629 }
[ "org.apache.camel.Exchange", "org.springframework.ws.WebServiceMessage" ]
import org.apache.camel.Exchange; import org.springframework.ws.WebServiceMessage;
import org.apache.camel.*; import org.springframework.ws.*;
[ "org.apache.camel", "org.springframework.ws" ]
org.apache.camel; org.springframework.ws;
741,869
@Override public GeoPos getGeoPos(final PixelPos pixelPos, GeoPos geoPos) { initialize(); if (geoPos == null) { geoPos = new GeoPos(); } geoPos.setInvalid(); if (pixelPos.isValid()) { int x0 = (int) Math.floor(pixelPos.getX()); int y0 = (int) Math.floor(pixelPos.getY()); if (x0 >= 0 && x0 < rasterWidth && y0 >= 0 && y0 < rasterHeight) { if (fractionAccuracy) { // implies tiling mode if (x0 > 0 && pixelPos.x - x0 < 0.5f || x0 == rasterWidth - 1) { x0 -= 1; } if (y0 > 0 && pixelPos.y - y0 < 0.5f || y0 == rasterHeight - 1) { y0 -= 1; } final double wx = pixelPos.x - (x0 + 0.5f); final double wy = pixelPos.y - (y0 + 0.5f); final Raster latLonData = latLonImage.getData(new Rectangle(x0, y0, 2, 2)); final double lat = interpolate(wx, wy, latLonData, 0); final double lon = interpolate(wx, wy, latLonData, 1); geoPos.setLocation(lat, lon); } else { getGeoPosInternal(x0, y0, geoPos); } } else { if (pixelPosEstimator != null) { return pixelPosEstimator.getGeoPos(pixelPos, geoPos); } } } return geoPos; }
GeoPos function(final PixelPos pixelPos, GeoPos geoPos) { initialize(); if (geoPos == null) { geoPos = new GeoPos(); } geoPos.setInvalid(); if (pixelPos.isValid()) { int x0 = (int) Math.floor(pixelPos.getX()); int y0 = (int) Math.floor(pixelPos.getY()); if (x0 >= 0 && x0 < rasterWidth && y0 >= 0 && y0 < rasterHeight) { if (fractionAccuracy) { if (x0 > 0 && pixelPos.x - x0 < 0.5f x0 == rasterWidth - 1) { x0 -= 1; } if (y0 > 0 && pixelPos.y - y0 < 0.5f y0 == rasterHeight - 1) { y0 -= 1; } final double wx = pixelPos.x - (x0 + 0.5f); final double wy = pixelPos.y - (y0 + 0.5f); final Raster latLonData = latLonImage.getData(new Rectangle(x0, y0, 2, 2)); final double lat = interpolate(wx, wy, latLonData, 0); final double lon = interpolate(wx, wy, latLonData, 1); geoPos.setLocation(lat, lon); } else { getGeoPosInternal(x0, y0, geoPos); } } else { if (pixelPosEstimator != null) { return pixelPosEstimator.getGeoPos(pixelPos, geoPos); } } } return geoPos; }
/** * Returns the latitude and longitude value for a given pixel co-ordinate. * * @param pixelPos the pixel's co-ordinates given as x,y * @param geoPos an instance of <code>GeoPos</code> to be used as retun value. If this parameter is * <code>null</code>, the method creates a new instance which it then returns. * * @return the geographical position as lat/lon. */
Returns the latitude and longitude value for a given pixel co-ordinate
getGeoPos
{ "repo_name": "valgur/snap-engine", "path": "snap-core/src/main/java/org/esa/snap/framework/datamodel/PixelGeoCoding.java", "license": "gpl-3.0", "size": 59963 }
[ "java.awt.Rectangle", "java.awt.image.Raster" ]
import java.awt.Rectangle; import java.awt.image.Raster;
import java.awt.*; import java.awt.image.*;
[ "java.awt" ]
java.awt;
2,263,710
public static Set<BookiiStick> getSticks() throws IOException { File[] mounts; if(OS.isWindows()) { mounts = File.listRoots(); } else { LinkedList<File> mountList = new LinkedList<File>(); Process process = new ProcessBuilder(OS.getMountCommand()).start(); BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream())); String row; while ((row = in.readLine()) != null) { row = row.trim(); if (row.startsWith("/dev/")) { int p = row.indexOf(" on "); row = row.substring(p + " on ".length()); p = row.indexOf(" "); row = row.substring(0, p); mountList.add(new File(row)); } } mounts = mountList.toArray(new File[0]); } HashSet<BookiiStick> sticks = new HashSet<>(); for (File mount : mounts) { if (BookiiStick.checkForStick(mount)) { sticks.add(new BookiiStick(mount)); } } return(sticks); }
static Set<BookiiStick> function() throws IOException { File[] mounts; if(OS.isWindows()) { mounts = File.listRoots(); } else { LinkedList<File> mountList = new LinkedList<File>(); Process process = new ProcessBuilder(OS.getMountCommand()).start(); BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream())); String row; while ((row = in.readLine()) != null) { row = row.trim(); if (row.startsWith("/dev/")) { int p = row.indexOf(STR); row = row.substring(p + STR.length()); p = row.indexOf(" "); row = row.substring(0, p); mountList.add(new File(row)); } } mounts = mountList.toArray(new File[0]); } HashSet<BookiiStick> sticks = new HashSet<>(); for (File mount : mounts) { if (BookiiStick.checkForStick(mount)) { sticks.add(new BookiiStick(mount)); } } return(sticks); }
/** * get all the sticks * @return set of stick objects * @throws IOException */
get all the sticks
getSticks
{ "repo_name": "Martin-Dames/Tingeltangel", "path": "core/src/main/java/tingeltangel/core/BookiiStick.java", "license": "gpl-2.0", "size": 24165 }
[ "java.io.BufferedReader", "java.io.File", "java.io.IOException", "java.io.InputStreamReader", "java.util.HashSet", "java.util.LinkedList", "java.util.Set" ]
import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashSet; import java.util.LinkedList; import java.util.Set;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,485,078
private GroupBean getData(Cursor cursor) { int id = cursor.getInt(cursor.getColumnIndex(COL_ID)); String name = cursor.getString(cursor.getColumnIndex(COL_NAME)); return new GroupBean(id,name); }
GroupBean function(Cursor cursor) { int id = cursor.getInt(cursor.getColumnIndex(COL_ID)); String name = cursor.getString(cursor.getColumnIndex(COL_NAME)); return new GroupBean(id,name); }
/** * Method to get data from database cursor * @param cursor is reference of database that have data * @return or null if operation fails */
Method to get data from database cursor
getData
{ "repo_name": "bshubham80/ThereVGo", "path": "app/src/main/java/com/client/therevgo/services/database/GroupTable.java", "license": "gpl-3.0", "size": 6275 }
[ "android.database.Cursor" ]
import android.database.Cursor;
import android.database.*;
[ "android.database" ]
android.database;
798,140
@Test public void testGetVersionByProjectNameAndEvnName() throws Exception { //prepare data Map<String, String> ret = new HashMap<String, String>(); ret.put(ConfigServerService.TAG_KEY, TEST_TAG_VALUE); ret.put(KEY1, VALUE1); ret.put(KEY2, VALUE2); props = ret; ConfigCenterPropertyPlaceholderConfigurer ccpc; ccpc = new ConfigCenterPropertyPlaceholderConfigurer(); ccpc.setCcVersion(1L); ccpc.setCcServerUrl("http://localhost:8080/rpc/ConfigServerService"); ccpc.setCcUser(USER2); ccpc.setCcPassword(PASSWORD2); ccpc.setEnableUpdateCallback(true); ccpc.setCallbackInteval(100L); ccpc.setProjectName("pName"); ccpc.setEnvName("eName"); ccpc.setConfigServerService(configServerServiceMock); DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory(); ccpc.setApplicationContext(appContext); ccpc.postProcessBeanFactory(beanFactory); }
void function() throws Exception { Map<String, String> ret = new HashMap<String, String>(); ret.put(ConfigServerService.TAG_KEY, TEST_TAG_VALUE); ret.put(KEY1, VALUE1); ret.put(KEY2, VALUE2); props = ret; ConfigCenterPropertyPlaceholderConfigurer ccpc; ccpc = new ConfigCenterPropertyPlaceholderConfigurer(); ccpc.setCcVersion(1L); ccpc.setCcServerUrl(STRpNameSTReName"); ccpc.setConfigServerService(configServerServiceMock); DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory(); ccpc.setApplicationContext(appContext); ccpc.postProcessBeanFactory(beanFactory); }
/** * test get version by project name and environment name * @throws Exception all exception will throw out and mark failed at unit test. */
test get version by project name and environment name
testGetVersionByProjectNameAndEvnName
{ "repo_name": "sdgdsffdsfff/configcenter-client", "path": "src/test/java/com/baidu/cc/spring/ConfigCenterPropertyPlaceholderConfigurerTest.java", "license": "apache-2.0", "size": 22673 }
[ "com.baidu.cc.interfaces.ConfigServerService", "java.util.HashMap", "java.util.Map", "org.springframework.beans.factory.support.DefaultListableBeanFactory" ]
import com.baidu.cc.interfaces.ConfigServerService; import java.util.HashMap; import java.util.Map; import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import com.baidu.cc.interfaces.*; import java.util.*; import org.springframework.beans.factory.support.*;
[ "com.baidu.cc", "java.util", "org.springframework.beans" ]
com.baidu.cc; java.util; org.springframework.beans;
2,677,778
public InputStream openZipEntryStream(File zipFile, String entryName) throws IOException;
InputStream function(File zipFile, String entryName) throws IOException;
/** * Opens a stream from a given zip file and returns it. * * @param zipFile * the {@link File} corresponding to the zip file to read from. * @param entryName * the name of the entry whose corresponding stream should be * returned. * @return the {@link InputStream} corresponding to the desired entry. * @throws IOException * if a problem occurs attempting to open the entry stream. */
Opens a stream from a given zip file and returns it
openZipEntryStream
{ "repo_name": "sapia-oss/corus", "path": "modules/client/src/main/java/org/sapia/corus/client/services/file/FileSystemModule.java", "license": "gpl-3.0", "size": 5105 }
[ "java.io.File", "java.io.IOException", "java.io.InputStream" ]
import java.io.File; import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
610,627
@Override public void write(byte[] b, int off, int len) throws IOException { while (len > 0) { int c = Math.min(len, decoderIn.remaining()); decoderIn.put(b, off, c); processInput(false); len -= c; off += c; } if (writeImmediately) { flushOutput(); } }
void function(byte[] b, int off, int len) throws IOException { while (len > 0) { int c = Math.min(len, decoderIn.remaining()); decoderIn.put(b, off, c); processInput(false); len -= c; off += c; } if (writeImmediately) { flushOutput(); } }
/** * Write bytes from the specified byte array to the stream. * * @param b the byte array containing the bytes to write * @param off the start offset in the byte array * @param len the number of bytes to write * @throws IOException if an I/O error occurs */
Write bytes from the specified byte array to the stream
write
{ "repo_name": "rytina/dukecon_appsgenerator", "path": "org.apache.commons.io/source-bundle/org/apache/commons/io/output/WriterOutputStream.java", "license": "epl-1.0", "size": 11518 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,821,308
public void testRemove() { ConcurrentHashMap map = map5(); map.remove(five); assertEquals(4, map.size()); assertFalse(map.containsKey(five)); }
void function() { ConcurrentHashMap map = map5(); map.remove(five); assertEquals(4, map.size()); assertFalse(map.containsKey(five)); }
/** * remove removes the correct key-value pair from the map */
remove removes the correct key-value pair from the map
testRemove
{ "repo_name": "mirego/j2objc", "path": "jre_emul/android/platform/libcore/jsr166-tests/src/test/java/jsr166/ConcurrentHashMapTest.java", "license": "apache-2.0", "size": 24611 }
[ "java.util.concurrent.ConcurrentHashMap" ]
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
365,820
public final void setSummaryOff(@Nullable final CharSequence summaryOff) { this.summaryOff = summaryOff; }
final void function(@Nullable final CharSequence summaryOff) { this.summaryOff = summaryOff; }
/** * Sets the summary, which should be shown when the preference is not checked. * * @param summaryOff * The summary, which should be set, as an instance of the type {@link CharSequence} or * null, if no dedicated summary should be shown when the preference is not checked */
Sets the summary, which should be shown when the preference is not checked
setSummaryOff
{ "repo_name": "michael-rapp/AndroidMaterialPreferences", "path": "library/src/main/java/de/mrapp/android/preference/AbstractTwoStatePreference.java", "license": "apache-2.0", "size": 18369 }
[ "androidx.annotation.Nullable" ]
import androidx.annotation.Nullable;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
1,490,835
public void dropTable(PropertyBusinessObject cmp) throws IOException { String tableName = getTableName(cmp); execute("Drop table " + tableName); }
void function(PropertyBusinessObject cmp) throws IOException { String tableName = getTableName(cmp); execute(STR + tableName); }
/** * Drop a table matching the given property component * @param cmp the business object */
Drop a table matching the given property component
dropTable
{ "repo_name": "shannah/CodenameOne", "path": "CodenameOne/src/com/codename1/properties/SQLMap.java", "license": "gpl-2.0", "size": 21745 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
905,545
public static String opToStr(int operator) { switch (operator) { case Token.BITOR: return "|"; case Token.OR: return "||"; case Token.BITXOR: return "^"; case Token.AND: return "&&"; case Token.BITAND: return "&"; case Token.SHEQ: return "==="; case Token.EQ: return "=="; case Token.NOT: return "!"; case Token.NE: return "!="; case Token.SHNE: return "!=="; case Token.LSH: return "<<"; case Token.IN: return "in"; case Token.LE: return "<="; case Token.LT: return "<"; case Token.URSH: return ">>>"; case Token.RSH: return ">>"; case Token.GE: return ">="; case Token.GT: return ">"; case Token.MUL: return "*"; case Token.DIV: return "/"; case Token.MOD: return "%"; case Token.BITNOT: return "~"; case Token.ADD: case Token.POS: return "+"; case Token.SUB: case Token.NEG: return "-"; case Token.ASSIGN: return "="; case Token.ASSIGN_BITOR: return "|="; case Token.ASSIGN_BITXOR: return "^="; case Token.ASSIGN_BITAND: return "&="; case Token.ASSIGN_LSH: return "<<="; case Token.ASSIGN_RSH: return ">>="; case Token.ASSIGN_URSH: return ">>>="; case Token.ASSIGN_ADD: return "+="; case Token.ASSIGN_SUB: return "-="; case Token.ASSIGN_MUL: return "*="; case Token.ASSIGN_DIV: return "/="; case Token.ASSIGN_MOD: return "%="; case Token.VOID: return "void"; case Token.TYPEOF: return "typeof"; case Token.INSTANCEOF: return "instanceof"; default: return null; } }
static String function(int operator) { switch (operator) { case Token.BITOR: return " "; case Token.OR: return " "; case Token.BITXOR: return "^"; case Token.AND: return "&&"; case Token.BITAND: return "&"; case Token.SHEQ: return "==="; case Token.EQ: return "=="; case Token.NOT: return "!"; case Token.NE: return "!="; case Token.SHNE: return "!=="; case Token.LSH: return "<<"; case Token.IN: return "in"; case Token.LE: return "<="; case Token.LT: return "<"; case Token.URSH: return ">>>"; case Token.RSH: return ">>"; case Token.GE: return ">="; case Token.GT: return ">"; case Token.MUL: return "*"; case Token.DIV: return "/"; case Token.MOD: return "%"; case Token.BITNOT: return "~"; case Token.ADD: case Token.POS: return "+"; case Token.SUB: case Token.NEG: return "-"; case Token.ASSIGN: return "="; case Token.ASSIGN_BITOR: return STR; case Token.ASSIGN_BITXOR: return "^="; case Token.ASSIGN_BITAND: return "&="; case Token.ASSIGN_LSH: return "<<="; case Token.ASSIGN_RSH: return ">>="; case Token.ASSIGN_URSH: return ">>>="; case Token.ASSIGN_ADD: return "+="; case Token.ASSIGN_SUB: return "-="; case Token.ASSIGN_MUL: return "*="; case Token.ASSIGN_DIV: return "/="; case Token.ASSIGN_MOD: return "%="; case Token.VOID: return "void"; case Token.TYPEOF: return STR; case Token.INSTANCEOF: return STR; default: return null; } }
/** * Converts an operator's token value (see {@link Token}) to a string * representation. * * @param operator the operator's token value to convert * @return the string representation or {@code null} if the token value is * not an operator */
Converts an operator's token value (see <code>Token</code>) to a string representation
opToStr
{ "repo_name": "selkhateeb/closure-compiler", "path": "src/com/google/javascript/jscomp/NodeUtil.java", "license": "apache-2.0", "size": 128800 }
[ "com.google.javascript.rhino.Token" ]
import com.google.javascript.rhino.Token;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
433,330
public int getMetaFromState(IBlockState state) { return ((Integer)state.getValue(LEGACY_DATA)).intValue(); }
int function(IBlockState state) { return ((Integer)state.getValue(LEGACY_DATA)).intValue(); }
/** * Convert the BlockState into the correct metadata value */
Convert the BlockState into the correct metadata value
getMetaFromState
{ "repo_name": "SkidJava/BaseClient", "path": "new_1.8.8/net/minecraft/block/BlockFlowerPot.java", "license": "gpl-2.0", "size": 17095 }
[ "net.minecraft.block.state.IBlockState" ]
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.state.*;
[ "net.minecraft.block" ]
net.minecraft.block;
2,671,692
@Test public void equalsTest(){ boundObj = BoundsObject.newTightBound(x, num0); boundObj2 = BoundsObject.newTightBound(x, num0); boundObj.equals(boundObj2); assertEquals(boundObj, boundObj2); }
void function(){ boundObj = BoundsObject.newTightBound(x, num0); boundObj2 = BoundsObject.newTightBound(x, num0); boundObj.equals(boundObj2); assertEquals(boundObj, boundObj2); }
/** * Testing of BoundsObject.equals method, * on the basis of equivalent BoundsObjects. * Provides coverage of "if (object instanceof BoundsObject)" * conditional statement for True. */
Testing of BoundsObject.equals method, on the basis of equivalent BoundsObjects. Provides coverage of "if (object instanceof BoundsObject)" conditional statement for True
equalsTest
{ "repo_name": "byu-vv-lab/sarl", "path": "test/edu/udel/cis/vsl/sarl/ideal/simplify/BoundsObjectEqualsTest.java", "license": "gpl-3.0", "size": 6833 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
885,604
public void collectionToSAX(Collection collection) throws SAXException { String ncollections; String nresources; String[] resources; String[] collections; try { ncollections = Integer.toString(collection.getChildCollectionCount()); nresources = Integer.toString(collection.getResourceCount()); attributes.clear(); attributes.addAttribute("", RESOURCE_COUNT_ATTR, RESOURCE_COUNT_ATTR, "CDATA", nresources); attributes.addAttribute("", COLLECTION_COUNT_ATTR, COLLECTION_COUNT_ATTR, "CDATA", ncollections); collections = collection.listChildCollections(); resources = collection.listResources(); this.xmlConsumer.startDocument(); this.xmlConsumer.startPrefixMapping(PREFIX, URI); this.xmlConsumer.startElement(URI, "collections", "collection:collections", attributes); // Print child collections for (int i = 0; i < collections.length; i++) { attributes.clear(); attributes.addAttribute("", "name", "name", "CDATA", collections[i]); this.xmlConsumer.startElement(URI, COLLECTION, QCOLLECTION, attributes); this.xmlConsumer.endElement(URI, COLLECTION, COLLECTION); } // Print child resources for (int i = 0; i < resources.length; i++) { attributes.clear(); attributes.addAttribute("", "name", "name", "CDATA", resources[i]); this.xmlConsumer.startElement(URI, RESOURCE, QRESOURCE, attributes); this.xmlConsumer.endElement(URI, RESOURCE, RESOURCE); } this.xmlConsumer.endElement(URI, "collections", "collection:collections"); this.xmlConsumer.endPrefixMapping(PREFIX); this.xmlConsumer.endDocument(); } catch (XMLDBException xde) { getLogger().warn("Collection listing failed: " + xde.getMessage()); throw new SAXException("Collection listing failed: " + xde.getMessage()); } }
void function(Collection collection) throws SAXException { String ncollections; String nresources; String[] resources; String[] collections; try { ncollections = Integer.toString(collection.getChildCollectionCount()); nresources = Integer.toString(collection.getResourceCount()); attributes.clear(); attributes.addAttribute(STRCDATASTRSTRCDATASTRcollectionsSTRcollection:collectionsSTRSTRnameSTRnameSTRCDATASTRSTRnameSTRnameSTRCDATASTRcollectionsSTRcollection:collectionsSTRCollection listing failed: STRCollection listing failed: " + xde.getMessage()); } }
/** * Output SAX events listing the collection. * * @exception SAXException */
Output SAX events listing the collection
collectionToSAX
{ "repo_name": "apache/cocoon", "path": "blocks/cocoon-xmldb/cocoon-xmldb-impl/src/main/java/org/apache/cocoon/generation/XMLDBCollectionGenerator.java", "license": "apache-2.0", "size": 9626 }
[ "org.xml.sax.SAXException", "org.xmldb.api.base.Collection" ]
import org.xml.sax.SAXException; import org.xmldb.api.base.Collection;
import org.xml.sax.*; import org.xmldb.api.base.*;
[ "org.xml.sax", "org.xmldb.api" ]
org.xml.sax; org.xmldb.api;
1,263,500