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 File getOutputDir() { return this.fOutputDir; }
File function() { return this.fOutputDir; }
/** * Return output directory * @return */
Return output directory
getOutputDir
{ "repo_name": "Comcast/Oscar", "path": "src/com/comcast/oscar/cli/commands/MergeBulk.java", "license": "apache-2.0", "size": 3848 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,113,214
@Test public void testStoreMemStore() throws Exception { // keep 3 versions minimum HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 3, 1000, 1, KeepDeletedCells.FALSE); HRegion region = hbu.createLocalHRegion(htd, null, null); // 2s in the past long ts = Environmen...
void function() throws Exception { HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 3, 1000, 1, KeepDeletedCells.FALSE); HRegion region = hbu.createLocalHRegion(htd, null, null); long ts = EnvironmentEdgeManager.currentTime() - 2000; try { Put p = new Put(T1, ts-1); p.addColumn(c0, c0, T2); region...
/** * Test mixed memstore and storefile scanning * with minimum versions. */
Test mixed memstore and storefile scanning with minimum versions
testStoreMemStore
{ "repo_name": "vincentpoon/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java", "license": "apache-2.0", "size": 13664 }
[ "org.apache.hadoop.hbase.HBaseTestingUtility", "org.apache.hadoop.hbase.HTableDescriptor", "org.apache.hadoop.hbase.KeepDeletedCells", "org.apache.hadoop.hbase.client.Get", "org.apache.hadoop.hbase.client.Put", "org.apache.hadoop.hbase.client.Result", "org.apache.hadoop.hbase.util.EnvironmentEdgeManager...
import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.KeepDeletedCells; import org.apache.hadoop.hbase.client.Get; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.util.En...
import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,666,993
public Format getFormatter() { return this.formatter; }
Format function() { return this.formatter; }
/** * Provides access to the parser Format implementation. * * @return formatter Format implementation */
Provides access to the parser Format implementation
getFormatter
{ "repo_name": "SpoonLabs/astor", "path": "examples/Lang-issue-428/src/main/java/org/apache/commons/lang3/text/CompositeFormat.java", "license": "gpl-2.0", "size": 3839 }
[ "java.text.Format" ]
import java.text.Format;
import java.text.*;
[ "java.text" ]
java.text;
2,794,208
public String getMusicFile(String localCopyPath) { // LocalCopyPath is empty if (TextUtils.isEmpty(localCopyPath)) return null; String path; // Search in the public data for (String publicData : mPathPublicData) { path = publicData + "/files/music/" + localCopyP...
String function(String localCopyPath) { if (TextUtils.isEmpty(localCopyPath)) return null; String path; for (String publicData : mPathPublicData) { path = publicData + STR + localCopyPath; if (FileTools.fileExists(path)) return path; } path = getPrivateMusicPath() + "/" + localCopyPath; return path; }
/** * Gets the path to the music track * @param localCopyPath The local copy path * @return The path to the music file */
Gets the path to the music track
getMusicFile
{ "repo_name": "Arcus92/PlayMusicExporter", "path": "playmusiclib/src/main/java/de/arcus/playmusiclib/PlayMusicManager.java", "license": "mit", "size": 26524 }
[ "android.text.TextUtils", "de.arcus.framework.utils.FileTools" ]
import android.text.TextUtils; import de.arcus.framework.utils.FileTools;
import android.text.*; import de.arcus.framework.utils.*;
[ "android.text", "de.arcus.framework" ]
android.text; de.arcus.framework;
1,834,161
public void setGeneralLedgerPendingEntryService(GeneralLedgerPendingEntryService generalLedgerPendingEntryService) { this.generalLedgerPendingEntryService = generalLedgerPendingEntryService; }
void function(GeneralLedgerPendingEntryService generalLedgerPendingEntryService) { this.generalLedgerPendingEntryService = generalLedgerPendingEntryService; }
/** * Sets the generalLedgerPendingEntryService. * * @param generalLedgerPendingEntryService */
Sets the generalLedgerPendingEntryService
setGeneralLedgerPendingEntryService
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/ld/service/impl/LaborLedgerPendingEntryServiceImpl.java", "license": "apache-2.0", "size": 9109 }
[ "org.kuali.kfs.sys.service.GeneralLedgerPendingEntryService" ]
import org.kuali.kfs.sys.service.GeneralLedgerPendingEntryService;
import org.kuali.kfs.sys.service.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,666,724
public void run() { try { accept(); } catch (CancelException e) { // bug 39462 // ignore } finally { try { if (this.serverSock != null) { this.serverSock.close(); } } catch (IOException ignore) { } if (this.stats != null) { this.stats.c...
void function() { try { accept(); } catch (CancelException e) { } finally { try { if (this.serverSock != null) { this.serverSock.close(); } } catch (IOException ignore) { } if (this.stats != null) { this.stats.close(); } } }
/** * The work loop of this acceptor * * @see #accept */
The work loop of this acceptor
run
{ "repo_name": "deepakddixit/incubator-geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/AcceptorImpl.java", "license": "apache-2.0", "size": 67846 }
[ "java.io.IOException", "org.apache.geode.CancelException" ]
import java.io.IOException; import org.apache.geode.CancelException;
import java.io.*; import org.apache.geode.*;
[ "java.io", "org.apache.geode" ]
java.io; org.apache.geode;
1,832,401
@PostConstruct public synchronized String[] reload() { List<String> messages = new LinkedList<>(); // clear existing layouts layoutMap.clear(); // load layouts loadFromClassPath(messages); loadFromFileSystem(messages); // give back any errors, in ca...
synchronized String[] function() { List<String> messages = new LinkedList<>(); layoutMap.clear(); loadFromClassPath(messages); loadFromFileSystem(messages); String[] result = messages.toArray(new String[messages.size()]); return result; }
/** * Reloads keyboard layouts. * * @return list of error messages */
Reloads keyboard layouts
reload
{ "repo_name": "limpygnome/parrot-manager", "path": "parrot-manager/src/main/java/com/limpygnome/parrot/component/sendKeys/KeyboardLayoutRepository.java", "license": "mit", "size": 8504 }
[ "java.util.LinkedList", "java.util.List" ]
import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,016,776
public NativeLibraryNestedSetBuilder addCcTargets( Iterable<? extends TransitiveInfoCollection> deps) { for (TransitiveInfoCollection dep : deps) { addCcTarget(dep); } return this; }
NativeLibraryNestedSetBuilder function( Iterable<? extends TransitiveInfoCollection> deps) { for (TransitiveInfoCollection dep : deps) { addCcTarget(dep); } return this; }
/** * Include native C/C++ libraries of specified dependencies into the nested set. */
Include native C/C++ libraries of specified dependencies into the nested set
addCcTargets
{ "repo_name": "hhclam/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/java/NativeLibraryNestedSetBuilder.java", "license": "apache-2.0", "size": 3873 }
[ "com.google.devtools.build.lib.analysis.TransitiveInfoCollection" ]
import com.google.devtools.build.lib.analysis.TransitiveInfoCollection;
import com.google.devtools.build.lib.analysis.*;
[ "com.google.devtools" ]
com.google.devtools;
1,705,422
@ServiceMethod(returns = ReturnType.SINGLE) Response<CallbackConfigInner> getCallbackConfigWithResponse( String resourceGroupName, String registryName, String webhookName, Context context);
@ServiceMethod(returns = ReturnType.SINGLE) Response<CallbackConfigInner> getCallbackConfigWithResponse( String resourceGroupName, String registryName, String webhookName, Context context);
/** * Gets the configuration of service URI and custom headers for the webhook. * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @pa...
Gets the configuration of service URI and custom headers for the webhook
getCallbackConfigWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/WebhooksClient.java", "license": "mit", "size": 36760 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.containerregistry.fluent.models.CallbackConfigInner" ]
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 com.azure.resourcemanager.containerregistry.fluent.models.CallbackConfigInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.containerregistry.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,085,429
List<DataValue> getAllDataValues();
List<DataValue> getAllDataValues();
/** * Returns all DataValues. * * @return a collection of all DataValues. */
Returns all DataValues
getAllDataValues
{ "repo_name": "minagri-rwanda/DHIS2-Agriculture", "path": "dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValueService.java", "license": "bsd-3-clause", "size": 14501 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,866,140
public Object call(VirtualFrame frame, Object target) { return execute(frame, new RArgsValuesAndNames(new Object[]{target}, ArgumentsSignature.empty(1))); }
Object function(VirtualFrame frame, Object target) { return execute(frame, new RArgsValuesAndNames(new Object[]{target}, ArgumentsSignature.empty(1))); }
/** * Helper method that wraps the argument into {@link RArgsValuesAndNames} and invokes the * {@link #execute(VirtualFrame, RArgsValuesAndNames)} method. */
Helper method that wraps the argument into <code>RArgsValuesAndNames</code> and invokes the <code>#execute(VirtualFrame, RArgsValuesAndNames)</code> method
call
{ "repo_name": "graalvm/fastr", "path": "com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/call/RExplicitBaseEnvCallDispatcher.java", "license": "gpl-2.0", "size": 3376 }
[ "com.oracle.truffle.api.frame.VirtualFrame", "com.oracle.truffle.r.runtime.ArgumentsSignature", "com.oracle.truffle.r.runtime.data.RArgsValuesAndNames" ]
import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.r.runtime.ArgumentsSignature; import com.oracle.truffle.r.runtime.data.RArgsValuesAndNames;
import com.oracle.truffle.api.frame.*; import com.oracle.truffle.r.runtime.*; import com.oracle.truffle.r.runtime.data.*;
[ "com.oracle.truffle" ]
com.oracle.truffle;
547,009
public synchronized void saveToKeyStore(OutputStream os, char[] password) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidParameterSpecException, InvalidKeySpecException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadP...
synchronized void function(OutputStream os, char[] password) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidParameterSpecException, InvalidKeySpecException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException, KeyStoreException, CertificateException, ...
/** * Saves all the certificates generated and their private key in a JKS file * @param file The file where the certificate will be saved * @param password The password to access the private key */
Saves all the certificates generated and their private key in a JKS file
saveToKeyStore
{ "repo_name": "ChristieEnglish/spydroid-ipcamera", "path": "src/net/majorkernelpanic/http/ModSSL.java", "license": "gpl-3.0", "size": 13066 }
[ "java.io.IOException", "java.io.OutputStream", "java.security.InvalidAlgorithmParameterException", "java.security.InvalidKeyException", "java.security.KeyStoreException", "java.security.NoSuchAlgorithmException", "java.security.cert.CertificateException", "java.security.spec.InvalidKeySpecException", ...
import java.io.IOException; import java.io.OutputStream; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.cert.CertificateException; import java.security.spec.Inv...
import java.io.*; import java.security.*; import java.security.cert.*; import java.security.spec.*; import javax.crypto.*;
[ "java.io", "java.security", "javax.crypto" ]
java.io; java.security; javax.crypto;
2,856,000
@Beta public RecursiveComparisonAssert<?> usingRecursiveComparison(RecursiveComparisonConfiguration recursiveComparisonConfiguration) { return new RecursiveComparisonAssert<>(actual, recursiveComparisonConfiguration).withAssertionState(myself) ...
RecursiveComparisonAssert<?> function(RecursiveComparisonConfiguration recursiveComparisonConfiguration) { return new RecursiveComparisonAssert<>(actual, recursiveComparisonConfiguration).withAssertionState(myself) .withTypeComparators(comparatorByType); }
/** * Same as {@link #usingRecursiveComparison()} but allows to specify your own {@link RecursiveComparisonConfiguration}. * @param recursiveComparisonConfiguration the {@link RecursiveComparisonConfiguration} used in the chained {@link RecursiveComparisonAssert#isEqualTo(Object) isEqualTo} assertion. * * @...
Same as <code>#usingRecursiveComparison()</code> but allows to specify your own <code>RecursiveComparisonConfiguration</code>
usingRecursiveComparison
{ "repo_name": "xasx/assertj-core", "path": "src/main/java/org/assertj/core/api/AbstractObjectAssert.java", "license": "apache-2.0", "size": 53427 }
[ "org.assertj.core.api.recursive.comparison.RecursiveComparisonConfiguration" ]
import org.assertj.core.api.recursive.comparison.RecursiveComparisonConfiguration;
import org.assertj.core.api.recursive.comparison.*;
[ "org.assertj.core" ]
org.assertj.core;
711,630
public CLIOutputResponse showLog(final ShowLogRequest request) throws IOException, SubversionException, UnauthorizedException { final File projectPath = new File(request.getProjectPath()); final List<String> uArgs = defaultArgs(); addOption(uArgs, "--revision", request.getRevision()); uArgs.ad...
CLIOutputResponse function(final ShowLogRequest request) throws IOException, SubversionException, UnauthorizedException { final File projectPath = new File(request.getProjectPath()); final List<String> uArgs = defaultArgs(); addOption(uArgs, STR, request.getRevision()); uArgs.add("log"); final CommandLineResult result ...
/** * Perform an "svn log" based on the request. * * @param request the request * @return the response * @throws IOException if there is a problem executing the command * @throws SubversionException if there is a Subversion issue */
Perform an "svn log" based on the request
showLog
{ "repo_name": "jonahkichwacoders/che", "path": "plugins/plugin-svn/che-plugin-svn-ext-server/src/main/java/org/eclipse/che/plugin/svn/server/SubversionApi.java", "license": "epl-1.0", "size": 42801 }
[ "java.io.File", "java.io.IOException", "java.util.List", "org.eclipse.che.api.core.UnauthorizedException", "org.eclipse.che.dto.server.DtoFactory", "org.eclipse.che.plugin.svn.server.upstream.CommandLineResult", "org.eclipse.che.plugin.svn.shared.CLIOutputResponse", "org.eclipse.che.plugin.svn.shared....
import java.io.File; import java.io.IOException; import java.util.List; import org.eclipse.che.api.core.UnauthorizedException; import org.eclipse.che.dto.server.DtoFactory; import org.eclipse.che.plugin.svn.server.upstream.CommandLineResult; import org.eclipse.che.plugin.svn.shared.CLIOutputResponse; import org.eclipse...
import java.io.*; import java.util.*; import org.eclipse.che.api.core.*; import org.eclipse.che.dto.server.*; import org.eclipse.che.plugin.svn.server.upstream.*; import org.eclipse.che.plugin.svn.shared.*;
[ "java.io", "java.util", "org.eclipse.che" ]
java.io; java.util; org.eclipse.che;
1,501,812
public static Set<Integer> getOptedInHistoryTypes() { return Collections.unmodifiableSet(optedInHistoryTypes); }
static Set<Integer> function() { return Collections.unmodifiableSet(optedInHistoryTypes); }
/** * Returns the set of History Types which have "opted-in" to be applicable for passive scanning. * * @return a set of {@code Integer} representing all of the History Types which have "opted-in" * for passive scanning. * @since 2.8.0 */
Returns the set of History Types which have "opted-in" to be applicable for passive scanning
getOptedInHistoryTypes
{ "repo_name": "psiinon/zaproxy", "path": "zap/src/main/java/org/zaproxy/zap/extension/pscan/PassiveScanThread.java", "license": "apache-2.0", "size": 21671 }
[ "java.util.Collections", "java.util.Set" ]
import java.util.Collections; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,036,387
public Matrix4f getTransform(Item item, TransformType transformType) { switch (transformType) { case THIRD_PERSON_LEFT_HAND: return thirdPersonLeftHand; case THIRD_PERSON_RIGHT_HAND: return thirdPersonRightHand; case FIRST_PERSON_LEFT_HAND: return firstPersonLeftHand; case FIRST_PERSON_R...
Matrix4f function(Item item, TransformType transformType) { switch (transformType) { case THIRD_PERSON_LEFT_HAND: return thirdPersonLeftHand; case THIRD_PERSON_RIGHT_HAND: return thirdPersonRightHand; case FIRST_PERSON_LEFT_HAND: return firstPersonLeftHand; case FIRST_PERSON_RIGHT_HAND: return firstPersonRightHand; cas...
/** * Gets the {@link Matrix4f transformation} for the specified {@link Item} and {@link TransformType}. * * @param item the item * @param transformType the transform type * @return the transform */
Gets the <code>Matrix4f transformation</code> for the specified <code>Item</code> and <code>TransformType</code>
getTransform
{ "repo_name": "Ordinastie/MalisisCore", "path": "src/main/java/net/malisis/core/block/component/ItemTransformComponent.java", "license": "mit", "size": 4457 }
[ "javax.vecmath.Matrix4f", "net.minecraft.client.renderer.block.model.ItemCameraTransforms", "net.minecraft.item.Item" ]
import javax.vecmath.Matrix4f; import net.minecraft.client.renderer.block.model.ItemCameraTransforms; import net.minecraft.item.Item;
import javax.vecmath.*; import net.minecraft.client.renderer.block.model.*; import net.minecraft.item.*;
[ "javax.vecmath", "net.minecraft.client", "net.minecraft.item" ]
javax.vecmath; net.minecraft.client; net.minecraft.item;
780,689
public Identity readIdentity( final String identityId, final QueryMembership queryMembership, final String properties) { final UUID locationId = UUID.fromString("28010c54-d0c0-4c89-a5b0-1c9e188b9fb7"); //$NON-NLS-1$ final ApiResourceVersion apiVersion = new ApiResourceVer...
Identity function( final String identityId, final QueryMembership queryMembership, final String properties) { final UUID locationId = UUID.fromString(STR); final ApiResourceVersion apiVersion = new ApiResourceVersion(STR); final Map<String, Object> routeValues = new HashMap<String, Object>(); routeValues.put(STR, ident...
/** * [Preview API 3.1-preview.1] * * @param identityId * * @param queryMembership * * @param properties * * @return Identity */
[Preview API 3.1-preview.1]
readIdentity
{ "repo_name": "Microsoft/vso-httpclient-java", "path": "Rest/alm-vss-client/src/main/generated/com/microsoft/alm/visualstudio/services/identity/client/IdentityHttpClientBase.java", "license": "mit", "size": 37296 }
[ "com.microsoft.alm.client.HttpMethod", "com.microsoft.alm.client.VssMediaTypes", "com.microsoft.alm.client.VssRestRequest", "com.microsoft.alm.client.model.NameValueCollection", "com.microsoft.alm.visualstudio.services.identity.Identity", "com.microsoft.alm.visualstudio.services.identity.QueryMembership",...
import com.microsoft.alm.client.HttpMethod; import com.microsoft.alm.client.VssMediaTypes; import com.microsoft.alm.client.VssRestRequest; import com.microsoft.alm.client.model.NameValueCollection; import com.microsoft.alm.visualstudio.services.identity.Identity; import com.microsoft.alm.visualstudio.services.identity....
import com.microsoft.alm.client.*; import com.microsoft.alm.client.model.*; import com.microsoft.alm.visualstudio.services.identity.*; import com.microsoft.alm.visualstudio.services.webapi.*; import java.util.*;
[ "com.microsoft.alm", "java.util" ]
com.microsoft.alm; java.util;
2,694,167
protected void calcLabelVerticalSecondScaleSize(Canvas canvas) { if (mGraphView.mSecondScale == null) { mLabelVerticalSecondScaleWidth = 0; mLabelVerticalSecondScaleHeight = 0; return; } // test label double testY = ((mGraphView.mSecondScale.getMa...
void function(Canvas canvas) { if (mGraphView.mSecondScale == null) { mLabelVerticalSecondScaleWidth = 0; mLabelVerticalSecondScaleHeight = 0; return; } double testY = ((mGraphView.mSecondScale.getMaxY() - mGraphView.mSecondScale.getMinY()) * 0.783) + mGraphView.mSecondScale.getMinY(); String testLabel = mGraphView.mSe...
/** * calculates the vertical second scale * label size * @param canvas canvas */
calculates the vertical second scale label size
calcLabelVerticalSecondScaleSize
{ "repo_name": "shubhamshuklaer/GraphView", "path": "src/main/java/com/jjoe64/graphview/GridLabelRenderer.java", "license": "gpl-2.0", "size": 47072 }
[ "android.graphics.Canvas", "android.graphics.Rect" ]
import android.graphics.Canvas; import android.graphics.Rect;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
1,902,414
public void characters (char ch[], int start, int length) throws SAXException { // no op }
void function (char ch[], int start, int length) throws SAXException { }
/** * Receive notification of character data inside an element. * * <p>By default, do nothing. Application writers may override this * method to take specific actions for each chunk of character data * (such as adding the data to a node or buffer, or printing it to * a file).</p> * ...
Receive notification of character data inside an element. By default, do nothing. Application writers may override this method to take specific actions for each chunk of character data (such as adding the data to a node or buffer, or printing it to a file)
characters
{ "repo_name": "taciano-perez/JamVM-PH", "path": "src/classpath/external/sax/org/xml/sax/helpers/DefaultHandler.java", "license": "gpl-2.0", "size": 16324 }
[ "org.xml.sax.SAXException" ]
import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
1,613,071
public static ClassFileReader newInstance(Path path, JarFile jf) throws IOException { return new JarFileReader(path, jf); }
static ClassFileReader function(Path path, JarFile jf) throws IOException { return new JarFileReader(path, jf); }
/** * Returns a ClassFileReader instance of a given JarFile. */
Returns a ClassFileReader instance of a given JarFile
newInstance
{ "repo_name": "FauxFaux/jdk9-langtools", "path": "src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ClassFileReader.java", "license": "gpl-2.0", "size": 14564 }
[ "java.io.IOException", "java.nio.file.Path", "java.util.jar.JarFile" ]
import java.io.IOException; import java.nio.file.Path; import java.util.jar.JarFile;
import java.io.*; import java.nio.file.*; import java.util.jar.*;
[ "java.io", "java.nio", "java.util" ]
java.io; java.nio; java.util;
315,387
@Override void setAnimatedValue(Object target) { if (mFloatProperty != null) { mFloatProperty.setValue(target, mFloatAnimatedValue); return; } if (mProperty != null) { mProperty.set(target, mFloatAnimatedValue); ...
void setAnimatedValue(Object target) { if (mFloatProperty != null) { mFloatProperty.setValue(target, mFloatAnimatedValue); return; } if (mProperty != null) { mProperty.set(target, mFloatAnimatedValue); return; } if (mJniSetter != 0) { nCallFloatMethod(target, mJniSetter, mFloatAnimatedValue); return; } if (mSetter != n...
/** * Internal function to set the value on the target object, using the setter set up * earlier on this PropertyValuesHolder object. This function is called by ObjectAnimator * to handle turning the value calculated by ValueAnimator into a value set on the object * according to the ...
Internal function to set the value on the target object, using the setter set up earlier on this PropertyValuesHolder object. This function is called by ObjectAnimator to handle turning the value calculated by ValueAnimator into a value set on the object according to the name of the property
setAnimatedValue
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "frameworks/base/core/java/android/animation/PropertyValuesHolder.java", "license": "gpl-3.0", "size": 73990 }
[ "android.util.Log", "java.lang.reflect.InvocationTargetException" ]
import android.util.Log; import java.lang.reflect.InvocationTargetException;
import android.util.*; import java.lang.reflect.*;
[ "android.util", "java.lang" ]
android.util; java.lang;
2,180,432
public String renderWarn() { String result = getWarn(); setWarn(null); return Formatter.escapeDoubleQuotes(result).toString(); }
String function() { String result = getWarn(); setWarn(null); return Formatter.escapeDoubleQuotes(result).toString(); }
/** * after calling this method, the warning is cleared so it is only rendered once and therefore only displayed once to the user * * @return */
after calling this method, the warning is cleared so it is only rendered once and therefore only displayed once to the user
renderWarn
{ "repo_name": "RLDevOps/Demo", "path": "src/main/java/org/olat/core/gui/GUIMessage.java", "license": "apache-2.0", "size": 2801 }
[ "org.olat.core.util.Formatter" ]
import org.olat.core.util.Formatter;
import org.olat.core.util.*;
[ "org.olat.core" ]
org.olat.core;
1,782,095
public Logger getParentLogger() throws SQLFeatureNotSupportedException { if (parentLoggerSupported) { try { Method method = adapted.getClass().getMethod("getParentLogger", new Class[0]); return (Logger)method.invoke(adapted, new Object[0]); ...
Logger function() throws SQLFeatureNotSupportedException { if (parentLoggerSupported) { try { Method method = adapted.getClass().getMethod(STR, new Class[0]); return (Logger)method.invoke(adapted, new Object[0]); } catch (NoSuchMethodException e) { parentLoggerSupported = false; throw new SQLFeatureNotSupportedExceptio...
/** * Java 1.7 method. */
Java 1.7 method
getParentLogger
{ "repo_name": "kettas/commons-dbutils", "path": "src/main/java/org/apache/commons/dbutils/DbUtils.java", "license": "apache-2.0", "size": 37854 }
[ "java.lang.reflect.InvocationTargetException", "java.lang.reflect.Method", "java.sql.SQLFeatureNotSupportedException", "java.util.logging.Logger" ]
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.sql.SQLFeatureNotSupportedException; import java.util.logging.Logger;
import java.lang.reflect.*; import java.sql.*; import java.util.logging.*;
[ "java.lang", "java.sql", "java.util" ]
java.lang; java.sql; java.util;
1,583,652
public static String findProjectFormName(DynaBean form) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { return ((ObservationData) (PropertyUtils.getProperty(form, "observations"))).getProjectFormName(); }
static String function(DynaBean form) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { return ((ObservationData) (PropertyUtils.getProperty(form, STR))).getProjectFormName(); }
/** * Find the projectFormName where ever we normally store it. This is for * that could which needs this information before creating a * projectFormMapper * * @param form * @return the current projectFormName * @throws IllegalAccessException * @throws InvocationTargetException * @throws NoSuchMethod...
Find the projectFormName where ever we normally store it. This is for that could which needs this information before creating a projectFormMapper
findProjectFormName
{ "repo_name": "phassoa/openelisglobal-core", "path": "app/src/us/mn/state/health/lims/patient/saving/Accessioner.java", "license": "mpl-2.0", "size": 49456 }
[ "java.lang.reflect.InvocationTargetException", "org.apache.commons.beanutils.DynaBean", "org.apache.commons.beanutils.PropertyUtils", "us.mn.state.health.lims.patient.valueholder.ObservationData" ]
import java.lang.reflect.InvocationTargetException; import org.apache.commons.beanutils.DynaBean; import org.apache.commons.beanutils.PropertyUtils; import us.mn.state.health.lims.patient.valueholder.ObservationData;
import java.lang.reflect.*; import org.apache.commons.beanutils.*; import us.mn.state.health.lims.patient.valueholder.*;
[ "java.lang", "org.apache.commons", "us.mn.state" ]
java.lang; org.apache.commons; us.mn.state;
2,775,057
public List<TMDbLanguage> getTranslations() { return translations; }
List<TMDbLanguage> function() { return translations; }
/** * Gets the movie translations. * * @return The movie translations */
Gets the movie translations
getTranslations
{ "repo_name": "makgyver/MKtmdb", "path": "src/mk/tmdb/entity/movie/TMDbMovieFull.java", "license": "gpl-3.0", "size": 6692 }
[ "java.util.List", "mk.tmdb.entity.TMDbLanguage" ]
import java.util.List; import mk.tmdb.entity.TMDbLanguage;
import java.util.*; import mk.tmdb.entity.*;
[ "java.util", "mk.tmdb.entity" ]
java.util; mk.tmdb.entity;
1,046,913
public void setLabel(ChartText value) { label = value; if (label != null && (this.location == Location.BOTTOM || this.location == Location.LEFT)) { this.drawLabel = true; } }
void function(ChartText value) { label = value; if (label != null && (this.location == Location.BOTTOM this.location == Location.LEFT)) { this.drawLabel = true; } }
/** * Set axis label * * @param value Axis label */
Set axis label
setLabel
{ "repo_name": "meteoinfo/meteoinfolib", "path": "src/org/meteoinfo/chart/axis/Axis.java", "license": "lgpl-3.0", "size": 53295 }
[ "org.meteoinfo.chart.ChartText", "org.meteoinfo.chart.Location" ]
import org.meteoinfo.chart.ChartText; import org.meteoinfo.chart.Location;
import org.meteoinfo.chart.*;
[ "org.meteoinfo.chart" ]
org.meteoinfo.chart;
403,312
private void setForwardingRulesForVlan(InstancePort instPort, boolean install) { // switching rules for the instPorts in the same node TrafficSelector selector = DefaultTrafficSelector.builder() // TODO: need to handle IPv6 in near future .matchEthType(Ethernet.TYPE_I...
void function(InstancePort instPort, boolean install) { TrafficSelector selector = DefaultTrafficSelector.builder() .matchEthType(Ethernet.TYPE_IPV4) .matchIPDst(instPort.ipAddress().toIpPrefix()) .matchVlanId(getVlanId(instPort)) .build(); TrafficTreatment treatment = DefaultTrafficTreatment.builder() .popVlan() .setE...
/** * Configures the flow rules which are used for L2 VLAN packet switching. * Note that these rules will be inserted in switching table (table 5). * * @param instPort instance port object * @param install install flag, add the rule if true, remove it otherwise */
Configures the flow rules which are used for L2 VLAN packet switching. Note that these rules will be inserted in switching table (table 5)
setForwardingRulesForVlan
{ "repo_name": "kuujo/onos", "path": "apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingHandler.java", "license": "apache-2.0", "size": 35858 }
[ "org.onlab.packet.Ethernet", "org.onosproject.net.flow.DefaultTrafficSelector", "org.onosproject.net.flow.DefaultTrafficTreatment", "org.onosproject.net.flow.TrafficSelector", "org.onosproject.net.flow.TrafficTreatment", "org.onosproject.openstacknetworking.api.InstancePort" ]
import org.onlab.packet.Ethernet; import org.onosproject.net.flow.DefaultTrafficSelector; import org.onosproject.net.flow.DefaultTrafficTreatment; import org.onosproject.net.flow.TrafficSelector; import org.onosproject.net.flow.TrafficTreatment; import org.onosproject.openstacknetworking.api.InstancePort;
import org.onlab.packet.*; import org.onosproject.net.flow.*; import org.onosproject.openstacknetworking.api.*;
[ "org.onlab.packet", "org.onosproject.net", "org.onosproject.openstacknetworking" ]
org.onlab.packet; org.onosproject.net; org.onosproject.openstacknetworking;
95,669
public static void createXML(LFSSelProps propi, String fName) throws IOException { try { DocumentBuilderFactory docFactory = DocumentBuilderFactory .newInstance(); DocumentBuilder docBuilder; docBuilder = docFactory.newDocumentBuilder(); // root elements Document doc = docBuilder.n...
static void function(LFSSelProps propi, String fName) throws IOException { try { DocumentBuilderFactory docFactory = DocumentBuilderFactory .newInstance(); DocumentBuilder docBuilder; docBuilder = docFactory.newDocumentBuilder(); Document doc = docBuilder.newDocument(); Element rootElement = doc.createElement(STR); doc...
/** * XML serialization of different classes: - LFSSelProps - LFSExpProps - * LFSSOMProperties - LFSGrowingSOM * * * */
XML serialization of different classes: - LFSSelProps - LFSExpProps - LFSSOMProperties - LFSGrowingSOM
createXML
{ "repo_name": "vbuendia/lfsom", "path": "lfsom/src/lfsom/output/XMLOutputter.java", "license": "apache-2.0", "size": 11259 }
[ "java.io.File", "java.io.IOException", "javax.xml.parsers.DocumentBuilder", "javax.xml.parsers.DocumentBuilderFactory", "javax.xml.transform.Transformer", "javax.xml.transform.TransformerFactory", "javax.xml.transform.dom.DOMSource", "javax.xml.transform.stream.StreamResult", "org.w3c.dom.Document",...
import java.io.File; import java.io.IOException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; imp...
import java.io.*; import javax.xml.parsers.*; import javax.xml.transform.*; import javax.xml.transform.dom.*; import javax.xml.transform.stream.*; import org.w3c.dom.*;
[ "java.io", "javax.xml", "org.w3c.dom" ]
java.io; javax.xml; org.w3c.dom;
1,567,581
public Credentials getCredentials(AuthScheme authscheme, String host, int port, boolean proxy) throws CredentialsNotAvailableException { if (authscheme == null) { return null; } try { Credentials credentials = null; if (authscheme insta...
Credentials function(AuthScheme authscheme, String host, int port, boolean proxy) throws CredentialsNotAvailableException { if (authscheme == null) { return null; } try { Credentials credentials = null; if (authscheme instanceof NTLMScheme) { AuthenticationDialog pwDialog = new AuthenticationDialog( ownerFrame, STR, ST...
/** * Implementation method for the CredentialsProvider interface. * <p> * Based on sample code: * <a href="http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/examples/InteractiveAuthenticationExample.java?view=markup">InteractiveAuthenticationExample</a> * ...
Implementation method for the CredentialsProvider interface. Based on sample code: InteractiveAuthenticationExample
getCredentials
{ "repo_name": "hyperic/jets3t", "path": "src/org/jets3t/apps/cockpitlite/CockpitLite.java", "license": "apache-2.0", "size": 117998 }
[ "java.io.IOException", "org.apache.commons.httpclient.Credentials", "org.apache.commons.httpclient.NTCredentials", "org.apache.commons.httpclient.UsernamePasswordCredentials", "org.apache.commons.httpclient.auth.AuthScheme", "org.apache.commons.httpclient.auth.CredentialsNotAvailableException", "org.apa...
import java.io.IOException; import org.apache.commons.httpclient.Credentials; import org.apache.commons.httpclient.NTCredentials; import org.apache.commons.httpclient.UsernamePasswordCredentials; import org.apache.commons.httpclient.auth.AuthScheme; import org.apache.commons.httpclient.auth.CredentialsNotAvailableExcep...
import java.io.*; import org.apache.commons.httpclient.*; import org.apache.commons.httpclient.auth.*; import org.jets3t.gui.*;
[ "java.io", "org.apache.commons", "org.jets3t.gui" ]
java.io; org.apache.commons; org.jets3t.gui;
1,969,575
public static String getFreeTextTermTablename(final Configuration conf) { requireNonNull(conf); return makeFreeTextTermTablename( ConfigUtils.getTablePrefix(conf) ); }
static String function(final Configuration conf) { requireNonNull(conf); return makeFreeTextTermTablename( ConfigUtils.getTablePrefix(conf) ); }
/** * Get the Term index's table name. * * @param conf - The Rya configuration that specifies which instance of Rya * the table names will be built for. (not null) * @return The Free Text Term index's Accumulo table name for the Rya instance. */
Get the Term index's table name
getFreeTextTermTablename
{ "repo_name": "kchilton2/incubator-rya", "path": "extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/freetext/AccumuloFreeTextIndexer.java", "license": "apache-2.0", "size": 37025 }
[ "java.util.Objects", "org.apache.hadoop.conf.Configuration", "org.apache.rya.indexing.accumulo.ConfigUtils" ]
import java.util.Objects; import org.apache.hadoop.conf.Configuration; import org.apache.rya.indexing.accumulo.ConfigUtils;
import java.util.*; import org.apache.hadoop.conf.*; import org.apache.rya.indexing.accumulo.*;
[ "java.util", "org.apache.hadoop", "org.apache.rya" ]
java.util; org.apache.hadoop; org.apache.rya;
2,290,965
public void test(){ int acertados=0; // Perform classification of training and test sets in KEEL Format classifyTrainSet(); classifyTestSet(); writeResults(); try{ bw_output.write("\n\n"); bw_output.write("---------------------------------------------\n"); bw_output.write...
void function(){ int acertados=0; classifyTrainSet(); classifyTestSet(); writeResults(); try{ bw_output.write("\n\n"); bw_output.write(STR); bw_output.write(STR); bw_output.write(STR); for(int i=0;i<tstSet.getNumInstances();i++){ Instance tst_i = tstSet.getInstance(i); boolean covered = false; for(int j=1;j<R.size() &&...
/** * Test process. */
Test process
test
{ "repo_name": "SCI2SUGR/KEEL", "path": "src/keel/Algorithms/Rule_Learning/Swap1/swap1.java", "license": "gpl-3.0", "size": 26869 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,924,493
public VirtualMachineRunCommandProperties withParameters(List<RunCommandInputParameter> parameters) { this.parameters = parameters; return this; }
VirtualMachineRunCommandProperties function(List<RunCommandInputParameter> parameters) { this.parameters = parameters; return this; }
/** * Set the parameters property: The parameters used by the script. * * @param parameters the parameters value to set. * @return the VirtualMachineRunCommandProperties object itself. */
Set the parameters property: The parameters used by the script
withParameters
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineRunCommandProperties.java", "license": "mit", "size": 10064 }
[ "com.azure.resourcemanager.compute.models.RunCommandInputParameter", "java.util.List" ]
import com.azure.resourcemanager.compute.models.RunCommandInputParameter; import java.util.List;
import com.azure.resourcemanager.compute.models.*; import java.util.*;
[ "com.azure.resourcemanager", "java.util" ]
com.azure.resourcemanager; java.util;
2,597,896
public Set<IFeature> getNotSelectedFeatures() { Set<IFeature> result = new HashSet<IFeature>(); for (TableItem item : table.getItems()) { if (!item.getChecked() && !item.getGrayed()) result.add((IFeature) item.getData()); } return result; }
Set<IFeature> function() { Set<IFeature> result = new HashSet<IFeature>(); for (TableItem item : table.getItems()) { if (!item.getChecked() && !item.getGrayed()) result.add((IFeature) item.getData()); } return result; }
/** * necessary to distinguish from grayed features * * @return */
necessary to distinguish from grayed features
getNotSelectedFeatures
{ "repo_name": "ckaestne/CIDE", "path": "CIDE2/src/de/ovgu/cide/utils/SelectFeatureSetPage.java", "license": "gpl-3.0", "size": 6728 }
[ "de.ovgu.cide.features.IFeature", "java.util.HashSet", "java.util.Set", "org.eclipse.swt.widgets.TableItem" ]
import de.ovgu.cide.features.IFeature; import java.util.HashSet; import java.util.Set; import org.eclipse.swt.widgets.TableItem;
import de.ovgu.cide.features.*; import java.util.*; import org.eclipse.swt.widgets.*;
[ "de.ovgu.cide", "java.util", "org.eclipse.swt" ]
de.ovgu.cide; java.util; org.eclipse.swt;
1,042,327
private void loadTestPlans(Class<?> testClass) throws InitializationError { try { GatewayRestTestPlan annotation = testClass.getAnnotation(GatewayRestTestPlan.class); if (annotation == null) { throw new InitializationError("Missing @GatewayRestTestPlan annotation on t...
void function(Class<?> testClass) throws InitializationError { try { GatewayRestTestPlan annotation = testClass.getAnnotation(GatewayRestTestPlan.class); if (annotation == null) { throw new InitializationError(STR); } else { TestPlanInfo planInfo = new TestPlanInfo(); planInfo.planPath = annotation.value(); planInfo.na...
/** * Loads the test plans. * @param testClass * @throws InitializationError */
Loads the test plans
loadTestPlans
{ "repo_name": "KevinHorvatin/apiman", "path": "gateway/test/src/test/java/io/apiman/gateway/test/junit/GatewayRestTester.java", "license": "apache-2.0", "size": 11409 }
[ "io.apiman.test.common.util.TestUtil", "java.io.File", "org.junit.runners.model.InitializationError" ]
import io.apiman.test.common.util.TestUtil; import java.io.File; import org.junit.runners.model.InitializationError;
import io.apiman.test.common.util.*; import java.io.*; import org.junit.runners.model.*;
[ "io.apiman.test", "java.io", "org.junit.runners" ]
io.apiman.test; java.io; org.junit.runners;
1,270,607
public void initializePackageContents() { if (isInitialized) return; isInitialized = true; // Initialize package setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); // Create type parameters // Set bounds for type parameters // Add supertypes to classes // Initia...
void function() { if (isInitialized) return; isInitialized = true; setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); initEClass(luaConfigFileEClass, LuaConfigFile.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getLuaConfigFile_Rows(), ecorePackage.getEObject(), null, "ro...
/** * Complete the initialization of the package and its meta-model. This * method is guarded to have no affect on any invocation but its first. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any invocation but its first.
initializePackageContents
{ "repo_name": "ViViD-DiverSE/VM-Source", "path": "fr.inria.lang.luaConfigFile/src-gen/fr/inria/lang/conf/impl/ConfPackageImpl.java", "license": "lgpl-3.0", "size": 8215 }
[ "fr.inria.lang.conf.Assignment", "fr.inria.lang.conf.GeneratedComment", "fr.inria.lang.conf.LuaConfigFile" ]
import fr.inria.lang.conf.Assignment; import fr.inria.lang.conf.GeneratedComment; import fr.inria.lang.conf.LuaConfigFile;
import fr.inria.lang.conf.*;
[ "fr.inria.lang" ]
fr.inria.lang;
375,067
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>POST</code> method
doPost
{ "repo_name": "cerberustesting/cerberus-source", "path": "source/src/main/java/org/cerberus/servlet/zzpublic/ManageV001.java", "license": "gpl-3.0", "size": 20195 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
2,766,766
EClass getExpression();
EClass getExpression();
/** * Returns the meta object for class '{@link org.eclipse.bpmn2.Expression <em>Expression</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Expression</em>'. * @see org.eclipse.bpmn2.Expression * @generated */
Returns the meta object for class '<code>org.eclipse.bpmn2.Expression Expression</code>'.
getExpression
{ "repo_name": "lqjack/fixflow", "path": "modules/fixflow-core/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java", "license": "apache-2.0", "size": 1014933 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,408,122
public List<Family> getFamilies() { final List<Family> families = new ArrayList<>(); for (final FamilyNavigator nav : familySNavigators) { families.add(nav.getFamily()); } return families; }
List<Family> function() { final List<Family> families = new ArrayList<>(); for (final FamilyNavigator nav : familySNavigators) { families.add(nav.getFamily()); } return families; }
/** * Get the families that the person is a spouse of. * * @return the list of families */
Get the families that the person is a spouse of
getFamilies
{ "repo_name": "dickschoeller/gedbrowser", "path": "gedbrowser-datamodel/src/main/java/org/schoellerfamily/gedbrowser/datamodel/visitor/PersonVisitor.java", "license": "apache-2.0", "size": 5668 }
[ "java.util.ArrayList", "java.util.List", "org.schoellerfamily.gedbrowser.datamodel.Family", "org.schoellerfamily.gedbrowser.datamodel.navigator.FamilyNavigator" ]
import java.util.ArrayList; import java.util.List; import org.schoellerfamily.gedbrowser.datamodel.Family; import org.schoellerfamily.gedbrowser.datamodel.navigator.FamilyNavigator;
import java.util.*; import org.schoellerfamily.gedbrowser.datamodel.*; import org.schoellerfamily.gedbrowser.datamodel.navigator.*;
[ "java.util", "org.schoellerfamily.gedbrowser" ]
java.util; org.schoellerfamily.gedbrowser;
2,636,172
public Iterable<RenderableBlock> getRenderableBlocksFromGenus(String genusName) { //TODO: performance issue, must iterate through all blocks ArrayList<RenderableBlock> blocks = new ArrayList<RenderableBlock>(); for (RenderableBlock block : blockCanvas.getBlocks()) { if (getEn...
Iterable<RenderableBlock> function(String genusName) { ArrayList<RenderableBlock> blocks = new ArrayList<RenderableBlock>(); for (RenderableBlock block : blockCanvas.getBlocks()) { if (getEnv().getBlock(block.getBlockID()).getGenusName().equals(genusName)) { blocks.add(block); } } return blocks; }
/** * Returns all the RenderableBlocks of the specified genus. * Include all live blocks on all pages. Does NOT include: * (1) all blocks of a different genus * (2) Factory blocks, * (3) dead blocks, * (4) or subset blocks. * If no blocks are found, it returns an empt...
Returns all the RenderableBlocks of the specified genus. Include all live blocks on all pages. Does NOT include: (1) all blocks of a different genus (2) Factory blocks, (3) dead blocks, (4) or subset blocks. If no blocks are found, it returns an empty set
getRenderableBlocksFromGenus
{ "repo_name": "laurentschall/openblocks", "path": "src/main/java/edu/mit/blocks/workspace/Workspace.java", "license": "lgpl-3.0", "size": 36613 }
[ "edu.mit.blocks.renderable.RenderableBlock", "java.util.ArrayList" ]
import edu.mit.blocks.renderable.RenderableBlock; import java.util.ArrayList;
import edu.mit.blocks.renderable.*; import java.util.*;
[ "edu.mit.blocks", "java.util" ]
edu.mit.blocks; java.util;
903,224
public Analyze[] getAnalyzes() { Analyze[] result = null; if (analyzes != null) { result = Arrays.copyOf(analyzes, analyzes.length); } return (result); }
Analyze[] function() { Analyze[] result = null; if (analyzes != null) { result = Arrays.copyOf(analyzes, analyzes.length); } return (result); }
/** * We keep track of the Analyze instances we are to execute. * * @return An array of Analyze instances. */
We keep track of the Analyze instances we are to execute
getAnalyzes
{ "repo_name": "djb61230/jflicks", "path": "src/org/jflicks/ui/view/aspirin/ExecutePanel.java", "license": "gpl-3.0", "size": 11924 }
[ "java.util.Arrays", "org.jflicks.ui.view.aspirin.analyze.Analyze" ]
import java.util.Arrays; import org.jflicks.ui.view.aspirin.analyze.Analyze;
import java.util.*; import org.jflicks.ui.view.aspirin.analyze.*;
[ "java.util", "org.jflicks.ui" ]
java.util; org.jflicks.ui;
1,218,659
@SuppressWarnings("SameParameterValue") public void playMusic(String name, double volume, boolean loop) throws AudioControllerException { Audio soundEffect; soundEffect=sounds.get(name); if((sounds.get(name)).isPlaying()) { throw new AudioControllerException("That music is already playing."); } soun...
@SuppressWarnings(STR) void function(String name, double volume, boolean loop) throws AudioControllerException { Audio soundEffect; soundEffect=sounds.get(name); if((sounds.get(name)).isPlaying()) { throw new AudioControllerException(STR); } soundEffect.playAsMusic(1,(float)volume,loop); }
/** * Plays music, and remembers about it. It will show up as playing and can be stopped. * Only one instance of a sound can be playing as music at a time. * @param name the name of the sound to be played, which was assigned by the addSound() method. * @param loop true if the music should loop, false if it shou...
Plays music, and remembers about it. It will show up as playing and can be stopped. Only one instance of a sound can be playing as music at a time
playMusic
{ "repo_name": "AMP-studios/Proj01", "path": "src/CustomUtils/AudioController.java", "license": "gpl-3.0", "size": 4245 }
[ "org.newdawn.slick.openal.Audio" ]
import org.newdawn.slick.openal.Audio;
import org.newdawn.slick.openal.*;
[ "org.newdawn.slick" ]
org.newdawn.slick;
259,656
public static final void setAlternativeIcon(Map map, Icon value) { map.put(ALTERNATIVE_ICON, value); }
static final void function(Map map, Icon value) { map.put(ALTERNATIVE_ICON, value); }
/** * Sets the alternateIcon attribute in the specified map to the specified * value. */
Sets the alternateIcon attribute in the specified map to the specified value
setAlternativeIcon
{ "repo_name": "ProgettoRadis/ArasuiteIta", "path": "TICO/src/tico/board/TBoardConstants.java", "license": "apache-2.0", "size": 24156 }
[ "java.util.Map", "javax.swing.Icon" ]
import java.util.Map; import javax.swing.Icon;
import java.util.*; import javax.swing.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
1,184,539
private ViewGroup.LayoutParams getLayoutParams(View child) { ViewGroup.LayoutParams layoutParams = child.getLayoutParams(); if (layoutParams == null) { // Since this is a horizontal list view default to matching the parents height, and wrapping the width layoutParams = new Vi...
ViewGroup.LayoutParams function(View child) { ViewGroup.LayoutParams layoutParams = child.getLayoutParams(); if (layoutParams == null) { layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT); } return layoutParams; }
/** * Gets a child's layout parameters, defaults if not available. */
Gets a child's layout parameters, defaults if not available
getLayoutParams
{ "repo_name": "zhuangzaiku/NiuwaClient", "path": "androidHorizontalListView/src/main/java/tv/meetme/android/horizontallistview/HorizontalListView.java", "license": "apache-2.0", "size": 52632 }
[ "android.view.View", "android.view.ViewGroup" ]
import android.view.View; import android.view.ViewGroup;
import android.view.*;
[ "android.view" ]
android.view;
2,893,789
protected void prepare(final boolean iCopyDatabaseToNodes, final boolean iCreateDatabase) throws IOException { // CREATE THE DATABASE final Iterator<ServerRun> it = serverInstance.iterator(); final ServerRun master = it.next(); if (iCreateDatabase) { final ODatabaseDocumentTx db = master....
void function(final boolean iCopyDatabaseToNodes, final boolean iCreateDatabase) throws IOException { final Iterator<ServerRun> it = serverInstance.iterator(); final ServerRun master = it.next(); if (iCreateDatabase) { final ODatabaseDocumentTx db = master.createDatabase(getDatabaseName()); try { onAfterDatabaseCreatio...
/** * Create the database on first node only * * @throws IOException */
Create the database on first node only
prepare
{ "repo_name": "DiceHoldingsInc/orientdb", "path": "distributed/src/test/java/com/orientechnologies/orient/server/distributed/AbstractServerClusterTest.java", "license": "apache-2.0", "size": 5637 }
[ "com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx", "java.io.IOException", "java.util.Iterator" ]
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx; import java.io.IOException; import java.util.Iterator;
import com.orientechnologies.orient.core.db.document.*; import java.io.*; import java.util.*;
[ "com.orientechnologies.orient", "java.io", "java.util" ]
com.orientechnologies.orient; java.io; java.util;
988,327
public static boolean validateResultObservationCode(BirthWeight birthWeight, DiagnosticChain diagnostics, Map<Object, Object> context) { if (VALIDATE_RESULT_OBSERVATION_CODE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setContext(NCRPackage.Literals.BI...
static boolean function(BirthWeight birthWeight, DiagnosticChain diagnostics, Map<Object, Object> context) { if (VALIDATE_RESULT_OBSERVATION_CODE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setContext(NCRPackage.Literals.BIRTH_WEIGHT); try { VALIDATE_RESULT_OBSERVAT...
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CD) and * let value : datatypes::CD = self.code.oclAsType(datatypes::CD) in ( * value.code = '47340003' and value.codeSystem = '2.16.840.1.113883.6.96...
not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = self.code.oclAsType(datatypes::CD) in ( value.code = '47340003' and value.codeSystem = '2.16.840.1.113883.6.96')
validateResultObservationCode
{ "repo_name": "drbgfc/mdht", "path": "cda/deprecated/org.openhealthtools.mdht.uml.cda.ncr/src/org/openhealthtools/mdht/uml/cda/ncr/operations/BirthWeightOperations.java", "license": "epl-1.0", "size": 19073 }
[ "java.util.Map", "org.eclipse.emf.common.util.BasicDiagnostic", "org.eclipse.emf.common.util.Diagnostic", "org.eclipse.emf.common.util.DiagnosticChain", "org.eclipse.ocl.ParserException", "org.eclipse.ocl.ecore.Constraint", "org.openhealthtools.mdht.uml.cda.ncr.BirthWeight", "org.openhealthtools.mdht....
import java.util.Map; import org.eclipse.emf.common.util.BasicDiagnostic; import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.common.util.DiagnosticChain; import org.eclipse.ocl.ParserException; import org.eclipse.ocl.ecore.Constraint; import org.openhealthtools.mdht.uml.cda.ncr.BirthWeight; import or...
import java.util.*; import org.eclipse.emf.common.util.*; import org.eclipse.ocl.*; import org.eclipse.ocl.ecore.*; import org.openhealthtools.mdht.uml.cda.ncr.*; import org.openhealthtools.mdht.uml.cda.ncr.util.*;
[ "java.util", "org.eclipse.emf", "org.eclipse.ocl", "org.openhealthtools.mdht" ]
java.util; org.eclipse.emf; org.eclipse.ocl; org.openhealthtools.mdht;
1,099,799
public static Path moveAsideBadEditsFile(final FileSystem fs, final Path edits) throws IOException { Path moveAsideName = new Path(edits.getParent(), edits.getName() + "." + System.currentTimeMillis()); if (!fs.rename(edits, moveAsideName)) { LOG.warn("Rename failed from " + edits + " to "...
static Path function(final FileSystem fs, final Path edits) throws IOException { Path moveAsideName = new Path(edits.getParent(), edits.getName() + "." + System.currentTimeMillis()); if (!fs.rename(edits, moveAsideName)) { LOG.warn(STR + edits + STR + moveAsideName); } return moveAsideName; }
/** * Move aside a bad edits file. * @param fs * @param edits Edits file to move aside. * @return The name of the moved aside file. * @throws IOException */
Move aside a bad edits file
moveAsideBadEditsFile
{ "repo_name": "Shmuma/hbase-trunk", "path": "src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java", "license": "apache-2.0", "size": 65672 }
[ "java.io.IOException", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,615,043
private int getItemIndex(TableItem item) { int index = -1; for (int i = 0; i < table.getItemCount(); i++) { if (table.getItem(i) == item) { index = i; break; } } return index; }
int function(TableItem item) { int index = -1; for (int i = 0; i < table.getItemCount(); i++) { if (table.getItem(i) == item) { index = i; break; } } return index; }
/** * Returns the index of the given item. * * @param item * @return */
Returns the index of the given item
getItemIndex
{ "repo_name": "fstahnke/arx", "path": "src/gui/org/deidentifier/arx/gui/view/impl/explore/ViewClipboard.java", "license": "apache-2.0", "size": 18487 }
[ "org.eclipse.swt.widgets.TableItem" ]
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,081,309
public MessageDestinationRefType<T> removeLookupName() { childNode.removeChildren("lookup-name"); return this; } // --------------------------------------------------------------------------------------------------------|| // ClassName: MessageDestinationRefType ElementName: xsd:string Elem...
MessageDestinationRefType<T> function() { childNode.removeChildren(STR); return this; }
/** * Removes the <code>lookup-name</code> element * @return the current instance of <code>MessageDestinationRefType<T></code> */
Removes the <code>lookup-name</code> element
removeLookupName
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/javaee6/MessageDestinationRefTypeImpl.java", "license": "epl-1.0", "size": 16577 }
[ "org.jboss.shrinkwrap.descriptor.api.javaee6.MessageDestinationRefType" ]
import org.jboss.shrinkwrap.descriptor.api.javaee6.MessageDestinationRefType;
import org.jboss.shrinkwrap.descriptor.api.javaee6.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
842,807
private void enableToolbarActions() { boolean zapConfigurationValid = ZAPHelper.getInstance().isZapConfigurationValid(); boolean zapRunning = ZAPHelper.getInstance().isZapRunning(); runZAPScanAction.setEnabled(zapConfigurationValid && zapRunning); startZapAction.setEnabled(zapConfigurationValid && !zapRunnin...
void function() { boolean zapConfigurationValid = ZAPHelper.getInstance().isZapConfigurationValid(); boolean zapRunning = ZAPHelper.getInstance().isZapRunning(); runZAPScanAction.setEnabled(zapConfigurationValid && zapRunning); startZapAction.setEnabled(zapConfigurationValid && !zapRunning); stopZapAction.setEnabled(za...
/** * Enable/disable the toolbar action icons based on the current status of * the ZAP server. */
Enable/disable the toolbar action icons based on the current status of the ZAP server
enableToolbarActions
{ "repo_name": "polyhedraltech/SecurityTesting", "path": "com.polyhedral.security.testing.zedattackproxy/src/com/polyhedral/security/testing/zedattackproxy/views/ZAPView.java", "license": "apache-2.0", "size": 20444 }
[ "com.polyhedral.security.testing.zedattackproxy.utils.ZAPHelper" ]
import com.polyhedral.security.testing.zedattackproxy.utils.ZAPHelper;
import com.polyhedral.security.testing.zedattackproxy.utils.*;
[ "com.polyhedral.security" ]
com.polyhedral.security;
1,087,705
public Observable<ServiceResponse<Page<DedicatedHostInner>>> listByHostGroupNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); }
Observable<ServiceResponse<Page<DedicatedHostInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); }
/** * Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in the response to get the next page of dedicated hosts. * ServiceResponse<PageImpl1<DedicatedHostInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @...
Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in the response to get the next page of dedicated hosts
listByHostGroupNextSinglePageAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/compute/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/compute/v2019_11_01/implementation/DedicatedHostsInner.java", "license": "mit", "size": 62536 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
1,663,057
void setElementView(ElementDeleteVariable value);
void setElementView(ElementDeleteVariable value);
/** * Sets the value of the ' * {@link org.eclipse.sirius.diagram.description.tool.DeleteElementDescription#getElementView * <em>Element View</em>}' containment reference. <!-- begin-user-doc --> * <!-- end-user-doc --> * * @param value * the new value of the '<em>Element ...
Sets the value of the ' <code>org.eclipse.sirius.diagram.description.tool.DeleteElementDescription#getElementView Element View</code>' containment reference.
setElementView
{ "repo_name": "FTSRG/iq-sirius-integration", "path": "host/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/tool/DeleteElementDescription.java", "license": "epl-1.0", "size": 7879 }
[ "org.eclipse.sirius.viewpoint.description.tool.ElementDeleteVariable" ]
import org.eclipse.sirius.viewpoint.description.tool.ElementDeleteVariable;
import org.eclipse.sirius.viewpoint.description.tool.*;
[ "org.eclipse.sirius" ]
org.eclipse.sirius;
2,432,176
@SimpleFunction public void ClearTag(final String tag) { final SharedPreferences.Editor sharedPrefsEditor = sharedPreferences.edit(); sharedPrefsEditor.remove(tag); sharedPrefsEditor.commit(); }
void function(final String tag) { final SharedPreferences.Editor sharedPrefsEditor = sharedPreferences.edit(); sharedPrefsEditor.remove(tag); sharedPrefsEditor.commit(); }
/** * Clear the entry with the given tag * * @param tag The tag to remove. */
Clear the entry with the given tag
ClearTag
{ "repo_name": "yflou520/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/TinyDB.java", "license": "apache-2.0", "size": 6746 }
[ "android.content.SharedPreferences" ]
import android.content.SharedPreferences;
import android.content.*;
[ "android.content" ]
android.content;
2,370,390
protected void restoreViewPresentations(@NonNull final Iterable<View> views) { for (View view : views) { restoreViewPresentation(view); } }
void function(@NonNull final Iterable<View> views) { for (View view : views) { restoreViewPresentation(view); } }
/** * Restores the presentation of given {@link View}s by calling {@link #restoreViewPresentation(View)}. */
Restores the presentation of given <code>View</code>s by calling <code>#restoreViewPresentation(View)</code>
restoreViewPresentations
{ "repo_name": "ypochien/ReturnTrue", "path": "Android/Listviewanimation/src/main/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/SwipeDismissTouchListener.java", "license": "mit", "size": 9424 }
[ "android.support.annotation.NonNull", "android.view.View" ]
import android.support.annotation.NonNull; import android.view.View;
import android.support.annotation.*; import android.view.*;
[ "android.support", "android.view" ]
android.support; android.view;
130,663
@Override public boolean equals(Object o) { if(o == this){ return true; } if (!(o instanceof PortRange)){ return false; } PortRange other = (PortRange) o; return Objects.equal(lowerBound, other.lowerBound) && Objects.equal(upperBound, other.upperBound); }
boolean function(Object o) { if(o == this){ return true; } if (!(o instanceof PortRange)){ return false; } PortRange other = (PortRange) o; return Objects.equal(lowerBound, other.lowerBound) && Objects.equal(upperBound, other.upperBound); }
/** * Returns true if the input is an instance of this class and if its value * equals the value contained in this class. * * @param o * the object to compare * * @return true if this object and the input represent the same value */
Returns true if the input is an instance of this class and if its value equals the value contained in this class
equals
{ "repo_name": "snmaher/xacml4j", "path": "xacml-core/src/main/java/org/xacml4j/v30/PortRange.java", "license": "lgpl-3.0", "size": 7421 }
[ "com.google.common.base.Objects" ]
import com.google.common.base.Objects;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,419,298
protected void initClientContainer(ClientContainer clientContainer) { // Apply the name to the container clientContainer.setTitle(TextTranslation.toText(getName())); }
void function(ClientContainer clientContainer) { clientContainer.setTitle(TextTranslation.toText(getName())); }
/** * Initializes the target {@link ClientContainer} for this inventory. * * @param clientContainer The client container */
Initializes the target <code>ClientContainer</code> for this inventory
initClientContainer
{ "repo_name": "LanternPowered/LanternServer", "path": "src/main/java/org/lanternpowered/server/inventory/AbstractMutableInventory.java", "license": "mit", "size": 7808 }
[ "org.lanternpowered.server.inventory.client.ClientContainer" ]
import org.lanternpowered.server.inventory.client.ClientContainer;
import org.lanternpowered.server.inventory.client.*;
[ "org.lanternpowered.server" ]
org.lanternpowered.server;
415,894
public Object getValueAt(int rowIndex, int columnIndex) { int itemIndex = gui.getSelectedDetail(); if (gui.getDetailsForProblem()) { // Details for problem int sumRatings = 0; int taskID = orderedTasks[rowIndex].getID(); for (int i = 0; i < orderedTasks.length; i++) sumRatings += problems[itemIndex...
Object function(int rowIndex, int columnIndex) { int itemIndex = gui.getSelectedDetail(); if (gui.getDetailsForProblem()) { int sumRatings = 0; int taskID = orderedTasks[rowIndex].getID(); for (int i = 0; i < orderedTasks.length; i++) sumRatings += problems[itemIndex].getDistRatingForTask(i); if (columnIndex == 0) retu...
/** * Get the value of a specific cell * * @param rowIndex * row of a cell * @param columnIndex * column of a cell * @return value of the cell */
Get the value of a specific cell
getValueAt
{ "repo_name": "r-kober/ReCaLys", "path": "ReCaLys/src/de/upb/recalys/view/models/DetailsTableModel.java", "license": "mit", "size": 7580 }
[ "de.upb.recalys.model.RCSTask", "java.text.DecimalFormat" ]
import de.upb.recalys.model.RCSTask; import java.text.DecimalFormat;
import de.upb.recalys.model.*; import java.text.*;
[ "de.upb.recalys", "java.text" ]
de.upb.recalys; java.text;
2,339,790
public static void register(BootstrapRegistry registry) { registry.registerIfAbsent(TextEncryptor.class, context -> { KeyProperties keyProperties = context.get(KeyProperties.class); if (TextEncryptorConfigBootstrapper.keysConfigured(keyProperties)) { if (TextEncryptorConfigBootstrapper.RSA_IS_PRESENT) { ...
static void function(BootstrapRegistry registry) { registry.registerIfAbsent(TextEncryptor.class, context -> { KeyProperties keyProperties = context.get(KeyProperties.class); if (TextEncryptorConfigBootstrapper.keysConfigured(keyProperties)) { if (TextEncryptorConfigBootstrapper.RSA_IS_PRESENT) { RsaProperties rsaPrope...
/** * Register all classes that need a {@link TextEncryptor} in * {@link TextEncryptorConfigBootstrapper}. * @param registry the BootstrapRegistry. */
Register all classes that need a <code>TextEncryptor</code> in <code>TextEncryptorConfigBootstrapper</code>
register
{ "repo_name": "spring-cloud/spring-cloud-commons", "path": "spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/encrypt/TextEncryptorUtils.java", "license": "apache-2.0", "size": 7583 }
[ "org.springframework.boot.BootstrapRegistry", "org.springframework.boot.context.properties.bind.BindHandler", "org.springframework.cloud.bootstrap.TextEncryptorBindHandler", "org.springframework.cloud.bootstrap.TextEncryptorConfigBootstrapper", "org.springframework.cloud.context.encrypt.EncryptorFactory", ...
import org.springframework.boot.BootstrapRegistry; import org.springframework.boot.context.properties.bind.BindHandler; import org.springframework.cloud.bootstrap.TextEncryptorBindHandler; import org.springframework.cloud.bootstrap.TextEncryptorConfigBootstrapper; import org.springframework.cloud.context.encrypt.Encryp...
import org.springframework.boot.*; import org.springframework.boot.context.properties.bind.*; import org.springframework.cloud.bootstrap.*; import org.springframework.cloud.context.encrypt.*; import org.springframework.security.crypto.encrypt.*;
[ "org.springframework.boot", "org.springframework.cloud", "org.springframework.security" ]
org.springframework.boot; org.springframework.cloud; org.springframework.security;
148,805
public static RevCommit getCommit(Repository repository, String objectId) { if (!hasCommits(repository)) { return null; } RevCommit commit = null; RevWalk walk = null; try { // resolve object id ObjectId branchObject; if (StringUtils.isEmpty(objectId) || "HEAD".equalsIgnoreCase(objectI...
static RevCommit function(Repository repository, String objectId) { if (!hasCommits(repository)) { return null; } RevCommit commit = null; RevWalk walk = null; try { ObjectId branchObject; if (StringUtils.isEmpty(objectId) "HEAD".equalsIgnoreCase(objectId)) { branchObject = getDefaultBranch(repository); } else { branch...
/** * Returns the specified commit from the repository. If the repository does * not exist or is empty, null is returned. * * @param repository * @param objectId * if unspecified, HEAD is assumed. * @return RevCommit */
Returns the specified commit from the repository. If the repository does not exist or is empty, null is returned
getCommit
{ "repo_name": "mystygage/gitblit", "path": "src/main/java/com/gitblit/utils/JGitUtils.java", "license": "apache-2.0", "size": 99980 }
[ "org.eclipse.jgit.lib.ObjectId", "org.eclipse.jgit.lib.Repository", "org.eclipse.jgit.revwalk.RevCommit", "org.eclipse.jgit.revwalk.RevWalk" ]
import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.jgit.lib.*; import org.eclipse.jgit.revwalk.*;
[ "org.eclipse.jgit" ]
org.eclipse.jgit;
2,255,715
@Test public void testRequestWithSubstrings2Any() { Dsmlv2Parser parser = null; try { parser = newParser(); parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_substrings_2_any.xml" ) .openStream(), "UTF-8" ); ...
void function() { Dsmlv2Parser parser = null; try { parser = newParser(); parser.setInput( SearchRequestTest.class.getResource( STR ) .openStream(), "UTF-8" ); parser.parse(); } catch ( Exception e ) { fail( e.getMessage() ); } SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest()...
/** * Test parsing of a request with a Substrings Filter with 1 Any element */
Test parsing of a request with a Substrings Filter with 1 Any element
testRequestWithSubstrings2Any
{ "repo_name": "darranl/directory-shared", "path": "dsml/parser/src/test/java/org/apache/directory/api/dsmlv2/searchRequest/SearchRequestTest.java", "license": "apache-2.0", "size": 67826 }
[ "java.util.List", "org.apache.directory.api.dsmlv2.Dsmlv2Parser", "org.apache.directory.api.ldap.model.filter.ExprNode", "org.apache.directory.api.ldap.model.filter.SubstringNode", "org.apache.directory.api.ldap.model.message.SearchRequest", "org.junit.Assert" ]
import java.util.List; import org.apache.directory.api.dsmlv2.Dsmlv2Parser; import org.apache.directory.api.ldap.model.filter.ExprNode; import org.apache.directory.api.ldap.model.filter.SubstringNode; import org.apache.directory.api.ldap.model.message.SearchRequest; import org.junit.Assert;
import java.util.*; import org.apache.directory.api.dsmlv2.*; import org.apache.directory.api.ldap.model.filter.*; import org.apache.directory.api.ldap.model.message.*; import org.junit.*;
[ "java.util", "org.apache.directory", "org.junit" ]
java.util; org.apache.directory; org.junit;
1,657,019
public void addBackgroundListener(BackgroundListener listener) { if (!listeners.contains(listener)) { listeners.add(listener); } }
void function(BackgroundListener listener) { if (!listeners.contains(listener)) { listeners.add(listener); } }
/** * Adds a BackgroundListener */
Adds a BackgroundListener
addBackgroundListener
{ "repo_name": "griffon/griffon-swingx-ws-plugin", "path": "src/main/org/jdesktop/swingx/BackgroundWorker.java", "license": "apache-2.0", "size": 17777 }
[ "org.jdesktop.swingx.event.BackgroundListener" ]
import org.jdesktop.swingx.event.BackgroundListener;
import org.jdesktop.swingx.event.*;
[ "org.jdesktop.swingx" ]
org.jdesktop.swingx;
2,338,751
VersionOperation version(OperationCallback cb);
VersionOperation version(OperationCallback cb);
/** * Create a new version operation. */
Create a new version operation
version
{ "repo_name": "normanmaurer/java-memcached-client", "path": "src/main/java/net/spy/memcached/OperationFactory.java", "license": "mit", "size": 11093 }
[ "net.spy.memcached.ops.OperationCallback", "net.spy.memcached.ops.VersionOperation" ]
import net.spy.memcached.ops.OperationCallback; import net.spy.memcached.ops.VersionOperation;
import net.spy.memcached.ops.*;
[ "net.spy.memcached" ]
net.spy.memcached;
607,903
public void doLocalUpdate() { if (this.targetLocation == null) { this.targetLocation = new Vec3d(this.dragon.posX, this.dragon.posY, this.dragon.posZ); } }
void function() { if (this.targetLocation == null) { this.targetLocation = new Vec3d(this.dragon.posX, this.dragon.posY, this.dragon.posZ); } }
/** * Gives the phase a chance to update its status. * Called by dragon's onLivingUpdate. Only used when !worldObj.isRemote. */
Gives the phase a chance to update its status. Called by dragon's onLivingUpdate. Only used when !worldObj.isRemote
doLocalUpdate
{ "repo_name": "lucemans/ShapeClient-SRC", "path": "net/minecraft/entity/boss/dragon/phase/PhaseHover.java", "license": "mpl-2.0", "size": 1386 }
[ "net.minecraft.util.math.Vec3d" ]
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.math.*;
[ "net.minecraft.util" ]
net.minecraft.util;
852,239
void flush(FlushRequest request, ActionListener <FlushResponse> listener);
void flush(FlushRequest request, ActionListener <FlushResponse> listener);
/** * Explicitly flush one or more indices (releasing memory from the node). * * @param request The flush request * @param listener A listener to be notified with a result * @see org.elasticsearch.client.Requests#flushRequest(String...) */
Explicitly flush one or more indices (releasing memory from the node)
flush
{ "repo_name": "ern/elasticsearch", "path": "server/src/main/java/org/elasticsearch/client/IndicesAdminClient.java", "license": "apache-2.0", "size": 26477 }
[ "org.elasticsearch.action.ActionListener", "org.elasticsearch.action.admin.indices.flush.FlushRequest", "org.elasticsearch.action.admin.indices.flush.FlushResponse" ]
import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.admin.indices.flush.FlushRequest; import org.elasticsearch.action.admin.indices.flush.FlushResponse;
import org.elasticsearch.action.*; import org.elasticsearch.action.admin.indices.flush.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
587,187
public int getOffset(CommandLine commandLine, String option) throws Exception { int offset = commandLine.getIntValue(option); if (offset == -1){ return offset; } String project = commandLine.getValue(Options.PROJECT_OPTION); if (project == null){ // some commands use -n for the ...
int function(CommandLine commandLine, String option) throws Exception { int offset = commandLine.getIntValue(option); if (offset == -1){ return offset; } String project = commandLine.getValue(Options.PROJECT_OPTION); if (project == null){ project = commandLine.getValue(Options.NAME_OPTION); } String file = commandLine....
/** * Convenience method which uses the standard project, file, offset, and * encoding options to determine the character offset in the file. * * @param commandLine The command line instance. * @param option The name of the option containing the offset value. * @return The char offset. */
Convenience method which uses the standard project, file, offset, and encoding options to determine the character offset in the file
getOffset
{ "repo_name": "euclio/eclim", "path": "org.eclim.core/java/org/eclim/plugin/core/command/AbstractCommand.java", "license": "gpl-3.0", "size": 5631 }
[ "org.eclim.command.CommandLine", "org.eclim.command.Options", "org.eclim.plugin.core.util.ProjectUtils", "org.eclim.util.file.FileUtils" ]
import org.eclim.command.CommandLine; import org.eclim.command.Options; import org.eclim.plugin.core.util.ProjectUtils; import org.eclim.util.file.FileUtils;
import org.eclim.command.*; import org.eclim.plugin.core.util.*; import org.eclim.util.file.*;
[ "org.eclim.command", "org.eclim.plugin", "org.eclim.util" ]
org.eclim.command; org.eclim.plugin; org.eclim.util;
1,267,720
public Map<String, Object> getMBeanResult(final String mbeanName) { final Map<String, Object> ret = new HashMap<>(); try { final ObjectName name = new ObjectName(mbeanName); final MBeanInfo info = getMBeanInfo(name); final MBeanAttributeInfo[] mbeanAttrs = info.getAttributes(); final ...
Map<String, Object> function(final String mbeanName) { final Map<String, Object> ret = new HashMap<>(); try { final ObjectName name = new ObjectName(mbeanName); final MBeanInfo info = getMBeanInfo(name); final MBeanAttributeInfo[] mbeanAttrs = info.getAttributes(); final Map<String, Object> attributes = new TreeMap<>()...
/** * Get MBean Result * @param mbeanName mbeanName * @return Map of MBean */
Get MBean Result
getMBeanResult
{ "repo_name": "HappyRay/azkaban", "path": "azkaban-common/src/main/java/azkaban/server/MBeanRegistrationManager.java", "license": "apache-2.0", "size": 4375 }
[ "java.util.HashMap", "java.util.Map", "java.util.TreeMap", "javax.management.MBeanAttributeInfo", "javax.management.MBeanInfo", "javax.management.ObjectName" ]
import java.util.HashMap; import java.util.Map; import java.util.TreeMap; import javax.management.MBeanAttributeInfo; import javax.management.MBeanInfo; import javax.management.ObjectName;
import java.util.*; import javax.management.*;
[ "java.util", "javax.management" ]
java.util; javax.management;
697,190
public VersioningConfiguration getBucketVersioning(GetBucketVersioningArgs args) throws ErrorResponseException, InsufficientDataException, InternalException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, ServerException, XmlParserException { checkA...
VersioningConfiguration function(GetBucketVersioningArgs args) throws ErrorResponseException, InsufficientDataException, InternalException, InvalidKeyException, InvalidResponseException, IOException, NoSuchAlgorithmException, ServerException, XmlParserException { checkArgs(args); try (Response response = executeGet(arg...
/** * Gets versioning configuration of a bucket. * * <pre>Example:{@code * VersioningConfiguration config = * minioClient.getBucketVersioning( * GetBucketVersioningArgs.builder().bucket("my-bucketname").build()); * }</pre> * * @param args {@link GetBucketVersioningArgs} object. ...
Gets versioning configuration of a bucket. <code>Example:VersioningConfiguration config = minioClient.getBucketVersioning( GetBucketVersioningArgs.builder().bucket("my-bucketname").build()); </code>
getBucketVersioning
{ "repo_name": "balamurugana/minio-java", "path": "api/src/main/java/io/minio/MinioClient.java", "license": "apache-2.0", "size": 124773 }
[ "io.minio.errors.ErrorResponseException", "io.minio.errors.InsufficientDataException", "io.minio.errors.InternalException", "io.minio.errors.InvalidResponseException", "io.minio.errors.ServerException", "io.minio.errors.XmlParserException", "io.minio.messages.VersioningConfiguration", "java.io.IOExcep...
import io.minio.errors.ErrorResponseException; import io.minio.errors.InsufficientDataException; import io.minio.errors.InternalException; import io.minio.errors.InvalidResponseException; import io.minio.errors.ServerException; import io.minio.errors.XmlParserException; import io.minio.messages.VersioningConfiguration;...
import io.minio.errors.*; import io.minio.messages.*; import java.io.*; import java.security.*;
[ "io.minio.errors", "io.minio.messages", "java.io", "java.security" ]
io.minio.errors; io.minio.messages; java.io; java.security;
1,938,125
return LabOrder.class.isAssignableFrom(c); }
return LabOrder.class.isAssignableFrom(c); }
/** * Determines if the command object being submitted is a valid type * * @see org.springframework.validation.Validator#supports(java.lang.Class) */
Determines if the command object being submitted is a valid type
supports
{ "repo_name": "openmrs/openmrs-module-jsslab", "path": "api/src/main/java/org/openmrs/module/jsslab/validator/LabOrderValidator.java", "license": "mpl-2.0", "size": 1982 }
[ "org.openmrs.module.jsslab.db.LabOrder" ]
import org.openmrs.module.jsslab.db.LabOrder;
import org.openmrs.module.jsslab.db.*;
[ "org.openmrs.module" ]
org.openmrs.module;
2,180,472
private NodeList generateExpectedNodes(Element testElement) throws XPathExpressionException, FileNotFoundException, ParserConfigurationException, SAXException, IOException, URISyntaxException { if (externalExpectedFile.isAvailable()) { return externalExpectedFile.getNodes(testElement.getOwner...
NodeList function(Element testElement) throws XPathExpressionException, FileNotFoundException, ParserConfigurationException, SAXException, IOException, URISyntaxException { if (externalExpectedFile.isAvailable()) { return externalExpectedFile.getNodes(testElement.getOwnerDocument()); } else { return generateExpectedNod...
/** * Generates a node list from utfx:expected depending on whether an external file is in use * * @param testElement * @return node list * @throws XPathExpressionException * @throws FileNotFoundException * @throws ParserConfigurationException * @throws SAXException ...
Generates a node list from utfx:expected depending on whether an external file is in use
generateExpectedNodes
{ "repo_name": "bwagner/utf-x-framework-svn-trunk", "path": "src/java/utfx/framework/XSLTTransformTestCase.java", "license": "gpl-2.0", "size": 22260 }
[ "java.io.FileNotFoundException", "java.io.IOException", "java.net.URISyntaxException", "javax.xml.parsers.ParserConfigurationException", "javax.xml.xpath.XPathExpressionException", "org.w3c.dom.Element", "org.w3c.dom.NodeList", "org.xml.sax.SAXException" ]
import java.io.FileNotFoundException; import java.io.IOException; import java.net.URISyntaxException; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPathExpressionException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import org.xml.sax.SAXException;
import java.io.*; import java.net.*; import javax.xml.parsers.*; import javax.xml.xpath.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "java.io", "java.net", "javax.xml", "org.w3c.dom", "org.xml.sax" ]
java.io; java.net; javax.xml; org.w3c.dom; org.xml.sax;
1,290,253
public void testMergeScheduler() throws Exception { // 1. alg definition (required in every "logic" test) String algLines[] = { "# ----- properties ", "content.source=org.apache.lucene.benchmark.byTask.feeds.LineDocSource", "docs.file=" + getReuters20LinesFile(), "content.sourc...
void function() throws Exception { String algLines[] = { STR, STR, STR + getReuters20LinesFile(), STR, STR, STR, STR, STR + MyMergeScheduler.class.getName(), STR, STR, STR, STR, STRRounds\STR ResetSystemEraseSTR CreateIndexSTR { \STR AddDoc > : * STR} : 2STRdid not use the specified MergeSchedulerSTRwrong number of doc...
/** * Test that we can set merge scheduler". */
Test that we can set merge scheduler"
testMergeScheduler
{ "repo_name": "tokee/lucene", "path": "contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java", "license": "apache-2.0", "size": 40288 }
[ "org.apache.lucene.index.IndexWriter", "org.apache.lucene.index.LogDocMergePolicy" ]
import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.LogDocMergePolicy;
import org.apache.lucene.index.*;
[ "org.apache.lucene" ]
org.apache.lucene;
2,592,183
protected static ResultData findData(String data, ResultData root) { ResultData result = null; String[] pathItems = StringUtils.split(data, '.'); if (pathItems != null) { if (root instanceof MapResultData) { int count = pathItems.length; int index ...
static ResultData function(String data, ResultData root) { ResultData result = null; String[] pathItems = StringUtils.split(data, '.'); if (pathItems != null) { if (root instanceof MapResultData) { int count = pathItems.length; int index = 0; MapResultData map = (MapResultData) root; while (index < count && result == n...
/** * Finds a inner ResultData matching the specified data name in a ResultData * tree. Supports only MapResultData walking. * * @param data * the name of the data containing the value * @param root * the root of the tree * @return the ResultData matching t...
Finds a inner ResultData matching the specified data name in a ResultData tree. Supports only MapResultData walking
findData
{ "repo_name": "ra0077/jmeter", "path": "src/core/org/apache/jmeter/report/dashboard/AbstractDataExporter.java", "license": "apache-2.0", "size": 3989 }
[ "org.apache.commons.lang3.StringUtils", "org.apache.jmeter.report.processor.MapResultData", "org.apache.jmeter.report.processor.ResultData" ]
import org.apache.commons.lang3.StringUtils; import org.apache.jmeter.report.processor.MapResultData; import org.apache.jmeter.report.processor.ResultData;
import org.apache.commons.lang3.*; import org.apache.jmeter.report.processor.*;
[ "org.apache.commons", "org.apache.jmeter" ]
org.apache.commons; org.apache.jmeter;
363,485
public static String getValueOfParm(String parm, Event event) { String retParmVal = null; final String ifString = event.getInterface(); if (parm.equals(TAG_UEI)) { retParmVal = event.getUei(); } if (parm.equals(TAG_EVENT_DB_ID)) { if (event.hasDbid()) { retParmVal = Integer.toString(e...
static String function(String parm, Event event) { String retParmVal = null; final String ifString = event.getInterface(); if (parm.equals(TAG_UEI)) { retParmVal = event.getUei(); } if (parm.equals(TAG_EVENT_DB_ID)) { if (event.hasDbid()) { retParmVal = Integer.toString(event.getDbid()); } else { retParmVal = STR; } } ...
/** * Get the value of the parm for the event * * @param parm * the parm for which value is needed from the event * @param event * the event whose parm value is required * @return value of the event parm/element */
Get the value of the parm for the event
getValueOfParm
{ "repo_name": "tharindum/opennms_dashboard", "path": "opennms-services/src/main/java/org/opennms/netmgt/eventd/EventUtil.java", "license": "gpl-2.0", "size": 36577 }
[ "java.net.InetAddress", "java.sql.SQLException", "java.text.DateFormat", "java.util.Date", "org.opennms.core.utils.ThreadCategory", "org.opennms.netmgt.EventConstants", "org.opennms.netmgt.xml.event.Event", "org.opennms.netmgt.xml.event.Snmp", "org.opennms.netmgt.xml.event.Tticket" ]
import java.net.InetAddress; import java.sql.SQLException; import java.text.DateFormat; import java.util.Date; import org.opennms.core.utils.ThreadCategory; import org.opennms.netmgt.EventConstants; import org.opennms.netmgt.xml.event.Event; import org.opennms.netmgt.xml.event.Snmp; import org.opennms.netmgt.xml.event....
import java.net.*; import java.sql.*; import java.text.*; import java.util.*; import org.opennms.core.utils.*; import org.opennms.netmgt.*; import org.opennms.netmgt.xml.event.*;
[ "java.net", "java.sql", "java.text", "java.util", "org.opennms.core", "org.opennms.netmgt" ]
java.net; java.sql; java.text; java.util; org.opennms.core; org.opennms.netmgt;
2,717,318
private void adjustItem(int position, View v, boolean invalidChildHeight) { // Adjust item height ViewGroup.LayoutParams lp = v.getLayoutParams(); int height; if (position != mSrcPos && position != mFirstExpPos && position != mSecondExpPos) { height = ViewGroup.LayoutPar...
void function(int position, View v, boolean invalidChildHeight) { ViewGroup.LayoutParams lp = v.getLayoutParams(); int height; if (position != mSrcPos && position != mFirstExpPos && position != mSecondExpPos) { height = ViewGroup.LayoutParams.WRAP_CONTENT; } else { height = calcItemHeight(position, v, invalidChildHeigh...
/** * Sets layout param height, gravity, and visibility on * wrapped item. */
Sets layout param height, gravity, and visibility on wrapped item
adjustItem
{ "repo_name": "nibdev/otrta", "path": "src/com/nibdev/otrtav2/view/custom/dslv/DragSortListView.java", "license": "mit", "size": 100490 }
[ "android.view.Gravity", "android.view.View", "android.view.ViewGroup" ]
import android.view.Gravity; import android.view.View; import android.view.ViewGroup;
import android.view.*;
[ "android.view" ]
android.view;
2,318,075
BooleanWrapper isActive();
BooleanWrapper isActive();
/** * Returns true if the resource manager is operational and a client is connected. * * Throws SecurityException if client is not connected. * @return true if the resource manager is operational, false otherwise */
Returns true if the resource manager is operational and a client is connected. Throws SecurityException if client is not connected
isActive
{ "repo_name": "tobwiens/scheduling", "path": "rm/rm-client/src/main/java/org/ow2/proactive/resourcemanager/frontend/ResourceManager.java", "license": "agpl-3.0", "size": 23500 }
[ "org.objectweb.proactive.core.util.wrapper.BooleanWrapper" ]
import org.objectweb.proactive.core.util.wrapper.BooleanWrapper;
import org.objectweb.proactive.core.util.wrapper.*;
[ "org.objectweb.proactive" ]
org.objectweb.proactive;
2,020,958
public void handleResult(Object result) { if (viewer.getState() == Browser.DISCARDED) return; //Async cancel. if (dialog.getStatus() != MoveGroupSelectionDialog.CANCEL) dialog.setTargets((Collection) result); }
void function(Object result) { if (viewer.getState() == Browser.DISCARDED) return; if (dialog.getStatus() != MoveGroupSelectionDialog.CANCEL) dialog.setTargets((Collection) result); }
/** * Feeds the result back to the viewer. * @see DataTreeViewerLoader#handleResult(Object) */
Feeds the result back to the viewer
handleResult
{ "repo_name": "simleo/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/MoveDataLoader.java", "license": "gpl-2.0", "size": 3465 }
[ "java.util.Collection", "org.openmicroscopy.shoola.agents.treeviewer.browser.Browser", "org.openmicroscopy.shoola.agents.treeviewer.util.MoveGroupSelectionDialog" ]
import java.util.Collection; import org.openmicroscopy.shoola.agents.treeviewer.browser.Browser; import org.openmicroscopy.shoola.agents.treeviewer.util.MoveGroupSelectionDialog;
import java.util.*; import org.openmicroscopy.shoola.agents.treeviewer.browser.*; import org.openmicroscopy.shoola.agents.treeviewer.util.*;
[ "java.util", "org.openmicroscopy.shoola" ]
java.util; org.openmicroscopy.shoola;
1,528,423
protected List<RexFieldCollation> visitFieldCollations( List<RexFieldCollation> collations, boolean[] update) { ImmutableList.Builder<RexFieldCollation> clonedOperands = ImmutableList.builder(); for (RexFieldCollation collation : collations) { RexNode clonedOperand = collation.left.accept(...
List<RexFieldCollation> function( List<RexFieldCollation> collations, boolean[] update) { ImmutableList.Builder<RexFieldCollation> clonedOperands = ImmutableList.builder(); for (RexFieldCollation collation : collations) { RexNode clonedOperand = collation.left.accept(this); if ((clonedOperand != collation.left) && (upd...
/** * Visits each of a list of field collations and returns a list of the * results. * * @param collations List of field collations * @param update If not null, sets this to true if any of the expressions * was modified * @return Array of visited field collations */
Visits each of a list of field collations and returns a list of the results
visitFieldCollations
{ "repo_name": "wanglan/calcite", "path": "core/src/main/java/org/apache/calcite/rex/RexShuttle.java", "license": "apache-2.0", "size": 8899 }
[ "com.google.common.collect.ImmutableList", "java.util.List" ]
import com.google.common.collect.ImmutableList; import java.util.List;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
413,293
@SuppressWarnings("unchecked") public <T> T deserialize(String body, Type returnType) { try { if (apiClient.isLenientOnJson()) { JsonReader jsonReader = new JsonReader(new StringReader(body)); // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javad...
@SuppressWarnings(STR) <T> T function(String body, Type returnType) { try { if (apiClient.isLenientOnJson()) { JsonReader jsonReader = new JsonReader(new StringReader(body)); jsonReader.setLenient(true); return gson.fromJson(jsonReader, returnType); } else { return gson.fromJson(body, returnType); } } catch (JsonParseE...
/** * Deserialize the given JSON string to Java object. * * @param <T> Type * @param body The JSON string * @param returnType The type to deserialize into * @return The deserialized Java object */
Deserialize the given JSON string to Java object
deserialize
{ "repo_name": "huseyin-kilic/Fall2017Swe573", "path": "src/main/java/io/swagger/client/JSON.java", "license": "mit", "size": 6655 }
[ "com.google.gson.JsonDeserializer", "com.google.gson.JsonParseException", "com.google.gson.JsonSerializer", "com.google.gson.stream.JsonReader", "java.io.StringReader", "java.lang.reflect.Type", "java.util.Date" ]
import com.google.gson.JsonDeserializer; import com.google.gson.JsonParseException; import com.google.gson.JsonSerializer; import com.google.gson.stream.JsonReader; import java.io.StringReader; import java.lang.reflect.Type; import java.util.Date;
import com.google.gson.*; import com.google.gson.stream.*; import java.io.*; import java.lang.reflect.*; import java.util.*;
[ "com.google.gson", "java.io", "java.lang", "java.util" ]
com.google.gson; java.io; java.lang; java.util;
1,152,713
protected void updateLocation (BodyObject source, Location loc) { SceneLocation sloc = new SceneLocation(loc, source.getOid()); if (!_ssobj.occupantLocs.contains(sloc)) { // complain if they don't already have a location configured log.warning("Changing loc for occupant w...
void function (BodyObject source, Location loc) { SceneLocation sloc = new SceneLocation(loc, source.getOid()); if (!_ssobj.occupantLocs.contains(sloc)) { log.warning(STR, "where", where(), "who", source.who(), "nloc", loc, new Exception()); _ssobj.addToOccupantLocs(sloc); } else { _ssobj.updateOccupantLocs(sloc); } }
/** * Updates the location of the specified body. */
Updates the location of the specified body
updateLocation
{ "repo_name": "threerings/vilya", "path": "core/src/main/java/com/threerings/whirled/spot/server/SpotSceneManager.java", "license": "lgpl-2.1", "size": 21351 }
[ "com.threerings.crowd.data.BodyObject", "com.threerings.whirled.spot.data.Location", "com.threerings.whirled.spot.data.SceneLocation" ]
import com.threerings.crowd.data.BodyObject; import com.threerings.whirled.spot.data.Location; import com.threerings.whirled.spot.data.SceneLocation;
import com.threerings.crowd.data.*; import com.threerings.whirled.spot.data.*;
[ "com.threerings.crowd", "com.threerings.whirled" ]
com.threerings.crowd; com.threerings.whirled;
2,292,236
private Set<INode> determineKeptNodes(SimulinkModelGraph graph) { ListMap<String, List<INode>> nodesByLabel = getSubgraphsByLabel(graph); Set<INode> keep = new IdentityHashSet<INode>(); for (String label : nodesByLabel.getKeys()) { List<List<INode>> list = nodesByLabel.getCollection(label); if (list != n...
Set<INode> function(SimulinkModelGraph graph) { ListMap<String, List<INode>> nodesByLabel = getSubgraphsByLabel(graph); Set<INode> keep = new IdentityHashSet<INode>(); for (String label : nodesByLabel.getKeys()) { List<List<INode>> list = nodesByLabel.getCollection(label); if (list != null && list.size() >= 2) { for (L...
/** * Calculates the set of nodes that should be kept as they occur in at least * one duplicated subgraph. */
Calculates the set of nodes that should be kept as they occur in at least one duplicated subgraph
determineKeptNodes
{ "repo_name": "vimaier/conqat", "path": "org.conqat.engine.simulink/src/org/conqat/engine/simulink/clones/preprocess/NonDuplicateSubgraphPreprocessor.java", "license": "apache-2.0", "size": 5439 }
[ "java.util.List", "java.util.Set", "org.conqat.engine.model_clones.model.INode", "org.conqat.engine.simulink.clones.model.SimulinkModelGraph", "org.conqat.lib.commons.collections.IdentityHashSet", "org.conqat.lib.commons.collections.ListMap" ]
import java.util.List; import java.util.Set; import org.conqat.engine.model_clones.model.INode; import org.conqat.engine.simulink.clones.model.SimulinkModelGraph; import org.conqat.lib.commons.collections.IdentityHashSet; import org.conqat.lib.commons.collections.ListMap;
import java.util.*; import org.conqat.engine.model_clones.model.*; import org.conqat.engine.simulink.clones.model.*; import org.conqat.lib.commons.collections.*;
[ "java.util", "org.conqat.engine", "org.conqat.lib" ]
java.util; org.conqat.engine; org.conqat.lib;
2,099,703
public static OMElement buildOMElement(InputStream inputStream) throws Exception { XMLStreamReader parser; StAXOMBuilder builder; try { parser = XMLInputFactory.newInstance().createXMLStreamReader(inputStream); builder = new StAXOMBuilder(parser); } c...
static OMElement function(InputStream inputStream) throws Exception { XMLStreamReader parser; StAXOMBuilder builder; try { parser = XMLInputFactory.newInstance().createXMLStreamReader(inputStream); builder = new StAXOMBuilder(parser); } catch (XMLStreamException e) { String msg = STR; log.error(msg, e); throw new Excep...
/** * Build OMElement from inputstream * @param inputStream * @return OMElement * @throws Exception * @return */
Build OMElement from inputstream
buildOMElement
{ "repo_name": "susinda/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java", "license": "apache-2.0", "size": 251683 }
[ "java.io.InputStream", "javax.xml.stream.XMLInputFactory", "javax.xml.stream.XMLStreamException", "javax.xml.stream.XMLStreamReader", "org.apache.axiom.om.OMElement", "org.apache.axiom.om.impl.builder.StAXOMBuilder" ]
import java.io.InputStream; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.impl.builder.StAXOMBuilder;
import java.io.*; import javax.xml.stream.*; import org.apache.axiom.om.*; import org.apache.axiom.om.impl.builder.*;
[ "java.io", "javax.xml", "org.apache.axiom" ]
java.io; javax.xml; org.apache.axiom;
1,327,075
@Test public final void testSetParameterStringNull() { IPv6RemoteATCommandRequestPacket packet = new IPv6RemoteATCommandRequestPacket(frameID, ipv6address, transmitOptions, command, parameterStr); // Call the method under test. packet.setParameter((String)null); // Verify the result. assertThat("Con...
final void function() { IPv6RemoteATCommandRequestPacket packet = new IPv6RemoteATCommandRequestPacket(frameID, ipv6address, transmitOptions, command, parameterStr); packet.setParameter((String)null); assertThat(STR, packet.getParameterAsString(), is(equalTo(null))); assertThat(STR, packet.getParameter(), is(equalTo(nu...
/** * Test method for {@link com.digi.xbee.api.packet.thread.IPv6RemoteATCommandRequestPacket#setParameter(String)}. * * <p>Test if a string parameter with {@code null} value is properly * configured.</p> */
Test method for <code>com.digi.xbee.api.packet.thread.IPv6RemoteATCommandRequestPacket#setParameter(String)</code>. Test if a string parameter with null value is properly configured
testSetParameterStringNull
{ "repo_name": "digidotcom/XBeeJavaLibrary", "path": "library/src/test/java/com/digi/xbee/api/packet/thread/IPv6RemoteATCommandRequestPacketTest.java", "license": "mpl-2.0", "size": 37308 }
[ "org.hamcrest.core.Is", "org.junit.Assert" ]
import org.hamcrest.core.Is; import org.junit.Assert;
import org.hamcrest.core.*; import org.junit.*;
[ "org.hamcrest.core", "org.junit" ]
org.hamcrest.core; org.junit;
827,055
public Builder notionalSchedule(NotionalSchedule notionalSchedule) { JodaBeanUtils.notNull(notionalSchedule, "notionalSchedule"); this.notionalSchedule = notionalSchedule; return this; }
Builder function(NotionalSchedule notionalSchedule) { JodaBeanUtils.notNull(notionalSchedule, STR); this.notionalSchedule = notionalSchedule; return this; }
/** * Sets the notional schedule. * <p> * The notional amount schedule, which can vary during the lifetime of the swap. * In most cases, the notional amount is not exchanged, with only the net difference being exchanged. * However, in certain cases, initial, final or intermediate amounts are ex...
Sets the notional schedule. The notional amount schedule, which can vary during the lifetime of the swap. In most cases, the notional amount is not exchanged, with only the net difference being exchanged. However, in certain cases, initial, final or intermediate amounts are exchanged
notionalSchedule
{ "repo_name": "ChinaQuants/Strata", "path": "modules/product/src/main/java/com/opengamma/strata/product/swap/RateCalculationSwapLeg.java", "license": "apache-2.0", "size": 27790 }
[ "org.joda.beans.JodaBeanUtils" ]
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
2,520,028
public void test_17_6554() throws Exception { Connection alphaConn = openUserConnection( ALPHA ); Connection betaConn = openUserConnection( BETA ); alphaConn.setAutoCommit( false ); betaConn.setAutoCommit( false ); String createSequence = "create sequence seq6554"; ...
void function() throws Exception { Connection alphaConn = openUserConnection( ALPHA ); Connection betaConn = openUserConnection( BETA ); alphaConn.setAutoCommit( false ); betaConn.setAutoCommit( false ); String createSequence = STR; String nextValueFor = STR; String[][] nextValueForResults = new String[][] { { STR }, }...
/** * Verify that a sequence can be used in the same transaction * which created it. */
Verify that a sequence can be used in the same transaction which created it
test_17_6554
{ "repo_name": "trejkaz/derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/SequenceTest.java", "license": "apache-2.0", "size": 29822 }
[ "java.sql.Connection" ]
import java.sql.Connection;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,751,153
@Test public void folderExistsTest() { boolean actual = conn.folderExists( "a/b" ); Assert.assertTrue( "Folder B exists", actual ); } private class Mconn extends MailConnection { Store store; Folder a; Folder b; Folder c; Folder inbox; Integer mode = -1; boolean cCreated ...
void function() { boolean actual = conn.folderExists( "a/b" ); Assert.assertTrue( STR, actual ); } private class Mconn extends MailConnection { Store store; Folder a; Folder b; Folder c; Folder inbox; Integer mode = -1; boolean cCreated = false; public Mconn( LogChannelInterface log ) throws KettleException, MessagingE...
/** * PDI-7426 Test {@link MailConnection#folderExists(String)} method. */
PDI-7426 Test <code>MailConnection#folderExists(String)</code> method
folderExistsTest
{ "repo_name": "aminmkhan/pentaho-kettle", "path": "engine/src/test/java/org/pentaho/di/job/entries/getpop/MailConnectionTest.java", "license": "apache-2.0", "size": 4398 }
[ "javax.mail.Folder", "javax.mail.MessagingException", "javax.mail.Store", "org.junit.Assert", "org.mockito.Mockito", "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.core.logging.LogChannelInterface" ]
import javax.mail.Folder; import javax.mail.MessagingException; import javax.mail.Store; import org.junit.Assert; import org.mockito.Mockito; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.logging.LogChannelInterface;
import javax.mail.*; import org.junit.*; import org.mockito.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.logging.*;
[ "javax.mail", "org.junit", "org.mockito", "org.pentaho.di" ]
javax.mail; org.junit; org.mockito; org.pentaho.di;
1,480,952
public IdempotentConsumerDefinition messageIdRepository(IdempotentRepository<?> idempotentRepository) { setMessageIdRepository(idempotentRepository); return this; }
IdempotentConsumerDefinition function(IdempotentRepository<?> idempotentRepository) { setMessageIdRepository(idempotentRepository); return this; }
/** * Sets the the message id repository for the idempotent consumer * * @param idempotentRepository the repository instance of idempotent * @return builder */
Sets the the message id repository for the idempotent consumer
messageIdRepository
{ "repo_name": "logzio/camel", "path": "camel-core/src/main/java/org/apache/camel/model/IdempotentConsumerDefinition.java", "license": "apache-2.0", "size": 7616 }
[ "org.apache.camel.spi.IdempotentRepository" ]
import org.apache.camel.spi.IdempotentRepository;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
1,422,918
public URL getUrl(String path) { try { return sslSocketFactory != null ? new URL("https://" + getHostName() + ":" + getPort() + path) : new URL("http://" + getHostName() + ":" + getPort() + path); } catch (MalformedURLException e) { throw new AssertionError(e); } }
URL function(String path) { try { return sslSocketFactory != null ? new URL(STRhttp: } catch (MalformedURLException e) { throw new AssertionError(e); } }
/** * Returns a URL for connecting to this server. * @param path the request path, such as "/". */
Returns a URL for connecting to this server
getUrl
{ "repo_name": "DirtyUnicorns/android_external_okhttp", "path": "mockwebserver/src/main/java/com/squareup/okhttp/mockwebserver/MockWebServer.java", "license": "apache-2.0", "size": 28383 }
[ "java.net.MalformedURLException" ]
import java.net.MalformedURLException;
import java.net.*;
[ "java.net" ]
java.net;
2,434,137
double project(Vector x) throws UnsupportedOperationException;
double project(Vector x) throws UnsupportedOperationException;
/** * Inverse of embed (many to one). * * @param x * @return the projection of x onto the embedding of this line. * @throws UnsupportedOperationException */
Inverse of embed (many to one)
project
{ "repo_name": "sodash/open-code", "path": "winterwell.maths/src/com/winterwell/maths/vector/IMetric1D.java", "license": "mit", "size": 963 }
[ "no.uib.cipr.matrix.Vector" ]
import no.uib.cipr.matrix.Vector;
import no.uib.cipr.matrix.*;
[ "no.uib.cipr" ]
no.uib.cipr;
1,882,303
public Set putOutgoingUserData(final DistributionMessage message) throws NotSerializableException { return sendMessage(message); }
Set function(final DistributionMessage message) throws NotSerializableException { return sendMessage(message); }
/** * Adds a message to the outgoing queue. Note that * <code>message</code> should not be modified after it has been * added to the queue. After <code>message</code> is distributed, * it will be recycled. * * @return list of recipients who did not receive the message * @throws NotSerializableExc...
Adds a message to the outgoing queue. Note that <code>message</code> should not be modified after it has been added to the queue. After <code>message</code> is distributed, it will be recycled
putOutgoingUserData
{ "repo_name": "robertgeiger/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java", "license": "apache-2.0", "size": 176592 }
[ "java.io.NotSerializableException", "java.util.Set" ]
import java.io.NotSerializableException; import java.util.Set;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,767,302
public void setFaceColor(Color fc) { face_color = fc; repaint(); }
void function(Color fc) { face_color = fc; repaint(); }
/** Set the sign face color. * @param fc Face color of sign. */
Set the sign face color
setFaceColor
{ "repo_name": "CA-IRIS/mn-iris", "path": "src/us/mn/state/dot/tms/client/dms/SignPixelPanel.java", "license": "gpl-2.0", "size": 10771 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
881,005
public static Runner current() { ThreadGroup group = Thread.currentThread().getThreadGroup(); if (group == cMainGroup) { return cMainRunner; } ConcurrentHashMap<ThreadGroup, Runner> runners = cRunners; if (runners == null) { synchronized (Runner.cla...
static Runner function() { ThreadGroup group = Thread.currentThread().getThreadGroup(); if (group == cMainGroup) { return cMainRunner; } ConcurrentHashMap<ThreadGroup, Runner> runners = cRunners; if (runners == null) { synchronized (Runner.class) { runners = cRunners; if (runners == null) { cRunners = runners = new Con...
/** * Return an executor for the current thread's group or security manager. */
Return an executor for the current thread's group or security manager
current
{ "repo_name": "cojen/Tupl", "path": "src/main/java/org/cojen/tupl/util/Runner.java", "license": "agpl-3.0", "size": 7245 }
[ "java.util.concurrent.ConcurrentHashMap" ]
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
37,641
private void commandWait(Shell shell, Command cmd) throws Exception { while (!cmd.isFinished()) { synchronized (cmd) { try { if (!cmd.isFinished()) { cmd.wait(mTimeout); } } catch (InterruptedExceptio...
void function(Shell shell, Command cmd) throws Exception { while (!cmd.isFinished()) { synchronized (cmd) { try { if (!cmd.isFinished()) { cmd.wait(mTimeout); } } catch (InterruptedException e) { Log.e(TAG, mTAG + e.getMessage()); } } if (!cmd.isExecuting() && !cmd.isFinished()) { Exception e = new Exception(); if (!sh...
/** * This below method is part of the RootTools Project: https://github.com/Stericson/RootTools * Copyright (c) 2012 Stephen Erickson, Chris Ravenscroft, Dominik Schuermann, Adam Shanks * * Slightly modified commandWait method as found in RootToolsInternalMethods.java to utilise * the user sel...
This below method is part of the RootTools Project: HREF Copyright (c) 2012 Stephen Erickson, Chris Ravenscroft, Dominik Schuermann, Adam Shanks Slightly modified commandWait method as found in RootToolsInternalMethods.java to utilise the user selected timeout value
commandWait
{ "repo_name": "5GSD/AIMSICDL", "path": "AIMSICD/src/main/java/zz/aimsicd/lite/ui/fragments/AtCommandFragment.java", "license": "gpl-3.0", "size": 17029 }
[ "android.util.Log", "com.stericson.RootShell" ]
import android.util.Log; import com.stericson.RootShell;
import android.util.*; import com.stericson.*;
[ "android.util", "com.stericson" ]
android.util; com.stericson;
2,508,494
private void addNamespacePanelHeader(Panel panel, Attribute attribute) { PanelHeader header = new PanelHeader(); header.setText(translation.preferredGroupNameHeaderText() + attribute.getFriendlyNameParameter() + "\'"); panel.add(header); }
void function(Panel panel, Attribute attribute) { PanelHeader header = new PanelHeader(); header.setText(translation.preferredGroupNameHeaderText() + attribute.getFriendlyNameParameter() + "\'"); panel.add(header); }
/** * Sets up the header for panel with namespace name */
Sets up the header for panel with namespace name
addNamespacePanelHeader
{ "repo_name": "zlamalp/perun-wui", "path": "perun-wui-profile/src/main/java/cz/metacentrum/perun/wui/profile/pages/settings/preferredgroupnames/PreferredGroupNamesView.java", "license": "bsd-2-clause", "size": 8350 }
[ "cz.metacentrum.perun.wui.model.beans.Attribute", "org.gwtbootstrap3.client.ui.Panel", "org.gwtbootstrap3.client.ui.PanelHeader" ]
import cz.metacentrum.perun.wui.model.beans.Attribute; import org.gwtbootstrap3.client.ui.Panel; import org.gwtbootstrap3.client.ui.PanelHeader;
import cz.metacentrum.perun.wui.model.beans.*; import org.gwtbootstrap3.client.ui.*;
[ "cz.metacentrum.perun", "org.gwtbootstrap3.client" ]
cz.metacentrum.perun; org.gwtbootstrap3.client;
72,957
public AfterWatermarkEarlyAndLate withLateFirings(OnceTrigger lateFirings) { checkNotNull(lateFirings, "Must specify the trigger to use for late firings"); return new AfterWatermarkEarlyAndLate(Never.ever(), lateFirings); }
AfterWatermarkEarlyAndLate function(OnceTrigger lateFirings) { checkNotNull(lateFirings, STR); return new AfterWatermarkEarlyAndLate(Never.ever(), lateFirings); }
/** * Creates a new {@code Trigger} like the this, except that it fires repeatedly whenever the * given {@code Trigger} fires after the watermark has passed the end of the window. */
Creates a new Trigger like the this, except that it fires repeatedly whenever the given Trigger fires after the watermark has passed the end of the window
withLateFirings
{ "repo_name": "lukecwik/incubator-beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/AfterWatermark.java", "license": "apache-2.0", "size": 7694 }
[ "org.apache.beam.sdk.transforms.windowing.Trigger", "org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions" ]
import org.apache.beam.sdk.transforms.windowing.Trigger; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions;
import org.apache.beam.sdk.transforms.windowing.*; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.*;
[ "org.apache.beam" ]
org.apache.beam;
1,204,084
public ServiceFuture<Void> deleteCredentialAsync(String accountName, String databaseName, String credentialName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteCredentialWithServiceResponseAsync(accountName, databaseName, credentialName), serviceCallback); }
ServiceFuture<Void> function(String accountName, String databaseName, String credentialName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteCredentialWithServiceResponseAsync(accountName, databaseName, credentialName), serviceCallback); }
/** * Deletes the specified credential in the specified database. * * @param accountName The Azure Data Lake Analytics account upon which to execute catalog operations. * @param databaseName The name of the database containing the credential. * @param credentialName The name of the credential t...
Deletes the specified credential in the specified database
deleteCredentialAsync
{ "repo_name": "jianghaolu/azure-sdk-for-java", "path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/CatalogsImpl.java", "license": "mit", "size": 683869 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,801,213
public static @Nonnull Matcher<PermittedByAcl> hasAclName( @Nonnull Matcher<? super String> subMatcher) { return new PermittedByAclMatchers.HasAclName(subMatcher); }
static @Nonnull Matcher<PermittedByAcl> function( @Nonnull Matcher<? super String> subMatcher) { return new PermittedByAclMatchers.HasAclName(subMatcher); }
/** * Provides a matcher that matches if the provided {@code subMatcher} matches the {@link * IpSpaceReference}'s {@code name}. */
Provides a matcher that matches if the provided subMatcher matches the <code>IpSpaceReference</code>'s name
hasAclName
{ "repo_name": "arifogel/batfish", "path": "projects/batfish-common-protocol/src/test/java/org/batfish/datamodel/matchers/DataModelMatchers.java", "license": "apache-2.0", "size": 17325 }
[ "javax.annotation.Nonnull", "org.batfish.datamodel.acl.PermittedByAcl", "org.hamcrest.Matcher" ]
import javax.annotation.Nonnull; import org.batfish.datamodel.acl.PermittedByAcl; import org.hamcrest.Matcher;
import javax.annotation.*; import org.batfish.datamodel.acl.*; import org.hamcrest.*;
[ "javax.annotation", "org.batfish.datamodel", "org.hamcrest" ]
javax.annotation; org.batfish.datamodel; org.hamcrest;
2,696,123
if (apiMessage.length() > 3) { try { if(apiMessage.length() >= 8 && apiMessage.charAt(2) == ':' && apiMessage.charAt(5) == ':') { timeStamp = apiMessage.substring(0,8); apiMessage = apiMessage.substring(9, apiMessage.length() - 2); } else { apiMessage = apiMessage.substring(0, ...
if (apiMessage.length() > 3) { try { if(apiMessage.length() >= 8 && apiMessage.charAt(2) == ':' && apiMessage.charAt(5) == ':') { timeStamp = apiMessage.substring(0,8); apiMessage = apiMessage.substring(9, apiMessage.length() - 2); } else { apiMessage = apiMessage.substring(0, apiMessage.length() - 2); } apiCodeReceive...
/** * Parses the API message and extracts the information */
Parses the API message and extracts the information
parseAPIMessage
{ "repo_name": "smerschjohann/openhab", "path": "bundles/binding/org.openhab.binding.dscalarm/src/main/java/org/openhab/binding/dscalarm/internal/protocol/APIMessage.java", "license": "epl-1.0", "size": 29760 }
[ "org.openhab.binding.dscalarm.internal.protocol.APICode" ]
import org.openhab.binding.dscalarm.internal.protocol.APICode;
import org.openhab.binding.dscalarm.internal.protocol.*;
[ "org.openhab.binding" ]
org.openhab.binding;
1,510,043
jPanel1 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); nntable = new javax.swing.JTable(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); nntable.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { ...
jPanel1 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); nntable = new javax.swing.JTable(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); nntable.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null, null, null, null, null, null,...
/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. always regenerated by the Form Editor
initComponents
{ "repo_name": "dimasalomatine/SDI_BATool", "path": "src/NN2HLBP/EditNNMap.java", "license": "gpl-2.0", "size": 6779 }
[ "javax.swing.AbstractCellEditor", "javax.swing.JComponent", "javax.swing.JTable", "javax.swing.JTextField", "javax.swing.table.DefaultTableModel", "javax.swing.table.TableCellEditor" ]
import javax.swing.AbstractCellEditor; import javax.swing.JComponent; import javax.swing.JTable; import javax.swing.JTextField; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableCellEditor;
import javax.swing.*; import javax.swing.table.*;
[ "javax.swing" ]
javax.swing;
500,218
public void reply(String content) throws IOException, ParseException { DiscordClient.get().sendMessage(String.format("%s, %s", this.getAuthor(), content), this.getChannel().getID()); }
void function(String content) throws IOException, ParseException { DiscordClient.get().sendMessage(String.format(STR, this.getAuthor(), content), this.getChannel().getID()); }
/** * Adds an @mention to the author of the referenced Message * object before your content * * @param content Message to send. */
Adds an @mention to the author of the referenced Message object before your content
reply
{ "repo_name": "nerd/Discord4J", "path": "src/main/java/sx/blah/discord/handle/obj/Message.java", "license": "gpl-2.0", "size": 2689 }
[ "java.io.IOException", "org.json.simple.parser.ParseException" ]
import java.io.IOException; import org.json.simple.parser.ParseException;
import java.io.*; import org.json.simple.parser.*;
[ "java.io", "org.json.simple" ]
java.io; org.json.simple;
152,448
private static List<Port> mergePortInfo(List<Port> ports, PortType[] portTypes, String nodeId) { List<Port> result = new ArrayList<>(); int numDocPorts = ports.size(); int numImplPorts = portTypes.length; if (numDocPorts != numImplPorts) { LOGGER.warn(String.format("%s: Documentation does not match implem...
static List<Port> function(List<Port> ports, PortType[] portTypes, String nodeId) { List<Port> result = new ArrayList<>(); int numDocPorts = ports.size(); int numImplPorts = portTypes.length; if (numDocPorts != numImplPorts) { LOGGER.warn(String.format(STR, nodeId, numDocPorts, numImplPorts)); } for (int index = 0; ind...
/** * Merge port information which is defined (a) in the node's documentation, (b) * via the {@link NodeModel}'s implementation. * * @param ports * The port info from the documentation. * @param portTypes * The port type info from the implementation. * @param nodeId * ...
Merge port information which is defined (a) in the node's documentation, (b) via the <code>NodeModel</code>'s implementation
mergePortInfo
{ "repo_name": "qqilihq/knime-json-node-doc-generator", "path": "de.philippkatz.knime.jsondocgen.application/src/de/philippkatz/knime/jsondocgen/JsonNodeDocuGenerator.java", "license": "gpl-3.0", "size": 24416 }
[ "de.philippkatz.knime.jsondocgen.docs.NodeDoc", "java.util.ArrayList", "java.util.List", "org.knime.core.node.port.PortType" ]
import de.philippkatz.knime.jsondocgen.docs.NodeDoc; import java.util.ArrayList; import java.util.List; import org.knime.core.node.port.PortType;
import de.philippkatz.knime.jsondocgen.docs.*; import java.util.*; import org.knime.core.node.port.*;
[ "de.philippkatz.knime", "java.util", "org.knime.core" ]
de.philippkatz.knime; java.util; org.knime.core;
2,366,407
public void setAccessKey(@NotNull String accessKey) { this.accessKey = Preconditions.checkNotNull(accessKey); }
void function(@NotNull String accessKey) { this.accessKey = Preconditions.checkNotNull(accessKey); }
/** * Set the AWS access key * * @param accessKey * access key */
Set the AWS access key
setAccessKey
{ "repo_name": "brightchen/apex-malhar", "path": "library/src/main/java/org/apache/apex/malhar/lib/fs/s3/S3TupleOutputModule.java", "license": "apache-2.0", "size": 10576 }
[ "com.google.common.base.Preconditions", "javax.validation.constraints.NotNull" ]
import com.google.common.base.Preconditions; import javax.validation.constraints.NotNull;
import com.google.common.base.*; import javax.validation.constraints.*;
[ "com.google.common", "javax.validation" ]
com.google.common; javax.validation;
216,238
@BeanTagAttribute public List<MetaTag> getAdditionalMetaTags() { return additionalMetaTags; }
List<MetaTag> function() { return additionalMetaTags; }
/** * List of additional meta tags that should be included with the View in the html head tag. * * @return additionalMetaTags */
List of additional meta tags that should be included with the View in the html head tag
getAdditionalMetaTags
{ "repo_name": "kuali/kc-rice", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/view/View.java", "license": "apache-2.0", "size": 82752 }
[ "java.util.List", "org.kuali.rice.krad.uif.element.MetaTag" ]
import java.util.List; import org.kuali.rice.krad.uif.element.MetaTag;
import java.util.*; import org.kuali.rice.krad.uif.element.*;
[ "java.util", "org.kuali.rice" ]
java.util; org.kuali.rice;
930,625