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 boolean validateMessageView_isAffectedBy(MessageView messageView, DiagnosticChain diagnostics, Map<Object, Object> context) { return validate (RamPackage.Literals.MESSAGE_VIEW, messageView, diagnostics, context, ...
boolean function(MessageView messageView, DiagnosticChain diagnostics, Map<Object, Object> context) { return validate (RamPackage.Literals.MESSAGE_VIEW, messageView, diagnostics, context, STRisAffectedBy", MESSAGE_VIEW__IS_AFFECTED_BY__EEXPRESSION, Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0); }
/** * Validates the isAffectedBy constraint of '<em>Message View</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Validates the isAffectedBy constraint of 'Message View'.
validateMessageView_isAffectedBy
{ "repo_name": "mschoettle/ecse429-fall15-project", "path": "ca.mcgill.sel.ram/src/ca/mcgill/sel/ram/util/RamValidator.java", "license": "gpl-2.0", "size": 147268 }
[ "ca.mcgill.sel.ram.MessageView", "ca.mcgill.sel.ram.RamPackage", "java.util.Map", "org.eclipse.emf.common.util.Diagnostic", "org.eclipse.emf.common.util.DiagnosticChain" ]
import ca.mcgill.sel.ram.MessageView; import ca.mcgill.sel.ram.RamPackage; import java.util.Map; import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.common.util.DiagnosticChain;
import ca.mcgill.sel.ram.*; import java.util.*; import org.eclipse.emf.common.util.*;
[ "ca.mcgill.sel", "java.util", "org.eclipse.emf" ]
ca.mcgill.sel; java.util; org.eclipse.emf;
2,006,680
public void drawAndUpdate(Canvas canvas) { if (canvas == null) return; // Check if we have exceeded the maximum number of generations if (mEmptyTimes > MAX_EMPTY_TIMES) { // restart after a delay; mGolThread.GOLRestarting(); init(mCanvas.getW...
void function(Canvas canvas) { if (canvas == null) return; if (mEmptyTimes > MAX_EMPTY_TIMES) { mGolThread.GOLRestarting(); init(mCanvas.getWidth(), mCanvas.getHeight()); return; } if (mFirstTime) { mPaint.setColor(Color.BLACK); mCanvas.drawRect(0, 0, mCanvas.getWidth(), mCanvas.getHeight(), mPaint); mFirstTime = false...
/** * Computes and draws the next generation in the game of life. Uses a list * of changes so not every cell needs to be checked. */
Computes and draws the next generation in the game of life. Uses a list of changes so not every cell needs to be checked
drawAndUpdate
{ "repo_name": "GavinDBrown/Amazing", "path": "src/com/GavinDev/Amazing/Maze/GameOfLife.java", "license": "gpl-3.0", "size": 15855 }
[ "android.graphics.Canvas", "android.graphics.Color", "java.util.Map" ]
import android.graphics.Canvas; import android.graphics.Color; import java.util.Map;
import android.graphics.*; import java.util.*;
[ "android.graphics", "java.util" ]
android.graphics; java.util;
1,656,668
public static List<Long> grubbsTest(GeoTimeSerie gts, boolean useMedian, double alpha) throws WarpScriptException { doubleCheck(gts); List<Long> anomalous_ticks = new ArrayList<Long>(); int N = gts.values; if (N < 3) { // no anomalous tick in this case return anomalous_ticks; } ...
static List<Long> function(GeoTimeSerie gts, boolean useMedian, double alpha) throws WarpScriptException { doubleCheck(gts); List<Long> anomalous_ticks = new ArrayList<Long>(); int N = gts.values; if (N < 3) { return anomalous_ticks; } double[] musigma = madsigma(gts, useMedian); double m = musigma[0]; double std = mus...
/** * Applying Grubbs' test using mean/std or median/mad * @see http://www.itl.nist.gov/div898/handbook/eda/section3/eda35h1.htm * * @param gts * @param useMedian Should the test use median/mad instead of mean/std * @param alpha Significance level with which to accept or reject anomalies. Defau...
Applying Grubbs' test using mean/std or median/mad
grubbsTest
{ "repo_name": "hbs/warp10-platform", "path": "warp10/src/main/java/io/warp10/continuum/gts/GTSOutliersHelper.java", "license": "apache-2.0", "size": 25525 }
[ "io.warp10.script.WarpScriptException", "java.util.ArrayList", "java.util.List", "org.apache.commons.math3.distribution.TDistribution" ]
import io.warp10.script.WarpScriptException; import java.util.ArrayList; import java.util.List; import org.apache.commons.math3.distribution.TDistribution;
import io.warp10.script.*; import java.util.*; import org.apache.commons.math3.distribution.*;
[ "io.warp10.script", "java.util", "org.apache.commons" ]
io.warp10.script; java.util; org.apache.commons;
1,730,009
@DoesServiceRequest public ServiceStats getServiceStats() throws StorageException { return this.getServiceStats(null , null ); }
ServiceStats function() throws StorageException { return this.getServiceStats(null , null ); }
/** * Queries the service for the {@link ServiceStats}. * * @return A {@link ServiceStats} object for the given storage service. * * @throws StorageException * If a storage service error occurred. */
Queries the service for the <code>ServiceStats</code>
getServiceStats
{ "repo_name": "horizon-institute/runspotrun-android-client", "path": "src/com/microsoft/azure/storage/blob/CloudBlobClient.java", "license": "agpl-3.0", "size": 29857 }
[ "com.microsoft.azure.storage.ServiceStats", "com.microsoft.azure.storage.StorageException" ]
import com.microsoft.azure.storage.ServiceStats; import com.microsoft.azure.storage.StorageException;
import com.microsoft.azure.storage.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
426,977
public void printThreadPoolStats(PrintStream outs) { ObjectName query; try { query = new ObjectName("org.apache.cassandra.concurrent:type=*"); Set<ObjectName> result = mbeanServerConn.queryNames(query, null); for (ObjectName objectName : result) ...
void function(PrintStream outs) { ObjectName query; try { query = new ObjectName(STR); Set<ObjectName> result = mbeanServerConn.queryNames(query, null); for (ObjectName objectName : result) { String poolName = objectName.getKeyProperty("type"); IExecutorMBean threadPoolProxy = JMX.newMBeanProxy(mbeanServerConn, objectN...
/** * Print out the size of the queues in the thread pools * * @param outs Output stream to generate the output on. */
Print out the size of the queues in the thread pools
printThreadPoolStats
{ "repo_name": "sammyyu/Cassandra", "path": "src/java/org/apache/cassandra/tools/NodeProbe.java", "license": "apache-2.0", "size": 21669 }
[ "java.io.IOException", "java.io.PrintStream", "java.util.Set", "javax.management.JMX", "javax.management.MalformedObjectNameException", "javax.management.ObjectName", "org.apache.cassandra.concurrent.IExecutorMBean" ]
import java.io.IOException; import java.io.PrintStream; import java.util.Set; import javax.management.JMX; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import org.apache.cassandra.concurrent.IExecutorMBean;
import java.io.*; import java.util.*; import javax.management.*; import org.apache.cassandra.concurrent.*;
[ "java.io", "java.util", "javax.management", "org.apache.cassandra" ]
java.io; java.util; javax.management; org.apache.cassandra;
1,077,919
String getVApp(String org, String vdc, String service, String vmName, PaasManagerUser user) throws IPNotRetrievedException, ClaudiaResourceNotFoundException, NetworkNotRetrievedException, OSNotRetrievedException;
String getVApp(String org, String vdc, String service, String vmName, PaasManagerUser user) throws IPNotRetrievedException, ClaudiaResourceNotFoundException, NetworkNotRetrievedException, OSNotRetrievedException;
/** * Get VApp of a Virtual Machine. */
Get VApp of a Virtual Machine
getVApp
{ "repo_name": "hmunfru/fiware-paas", "path": "core/src/main/java/com/telefonica/euro_iaas/paasmanager/claudia/ClaudiaClient.java", "license": "apache-2.0", "size": 7534 }
[ "com.telefonica.euro_iaas.paasmanager.exception.ClaudiaResourceNotFoundException", "com.telefonica.euro_iaas.paasmanager.exception.IPNotRetrievedException", "com.telefonica.euro_iaas.paasmanager.exception.NetworkNotRetrievedException", "com.telefonica.euro_iaas.paasmanager.exception.OSNotRetrievedException", ...
import com.telefonica.euro_iaas.paasmanager.exception.ClaudiaResourceNotFoundException; import com.telefonica.euro_iaas.paasmanager.exception.IPNotRetrievedException; import com.telefonica.euro_iaas.paasmanager.exception.NetworkNotRetrievedException; import com.telefonica.euro_iaas.paasmanager.exception.OSNotRetrievedE...
import com.telefonica.euro_iaas.paasmanager.exception.*; import com.telefonica.euro_iaas.paasmanager.model.dto.*;
[ "com.telefonica.euro_iaas" ]
com.telefonica.euro_iaas;
2,561,855
@Test public void statesLongTest() { DataPipe pipeToTransform = new DataPipe(); EquivalenceClassTransformer eqTransformer = new EquivalenceClassTransformer(); String[] statesLong = { "Alabama", "Alaska", "American Samoa", "Arizona", "Arkansas", "Cal...
void function() { DataPipe pipeToTransform = new DataPipe(); EquivalenceClassTransformer eqTransformer = new EquivalenceClassTransformer(); String[] statesLong = { STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, "Guam", STR, "Idaho", STR, STR, "Iowa", STR, STR, STR, "Maine", STR, STR, STR, STR, STR, STR, ST...
/** * %state or $stateLong generates from a predefined list */
%state or $stateLong generates from a predefined list
statesLongTest
{ "repo_name": "leeny324/DataGenerator", "path": "dg-core/src/test/java/org/finra/datagenerator/consumer/EquivalenceClassTransformerTest.java", "license": "apache-2.0", "size": 27496 }
[ "java.util.Arrays", "java.util.HashSet", "org.junit.Assert" ]
import java.util.Arrays; import java.util.HashSet; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
1,619,507
@Test public void testToManyReadOnly() throws DatabaseException { open(); PrimaryIndex<Integer, ToManyKeyEntity> priIndex = store.getPrimaryIndex(Integer.class, ToManyKeyEntity.class); priIndex.put(new ToManyKeyEntity()); close(); openReadOnly(); ...
void function() throws DatabaseException { open(); PrimaryIndex<Integer, ToManyKeyEntity> priIndex = store.getPrimaryIndex(Integer.class, ToManyKeyEntity.class); priIndex.put(new ToManyKeyEntity()); close(); openReadOnly(); priIndex = store.getPrimaryIndex(Integer.class, ToManyKeyEntity.class); SecondaryIndex<ToManyKey...
/** * Test a fix for a bug where opening a TO_MANY secondary index would fail * fail with "IllegalArgumentException: Wrong secondary key class: ..." * when the store was opened read-only. [#15156] */
Test a fix for a bug where opening a TO_MANY secondary index would fail fail with "IllegalArgumentException: Wrong secondary key class: ..." when the store was opened read-only. [#15156]
testToManyReadOnly
{ "repo_name": "hyc/BerkeleyDB", "path": "test/java/compat/src/com/sleepycat/persist/test/OperationTest.java", "license": "agpl-3.0", "size": 50010 }
[ "com.sleepycat.db.DatabaseException", "com.sleepycat.persist.PrimaryIndex", "com.sleepycat.persist.SecondaryIndex", "com.sleepycat.persist.model.KeyField", "com.sleepycat.persist.model.SecondaryKey", "java.util.HashSet", "java.util.Set" ]
import com.sleepycat.db.DatabaseException; import com.sleepycat.persist.PrimaryIndex; import com.sleepycat.persist.SecondaryIndex; import com.sleepycat.persist.model.KeyField; import com.sleepycat.persist.model.SecondaryKey; import java.util.HashSet; import java.util.Set;
import com.sleepycat.db.*; import com.sleepycat.persist.*; import com.sleepycat.persist.model.*; import java.util.*;
[ "com.sleepycat.db", "com.sleepycat.persist", "java.util" ]
com.sleepycat.db; com.sleepycat.persist; java.util;
685,002
private static void assertEquals(int expected, Integer actual) { Assert.assertNotNull(actual); Assert.assertEquals(expected, actual.intValue()); }
static void function(int expected, Integer actual) { Assert.assertNotNull(actual); Assert.assertEquals(expected, actual.intValue()); }
/** * Asserts that <code>expected</code> and actual are equal. * * @param expected the expected value * @param actual the actual value */
Asserts that <code>expected</code> and actual are equal
assertEquals
{ "repo_name": "QualiMaster/Infrastructure", "path": "CoordinationLayer/src/tests/eu/qualimaster/coordination/ManagerTests.java", "license": "apache-2.0", "size": 23468 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,849,438
public static ClassLoader getClassLoader(DeploymentId deploymentId, IServiceContext appCtx) throws HyracksException { IJobSerializerDeserializerContainer jobSerDeContainer = appCtx.getJobSerializerDeserializerContainer(); IJobSerializerDeserializer jobSerDe = deploymentId...
static ClassLoader function(DeploymentId deploymentId, IServiceContext appCtx) throws HyracksException { IJobSerializerDeserializerContainer jobSerDeContainer = appCtx.getJobSerializerDeserializerContainer(); IJobSerializerDeserializer jobSerDe = deploymentId == null ? null : jobSerDeContainer.getJobSerializerDeseriali...
/** * Get the classloader of a specific deployment * * @param deploymentId * @param appCtx * @return * @throws HyracksException */
Get the classloader of a specific deployment
getClassLoader
{ "repo_name": "ecarm002/incubator-asterixdb", "path": "hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/deployment/DeploymentUtils.java", "license": "apache-2.0", "size": 8926 }
[ "org.apache.hyracks.api.application.IServiceContext", "org.apache.hyracks.api.deployment.DeploymentId", "org.apache.hyracks.api.exceptions.HyracksException", "org.apache.hyracks.api.job.IJobSerializerDeserializer", "org.apache.hyracks.api.job.IJobSerializerDeserializerContainer" ]
import org.apache.hyracks.api.application.IServiceContext; import org.apache.hyracks.api.deployment.DeploymentId; import org.apache.hyracks.api.exceptions.HyracksException; import org.apache.hyracks.api.job.IJobSerializerDeserializer; import org.apache.hyracks.api.job.IJobSerializerDeserializerContainer;
import org.apache.hyracks.api.application.*; import org.apache.hyracks.api.deployment.*; import org.apache.hyracks.api.exceptions.*; import org.apache.hyracks.api.job.*;
[ "org.apache.hyracks" ]
org.apache.hyracks;
221,542
@ApiModelProperty(example = "null", value = "The first section in a Word or Excel document the watermark is visible") public Integer getStartSection() { return startSection; }
@ApiModelProperty(example = "null", value = STR) Integer function() { return startSection; }
/** * The first section in a Word or Excel document the watermark is visible * @return startSection **/
The first section in a Word or Excel document the watermark is visible
getStartSection
{ "repo_name": "Muhimbi/PDF-Converter-Services-Online", "path": "clients/v1/java/client/src/main/java/com/muhimbi/online/client/model/QrCodeWatermarkData.java", "license": "apache-2.0", "size": 26617 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,194,427
PointF getOutputSize(@NonNull Point inputSize) { Matrix matrix = new Matrix(); matrix.preConcat(flipRotate.getLocalMatrix()); matrix.preConcat(cropEditorElement.getLocalMatrix()); matrix.preConcat(cropEditorElement.getEditorMatrix()); EditorElement mainImage = getMainImage(); if (mainImage !=...
PointF getOutputSize(@NonNull Point inputSize) { Matrix matrix = new Matrix(); matrix.preConcat(flipRotate.getLocalMatrix()); matrix.preConcat(cropEditorElement.getLocalMatrix()); matrix.preConcat(cropEditorElement.getEditorMatrix()); EditorElement mainImage = getMainImage(); if (mainImage != null) { float xScale = 1f ...
/** * Calculates the exact output size based upon the crops/rotates and zooms in the hierarchy. * * @param inputSize Main image size * @return Size after applying all zooms/rotates and crops */
Calculates the exact output size based upon the crops/rotates and zooms in the hierarchy
getOutputSize
{ "repo_name": "WhisperSystems/TextSecure", "path": "app/src/main/java/org/thoughtcrime/securesms/imageeditor/model/EditorElementHierarchy.java", "license": "gpl-3.0", "size": 11788 }
[ "android.graphics.Matrix", "android.graphics.Point", "android.graphics.PointF", "androidx.annotation.NonNull" ]
import android.graphics.Matrix; import android.graphics.Point; import android.graphics.PointF; import androidx.annotation.NonNull;
import android.graphics.*; import androidx.annotation.*;
[ "android.graphics", "androidx.annotation" ]
android.graphics; androidx.annotation;
491,841
@Override public JComponent prepareRenderingComponent(JXMonthView monthView, Calendar calendar, CalendarState dayState) { JComponent component = super.prepareRenderingComponent(monthView, calendar, dayState); return (JComponent) getHighlighter().highlight( component...
JComponent function(JXMonthView monthView, Calendar calendar, CalendarState dayState) { JComponent component = super.prepareRenderingComponent(monthView, calendar, dayState); return (JComponent) getHighlighter().highlight( component, getCalendarAdapter(monthView, calendar, dayState)); }
/** * Overridden to apply the additional highlighters, if any. */
Overridden to apply the additional highlighters, if any
prepareRenderingComponent
{ "repo_name": "trejkaz/swingx", "path": "swingx-demos/swingx-demos-content/src/main/java/org/jdesktop/swingx/plaf/basic/DemoCalendarRenderingHandler.java", "license": "lgpl-2.1", "size": 5808 }
[ "java.util.Calendar", "javax.swing.JComponent", "org.jdesktop.swingx.JXMonthView" ]
import java.util.Calendar; import javax.swing.JComponent; import org.jdesktop.swingx.JXMonthView;
import java.util.*; import javax.swing.*; import org.jdesktop.swingx.*;
[ "java.util", "javax.swing", "org.jdesktop.swingx" ]
java.util; javax.swing; org.jdesktop.swingx;
2,698,363
public static boolean setSystemCursor(int cursorID) { int cursor_type = 0; //PointerIcon.TYPE_NULL; switch (cursorID) { case SDL_SYSTEM_CURSOR_ARROW: cursor_type = 1000; //PointerIcon.TYPE_ARROW; break; case SDL_SYSTEM_CURSOR_IBEAM: cursor_type = 1...
static boolean function(int cursorID) { int cursor_type = 0; switch (cursorID) { case SDL_SYSTEM_CURSOR_ARROW: cursor_type = 1000; break; case SDL_SYSTEM_CURSOR_IBEAM: cursor_type = 1008; break; case SDL_SYSTEM_CURSOR_WAIT: cursor_type = 1004; break; case SDL_SYSTEM_CURSOR_CROSSHAIR: cursor_type = 1007; break; case SDL...
/** * This method is called by SDL using JNI. */
This method is called by SDL using JNI
setSystemCursor
{ "repo_name": "nrz/ylikuutio", "path": "external/SDL2-2.0.14/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java", "license": "agpl-3.0", "size": 83693 }
[ "android.os.Build", "android.view.PointerIcon" ]
import android.os.Build; import android.view.PointerIcon;
import android.os.*; import android.view.*;
[ "android.os", "android.view" ]
android.os; android.view;
2,149,169
Calendar getEnableDate(Currency currency, RateType rateType);
Calendar getEnableDate(Currency currency, RateType rateType);
/** * gets the enabling date of the specified rate type. Returns null if no rateType specified, or no rate enabled. This is not necessarily the * enableDate of the present valid RateParameters. This method seeks the enabling date of the rate regardless of any field value changes in the * meantime. *...
gets the enabling date of the specified rate type. Returns null if no rateType specified, or no rate enabled. This is not necessarily the enableDate of the present valid RateParameters. This method seeks the enabling date of the rate regardless of any field value changes in the meantime
getEnableDate
{ "repo_name": "robertoandrade/cyclos", "path": "src/nl/strohalm/cyclos/services/accounts/rates/RateService.java", "license": "gpl-2.0", "size": 5612 }
[ "java.util.Calendar", "nl.strohalm.cyclos.entities.accounts.Currency" ]
import java.util.Calendar; import nl.strohalm.cyclos.entities.accounts.Currency;
import java.util.*; import nl.strohalm.cyclos.entities.accounts.*;
[ "java.util", "nl.strohalm.cyclos" ]
java.util; nl.strohalm.cyclos;
1,644,443
private Object[] evaluateParameterExpressions(Exchange exchange, Object body, Iterator<?> it) { Object[] answer = new Object[expressions.length]; for (int i = 0; i < expressions.length; i++) { if (body instanceof StreamCache) { // need to reset stream...
Object[] function(Exchange exchange, Object body, Iterator<?> it) { Object[] answer = new Object[expressions.length]; for (int i = 0; i < expressions.length; i++) { if (body instanceof StreamCache) { ((StreamCache) body).reset(); } Object parameterValue = it != null && it.hasNext() ? it.next() : null; Class<?> paramete...
/** * Evaluates all the parameter expressions */
Evaluates all the parameter expressions
evaluateParameterExpressions
{ "repo_name": "objectiser/camel", "path": "components/camel-bean/src/main/java/org/apache/camel/component/bean/MethodInfo.java", "license": "apache-2.0", "size": 34073 }
[ "java.util.Iterator", "org.apache.camel.Exchange", "org.apache.camel.Expression", "org.apache.camel.StreamCache" ]
import java.util.Iterator; import org.apache.camel.Exchange; import org.apache.camel.Expression; import org.apache.camel.StreamCache;
import java.util.*; import org.apache.camel.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
1,340,333
@ExcludeBrowsers({ BrowserType.IPAD, BrowserType.IPHONE }) public void testComponentWithRegisteredEventsAsync() throws Exception { DefDescriptor<ComponentDef> stub = addSourceAutoCleanup( ComponentDef.class, getIntegrationStubMarkup( "java://org.au...
@ExcludeBrowsers({ BrowserType.IPAD, BrowserType.IPHONE }) void function() throws Exception { DefDescriptor<ComponentDef> stub = addSourceAutoCleanup( ComponentDef.class, getIntegrationStubMarkup( "java: true, true, true, true) ); verifyComponentWithRegisteredEvents(stub, false); }
/** * Verify use of integration service to inject a component and initialize events with javascript function handlers. * (ASYNC) */
Verify use of integration service to inject a component and initialize events with javascript function handlers. (ASYNC)
testComponentWithRegisteredEventsAsync
{ "repo_name": "badlogicmanpreet/aura", "path": "aura-integration-test/src/test/java/org/auraframework/integration/test/IntegrationServiceImplUITest.java", "license": "apache-2.0", "size": 43019 }
[ "org.auraframework.def.ComponentDef", "org.auraframework.def.DefDescriptor", "org.auraframework.test.util.WebDriverUtil" ]
import org.auraframework.def.ComponentDef; import org.auraframework.def.DefDescriptor; import org.auraframework.test.util.WebDriverUtil;
import org.auraframework.def.*; import org.auraframework.test.util.*;
[ "org.auraframework.def", "org.auraframework.test" ]
org.auraframework.def; org.auraframework.test;
988,421
@Test public void testDateTimeSerialization() throws IOException { LocalDateTime now = LocalDateTime.now(); FsJob job = FsJob.builder().setLastrun(now).build(); String json = prettyMapper.writeValueAsString(job); FsJob generated = prettyMapper.readValue(json, FsJob.class); ...
void function() throws IOException { LocalDateTime now = LocalDateTime.now(); FsJob job = FsJob.builder().setLastrun(now).build(); String json = prettyMapper.writeValueAsString(job); FsJob generated = prettyMapper.readValue(json, FsJob.class); assertThat(generated.getLastrun(), is(now)); }
/** * We check that the date which is generated on disk does not change when we read it again * @throws IOException In case of serialization problem */
We check that the date which is generated on disk does not change when we read it again
testDateTimeSerialization
{ "repo_name": "dadoonet/fscrawler", "path": "beans/src/test/java/fr/pilato/elasticsearch/crawler/fs/beans/FsJobParserTest.java", "license": "apache-2.0", "size": 2636 }
[ "java.io.IOException", "java.time.LocalDateTime", "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers" ]
import java.io.IOException; import java.time.LocalDateTime; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers;
import java.io.*; import java.time.*; import org.hamcrest.*;
[ "java.io", "java.time", "org.hamcrest" ]
java.io; java.time; org.hamcrest;
668,899
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset data, PlotRenderingInfo info) { State sta...
XYItemRendererState function(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset data, PlotRenderingInfo info) { State state = new State(info); state.seriesPath = new GeneralPath(); state.seriesIndex = -1; return state; }
/** * Initialises the renderer. * <P> * This method will be called before the first item is rendered, giving the * renderer an opportunity to initialise any state information it wants to * maintain. The renderer can do nothing if it chooses. * * @param g2 the graphics device. *...
Initialises the renderer. This method will be called before the first item is rendered, giving the renderer an opportunity to initialise any state information it wants to maintain. The renderer can do nothing if it chooses
initialise
{ "repo_name": "ibestvina/multithread-centiscape", "path": "CentiScaPe2.1/src/main/java/org/jfree/chart/renderer/xy/StandardXYItemRenderer.java", "license": "mit", "size": 40508 }
[ "java.awt.Graphics2D", "java.awt.geom.GeneralPath", "java.awt.geom.Rectangle2D", "org.jfree.chart.plot.PlotRenderingInfo", "org.jfree.chart.plot.XYPlot", "org.jfree.data.xy.XYDataset" ]
import java.awt.Graphics2D; import java.awt.geom.GeneralPath; import java.awt.geom.Rectangle2D; import org.jfree.chart.plot.PlotRenderingInfo; import org.jfree.chart.plot.XYPlot; import org.jfree.data.xy.XYDataset;
import java.awt.*; import java.awt.geom.*; import org.jfree.chart.plot.*; import org.jfree.data.xy.*;
[ "java.awt", "org.jfree.chart", "org.jfree.data" ]
java.awt; org.jfree.chart; org.jfree.data;
2,716,008
@Override public NBTTagCompound writeToNBT(NBTTagCompound tCompound) { super.writeToNBT(tCompound); for (int i = 0; i < 9; i++) { NBTTagCompound tc = new NBTTagCompound(); inventory.get(i).writeToNBT(tc); tCompound.setTag("inventory" + i, tc); ...
NBTTagCompound function(NBTTagCompound tCompound) { super.writeToNBT(tCompound); for (int i = 0; i < 9; i++) { NBTTagCompound tc = new NBTTagCompound(); inventory.get(i).writeToNBT(tc); tCompound.setTag(STR + i, tc); } tCompound.setByte("mode", (byte) mode); tCompound.setByte(STR, (byte) fuzzySetting); tCompound.setInt...
/** * This function gets called whenever the world/chunk is saved */
This function gets called whenever the world/chunk is saved
writeToNBT
{ "repo_name": "MoreThanHidden/BluePower", "path": "src/main/java/com/bluepowermod/tile/tier1/TileItemDetector.java", "license": "gpl-3.0", "size": 7509 }
[ "net.minecraft.nbt.NBTTagCompound" ]
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.*;
[ "net.minecraft.nbt" ]
net.minecraft.nbt;
439,290
public void persist(String fileName) throws IOException { for(V v : getGraph().getVertices()) { Point p = new Point(transform(v)); locations.put(v, p); } ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream( fileName)); oos.wri...
void function(String fileName) throws IOException { for(V v : getGraph().getVertices()) { Point p = new Point(transform(v)); locations.put(v, p); } ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream( fileName)); oos.writeObject(locations); oos.close(); }
/** * save the Vertex locations to a file * @param fileName the file to save to * @throws IOException if the file cannot be used */
save the Vertex locations to a file
persist
{ "repo_name": "drzhonghao/grapa", "path": "jung-visualization/src/main/java/edu/uci/ics/jung/visualization/layout/PersistentLayoutImpl.java", "license": "lgpl-3.0", "size": 5076 }
[ "java.io.FileOutputStream", "java.io.IOException", "java.io.ObjectOutputStream" ]
import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectOutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,252,387
public Set<Integer> getWords() { return Collections.unmodifiableSet(wordToTag.keySet()); }
Set<Integer> function() { return Collections.unmodifiableSet(wordToTag.keySet()); }
/** * Get the numbers of all words in this lexicon. * @return An unmodifiable set of integers. */
Get the numbers of all words in this lexicon
getWords
{ "repo_name": "wmaier/rparse", "path": "src/de/tuebingen/rparse/treebank/lex/Lexicon.java", "license": "gpl-2.0", "size": 7591 }
[ "java.util.Collections", "java.util.Set" ]
import java.util.Collections; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,511,272
public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), String.valueOf(getS_Resource_ID())); }
KeyNamePair function() { return new KeyNamePair(get_ID(), String.valueOf(getS_Resource_ID())); }
/** Get Record ID/ColumnName @return ID/ColumnName pair */
Get Record ID/ColumnName
getKeyNamePair
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/X_S_ResourceUnAvailable.java", "license": "gpl-2.0", "size": 5386 }
[ "org.compiere.util.KeyNamePair" ]
import org.compiere.util.KeyNamePair;
import org.compiere.util.*;
[ "org.compiere.util" ]
org.compiere.util;
2,456,400
private void createModuleOutputFolder(AbstractFile file) throws IOException, NoCurrentCaseException { final Path moduleOutputFolder = getModuleOutputFolder(file); if (!Files.exists(moduleOutputFolder)) { Files.createDirectories(moduleOutputFolder); } }
void function(AbstractFile file) throws IOException, NoCurrentCaseException { final Path moduleOutputFolder = getModuleOutputFolder(file); if (!Files.exists(moduleOutputFolder)) { Files.createDirectories(moduleOutputFolder); } }
/** * Create any sub directories within the module output folder. */
Create any sub directories within the module output folder
createModuleOutputFolder
{ "repo_name": "eugene7646/autopsy", "path": "Core/src/org/sleuthkit/autopsy/modules/pictureanalyzer/impls/HEICProcessor.java", "license": "apache-2.0", "size": 10231 }
[ "java.io.IOException", "java.nio.file.Files", "java.nio.file.Path", "org.sleuthkit.autopsy.casemodule.NoCurrentCaseException", "org.sleuthkit.datamodel.AbstractFile" ]
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.datamodel.AbstractFile;
import java.io.*; import java.nio.file.*; import org.sleuthkit.autopsy.casemodule.*; import org.sleuthkit.datamodel.*;
[ "java.io", "java.nio", "org.sleuthkit.autopsy", "org.sleuthkit.datamodel" ]
java.io; java.nio; org.sleuthkit.autopsy; org.sleuthkit.datamodel;
1,545,886
FileSystem getFileSytem() { return rootFileSystem; }
FileSystem getFileSytem() { return rootFileSystem; }
/** * Returns the file system where metadata is stored. * * @return a FileSystem * * @since 0.8.0 */
Returns the file system where metadata is stored
getFileSytem
{ "repo_name": "rbrush/kite", "path": "kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemMetadataProvider.java", "license": "apache-2.0", "size": 21765 }
[ "org.apache.hadoop.fs.FileSystem" ]
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
65,048
public static String shortenURI(String inputURI) { String result = ""; int index0 = inputURI.indexOf("^^"); int index1 = inputURI.lastIndexOf('#'); int index2 = inputURI.lastIndexOf('/'); boolean isResource = inputURI.startsWith("<") && inputURI.endsWith(">"); // If we found a literal, we do not shorte...
static String function(String inputURI) { String result = STR^^STR<STR>STRSTRUTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return result; }
/** * Converts a URI to a shorter representation which is shown to users. * * @param inputURI * @return */
Converts a URI to a shorter representation which is shown to users
shortenURI
{ "repo_name": "martinpz/Spark-RDF-Analyzer", "path": "src/main/java/rdfanalyzer/spark/RDFgraph.java", "license": "apache-2.0", "size": 2356 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
1,122,163
public RouteDefinition getOriginalRoute() { return originalRoute; }
RouteDefinition function() { return originalRoute; }
/** * Gets the original route to be adviced. * * @return the original route. */
Gets the original route to be adviced
getOriginalRoute
{ "repo_name": "gnodet/camel", "path": "core/camel-core-model/src/main/java/org/apache/camel/builder/AdviceWithRouteBuilder.java", "license": "apache-2.0", "size": 13543 }
[ "org.apache.camel.model.RouteDefinition" ]
import org.apache.camel.model.RouteDefinition;
import org.apache.camel.model.*;
[ "org.apache.camel" ]
org.apache.camel;
1,795,772
public final void filter(CharSequence constraint, net.programmierecke.radiodroid2.utils.CustomFilter.FilterListener listener) { synchronized (mLock) { if (mThreadHandler == null) { HandlerThread thread = new HandlerThread( THREAD_NAME, android.os.Process.T...
final void function(CharSequence constraint, net.programmierecke.radiodroid2.utils.CustomFilter.FilterListener listener) { synchronized (mLock) { if (mThreadHandler == null) { HandlerThread thread = new HandlerThread( THREAD_NAME, android.os.Process.THREAD_PRIORITY_BACKGROUND); thread.start(); mThreadHandler = new Requ...
/** * <p>Starts an asynchronous filtering operation. Calling this method * cancels all previous non-executed filtering requests and posts a new * filtering request that will be executed later.</p> * * <p>Upon completion, the listener is notified.</p> * * @param constraint the constrai...
Starts an asynchronous filtering operation. Calling this method cancels all previous non-executed filtering requests and posts a new filtering request that will be executed later. Upon completion, the listener is notified
filter
{ "repo_name": "segler-alex/RadioDroid", "path": "app/src/main/java/net/programmierecke/radiodroid2/utils/CustomFilter.java", "license": "gpl-3.0", "size": 12048 }
[ "android.os.HandlerThread", "android.os.Message" ]
import android.os.HandlerThread; import android.os.Message;
import android.os.*;
[ "android.os" ]
android.os;
1,391,558
@SmallTest @Feature({"Download"}) public void testPausingWithoutOngoingDownloads() { setupService(); startNotificationService(); assertTrue(getService().isPaused()); assertTrue(getService().getNotificationIds().isEmpty()); }
@Feature({STR}) void function() { setupService(); startNotificationService(); assertTrue(getService().isPaused()); assertTrue(getService().getNotificationIds().isEmpty()); }
/** * Tests that creating the service without launching chrome will do nothing if there is no * ongoing download. */
Tests that creating the service without launching chrome will do nothing if there is no ongoing download
testPausingWithoutOngoingDownloads
{ "repo_name": "axinging/chromium-crosswalk", "path": "chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java", "license": "bsd-3-clause", "size": 10734 }
[ "org.chromium.base.test.util.Feature" ]
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.*;
[ "org.chromium.base" ]
org.chromium.base;
785,229
public static final void registerDefaultMatcher(final IProductPriceQueryMatcher matcher) { Check.assumeNotNull(matcher, "Parameter matcher is not null"); _defaultMatchers.addIfAbsent(matcher); logger.info("Registered default matcher: {}", matcher); }
static final void function(final IProductPriceQueryMatcher matcher) { Check.assumeNotNull(matcher, STR); _defaultMatchers.addIfAbsent(matcher); logger.info(STR, matcher); }
/** * Allows to add a matcher that will be applied when this rule looks for a matching product price. * * @param matcher */
Allows to add a matcher that will be applied when this rule looks for a matching product price
registerDefaultMatcher
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.business/src/main/java/de/metas/pricing/attributebased/impl/AttributePricing.java", "license": "gpl-2.0", "size": 12400 }
[ "org.adempiere.pricing.api.ProductPriceQuery", "org.adempiere.util.Check" ]
import org.adempiere.pricing.api.ProductPriceQuery; import org.adempiere.util.Check;
import org.adempiere.pricing.api.*; import org.adempiere.util.*;
[ "org.adempiere.pricing", "org.adempiere.util" ]
org.adempiere.pricing; org.adempiere.util;
2,584,082
public GblocksOutput runGblocks(GblocksParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(params); TypeReference<List<GblocksOutput>> retType = new TypeReference<List<GblocksOutput>>() {}; List<...
GblocksOutput function(GblocksParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(params); TypeReference<List<GblocksOutput>> retType = new TypeReference<List<GblocksOutput>>() {}; List<GblocksOutput> res = caller.jsonrpcCall(STR, ...
/** * <p>Original spec-file function name: run_Gblocks</p> * <pre> * Method for trimming MSAs of either DNA or PROTEIN sequences * ** * ** input_type: MSA * ** output_type: MSA * </pre> * @param params instance of type {@link us.kbase.kbgblocks.GblocksParams Gbl...
Original spec-file function name: run_Gblocks <code> Method for trimming MSAs of either DNA or PROTEIN sequences input_type: MSA output_type: MSA </code>
runGblocks
{ "repo_name": "dcchivian/kb_gblocks", "path": "lib/src/us/kbase/kbgblocks/KbGblocksClient.java", "license": "mit", "size": 7467 }
[ "com.fasterxml.jackson.core.type.TypeReference", "java.io.IOException", "java.util.ArrayList", "java.util.List", "us.kbase.common.service.JsonClientException", "us.kbase.common.service.RpcContext" ]
import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; import java.util.ArrayList; import java.util.List; import us.kbase.common.service.JsonClientException; import us.kbase.common.service.RpcContext;
import com.fasterxml.jackson.core.type.*; import java.io.*; import java.util.*; import us.kbase.common.service.*;
[ "com.fasterxml.jackson", "java.io", "java.util", "us.kbase.common" ]
com.fasterxml.jackson; java.io; java.util; us.kbase.common;
943,971
private boolean readRoleForm(RunData data, SessionState state) { // get the realm AuthzGroup realm = (AuthzGroup) state.getAttribute("realm"); // get the locks String[] locks = data.getParameters().getStrings("locks"); // we are setting for either a new role or this role Role role = (Role) state.getAt...
boolean function(RunData data, SessionState state) { AuthzGroup realm = (AuthzGroup) state.getAttribute("realm"); String[] locks = data.getParameters().getStrings("locks"); Role role = (Role) state.getAttribute("role"); if (locks == null && role != null) { Collection realms = new ArrayList<String>(Arrays.asList(realm.g...
/** * Read the user form and update the realm in state. * * @return true if the form is accepted, false if there's a validation error (an alertMessage will be set) */
Read the user form and update the realm in state
readRoleForm
{ "repo_name": "whumph/sakai", "path": "authz/authz-tool/tool/src/java/org/sakaiproject/authz/tool/RealmsAction.java", "license": "apache-2.0", "size": 43019 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.Collection", "java.util.List", "org.apache.commons.lang.StringUtils", "org.sakaiproject.authz.api.AuthzGroup", "org.sakaiproject.authz.api.Role", "org.sakaiproject.authz.api.RoleAlreadyDefinedException", "org.sakaiproject.authz.cover.AuthzGroupSe...
import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; import org.apache.commons.lang.StringUtils; import org.sakaiproject.authz.api.AuthzGroup; import org.sakaiproject.authz.api.Role; import org.sakaiproject.authz.api.RoleAlreadyDefinedException; import org.sakaiprojec...
import java.util.*; import org.apache.commons.lang.*; import org.sakaiproject.authz.api.*; import org.sakaiproject.authz.cover.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*;
[ "java.util", "org.apache.commons", "org.sakaiproject.authz", "org.sakaiproject.cheftool", "org.sakaiproject.event" ]
java.util; org.apache.commons; org.sakaiproject.authz; org.sakaiproject.cheftool; org.sakaiproject.event;
526,918
public QueryList executeQuery(Object key, Operator operator) { List dataList = (List)dataCollection.get(key); if(dataList == null) return new QueryList(); return cloneListData(new QueryList(dataList).filter(operator)); }
QueryList function(Object key, Operator operator) { List dataList = (List)dataCollection.get(key); if(dataList == null) return new QueryList(); return cloneListData(new QueryList(dataList).filter(operator)); }
/** * returns a subset of Data Collection. This subset is got by applying the * operator parameter. Operator can be a combination of multiple logical and * relational conditions. * @return returns results in this Query List * @param collectionKey collection key * @param key data key *...
returns a subset of Data Collection. This subset is got by applying the operator parameter. Operator can be a combination of multiple logical and relational conditions
executeQuery
{ "repo_name": "vivantech/kc_fixes", "path": "src/main/java/org/kuali/kra/budget/calculator/query/QueryEngine.java", "license": "apache-2.0", "size": 9008 }
[ "java.util.List", "org.kuali.kra.budget.calculator.QueryList" ]
import java.util.List; import org.kuali.kra.budget.calculator.QueryList;
import java.util.*; import org.kuali.kra.budget.calculator.*;
[ "java.util", "org.kuali.kra" ]
java.util; org.kuali.kra;
1,082,177
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); final DefaultTableModel dtm = (DefaultTableModel) ...
Component function(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); final DefaultTableModel dtm = (DefaultTableModel) table.getModel(); final FileElement element = (FileElement) dtm.getValueAt(r...
/** * Overridden to set the correct renderer. * @see DefaultTableCellRenderer#getTableCellRendererComponent(JTable, * Object, boolean, boolean, int, int) */
Overridden to set the correct renderer
getTableCellRendererComponent
{ "repo_name": "dominikl/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/fsimporter/chooser/FileTableRendererFileColumn.java", "license": "gpl-2.0", "size": 3045 }
[ "java.awt.Component", "javax.swing.JTable", "javax.swing.table.DefaultTableModel" ]
import java.awt.Component; import javax.swing.JTable; import javax.swing.table.DefaultTableModel;
import java.awt.*; import javax.swing.*; import javax.swing.table.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
568,539
KeyMapper<Object> getKeyMapper() { return datasourceExtension.getKeyMapper(); }
KeyMapper<Object> getKeyMapper() { return datasourceExtension.getKeyMapper(); }
/** * Gets the {@link KeyMapper } being used by the data source. * * @return the key mapper being used by the data source */
Gets the <code>KeyMapper </code> being used by the data source
getKeyMapper
{ "repo_name": "mstahv/framework", "path": "compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java", "license": "apache-2.0", "size": 273176 }
[ "com.vaadin.server.KeyMapper" ]
import com.vaadin.server.KeyMapper;
import com.vaadin.server.*;
[ "com.vaadin.server" ]
com.vaadin.server;
19,867
@CalledByNative static MidiManagerAndroid create(long nativeManagerPointer) { return new MidiManagerAndroid(nativeManagerPointer); } private MidiManagerAndroid(long nativeManagerPointer) { assert !ThreadUtils.runningOnUiThread(); mManager = (MidiManager) ContextUtils.getAp...
static MidiManagerAndroid create(long nativeManagerPointer) { return new MidiManagerAndroid(nativeManagerPointer); } private MidiManagerAndroid(long nativeManagerPointer) { assert !ThreadUtils.runningOnUiThread(); mManager = (MidiManager) ContextUtils.getApplicationContext().getSystemService( Context.MIDI_SERVICE); mHa...
/** * A creation function called by C++. * @param nativeManagerPointer The native pointer to a midi::MidiManagerAndroid object. */
A creation function called by C++
create
{ "repo_name": "youtube/cobalt", "path": "third_party/chromium/media/midi/java/src/org/chromium/midi/MidiManagerAndroid.java", "license": "bsd-3-clause", "size": 7349 }
[ "android.content.Context", "android.media.midi.MidiManager", "android.os.Handler", "org.chromium.base.ContextUtils", "org.chromium.base.ThreadUtils" ]
import android.content.Context; import android.media.midi.MidiManager; import android.os.Handler; import org.chromium.base.ContextUtils; import org.chromium.base.ThreadUtils;
import android.content.*; import android.media.midi.*; import android.os.*; import org.chromium.base.*;
[ "android.content", "android.media", "android.os", "org.chromium.base" ]
android.content; android.media; android.os; org.chromium.base;
589,211
public void sessionFlushed(ISession session) { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) { LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, "sessionFlushed", "sessionObservers.size()=" + _sessionObservers....
void function(ISession session) { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) { LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, STR, STR + _sessionObservers.size()); } if (_sessionObservers == null _sessionObservers.size() < 1) { ...
/** * Method sessionSynched * <p> * * @see com.ibm.wsspi.session.ISessionObserver#sessionFlushed(com.ibm.wsspi.session.ISession) */
Method sessionSynched
sessionFlushed
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.session/src/com/ibm/ws/session/SessionEventDispatcher.java", "license": "epl-1.0", "size": 14815 }
[ "com.ibm.ws.session.utils.LoggingUtil", "com.ibm.wsspi.session.ISession", "com.ibm.wsspi.session.ISessionObserver", "java.util.logging.Level" ]
import com.ibm.ws.session.utils.LoggingUtil; import com.ibm.wsspi.session.ISession; import com.ibm.wsspi.session.ISessionObserver; import java.util.logging.Level;
import com.ibm.ws.session.utils.*; import com.ibm.wsspi.session.*; import java.util.logging.*;
[ "com.ibm.ws", "com.ibm.wsspi", "java.util" ]
com.ibm.ws; com.ibm.wsspi; java.util;
360,744
@Test(expectedExceptions = { LDAPException.class }) public void testDecodeControlWithValue() throws Exception { final Control genericControl = new Control("1.3.6.1.4.1.30221.2.5.54", false, new ASN1OctetString("unexpected value")); new RejectUnindexedSearchRequestControl(genericControl)...
@Test(expectedExceptions = { LDAPException.class }) void function() throws Exception { final Control genericControl = new Control(STR, false, new ASN1OctetString(STR)); new RejectUnindexedSearchRequestControl(genericControl); }
/** * Tests the behavior when trying to decode a control that has a value. * * @throws Exception If an unexpected problem occurs. */
Tests the behavior when trying to decode a control that has a value
testDecodeControlWithValue
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/controls/RejectUnindexedSearchRequestControlTestCase.java", "license": "gpl-2.0", "size": 4217 }
[ "com.unboundid.asn1.ASN1OctetString", "com.unboundid.ldap.sdk.Control", "com.unboundid.ldap.sdk.LDAPException", "org.testng.annotations.Test" ]
import com.unboundid.asn1.ASN1OctetString; import com.unboundid.ldap.sdk.Control; import com.unboundid.ldap.sdk.LDAPException; import org.testng.annotations.Test;
import com.unboundid.asn1.*; import com.unboundid.ldap.sdk.*; import org.testng.annotations.*;
[ "com.unboundid.asn1", "com.unboundid.ldap", "org.testng.annotations" ]
com.unboundid.asn1; com.unboundid.ldap; org.testng.annotations;
270,302
private static List<SparseRowDto> readAll(Iterator<SparseRowDto> iterator) { List<SparseRowDto> list = new LinkedList<SparseRowDto>(); while (iterator.hasNext()) { list.add(iterator.next()); } return list; }
static List<SparseRowDto> function(Iterator<SparseRowDto> iterator) { List<SparseRowDto> list = new LinkedList<SparseRowDto>(); while (iterator.hasNext()) { list.add(iterator.next()); } return list; }
/** * Read all data from the iterator into a list. * * @param iterator * @return */
Read all data from the iterator into a list
readAll
{ "repo_name": "hhu94/Synapse-Repository-Services", "path": "lib/jdomodels/src/test/java/org/sagebionetworks/repo/model/dbo/dao/table/CSVToRowIteratorTest.java", "license": "apache-2.0", "size": 14697 }
[ "java.util.Iterator", "java.util.LinkedList", "java.util.List", "org.sagebionetworks.repo.model.table.SparseRowDto" ]
import java.util.Iterator; import java.util.LinkedList; import java.util.List; import org.sagebionetworks.repo.model.table.SparseRowDto;
import java.util.*; import org.sagebionetworks.repo.model.table.*;
[ "java.util", "org.sagebionetworks.repo" ]
java.util; org.sagebionetworks.repo;
661,582
public ITask setCreatedDate(OffsetDateTime value);
ITask function(OffsetDateTime value);
/** * Setter for <code>public.task.created_date</code>. */
Setter for <code>public.task.created_date</code>
setCreatedDate
{ "repo_name": "nickguletskii/OpenOlympus", "path": "src-gen/main/java/org/ng200/openolympus/jooq/tables/interfaces/ITask.java", "license": "mit", "size": 3597 }
[ "java.time.OffsetDateTime" ]
import java.time.OffsetDateTime;
import java.time.*;
[ "java.time" ]
java.time;
1,524,523
public String toPem( final StringWriterFactoryInterface stringWriterFactory, final PemWriterFactoryInterface pemWriterFactory ) { return this.toPem(null, null, stringWriterFactory, pemWriterFactory); }
String function( final StringWriterFactoryInterface stringWriterFactory, final PemWriterFactoryInterface pemWriterFactory ) { return this.toPem(null, null, stringWriterFactory, pemWriterFactory); }
/** * Get this key as a PEM formatted string. * * @param stringWriterFactory The string writer factory to use. * @param pemWriterFactory The PEM writer factory to use. * * @return The PEM formatted key. */
Get this key as a PEM formatted string
toPem
{ "repo_name": "eloquent/lockbox-java", "path": "src/main/java/co/lqnt/lockbox/key/PrivateKey.java", "license": "mit", "size": 10745 }
[ "co.lqnt.lockbox.util.PemWriterFactoryInterface", "co.lqnt.lockbox.util.StringWriterFactoryInterface" ]
import co.lqnt.lockbox.util.PemWriterFactoryInterface; import co.lqnt.lockbox.util.StringWriterFactoryInterface;
import co.lqnt.lockbox.util.*;
[ "co.lqnt.lockbox" ]
co.lqnt.lockbox;
2,840,302
public void removeSubscription(Subscription subscription) { if (!(this == subscription.getUser())) { throw new IllegalArgumentException ("Subscription not associated with this user"); } synchronized (subscriptions) { subscriptions.remove(subscription....
void function(Subscription subscription) { if (!(this == subscription.getUser())) { throw new IllegalArgumentException (STR); } synchronized (subscriptions) { subscriptions.remove(subscription.getHost()); } }
/** * Remove the specified {@link Subscription} from being associated * with this User. * * @param subscription Subscription to be removed * * @exception IllegalArgumentException if the specified subscription is not * associated with this User */
Remove the specified <code>Subscription</code> from being associated with this User
removeSubscription
{ "repo_name": "davcamer/clients", "path": "projects-for-testing/struts/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/memory/MemoryUser.java", "license": "apache-2.0", "size": 7173 }
[ "org.apache.struts.webapp.example.Subscription" ]
import org.apache.struts.webapp.example.Subscription;
import org.apache.struts.webapp.example.*;
[ "org.apache.struts" ]
org.apache.struts;
250,782
List<Directive> getDirectives();
List<Directive> getDirectives();
/** * This will return a list of all the directives that have been put on {@link com.intellij.lang.jsgraphql.types.language.Node} as a flat list, which may contain repeatable * and non repeatable directives. * * @return a list of all the directives associated with this Node */
This will return a list of all the directives that have been put on <code>com.intellij.lang.jsgraphql.types.language.Node</code> as a flat list, which may contain repeatable and non repeatable directives
getDirectives
{ "repo_name": "jimkyndemeyer/js-graphql-intellij-plugin", "path": "src/main/com/intellij/lang/jsgraphql/types/language/DirectivesContainer.java", "license": "mit", "size": 3489 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,510,922
try { AddProductDialog dialog = new AddProductDialog(); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } public AddProductDialog() { setTitle("Add New Product"); setBounds(100, 100, 450, 300); getContentPane...
try { AddProductDialog dialog = new AddProductDialog(); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } public AddProductDialog() { setTitle(STR); setBounds(100, 100, 450, 300); getContentPane().setLayout(new BorderLayout()); contentPa...
/** * Launch the application. */
Launch the application
main
{ "repo_name": "iproduct/IPT-Course-Java-8", "path": "IPT-Course-Java-29ed/IPTInvoicing/src/invoicing/gui/AddProductDialog.java", "license": "gpl-2.0", "size": 7744 }
[ "java.awt.BorderLayout", "javax.swing.JDialog", "javax.swing.JLabel", "javax.swing.JTextArea", "javax.swing.JTextField", "javax.swing.border.EmptyBorder" ]
import java.awt.BorderLayout; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JTextArea; import javax.swing.JTextField; import javax.swing.border.EmptyBorder;
import java.awt.*; import javax.swing.*; import javax.swing.border.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,588,039
void unRegisterXATxn(Xid xid, boolean isCommit) throws DatabaseException { if (allXATxns.remove(xid) == null) { throw new DatabaseException ("XA Transaction " + xid + " can not be unregistered."); } env.getMemoryBudget().updateMiscMemoryUsage (0 - MemoryBudget.HASHMAP_ENTRY_OVERHEAD); if...
void unRegisterXATxn(Xid xid, boolean isCommit) throws DatabaseException { if (allXATxns.remove(xid) == null) { throw new DatabaseException (STR + xid + STR); } env.getMemoryBudget().updateMiscMemoryUsage (0 - MemoryBudget.HASHMAP_ENTRY_OVERHEAD); if (isCommit) { numXACommits++; } else { numXAAborts++; } }
/** * Called when txn ends. */
Called when txn ends
unRegisterXATxn
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/je-3.2.74/src/com/sleepycat/je/txn/TxnManager.java", "license": "gpl-2.0", "size": 8929 }
[ "com.sleepycat.je.DatabaseException", "com.sleepycat.je.dbi.MemoryBudget", "javax.transaction.xa.Xid" ]
import com.sleepycat.je.DatabaseException; import com.sleepycat.je.dbi.MemoryBudget; import javax.transaction.xa.Xid;
import com.sleepycat.je.*; import com.sleepycat.je.dbi.*; import javax.transaction.xa.*;
[ "com.sleepycat.je", "javax.transaction" ]
com.sleepycat.je; javax.transaction;
2,073,510
void log(Level logLevel, String message, HttpServiceContext hsc);
void log(Level logLevel, String message, HttpServiceContext hsc);
/** * Request the following message be written to the output file. This is * based on the input requested log level versus the currently enabled value * on the log. * * @param logLevel * @param message * @param hsc */
Request the following message be written to the output file. This is based on the input requested log level versus the currently enabled value on the log
log
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.transport.http/src/com/ibm/wsspi/http/logging/DebugLog.java", "license": "epl-1.0", "size": 3561 }
[ "com.ibm.wsspi.http.channel.HttpServiceContext" ]
import com.ibm.wsspi.http.channel.HttpServiceContext;
import com.ibm.wsspi.http.channel.*;
[ "com.ibm.wsspi" ]
com.ibm.wsspi;
344,035
public void startTrasmit() { try { LOGGER.fine("start"); mediaSession.start(true); this.mediaReceived(""); } catch (IOException e) { e.printStackTrace(); } }
void function() { try { LOGGER.fine("start"); mediaSession.start(true); this.mediaReceived(""); } catch (IOException e) { e.printStackTrace(); } }
/** * Starts transmission and for NAT Traversal reasons start receiving also. */
Starts transmission and for NAT Traversal reasons start receiving also
startTrasmit
{ "repo_name": "TTalkIM/Smack", "path": "smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jspeex/AudioMediaSession.java", "license": "apache-2.0", "size": 8715 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,814,813
public PagerAdapter getAdapter() { return mAdapter; }
PagerAdapter function() { return mAdapter; }
/** * Retrieve the current adapter supplying pages. * * @return The currently registered PagerAdapter */
Retrieve the current adapter supplying pages
getAdapter
{ "repo_name": "gzsll/TLint", "path": "app/src/main/java/com/gzsll/hupu/widget/VerticalViewPager.java", "license": "apache-2.0", "size": 109046 }
[ "android.support.v4.view.PagerAdapter" ]
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.*;
[ "android.support" ]
android.support;
2,088,629
public SearchRequestBuilder setScroll(TimeValue keepAlive) { request.scroll(keepAlive); return this; }
SearchRequestBuilder function(TimeValue keepAlive) { request.scroll(keepAlive); return this; }
/** * If set, will enable scrolling of the search request for the specified timeout. */
If set, will enable scrolling of the search request for the specified timeout
setScroll
{ "repo_name": "jprante/elasticsearch-client", "path": "elasticsearch-client-search/src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java", "license": "apache-2.0", "size": 26853 }
[ "org.elasticsearch.common.unit.TimeValue" ]
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.unit.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
1,346,881
@Override public void addStatement(UpdateContext op, Resource subj, URI pred, Value obj, Resource... contexts) throws SailException { throw new SailException(ERR_OPENRDF_QUERY_MODEL); }
void function(UpdateContext op, Resource subj, URI pred, Value obj, Resource... contexts) throws SailException { throw new SailException(ERR_OPENRDF_QUERY_MODEL); }
/** * Unsupported API. */
Unsupported API
addStatement
{ "repo_name": "wikimedia/wikidata-query-blazegraph", "path": "bigdata-core/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java", "license": "gpl-2.0", "size": 195000 }
[ "org.openrdf.model.Resource", "org.openrdf.model.Value", "org.openrdf.sail.SailException", "org.openrdf.sail.UpdateContext" ]
import org.openrdf.model.Resource; import org.openrdf.model.Value; import org.openrdf.sail.SailException; import org.openrdf.sail.UpdateContext;
import org.openrdf.model.*; import org.openrdf.sail.*;
[ "org.openrdf.model", "org.openrdf.sail" ]
org.openrdf.model; org.openrdf.sail;
1,153,024
public void setIngameNotInFocus() { if (this.inGameHasFocus) { KeyBinding.unPressAllKeys(); this.inGameHasFocus = false; this.mouseHelper.ungrabMouseCursor(); } }
void function() { if (this.inGameHasFocus) { KeyBinding.unPressAllKeys(); this.inGameHasFocus = false; this.mouseHelper.ungrabMouseCursor(); } }
/** * Resets the player keystate, disables the ingame focus, and ungrabs the mouse cursor. */
Resets the player keystate, disables the ingame focus, and ungrabs the mouse cursor
setIngameNotInFocus
{ "repo_name": "dogjaw2233/tiu-s-mod", "path": "build/tmp/recompileMc/sources/net/minecraft/client/Minecraft.java", "license": "lgpl-2.1", "size": 129685 }
[ "net.minecraft.client.settings.KeyBinding" ]
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.client.settings.*;
[ "net.minecraft.client" ]
net.minecraft.client;
994,181
public Single<BlobCopyFromURLResponse> syncCopyFromURL(URL copySource) { return this.syncCopyFromURL(copySource, null, null, null, null); } /** * Copies the data at the source URL to a blob and waits for the copy to complete before returning a response. * For more information, see the <a ...
Single<BlobCopyFromURLResponse> function(URL copySource) { return this.syncCopyFromURL(copySource, null, null, null, null); } /** * Copies the data at the source URL to a blob and waits for the copy to complete before returning a response. * For more information, see the <a href="https: * * @param copySource * The sour...
/** * Copies the data at the source URL to a blob and waits for the copy to complete before returning a response. * For more information, see the <a href="https://docs.microsoft.com/rest/api/storageservices/copy-blob">Azure Docs</a> * * @param copySource * The source URL to copy from. ...
Copies the data at the source URL to a blob and waits for the copy to complete before returning a response. For more information, see the Azure Docs
syncCopyFromURL
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/storage/microsoft-azure-storage-blob/src/main/java/com/microsoft/azure/storage/blob/BlobURL.java", "license": "mit", "size": 60237 }
[ "com.microsoft.azure.storage.blob.models.BlobCopyFromURLResponse", "io.reactivex.Single" ]
import com.microsoft.azure.storage.blob.models.BlobCopyFromURLResponse; import io.reactivex.Single;
import com.microsoft.azure.storage.blob.models.*; import io.reactivex.*;
[ "com.microsoft.azure", "io.reactivex" ]
com.microsoft.azure; io.reactivex;
1,775,403
public static LenskitRecommender build(LenskitConfiguration config) throws RecommenderBuildException { return LenskitRecommenderEngine.build(config).createRecommender(); }
static LenskitRecommender function(LenskitConfiguration config) throws RecommenderBuildException { return LenskitRecommenderEngine.build(config).createRecommender(); }
/** * Build a recommender from a configuration. The recommender is immediately usable. This is * mostly useful for evaluations and test programs; more sophisticated applications that need * to build multiple recommenders from the same model should use a {@linkplain LenskitRecommenderEngine * recom...
Build a recommender from a configuration. The recommender is immediately usable. This is mostly useful for evaluations and test programs; more sophisticated applications that need to build multiple recommenders from the same model should use a LenskitRecommenderEngine recommender engine
build
{ "repo_name": "aglne/lenskit", "path": "lenskit-core/src/main/java/org/lenskit/LenskitRecommender.java", "license": "lgpl-2.1", "size": 5839 }
[ "org.grouplens.lenskit.RecommenderBuildException", "org.grouplens.lenskit.core.LenskitConfiguration" ]
import org.grouplens.lenskit.RecommenderBuildException; import org.grouplens.lenskit.core.LenskitConfiguration;
import org.grouplens.lenskit.*; import org.grouplens.lenskit.core.*;
[ "org.grouplens.lenskit" ]
org.grouplens.lenskit;
1,412,187
private static long getTgtEntityIdOfAttribute(long associationId, JDBCDAO jdbcdao) throws SQLException, DAOException { Long entityId = null; String getEntityIdQuery = "select TARGET_ENTITY_ID from DYEXTN_ASSOCIATION where IDENTIFIER = " + associationId; ResultSet resultSet = jdbcdao.getQueryResul...
static long function(long associationId, JDBCDAO jdbcdao) throws SQLException, DAOException { Long entityId = null; String getEntityIdQuery = STR + associationId; ResultSet resultSet = jdbcdao.getQueryResultSet(getEntityIdQuery); if (resultSet.next()) { entityId = resultSet.getLong(1); } jdbcdao.closeStatement(resultSe...
/** * It will retrieve the TargetEntity Id of the given association Id * @param associationId whose target entity id is to be searched * @return target entity Id of the given association Id * @throws SQLException * @throws DAOException */
It will retrieve the TargetEntity Id of the given association Id
getTgtEntityIdOfAttribute
{ "repo_name": "NCIP/catissue-tools", "path": "WEB-INF/src/edu/wustl/clinportal/querysuite/metadata/UpdateSchemaForConstraintProperties.java", "license": "bsd-3-clause", "size": 20501 }
[ "edu.wustl.dao.exception.DAOException", "java.sql.ResultSet", "java.sql.SQLException" ]
import edu.wustl.dao.exception.DAOException; import java.sql.ResultSet; import java.sql.SQLException;
import edu.wustl.dao.exception.*; import java.sql.*;
[ "edu.wustl.dao", "java.sql" ]
edu.wustl.dao; java.sql;
2,839,200
public static File createRepositoryBakFile(String filename) { return FileUtil.createFile(FileUtil.repositoryFolder, filename + FileUtil.BAK_EXTENSION); }
static File function(String filename) { return FileUtil.createFile(FileUtil.repositoryFolder, filename + FileUtil.BAK_EXTENSION); }
/** * Procedure to create a Repository Bak File * @param filename * @return */
Procedure to create a Repository Bak File
createRepositoryBakFile
{ "repo_name": "LucasBassetti/nemo-platform", "path": "br.ufes.inf.nemo.platform/src/main/java/br/ufes/inf/nemo/platform/util/FileUtil.java", "license": "mit", "size": 5937 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
5,322
private void unregisterListener() { Case.removeEventTypeSubscriber(CASE_EVENTS_OF_INTEREST, weakListener); }
void function() { Case.removeEventTypeSubscriber(CASE_EVENTS_OF_INTEREST, weakListener); }
/** * Unregisters this node's application event listener. */
Unregisters this node's application event listener
unregisterListener
{ "repo_name": "sleuthkit/autopsy", "path": "Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java", "license": "apache-2.0", "size": 80029 }
[ "org.sleuthkit.autopsy.casemodule.Case" ]
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.*;
[ "org.sleuthkit.autopsy" ]
org.sleuthkit.autopsy;
1,755,673
public CassandraLinkedService withAuthenticationType(Object authenticationType) { if (this.innerTypeProperties() == null) { this.innerTypeProperties = new CassandraLinkedServiceTypeProperties(); } this.innerTypeProperties().withAuthenticationType(authenticationType); retu...
CassandraLinkedService function(Object authenticationType) { if (this.innerTypeProperties() == null) { this.innerTypeProperties = new CassandraLinkedServiceTypeProperties(); } this.innerTypeProperties().withAuthenticationType(authenticationType); return this; }
/** * Set the authenticationType property: AuthenticationType to be used for connection. Type: string (or Expression * with resultType string). * * @param authenticationType the authenticationType value to set. * @return the CassandraLinkedService object itself. */
Set the authenticationType property: AuthenticationType to be used for connection. Type: string (or Expression with resultType string)
withAuthenticationType
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/models/CassandraLinkedService.java", "license": "mit", "size": 8252 }
[ "com.azure.resourcemanager.datafactory.fluent.models.CassandraLinkedServiceTypeProperties" ]
import com.azure.resourcemanager.datafactory.fluent.models.CassandraLinkedServiceTypeProperties;
import com.azure.resourcemanager.datafactory.fluent.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
71,398
@PUT @Path("timestamps/current") @Consumes(MediaType.TEXT_PLAIN) @Produces(MediaType.TEXT_PLAIN) public String getTimestampForUserCurrent(String jsonUser) throws MetalyzerAPIException { User user = gson.fromJson(jsonUser, User.class); semCon.setConnection(connectionName); log.info("Request for getTimestamp...
@Path(STR) @Consumes(MediaType.TEXT_PLAIN) @Produces(MediaType.TEXT_PLAIN) String function(String jsonUser) throws MetalyzerAPIException { User user = gson.fromJson(jsonUser, User.class); semCon.setConnection(connectionName); log.info(STR); return gson.toJson(semCon.getUserService().getTimestamp(RequestType.CURRENT_REQ...
/** * Query to get the Unix-Timestamp of a specific user. * @param user * User to which the Unix-Timestamp should be searched. * @return * Returns a JSON-String of the Unix-Timestamp of the given user. */
Query to get the Unix-Timestamp of a specific user
getTimestampForUserCurrent
{ "repo_name": "trustathsh/metalyzer", "path": "dataservice-module/src/main/java/de/hshannover/f4/trust/metalyzer/semantic/rest/SemanticsUserResource.java", "license": "apache-2.0", "size": 13368 }
[ "de.hshannover.f4.trust.metalyzer.api.exception.MetalyzerAPIException", "de.hshannover.f4.trust.metalyzer.semantic.entities.User", "de.hshannover.f4.trust.metalyzer.semantic.services.SemanticsController", "javax.ws.rs.Consumes", "javax.ws.rs.Path", "javax.ws.rs.Produces", "javax.ws.rs.core.MediaType" ]
import de.hshannover.f4.trust.metalyzer.api.exception.MetalyzerAPIException; import de.hshannover.f4.trust.metalyzer.semantic.entities.User; import de.hshannover.f4.trust.metalyzer.semantic.services.SemanticsController; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.r...
import de.hshannover.f4.trust.metalyzer.api.exception.*; import de.hshannover.f4.trust.metalyzer.semantic.entities.*; import de.hshannover.f4.trust.metalyzer.semantic.services.*; import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "de.hshannover.f4", "javax.ws" ]
de.hshannover.f4; javax.ws;
2,430,470
protected boolean checkRequired(FormComponent<?> formComponent) { final String input = formComponent.getInput(); // when null, check whether this is natural for that component, or // whether - as is the case with text fields - this can only happen // when the component was disabled if (input == null && !f...
boolean function(FormComponent<?> formComponent) { final String input = formComponent.getInput(); if (input == null && !formComponent.isInputNullable() && !formComponent.isEnabledInHierarchy()) { return true; } return !Strings.isEmpty(input); } public enum OneRequiredMode { ONE_OR_MORE, ONE_ONLY }
/** * Code copied from FormComponent#checkRequired, which is unfortunately useless as long as FormComponent#required is false. */
Code copied from FormComponent#checkRequired, which is unfortunately useless as long as FormComponent#required is false
checkRequired
{ "repo_name": "openwide-java/owsi-core-parent", "path": "owsi-core/owsi-core-components/owsi-core-component-wicket-more/src/main/java/fr/openwide/core/wicket/more/markup/html/form/validation/OneRequiredFormValidator.java", "license": "apache-2.0", "size": 3958 }
[ "org.apache.wicket.markup.html.form.FormComponent", "org.apache.wicket.util.string.Strings" ]
import org.apache.wicket.markup.html.form.FormComponent; import org.apache.wicket.util.string.Strings;
import org.apache.wicket.markup.html.form.*; import org.apache.wicket.util.string.*;
[ "org.apache.wicket" ]
org.apache.wicket;
1,929,675
@Override protected Hashtable<String,Object> backupState() { Hashtable<String,Object> result; result = super.backupState(); if (m_ScriptObject != null) result.put(BACKUP_SCRIPTOBJECT, m_ScriptObject); return result; }
Hashtable<String,Object> function() { Hashtable<String,Object> result; result = super.backupState(); if (m_ScriptObject != null) result.put(BACKUP_SCRIPTOBJECT, m_ScriptObject); return result; }
/** * Backs up the current state of the actor before update the variables. * * @return the backup */
Backs up the current state of the actor before update the variables
backupState
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/flow/core/AbstractScriptedActor.java", "license": "gpl-3.0", "size": 6193 }
[ "java.util.Hashtable" ]
import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
2,504,047
public String getExItemId(ItemStack item, IdentifierType idType) { if (item == null) { return null; } switch (idType) { case DISPLAY_NAME: if (item.hasItemMeta() && item.getItemMeta().hasDisplayName()) { return item.getItemMeta().ge...
String function(ItemStack item, IdentifierType idType) { if (item == null) { return null; } switch (idType) { case DISPLAY_NAME: if (item.hasItemMeta() && item.getItemMeta().hasDisplayName()) { return item.getItemMeta().getDisplayName().replace(identifierPrefix, STRSTRcaliburnSTRid"), PersistentDataType.STRING, null); ...
/** * Returns the ID of the {@link ExItem} that the given ItemStack is an instance of. If there is no {@link CustomItem} registered, the {@link VanillaItem} of * the stack's material is used. * * @param item the ItemStack * @param idType the ID storage method * @return the ID of the {@li...
Returns the ID of the <code>ExItem</code> that the given ItemStack is an instance of. If there is no <code>CustomItem</code> registered, the <code>VanillaItem</code> of the stack's material is used
getExItemId
{ "repo_name": "DRE2N/CaliburnAPI", "path": "src/main/java/de/erethon/caliburn/CaliburnAPI.java", "license": "lgpl-3.0", "size": 28205 }
[ "de.erethon.caliburn.category.IdentifierType", "org.bukkit.inventory.ItemStack", "org.bukkit.persistence.PersistentDataType" ]
import de.erethon.caliburn.category.IdentifierType; import org.bukkit.inventory.ItemStack; import org.bukkit.persistence.PersistentDataType;
import de.erethon.caliburn.category.*; import org.bukkit.inventory.*; import org.bukkit.persistence.*;
[ "de.erethon.caliburn", "org.bukkit.inventory", "org.bukkit.persistence" ]
de.erethon.caliburn; org.bukkit.inventory; org.bukkit.persistence;
619,720
@Override public Report test(Request request) { Logger.getLogger(Home.class.getName()).log(Priority.LOWEST, "Running test: {0}", this.toString()); Report report = new Report(1, 1, "100%", ""); Long start = System.currentTimeMillis(); main(request); Long end = System.curre...
Report function(Request request) { Logger.getLogger(Home.class.getName()).log(Priority.LOWEST, STR, this.toString()); Report report = new Report(1, 1, "100%", ""); Long start = System.currentTimeMillis(); main(request); Long end = System.currentTimeMillis(); if (end - start > 10) { report.setSuccessful(report.getSucces...
/** * Acceptance requirements: * * <ol> * <li> * Ensure that processing completes in under 10 ms. * </li> * </ol> * * @return Report */
Acceptance requirements: Ensure that processing completes in under 10 ms.
test
{ "repo_name": "ThreaT/blink", "path": "site/src/main/java/cool/blink/site/htmltofront/read/HtmlToFront.java", "license": "unlicense", "size": 1806 }
[ "cool.blink.back.utilities.LogUtilities", "cool.blink.back.webserver.Report", "cool.blink.back.webserver.Request", "cool.blink.site.home.read.Home", "java.util.logging.Logger" ]
import cool.blink.back.utilities.LogUtilities; import cool.blink.back.webserver.Report; import cool.blink.back.webserver.Request; import cool.blink.site.home.read.Home; import java.util.logging.Logger;
import cool.blink.back.utilities.*; import cool.blink.back.webserver.*; import cool.blink.site.home.read.*; import java.util.logging.*;
[ "cool.blink.back", "cool.blink.site", "java.util" ]
cool.blink.back; cool.blink.site; java.util;
802,930
try { return new URL(cleanPath(originalPath)); } catch (MalformedURLException ex) { // Cleaned URL path cannot be converted to URL // -> take original URL. return originalUrl; } }
try { return new URL(cleanPath(originalPath)); } catch (MalformedURLException ex) { return originalUrl; } }
/** * Determine a cleaned URL for the given original URL. * * @param originalUrl * the original URL * @param originalPath * the original URL path * @return the cleaned URL * @see org.springframework.util.StringUtils#cleanPath */
Determine a cleaned URL for the given original URL
getCleanedUrl
{ "repo_name": "xuse/ef-orm", "path": "common-core/src/main/java/jef/tools/resource/UrlResource.java", "license": "apache-2.0", "size": 7855 }
[ "java.net.MalformedURLException" ]
import java.net.MalformedURLException;
import java.net.*;
[ "java.net" ]
java.net;
2,442,624
public boolean deleteUser(User user) { getCacheService().getUserMap().remove(user.getId()); logger.debug("User has been deleted from cache. User : "+user); return true; }
boolean function(User user) { getCacheService().getUserMap().remove(user.getId()); logger.debug(STR+user); return true; }
/** * Delete User * * @param User user * @return boolean response of the method */
Delete User
deleteUser
{ "repo_name": "feiyue/maven-framework-project", "path": "spring3-rmi-httpinvoker-example/src/main/java/net/aimeizi/rmi/httpinvoke/example/http/server/HttpUserService.java", "license": "mit", "size": 1815 }
[ "net.aimeizi.rmi.httpinvoke.example.model.User" ]
import net.aimeizi.rmi.httpinvoke.example.model.User;
import net.aimeizi.rmi.httpinvoke.example.model.*;
[ "net.aimeizi.rmi" ]
net.aimeizi.rmi;
265,563
@Override protected void entryRemoved(boolean evicted, String key, BitmapDrawable oldValue, BitmapDrawable newValue) { if (RecyclingBitmapDrawable.class.isInstance(oldValue)) { // The removed entry is...
void function(boolean evicted, String key, BitmapDrawable oldValue, BitmapDrawable newValue) { if (RecyclingBitmapDrawable.class.isInstance(oldValue)) { ((RecyclingBitmapDrawable) oldValue).setIsCached(false); } else { if (VersionUtils.hasHoneycomb()) { mReusableBitmaps.add(new SoftReference<Bitmap>(oldValue.getBitmap(...
/** * Notify the removed entry that is no longer being cached */
Notify the removed entry that is no longer being cached
entryRemoved
{ "repo_name": "almiso/CollageApp", "path": "app/src/main/java/org/almiso/collageapp/android/media/util/ImageCache.java", "license": "mit", "size": 29484 }
[ "android.graphics.Bitmap", "android.graphics.drawable.BitmapDrawable", "java.lang.ref.SoftReference" ]
import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import java.lang.ref.SoftReference;
import android.graphics.*; import android.graphics.drawable.*; import java.lang.ref.*;
[ "android.graphics", "java.lang" ]
android.graphics; java.lang;
2,124,915
public int getLoginTimeout() throws SQLException { return loginTimeOut; }
int function() throws SQLException { return loginTimeOut; }
/** * Returns the amount of time that login will wait for the connection to happen before it gets * time out. * * @throws SQLException * @return int login time out. */
Returns the amount of time that login will wait for the connection to happen before it gets time out
getLoginTimeout
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/datasource/AbstractDataSource.java", "license": "apache-2.0", "size": 6744 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,885,819
public void testLoginAsSomeoneElse() throws IOException { final String encodedService = URLEncoder.encode(getServiceUrl(), "UTF-8"); // establish SSO session as the first user beginAt("/login?service=" + encodedService); setFormElement(FORM_USERNAME, getUsername()); setForm...
void function() throws IOException { final String encodedService = URLEncoder.encode(getServiceUrl(), "UTF-8"); beginAt(STR + encodedService); setFormElement(FORM_USERNAME, getUsername()); setFormElement(FORM_PASSWORD, getGoodPassword()); submit(); final String firstServiceTicket = LoginHelper.serviceTicketFromResponse...
/** * Test that logging in as someone else destroys the TGT and outstanding * service tickets for the previously authenticated user. * @throws IOException */
Test that logging in as someone else destroys the TGT and outstanding service tickets for the previously authenticated user
testLoginAsSomeoneElse
{ "repo_name": "0be1/cas", "path": "cas-server-compatibility/src/test/java/org/jasig/cas/login/LoginAsCredentialsAcceptorCompatibilityTests.java", "license": "apache-2.0", "size": 5659 }
[ "java.io.IOException", "java.net.URLEncoder" ]
import java.io.IOException; import java.net.URLEncoder;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
2,852,301
@Override public void cleanResourceReferences(String key) throws YarnException { String interned = intern(key); synchronized (interned) { super.cleanResourceReferences(key); } }
void function(String key) throws YarnException { String interned = intern(key); synchronized (interned) { super.cleanResourceReferences(key); } }
/** * Provides atomicity for the method. */
Provides atomicity for the method
cleanResourceReferences
{ "repo_name": "apurtell/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-sharedcachemanager/src/main/java/org/apache/hadoop/yarn/server/sharedcachemanager/store/InMemorySCMStore.java", "license": "apache-2.0", "size": 19226 }
[ "org.apache.hadoop.yarn.exceptions.YarnException" ]
import org.apache.hadoop.yarn.exceptions.YarnException;
import org.apache.hadoop.yarn.exceptions.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,579,632
public List<Contact> Contacts(String data) throws IllegalArgumentException, ParserException, MalformedURLException { List<Contact> result = null; List<IODataEntry> parsedSDMODataEntries = getParsedSDMODataEntries(data, parser, schema, "BusinessPartner","Contacts"); result = new LinkedList<Contact>(); ...
List<Contact> function(String data) throws IllegalArgumentException, ParserException, MalformedURLException { List<Contact> result = null; List<IODataEntry> parsedSDMODataEntries = getParsedSDMODataEntries(data, parser, schema, STR,STR); result = new LinkedList<Contact>(); for (IODataEntry entry : parsedSDMODataEntries...
/** * Get Contacts * @return - List&ltContact&gt * @throws - IllegalArgumentException, ParserException, MalformedURLException */
Get Contacts
Contacts
{ "repo_name": "liangyaohua/SalesOrder", "path": "src/com/capgemini/SalesOrder/zgwsample_srv/v0/entitytypes/BusinessPartner.java", "license": "gpl-2.0", "size": 17063 }
[ "com.sap.mobile.lib.parser.IODataEntry", "com.sap.mobile.lib.parser.ParserException", "java.net.MalformedURLException", "java.util.LinkedList", "java.util.List" ]
import com.sap.mobile.lib.parser.IODataEntry; import com.sap.mobile.lib.parser.ParserException; import java.net.MalformedURLException; import java.util.LinkedList; import java.util.List;
import com.sap.mobile.lib.parser.*; import java.net.*; import java.util.*;
[ "com.sap.mobile", "java.net", "java.util" ]
com.sap.mobile; java.net; java.util;
1,708,194
public boolean copyFile(String srcPath, String destPath) { File checkFile = new File(srcPath); if (checkFile.exists()==false) return false; boolean successful = false; FileInputStream fis = null; FileOutputStream fos = null; try { fis = new FileInputStream(srcPath); fos = new FileOutputStream...
boolean function(String srcPath, String destPath) { File checkFile = new File(srcPath); if (checkFile.exists()==false) return false; boolean successful = false; FileInputStream fis = null; FileOutputStream fos = null; try { fis = new FileInputStream(srcPath); fos = new FileOutputStream(destPath); this.copy(fis, fos); s...
/** * This method allows to copy a file from one location to another one. * * @param srcPath the source path * @param destPath the destination path * @return true, if successful */
This method allows to copy a file from one location to another one
copyFile
{ "repo_name": "EnFlexIT/AgentWorkbench", "path": "eclipseProjects/org.agentgui/bundles/de.enflexit.common/src/de/enflexit/common/transfer/FileCopier.java", "license": "lgpl-2.1", "size": 2874 }
[ "java.io.File", "java.io.FileInputStream", "java.io.FileOutputStream", "java.io.IOException" ]
import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,550,523
public ArrayList<RProject> getProjects(int page, int perPage, boolean descending, int sortOn, String search) { ArrayList<RProject> result = new ArrayList<RProject>(); try { String order = descending ? "DESC" : "ASC"; String sortMode = ""; if (sortOn == CREATED_AT) { sortMode = "created_at"; } ...
ArrayList<RProject> function(int page, int perPage, boolean descending, int sortOn, String search) { ArrayList<RProject> result = new ArrayList<RProject>(); try { String order = descending ? "DESC" : "ASC"; String sortMode = STRcreated_atSTRupdated_atSTRprojectsSTRpage=STR&per_page=STR&sort=STR&order=STR&search=STRUTF-...
/** * Retrieves multiple projects off of iSENSE. * * @param page * Which page of results to start from. 1-indexed * @param perPage * How many results to display per page * @param descending * Whether to display the results in descending order (true) or * asc...
Retrieves multiple projects off of iSENSE
getProjects
{ "repo_name": "JasonD94/iSENSE-API", "path": "Java/API/src/edu/uml/cs/isense/api/API.java", "license": "mit", "size": 30138 }
[ "edu.uml.cs.isense.objects.RProject", "java.util.ArrayList" ]
import edu.uml.cs.isense.objects.RProject; import java.util.ArrayList;
import edu.uml.cs.isense.objects.*; import java.util.*;
[ "edu.uml.cs", "java.util" ]
edu.uml.cs; java.util;
2,702,761
@SuppressWarnings("removal") public static boolean getDefaultHeadlessProperty() { return AccessController.doPrivileged((PrivilegedAction<Boolean>) () -> { final String display = System.getenv("DISPLAY"); return display == null || display.trim().isEmpty(); ...
@SuppressWarnings(STR) static boolean function() { return AccessController.doPrivileged((PrivilegedAction<Boolean>) () -> { final String display = System.getenv(STR); return display == null display.trim().isEmpty(); }); }
/** * Called from java.awt.GraphicsEnvironment when * to check if on this platform, the JDK should default to * headless mode, in the case the application did specify * a value for the java.awt.headless system property. */
Called from java.awt.GraphicsEnvironment when to check if on this platform, the JDK should default to headless mode, in the case the application did specify a value for the java.awt.headless system property
getDefaultHeadlessProperty
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/sun/awt/PlatformGraphicsInfo.java", "license": "apache-2.0", "size": 2604 }
[ "java.security.AccessController", "java.security.PrivilegedAction" ]
import java.security.AccessController; import java.security.PrivilegedAction;
import java.security.*;
[ "java.security" ]
java.security;
1,683,480
public void updateIncomeExpensesButtons() { if (controller.getCurrentMainCategory().getId() == Constants.EXPENSE_ID) { view.findViewById(R.id.transactionListIncomeSwitchButton) .setEnabled(true); view.findViewById(R.id.transactionListExpensesSwitchButton) .setEnabled(false); } else { view.find...
void function() { if (controller.getCurrentMainCategory().getId() == Constants.EXPENSE_ID) { view.findViewById(R.id.transactionListIncomeSwitchButton) .setEnabled(true); view.findViewById(R.id.transactionListExpensesSwitchButton) .setEnabled(false); } else { view.findViewById(R.id.transactionListIncomeSwitchButton) .se...
/** * Switches the income/expenses buttons "on" and "off". */
Switches the income/expenses buttons "on" and "off"
updateIncomeExpensesButtons
{ "repo_name": "daubigne/Android-Budget-Project", "path": "Android_Budget_App/src/it/chalmers/mufasa/android_budget_app/activities/TransactionListFragment.java", "license": "gpl-3.0", "size": 5410 }
[ "it.chalmers.mufasa.android_budget_app.settings.Constants" ]
import it.chalmers.mufasa.android_budget_app.settings.Constants;
import it.chalmers.mufasa.android_budget_app.settings.*;
[ "it.chalmers.mufasa" ]
it.chalmers.mufasa;
856,819
public IsolateRef getIsolate() { JsonObject obj = (JsonObject) json.get("isolate"); if (obj == null) return null; final String type = json.get("type").getAsString(); if ("Instance".equals(type) || "@Instance".equals(type)) { final String kind = json.get("kind").getAsString(); if ("Null".eq...
IsolateRef function() { JsonObject obj = (JsonObject) json.get(STR); if (obj == null) return null; final String type = json.get("type").getAsString(); if (STR.equals(type) STR.equals(type)) { final String kind = json.get("kind").getAsString(); if ("Null".equals(kind)) return null; } return new IsolateRef(obj); }
/** * The isolate with which this event is associated. * * This is provided for all event kinds except for: * - VMUpdate * * Can return <code>null</code>. */
The isolate with which this event is associated. This is provided for all event kinds except for: - VMUpdate Can return <code>null</code>
getIsolate
{ "repo_name": "dart-archive/vm_service_drivers", "path": "java/src/org/dartlang/vm/service/element/Event.java", "license": "bsd-3-clause", "size": 9926 }
[ "com.google.gson.JsonObject" ]
import com.google.gson.JsonObject;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
1,602,586
boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, byte[] value, Put put) throws IOException;
boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, byte[] value, Put put) throws IOException;
/** * Atomically checks if a row/family/qualifier value matches the expected * value. If it does, it adds the put. If the passed value is null, the check * is for the lack of column (ie: non-existance) * * @param row to check * @param family column family to check * @param qualifier column qualifi...
Atomically checks if a row/family/qualifier value matches the expected value. If it does, it adds the put. If the passed value is null, the check is for the lack of column (ie: non-existance)
checkAndPut
{ "repo_name": "lifeng5042/RStore", "path": "src/org/apache/hadoop/hbase/client/HTableInterface.java", "license": "gpl-2.0", "size": 17905 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,201,865
public AnalysisEngine getAe() { return this.ae; }
AnalysisEngine function() { return this.ae; }
/** * Gets the ae. * * @return the ae */
Gets the ae
getAe
{ "repo_name": "apache/uima-uimaj", "path": "uimaj-tools/src/main/java/org/apache/uima/tools/cvd/MainFrame.java", "license": "apache-2.0", "size": 89935 }
[ "org.apache.uima.analysis_engine.AnalysisEngine" ]
import org.apache.uima.analysis_engine.AnalysisEngine;
import org.apache.uima.analysis_engine.*;
[ "org.apache.uima" ]
org.apache.uima;
1,858,855
public static void installKinesisPlugin(QueryRunner queryRunner, String tableDescriptionLocation, String accessKey, String secretKey) { KinesisPlugin kinesisPlugin = new KinesisPlugin(); queryRunner.installPlugin(kinesisPlugin); Map<String, String> kinesisConfig = ImmutableMap.of( ...
static void function(QueryRunner queryRunner, String tableDescriptionLocation, String accessKey, String secretKey) { KinesisPlugin kinesisPlugin = new KinesisPlugin(); queryRunner.installPlugin(kinesisPlugin); Map<String, String> kinesisConfig = ImmutableMap.of( STR, STR, STR, accessKey, STR, secretKey, STR, tableDescr...
/** * Install the plug in into the given query runner, using normal setup but with the given table descriptions. * <p> * Note that this uses the actual client and will incur charges from AWS when run. Mainly for full * integration tests. */
Install the plug in into the given query runner, using normal setup but with the given table descriptions. Note that this uses the actual client and will incur charges from AWS when run. Mainly for full integration tests
installKinesisPlugin
{ "repo_name": "11xor6/presto", "path": "plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/util/TestUtils.java", "license": "apache-2.0", "size": 4182 }
[ "com.google.common.collect.ImmutableMap", "io.trino.plugin.kinesis.KinesisPlugin", "io.trino.testing.QueryRunner", "java.util.Map" ]
import com.google.common.collect.ImmutableMap; import io.trino.plugin.kinesis.KinesisPlugin; import io.trino.testing.QueryRunner; import java.util.Map;
import com.google.common.collect.*; import io.trino.plugin.kinesis.*; import io.trino.testing.*; import java.util.*;
[ "com.google.common", "io.trino.plugin", "io.trino.testing", "java.util" ]
com.google.common; io.trino.plugin; io.trino.testing; java.util;
1,071,262
public IMethod getMethod() { return getMethodCall().getMethod(); }
IMethod function() { return getMethodCall().getMethod(); }
/** * Method getMethod. * @return Object */
Method getMethod
getMethod
{ "repo_name": "linnet/eclipse-tools", "path": "dk.kamstruplinnet.callers/src/dk/kamstruplinnet/callers/search/MethodWrapper.java", "license": "epl-1.0", "size": 8175 }
[ "org.eclipse.jdt.core.IMethod" ]
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
2,803,129
public void close() throws IOException { RandomAccessFile raf = this.raf; if (raf == null) return; synchronized (raf) { closed = true; entries = null; raf.close(); } }
void function() throws IOException { RandomAccessFile raf = this.raf; if (raf == null) return; synchronized (raf) { closed = true; entries = null; raf.close(); } }
/** * Closes the ZipFile. This also closes all input streams given by * this class. After this is called, no further method should be * called. * * @exception IOException if a i/o error occured. */
Closes the ZipFile. This also closes all input streams given by this class. After this is called, no further method should be called
close
{ "repo_name": "rhuitl/uClinux", "path": "lib/classpath/java/util/zip/ZipFile.java", "license": "gpl-2.0", "size": 21581 }
[ "java.io.IOException", "java.io.RandomAccessFile" ]
import java.io.IOException; import java.io.RandomAccessFile;
import java.io.*;
[ "java.io" ]
java.io;
2,312,811
@Test public void testUpdateNodeStateComplete() { K8sNode updated = DefaultK8sNode.from(MINION_2) .state(COMPLETE) .build(); target.updateNode(updated); assertEquals(ERR_NOT_MATCH, updated, target.node(MINION_2_HOSTNAME)); validateEvents(K8S_NODE_U...
void function() { K8sNode updated = DefaultK8sNode.from(MINION_2) .state(COMPLETE) .build(); target.updateNode(updated); assertEquals(ERR_NOT_MATCH, updated, target.node(MINION_2_HOSTNAME)); validateEvents(K8S_NODE_UPDATED, K8S_NODE_COMPLETE); }
/** * Checks if updating a node state to complete generates proper events. */
Checks if updating a node state to complete generates proper events
testUpdateNodeStateComplete
{ "repo_name": "opennetworkinglab/onos", "path": "apps/k8s-node/app/src/test/java/org/onosproject/k8snode/impl/K8sNodeManagerTest.java", "license": "apache-2.0", "size": 13402 }
[ "org.junit.Assert", "org.onosproject.k8snode.api.DefaultK8sNode", "org.onosproject.k8snode.api.K8sNode" ]
import org.junit.Assert; import org.onosproject.k8snode.api.DefaultK8sNode; import org.onosproject.k8snode.api.K8sNode;
import org.junit.*; import org.onosproject.k8snode.api.*;
[ "org.junit", "org.onosproject.k8snode" ]
org.junit; org.onosproject.k8snode;
2,660,728
EEnum getAlineacion();
EEnum getAlineacion();
/** * Returns the meta object for enum '{@link visualizacionMetricas3.visualizacion.Alineacion <em>Alineacion</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for enum '<em>Alineacion</em>'. * @see visualizacionMetricas3.visualizacion.Alineacion * @generated */
Returns the meta object for enum '<code>visualizacionMetricas3.visualizacion.Alineacion Alineacion</code>'.
getAlineacion
{ "repo_name": "lfmendivelso10/AppModernization", "path": "source/i2/VisualizacionMetricas3/src/visualizacionMetricas3/visualizacion/VisualizacionPackage.java", "license": "mit", "size": 96014 }
[ "org.eclipse.emf.ecore.EEnum" ]
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,504,838
public static void updateRepositoryUuidInMetadata( ClusterService clusterService, final String repositoryName, RepositoryData repositoryData, ActionListener<Void> listener) { final String repositoryUuid = repositoryData.getUuid(); if (repositoryUuid.e...
static void function( ClusterService clusterService, final String repositoryName, RepositoryData repositoryData, ActionListener<Void> listener) { final String repositoryUuid = repositoryData.getUuid(); if (repositoryUuid.equals(RepositoryData.MISSING_UUID)) { listener.onResponse(null); return; } final RepositoriesMetad...
/** * Set the repository UUID in the named repository's {@link RepositoryMetadata} to match the UUID in its {@link RepositoryData}, * which may involve a cluster state update. * * @param listener notified when the {@link RepositoryMetadata} is updated, possibly on this thread or possibly on the mast...
Set the repository UUID in the named repository's <code>RepositoryMetadata</code> to match the UUID in its <code>RepositoryData</code>, which may involve a cluster state update
updateRepositoryUuidInMetadata
{ "repo_name": "robin13/elasticsearch", "path": "server/src/main/java/org/elasticsearch/repositories/RepositoriesService.java", "license": "apache-2.0", "size": 34604 }
[ "org.elasticsearch.action.ActionListener", "org.elasticsearch.cluster.metadata.RepositoriesMetadata", "org.elasticsearch.cluster.metadata.RepositoryMetadata", "org.elasticsearch.cluster.service.ClusterService" ]
import org.elasticsearch.action.ActionListener; import org.elasticsearch.cluster.metadata.RepositoriesMetadata; import org.elasticsearch.cluster.metadata.RepositoryMetadata; import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.action.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.cluster.service.*;
[ "org.elasticsearch.action", "org.elasticsearch.cluster" ]
org.elasticsearch.action; org.elasticsearch.cluster;
86,918
// TODO: Images selected from SDCARD don't display correctly, but from CAMERA ALBUM do! public void getImage(int srcType, int returnType) { Intent intent = new Intent(); String title = GET_PICTURE; if (this.mediaType == PICTURE) { intent.setType("image*"); title =...
void function(int srcType, int returnType) { Intent intent = new Intent(); String title = GET_PICTURE; if (this.mediaType == PICTURE) { intent.setType(STR); title = GET_All; } if(this.allowEdit){ File photo = createCaptureFile(encodingType); this.imageUri = Uri.fromFile(photo); } intent.setAction(Intent.ACTION_GET_CONT...
/** * Get image from photo library. * * @param quality Compression quality hint (0-100: 0=low quality & high compression, 100=compress of max quality) * @param srcType The album to get image from. * @param returnType Set the type of image to return. */
Get image from photo library
getImage
{ "repo_name": "zhushunqing/cordova-camera-android-crop-available", "path": "src/android/CameraLauncher.java", "license": "apache-2.0", "size": 39069 }
[ "android.content.Intent", "android.net.Uri", "java.io.File", "org.apache.cordova.CordovaPlugin" ]
import android.content.Intent; import android.net.Uri; import java.io.File; import org.apache.cordova.CordovaPlugin;
import android.content.*; import android.net.*; import java.io.*; import org.apache.cordova.*;
[ "android.content", "android.net", "java.io", "org.apache.cordova" ]
android.content; android.net; java.io; org.apache.cordova;
1,213,194
void execute(FHActCallback pCallback) throws Exception;
void execute(FHActCallback pCallback) throws Exception;
/** * Executes the request asynchronously. Executes the pCallback function when * it finishes. * * @param pCallback the callback function * @throws Exception this method is allowed to throw an exception */
Executes the request asynchronously. Executes the pCallback function when it finishes
execute
{ "repo_name": "matzew/fh-android-sdk", "path": "fh-android-sdk/src/main/java/com/feedhenry/sdk2/FHAct.java", "license": "apache-2.0", "size": 1518 }
[ "com.feedhenry.sdk.FHActCallback" ]
import com.feedhenry.sdk.FHActCallback;
import com.feedhenry.sdk.*;
[ "com.feedhenry.sdk" ]
com.feedhenry.sdk;
892,115
this.actionButtonsTag = actionButtonsTag; } public ActionButtonsColumnTag() { this.setMedia(MediaTypeEnum.HTML.getName()); this.actionButtonsTag = new ActionButtonsTag(); this.actionButtonsTag.showOnlyActionWithIcon(); }
this.actionButtonsTag = actionButtonsTag; } public ActionButtonsColumnTag() { this.setMedia(MediaTypeEnum.HTML.getName()); this.actionButtonsTag = new ActionButtonsTag(); this.actionButtonsTag.showOnlyActionWithIcon(); }
/** * Sets the action buttons tag. * * @param actionButtonsTag * the new action buttons tag */
Sets the action buttons tag
setActionButtonsTag
{ "repo_name": "alarulrajan/CodeFest", "path": "src/com/technoetic/xplanner/tags/displaytag/ActionButtonsColumnTag.java", "license": "gpl-2.0", "size": 4415 }
[ "org.displaytag.properties.MediaTypeEnum" ]
import org.displaytag.properties.MediaTypeEnum;
import org.displaytag.properties.*;
[ "org.displaytag.properties" ]
org.displaytag.properties;
2,230,521
public static DeleteType toDeleteType( KeyValue.Type type) throws IOException { switch (type) { case Delete: return DeleteType.DELETE_ONE_VERSION; case DeleteColumn: return DeleteType.DELETE_MULTIPLE_VERSIONS; case DeleteFamily: return DeleteType.DELETE_FAMILY; case DeleteF...
static DeleteType function( KeyValue.Type type) throws IOException { switch (type) { case Delete: return DeleteType.DELETE_ONE_VERSION; case DeleteColumn: return DeleteType.DELETE_MULTIPLE_VERSIONS; case DeleteFamily: return DeleteType.DELETE_FAMILY; case DeleteFamilyVersion: return DeleteType.DELETE_FAMILY_VERSION; de...
/** * Convert a delete KeyValue type to protocol buffer DeleteType. * * @param type * @return protocol buffer DeleteType * @throws IOException */
Convert a delete KeyValue type to protocol buffer DeleteType
toDeleteType
{ "repo_name": "drewpope/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java", "license": "apache-2.0", "size": 114457 }
[ "java.io.IOException", "java.lang.reflect.Type", "org.apache.hadoop.hbase.KeyValue", "org.apache.hadoop.hbase.client.Delete", "org.apache.hadoop.hbase.protobuf.generated.ClientProtos" ]
import java.io.IOException; import java.lang.reflect.Type; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.protobuf.generated.ClientProtos;
import java.io.*; import java.lang.reflect.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.protobuf.generated.*;
[ "java.io", "java.lang", "org.apache.hadoop" ]
java.io; java.lang; org.apache.hadoop;
106,021
SqlValidatorScope getGroupScope(SqlSelect select);
SqlValidatorScope getGroupScope(SqlSelect select);
/** * Returns a scope containing the objects visible from the GROUP BY clause * of a query. * * @param select SELECT statement * @return naming scope for GROUP BY clause */
Returns a scope containing the objects visible from the GROUP BY clause of a query
getGroupScope
{ "repo_name": "wanglan/calcite", "path": "core/src/main/java/org/apache/calcite/sql/validate/SqlValidator.java", "license": "apache-2.0", "size": 24553 }
[ "org.apache.calcite.sql.SqlSelect" ]
import org.apache.calcite.sql.SqlSelect;
import org.apache.calcite.sql.*;
[ "org.apache.calcite" ]
org.apache.calcite;
1,626,324
private void installHttpSelector(Properties settings, ProtocolDispatchSelector ps) throws NumberFormatException { String proxyHost = settings.getProperty("org.gnome.system.proxy.http host", null); int proxyPort = Integer.parseInt(settings.getProperty("org.gnome.system.proxy.http port", "0").trim()); if (proxy...
void function(Properties settings, ProtocolDispatchSelector ps) throws NumberFormatException { String proxyHost = settings.getProperty(STR, null); int proxyPort = Integer.parseInt(settings.getProperty(STR, "0").trim()); if (proxyHost != null && proxyHost.length() > 0 && proxyPort > 0) { Logger.log(getClass(), LogLevel....
/************************************************************************* * Install a http proxy from the given settings. * @param settings to inspect * @param ps the dispatch selector to configure. * @throws NumberFormatException ************************************************************************/
Install a http proxy from the given settings
installHttpSelector
{ "repo_name": "brsanthu/proxy-vole", "path": "src/main/java/com/btr/proxy/search/desktop/gnome/GnomeDConfProxySearchStrategy.java", "license": "bsd-3-clause", "size": 12811 }
[ "com.btr.proxy.selector.fixed.FixedProxySelector", "com.btr.proxy.selector.misc.ProtocolDispatchSelector", "com.btr.proxy.util.Logger", "java.util.Properties" ]
import com.btr.proxy.selector.fixed.FixedProxySelector; import com.btr.proxy.selector.misc.ProtocolDispatchSelector; import com.btr.proxy.util.Logger; import java.util.Properties;
import com.btr.proxy.selector.fixed.*; import com.btr.proxy.selector.misc.*; import com.btr.proxy.util.*; import java.util.*;
[ "com.btr.proxy", "java.util" ]
com.btr.proxy; java.util;
81,934
public static String resultSetToString(ResultSet resultSet) throws IllegalAccessException { StringBuilder resultSetStringBuilder = new StringBuilder(); List<String[]> resultSetStringArrayList = resultSetToStringArrayList(resultSet); List<Integer> maxColumnSizes = getMaxColumnSizes(resultSetStringArrayList...
static String function(ResultSet resultSet) throws IllegalAccessException { StringBuilder resultSetStringBuilder = new StringBuilder(); List<String[]> resultSetStringArrayList = resultSetToStringArrayList(resultSet); List<Integer> maxColumnSizes = getMaxColumnSizes(resultSetStringArrayList); String rowTemplate = create...
/** * Gets the result set as a table representation in the form of: * * <pre> * +-------+-------+-------+ * |column1|column2|column3| * +-------+-------+-------+ * |value1 |value2 |value3 | * +-------+-------+-------+ * |value1 |value2 |value3 | * +-------+-------+-------+ * </pre> *...
Gets the result set as a table representation in the form of: <code> +-------+-------+-------+ |column1|column2|column3| +-------+-------+-------+ |value1 |value2 |value3 | +-------+-------+-------+ |value1 |value2 |value3 | +-------+-------+-------+ </code>
resultSetToString
{ "repo_name": "nafae/developer", "path": "modules/dfp_axis/src/main/java/com/google/api/ads/dfp/axis/utils/v201411/Pql.java", "license": "apache-2.0", "size": 18525 }
[ "com.google.api.ads.dfp.axis.v201411.ResultSet", "java.util.List" ]
import com.google.api.ads.dfp.axis.v201411.ResultSet; import java.util.List;
import com.google.api.ads.dfp.axis.v201411.*; import java.util.*;
[ "com.google.api", "java.util" ]
com.google.api; java.util;
2,744,649
void disableSSL() { if (logger.isLoggable(Level.FINER)) logger.finer(toString() + " Disabling SSL..."); // Create a couple of cheap closed streams InputStream is = new ByteArrayInputStream(new byte[0]); try { is.close(); } catch (IOEx...
void disableSSL() { if (logger.isLoggable(Level.FINER)) logger.finer(toString() + STR); InputStream is = new ByteArrayInputStream(new byte[0]); try { is.close(); } catch (IOException e) { logger.fine(STR + e.getMessage()); } OutputStream os = new ByteArrayOutputStream(); try { os.close(); } catch (IOException e) { logg...
/** * Disables SSL on this TDS channel. */
Disables SSL on this TDS channel
disableSSL
{ "repo_name": "pierresouchay/mssql-jdbc", "path": "src/main/java/com/microsoft/sqlserver/jdbc/IOBuffer.java", "license": "mit", "size": 322046 }
[ "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.IOException", "java.io.InputStream", "java.io.OutputStream", "java.util.logging.Level", "java.util.logging.Logger" ]
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.logging.Level; import java.util.logging.Logger;
import java.io.*; import java.util.logging.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,023,296
static final void setAccelerator(JMenuItem item, KeyStroke keystroke) { if (keystroke != null) { item.setAccelerator(keystroke); } }
static final void setAccelerator(JMenuItem item, KeyStroke keystroke) { if (keystroke != null) { item.setAccelerator(keystroke); } }
/** * Set the accelerator of a given item. * * @param item The item. * @param keystroke The key stroke. */
Set the accelerator of a given item
setAccelerator
{ "repo_name": "carvalhomb/tsmells", "path": "sample/argouml/argouml/org/argouml/ui/cmd/GenericArgoMenuBar.java", "license": "gpl-2.0", "size": 30333 }
[ "javax.swing.JMenuItem", "javax.swing.KeyStroke" ]
import javax.swing.JMenuItem; import javax.swing.KeyStroke;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,221,015
try { final JavaFileSystem files = new JavaFileSystem(args[0]); final ResourceFactory resources = new StaticResources(files); ServerUtil.launchJettyServer(8080, new DefaultDispatcher(), new FileServerSessionsApp(resources)); } catch (final Exception e) { e.printStackTrace(); } } ...
try { final JavaFileSystem files = new JavaFileSystem(args[0]); final ResourceFactory resources = new StaticResources(files); ServerUtil.launchJettyServer(8080, new DefaultDispatcher(), new FileServerSessionsApp(resources)); } catch (final Exception e) { e.printStackTrace(); } } private final ResourceFactory resources;...
/** This is the main method to start this application server instance. @param args The command line arguments, however, this application only takes one: The path to read files from to respond to HTTP requests. */
This is the main method to start this application server instance
main
{ "repo_name": "emily-e/webframework", "path": "src/main/java/net/metanotion/web/examples/FileServerSessionsApp.java", "license": "apache-2.0", "size": 4140 }
[ "net.metanotion.io.JavaFileSystem", "net.metanotion.simpletemplate.ResourceFactory", "net.metanotion.simpletemplate.StaticResources", "net.metanotion.web.concrete.DefaultDispatcher", "net.metanotion.web.servlets.ServerUtil" ]
import net.metanotion.io.JavaFileSystem; import net.metanotion.simpletemplate.ResourceFactory; import net.metanotion.simpletemplate.StaticResources; import net.metanotion.web.concrete.DefaultDispatcher; import net.metanotion.web.servlets.ServerUtil;
import net.metanotion.io.*; import net.metanotion.simpletemplate.*; import net.metanotion.web.concrete.*; import net.metanotion.web.servlets.*;
[ "net.metanotion.io", "net.metanotion.simpletemplate", "net.metanotion.web" ]
net.metanotion.io; net.metanotion.simpletemplate; net.metanotion.web;
1,291,335
EEnum getAction();
EEnum getAction();
/** * Returns the meta object for enum '{@link datacenter.types.Action <em>Action</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for enum '<em>Action</em>'. * @see datacenter.types.Action * @generated */
Returns the meta object for enum '<code>datacenter.types.Action Action</code>'.
getAction
{ "repo_name": "diverse-project/flink-datacenter", "path": "datacenter/src/datacenter/types/TypesPackage.java", "license": "mit", "size": 4486 }
[ "org.eclipse.emf.ecore.EEnum" ]
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,799,841
//Executed inside a thread to have more responsive ui UIUtils.getDisplay().asyncExec(new Runnable() {
UIUtils.getDisplay().asyncExec(new Runnable() {
/** * Method to call when the selection changes. It will update the current selection and * refresh the toolbar removing the necessary control and adding the missing one. * The method is visible is used to know if a control should be visible or not * * @param activeEditor the active editor where the selecti...
Method to call when the selection changes. It will update the current selection and refresh the toolbar removing the necessary control and adding the missing one. The method is visible is used to know if a control should be visible or not
updateSelection
{ "repo_name": "OpenSoftwareSolutions/PDFReporter-Studio", "path": "com.jaspersoft.studio/src/com/jaspersoft/studio/toolbars/CommonToolbarHandler.java", "license": "lgpl-3.0", "size": 14252 }
[ "net.sf.jasperreports.eclipse.ui.util.UIUtils" ]
import net.sf.jasperreports.eclipse.ui.util.UIUtils;
import net.sf.jasperreports.eclipse.ui.util.*;
[ "net.sf.jasperreports" ]
net.sf.jasperreports;
99,330
@ApiModelProperty(example = "null", value = "") public String getType() { return type; }
@ApiModelProperty(example = "null", value = "") String function() { return type; }
/** * Get type * @return type **/
Get type
getType
{ "repo_name": "Metatavu/kunta-api-spec", "path": "java-client-generated/src/main/java/fi/metatavu/kuntaapi/client/model/Phone.java", "license": "agpl-3.0", "size": 7181 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,176,560
TDBInternal.expel(Location.mem(), true); }
TDBInternal.expel(Location.mem(), true); }
/** * Clean up test resources */
Clean up test resources
cleanupTest
{ "repo_name": "apache/jena", "path": "jena-jdbc/jena-jdbc-driver-tdb/src/test/java/org/apache/jena/jdbc/tdb/connections/TestTdbMemConnection.java", "license": "apache-2.0", "size": 2343 }
[ "org.apache.jena.tdb.sys.TDBInternal" ]
import org.apache.jena.tdb.sys.TDBInternal;
import org.apache.jena.tdb.sys.*;
[ "org.apache.jena" ]
org.apache.jena;
1,471,325
public boolean isPanningEvent(UIMouse e) { return (e.has(Button.RIGHT) && !config.classicControls && !e.has(Modifier.CTRL)) || (e.has(Button.MIDDLE) && config.classicControls); }
boolean function(UIMouse e) { return (e.has(Button.RIGHT) && !config.classicControls && !e.has(Modifier.CTRL)) (e.has(Button.MIDDLE) && config.classicControls); }
/** * Check if the mouse event is a panning event. * @param e the event * @return true if panning event */
Check if the mouse event is a panning event
isPanningEvent
{ "repo_name": "akarnokd/open-ig", "path": "src/hu/openig/screen/CommonResources.java", "license": "lgpl-3.0", "size": 46061 }
[ "hu.openig.ui.UIMouse" ]
import hu.openig.ui.UIMouse;
import hu.openig.ui.*;
[ "hu.openig.ui" ]
hu.openig.ui;
727,259
private static String getCommentsBefore(Node node) { Token token = getFirstToken(node); if (token != null) { token = token.getPreviousToken(); } ArrayList<String> comments = new ArrayList<String>(); while (token != null) { if (token.getId() == ...
static String function(Node node) { Token token = getFirstToken(node); if (token != null) { token = token.getPreviousToken(); } ArrayList<String> comments = new ArrayList<String>(); while (token != null) { if (token.getId() == Asn1Constants.WHITESPACE) { comments.add(getLineBreaks(token.getImage())); } else if (token.g...
/** * Returns all the comments before the specified node. If * there are multiple comment lines possibly separated by * whitespace, they will be concatenated into one string. * * @param node the production or token node * * @return the comment string, or * null i...
Returns all the comments before the specified node. If there are multiple comment lines possibly separated by whitespace, they will be concatenated into one string
getCommentsBefore
{ "repo_name": "runner-mei/mibble", "path": "src/main/java/net/percederberg/mibble/MibAnalyzerUtil.java", "license": "gpl-2.0", "size": 10258 }
[ "java.util.ArrayList", "net.percederberg.grammatica.parser.Node", "net.percederberg.grammatica.parser.Token", "net.percederberg.mibble.asn1.Asn1Constants" ]
import java.util.ArrayList; import net.percederberg.grammatica.parser.Node; import net.percederberg.grammatica.parser.Token; import net.percederberg.mibble.asn1.Asn1Constants;
import java.util.*; import net.percederberg.grammatica.parser.*; import net.percederberg.mibble.asn1.*;
[ "java.util", "net.percederberg.grammatica", "net.percederberg.mibble" ]
java.util; net.percederberg.grammatica; net.percederberg.mibble;
181,156
//------------------------- AUTOGENERATED START ------------------------- ///CLOVER:OFF public static IndexFamily.Meta meta() { return IndexFamily.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(IndexFamily.Meta.INSTANCE); }
static IndexFamily.Meta function() { return IndexFamily.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(IndexFamily.Meta.INSTANCE); }
/** * The meta-bean for {@code IndexFamily}. * @return the meta-bean, not null */
The meta-bean for IndexFamily
meta
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-FinancialTypes/src/main/java/com/opengamma/financial/security/index/IndexFamily.java", "license": "apache-2.0", "size": 6771 }
[ "org.joda.beans.JodaBeanUtils" ]
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
2,796,760
private static String deepCleanInternal(String email) throws IOException, ContextedException { if(null == sAPIKey) { ContextedException cre; cre = new ContextedException("No API key, must call registerAPIKey(String) first"); cre.addContextValue("apiKey", null); throw cre; } String apiUrl; apiU...
static String function(String email) throws IOException, ContextedException { if(null == sAPIKey) { ContextedException cre; cre = new ContextedException(STR); cre.addContextValue(STR, null); throw cre; } String apiUrl; apiUrl = String.format(LIST_WISE_API_URL_FORMAT, email, sAPIKey); URL url = new URL(apiUrl); URLConne...
/** * Returns a JSON string from the deep clean API * @param email * The email address to clean * @return A JSON string from the deep clean API * @throws IOException if an I/O error occurs * @throws ContextedException if no API key exists */
Returns a JSON string from the deep clean API
deepCleanInternal
{ "repo_name": "johnboyer/listwise-manager", "path": "listwise-manager/src/com/rodaxsoft/listwise/ListWiseManager.java", "license": "apache-2.0", "size": 5215 }
[ "java.io.BufferedReader", "java.io.IOException", "java.io.InputStreamReader", "java.net.URLConnection", "org.apache.commons.lang3.exception.ContextedException" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URLConnection; import org.apache.commons.lang3.exception.ContextedException;
import java.io.*; import java.net.*; import org.apache.commons.lang3.exception.*;
[ "java.io", "java.net", "org.apache.commons" ]
java.io; java.net; org.apache.commons;
1,257,936