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 static String getHopDAG(MLContext mlCtx, Script script, ArrayList<Integer> lines, SparkConf newConf, boolean performHOPRewrites, boolean withSubgraph) throws HopsException, DMLRuntimeException, LanguageException { SparkConf oldConf = mlCtx.getSparkSession().sparkContext().getConf(); SparkExecutionCo...
static String function(MLContext mlCtx, Script script, ArrayList<Integer> lines, SparkConf newConf, boolean performHOPRewrites, boolean withSubgraph) throws HopsException, DMLRuntimeException, LanguageException { SparkConf oldConf = mlCtx.getSparkSession().sparkContext().getConf(); SparkExecutionContext.SparkClusterCon...
/** * Get HOP DAG in dot format for a DML or PYDML Script. * * @param mlCtx * MLContext object. * @param script * The DML or PYDML Script object to execute. * @param lines * Only display the hops that have begin and end line number * equals to the given inte...
Get HOP DAG in dot format for a DML or PYDML Script
getHopDAG
{ "repo_name": "asurve/arvind-sysml2", "path": "src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java", "license": "apache-2.0", "size": 41918 }
[ "java.util.ArrayList", "java.util.Date", "org.apache.spark.SparkConf", "org.apache.sysml.hops.HopsException", "org.apache.sysml.parser.LanguageException", "org.apache.sysml.runtime.DMLRuntimeException", "org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext", "org.apache.sysml.runtime....
import java.util.ArrayList; import java.util.Date; import org.apache.spark.SparkConf; import org.apache.sysml.hops.HopsException; import org.apache.sysml.parser.LanguageException; import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext; import or...
import java.util.*; import org.apache.spark.*; import org.apache.sysml.hops.*; import org.apache.sysml.parser.*; import org.apache.sysml.runtime.*; import org.apache.sysml.runtime.controlprogram.context.*; import org.apache.sysml.runtime.controlprogram.parfor.stat.*;
[ "java.util", "org.apache.spark", "org.apache.sysml" ]
java.util; org.apache.spark; org.apache.sysml;
2,803,769
void enterResource(@NotNull JavaParser.ResourceContext ctx); void exitResource(@NotNull JavaParser.ResourceContext ctx);
void enterResource(@NotNull JavaParser.ResourceContext ctx); void exitResource(@NotNull JavaParser.ResourceContext ctx);
/** * Exit a parse tree produced by {@link JavaParser#resource}. * @param ctx the parse tree */
Exit a parse tree produced by <code>JavaParser#resource</code>
exitResource
{ "repo_name": "code4craft/daogen", "path": "daogen-core/src/main/java/com/dianping/daogen/antlr/JavaListener.java", "license": "mit", "size": 38983 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,470,332
public static <T extends Policy> T updateFieldsFromDTOToPolicy(ThrottlePolicyDTO dto, T policy) throws UnsupportedThrottleLimitTypeException { policy.setDisplayName(dto.getDisplayName()); policy.setDescription(dto.getDescription()); policy.setPolicyName(dto.getPolicyName()); ...
static <T extends Policy> T function(ThrottlePolicyDTO dto, T policy) throws UnsupportedThrottleLimitTypeException { policy.setDisplayName(dto.getDisplayName()); policy.setDescription(dto.getDescription()); policy.setPolicyName(dto.getPolicyName()); return policy; }
/** * Update common fields of Policy model object using Throttle Policy DTO object * * @param dto Throttle Policy DTO object * @param policy Policy model object * @param <T> Type of Policy model * @return Updated Policy object with common fields * @throws UnsupportedThrottleLimi...
Update common fields of Policy model object using Throttle Policy DTO object
updateFieldsFromDTOToPolicy
{ "repo_name": "lalaji/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.admin/src/main/java/org/wso2/carbon/apimgt/rest/api/admin/mappings/CommonThrottleMappingUtil.java", "license": "apache-2.0", "size": 29264 }
[ "org.wso2.carbon.apimgt.core.models.policy.Policy", "org.wso2.carbon.apimgt.rest.api.admin.dto.ThrottlePolicyDTO", "org.wso2.carbon.apimgt.rest.api.admin.exceptions.UnsupportedThrottleLimitTypeException" ]
import org.wso2.carbon.apimgt.core.models.policy.Policy; import org.wso2.carbon.apimgt.rest.api.admin.dto.ThrottlePolicyDTO; import org.wso2.carbon.apimgt.rest.api.admin.exceptions.UnsupportedThrottleLimitTypeException;
import org.wso2.carbon.apimgt.core.models.policy.*; import org.wso2.carbon.apimgt.rest.api.admin.dto.*; import org.wso2.carbon.apimgt.rest.api.admin.exceptions.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
678,361
@Override public boolean isForeingKey(String fieldname) { return DataInfo.isForeignKey(this.getType(), fieldname); }
boolean function(String fieldname) { return DataInfo.isForeignKey(this.getType(), fieldname); }
/** * Determina si un campo o miembro es una clave foranea. * * @param fieldname nombre del campo * @return Verdadero si es una clave foranea. */
Determina si un campo o miembro es una clave foranea
isForeingKey
{ "repo_name": "jencisopy/JavaBeanStack", "path": "business/src/main/java/org/javabeanstack/datactrl/AbstractDataObject.java", "license": "lgpl-3.0", "size": 65909 }
[ "org.javabeanstack.data.DataInfo" ]
import org.javabeanstack.data.DataInfo;
import org.javabeanstack.data.*;
[ "org.javabeanstack.data" ]
org.javabeanstack.data;
1,339,317
private KeyValue createKeyValue(byte[] key, byte[] cqBytes, boolean value, long timestamp) throws IOException { // create new key value for put return KeyValueUtil.newKeyValue(key, PhoenixDatabaseMetaData.SEQUENCE_FAMILY_BYTES, cqBytes, timestamp, value ? PDataType.TRUE_BYTES : PDataType.FALSE_BYTES); }
KeyValue function(byte[] key, byte[] cqBytes, boolean value, long timestamp) throws IOException { return KeyValueUtil.newKeyValue(key, PhoenixDatabaseMetaData.SEQUENCE_FAMILY_BYTES, cqBytes, timestamp, value ? PDataType.TRUE_BYTES : PDataType.FALSE_BYTES); }
/** * Creates a new KeyValue for a boolean value and adds it to the given put * * @param key * key used while creating KeyValue * @param cqBytes * column qualifier of KeyValue * @return return the KeyValue that was created */
Creates a new KeyValue for a boolean value and adds it to the given put
createKeyValue
{ "repo_name": "codymarcel/phoenix", "path": "phoenix-core/src/main/java/org/apache/phoenix/coprocessor/SequenceRegionObserver.java", "license": "apache-2.0", "size": 21425 }
[ "java.io.IOException", "org.apache.hadoop.hbase.KeyValue", "org.apache.phoenix.jdbc.PhoenixDatabaseMetaData", "org.apache.phoenix.schema.types.PDataType", "org.apache.phoenix.util.KeyValueUtil" ]
import java.io.IOException; import org.apache.hadoop.hbase.KeyValue; import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData; import org.apache.phoenix.schema.types.PDataType; import org.apache.phoenix.util.KeyValueUtil;
import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.phoenix.jdbc.*; import org.apache.phoenix.schema.types.*; import org.apache.phoenix.util.*;
[ "java.io", "org.apache.hadoop", "org.apache.phoenix" ]
java.io; org.apache.hadoop; org.apache.phoenix;
1,673,998
@Override public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ProducerId info = (ProducerId) o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalString1(info.getConnectionId(), bs); rc += tightMarshalLong1(wireFo...
int function(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ProducerId info = (ProducerId) o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalString1(info.getConnectionId(), bs); rc += tightMarshalLong1(wireFormat, info.getValue(), bs); rc += tightMarshalLong1(wireFormat,...
/** * Write the booleans that this object uses to a BooleanStream */
Write the booleans that this object uses to a BooleanStream
tightMarshal1
{ "repo_name": "tabish121/OpenWire", "path": "openwire-legacy/src/main/java/io/openwire/codec/v2/ProducerIdMarshaller.java", "license": "apache-2.0", "size": 4702 }
[ "io.openwire.codec.BooleanStream", "io.openwire.codec.OpenWireFormat", "io.openwire.commands.ProducerId", "java.io.IOException" ]
import io.openwire.codec.BooleanStream; import io.openwire.codec.OpenWireFormat; import io.openwire.commands.ProducerId; import java.io.IOException;
import io.openwire.codec.*; import io.openwire.commands.*; import java.io.*;
[ "io.openwire.codec", "io.openwire.commands", "java.io" ]
io.openwire.codec; io.openwire.commands; java.io;
1,709,006
@Test public void testHasNextTable() throws IOException, JAXBException { plateWriter.resultToTable(maps, labelList); PlateReaderInteger reader = new PlateReaderInteger(file); int index = 0; while(reader.hasNextTable()) { reader.nextTable(); index++; } assertTrue(maps.size() == index...
void function() throws IOException, JAXBException { plateWriter.resultToTable(maps, labelList); PlateReaderInteger reader = new PlateReaderInteger(file); int index = 0; while(reader.hasNextTable()) { reader.nextTable(); index++; } assertTrue(maps.size() == index); assertFalse(reader.hasNextTable()); reader.close(); }
/** * Tests has next table the method. * @throws JAXBException * @throws IOException */
Tests has next table the method
testHasNextTable
{ "repo_name": "jessemull/MicroFlex", "path": "src/test/java/com/github/jessemull/microflex/io/iointeger/PlateReaderIntegerResultsTest.java", "license": "apache-2.0", "size": 23466 }
[ "com.github.jessemull.microflex.integerflex.io.PlateReaderInteger", "java.io.IOException", "javax.xml.bind.JAXBException", "org.junit.Assert" ]
import com.github.jessemull.microflex.integerflex.io.PlateReaderInteger; import java.io.IOException; import javax.xml.bind.JAXBException; import org.junit.Assert;
import com.github.jessemull.microflex.integerflex.io.*; import java.io.*; import javax.xml.bind.*; import org.junit.*;
[ "com.github.jessemull", "java.io", "javax.xml", "org.junit" ]
com.github.jessemull; java.io; javax.xml; org.junit;
2,064,650
public void insertUpdate (DocumentEvent e) { Document doc; doc = e.getDocument (); try { mFilter.setPattern (doc.getText (0, doc.getLength ())); } catch (BadLocationException ble) { ble.printStackTrace (); } }
void function (DocumentEvent e) { Document doc; doc = e.getDocument (); try { mFilter.setPattern (doc.getText (0, doc.getLength ())); } catch (BadLocationException ble) { ble.printStackTrace (); } }
/** * Handle an insert update event. * @param e Details about the insert event. */
Handle an insert update event
insertUpdate
{ "repo_name": "besom/bbossgroups-mvn", "path": "bboss_taglib/src/main/java/org/htmlparser/parserapplications/filterbuilder/wrappers/RegexFilterWrapper.java", "license": "apache-2.0", "size": 10521 }
[ "javax.swing.event.DocumentEvent", "javax.swing.text.BadLocationException", "javax.swing.text.Document" ]
import javax.swing.event.DocumentEvent; import javax.swing.text.BadLocationException; import javax.swing.text.Document;
import javax.swing.event.*; import javax.swing.text.*;
[ "javax.swing" ]
javax.swing;
2,551,739
public static boolean isLicenseEqual(AnyLicenseInfo license1, AnyLicenseInfo license2, Map<String, String> xlationMap) throws SpdxCompareException { if (license1 instanceof ConjunctiveLicenseSet) { if (!(license2 instanceof ConjunctiveLicenseSet)) { return false; } else { return isLicenseSetsEqual...
static boolean function(AnyLicenseInfo license1, AnyLicenseInfo license2, Map<String, String> xlationMap) throws SpdxCompareException { if (license1 instanceof ConjunctiveLicenseSet) { if (!(license2 instanceof ConjunctiveLicenseSet)) { return false; } else { return isLicenseSetsEqual((ConjunctiveLicenseSet)license1, (...
/** * Compares two licenses from potentially two different documents which may have * different license ID's for the same license * @param license1 * @param license2 * @param xlationMap Mapping the license ID's from license 1 to license 2 * @return * @throws SpdxCompareException */
Compares two licenses from potentially two different documents which may have different license ID's for the same license
isLicenseEqual
{ "repo_name": "goneall/SPDX-Tools", "path": "src/org/spdx/compare/LicenseCompareHelper.java", "license": "apache-2.0", "size": 15840 }
[ "java.util.Map", "org.spdx.rdfparser.license.AnyLicenseInfo", "org.spdx.rdfparser.license.ConjunctiveLicenseSet", "org.spdx.rdfparser.license.DisjunctiveLicenseSet", "org.spdx.rdfparser.license.ExtractedLicenseInfo" ]
import java.util.Map; import org.spdx.rdfparser.license.AnyLicenseInfo; import org.spdx.rdfparser.license.ConjunctiveLicenseSet; import org.spdx.rdfparser.license.DisjunctiveLicenseSet; import org.spdx.rdfparser.license.ExtractedLicenseInfo;
import java.util.*; import org.spdx.rdfparser.license.*;
[ "java.util", "org.spdx.rdfparser" ]
java.util; org.spdx.rdfparser;
2,453,920
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_STRING, defaultValue = "") @SimpleProperty(category = PropertyCategory.BEHAVIOR, description = "The message that will be sent when the SendMessage method is called.") public void Message(String message) { Log.i(TAG, "Message set: " + messag...
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_STRING, defaultValue = STRThe message that will be sent when the SendMessage method is called.STRMessage set: " + message); this.message = message; }
/** * The text message to that will be sent when the SendMessage method is called. * * @param message the message to send when the SendMessage function is called. */
The text message to that will be sent when the SendMessage method is called
Message
{ "repo_name": "warren922/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/Texting.java", "license": "apache-2.0", "size": 45293 }
[ "com.google.appinventor.components.annotations.DesignerProperty", "com.google.appinventor.components.common.PropertyTypeConstants" ]
import com.google.appinventor.components.annotations.DesignerProperty; import com.google.appinventor.components.common.PropertyTypeConstants;
import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.common.*;
[ "com.google.appinventor" ]
com.google.appinventor;
1,557,629
public static Animation outToLeftAnimation(long duration, Interpolator interpolator) { Animation outtoLeft = new TranslateAnimation( Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, -1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f ); outtoLeft.setDurat...
static Animation function(long duration, Interpolator interpolator) { Animation outtoLeft = new TranslateAnimation( Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, -1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f ); outtoLeft.setDuration(duration); outtoLeft.setInterpolato...
/** * Slide animations to hide a view by sliding it to the left. * * @param duration the animation duration in milliseconds * @param interpolator the interpolator to use (pass {@code null} to use the {@link AccelerateInterpolator} interpolator) * @return a slide transition animation */
Slide animations to hide a view by sliding it to the left
outToLeftAnimation
{ "repo_name": "adiguzel/wordwise", "path": "src/com/tekle/oss/android/animation/AnimationFactory.java", "license": "apache-2.0", "size": 15184 }
[ "android.view.animation.AccelerateInterpolator", "android.view.animation.Animation", "android.view.animation.Interpolator", "android.view.animation.TranslateAnimation" ]
import android.view.animation.AccelerateInterpolator; import android.view.animation.Animation; import android.view.animation.Interpolator; import android.view.animation.TranslateAnimation;
import android.view.animation.*;
[ "android.view" ]
android.view;
1,620,907
protected void checkAndAddSpatialFilteringProfileCriterion(Criteria c, GetObservationRequest request, Session session) throws OwsExceptionReport { if (request.hasSpatialFilteringProfileSpatialFilter()) { c.add(SpatialRestrictions.filter(DataEntity.PROPERTY_GEOMETRY_ENTITY, ...
void function(Criteria c, GetObservationRequest request, Session session) throws OwsExceptionReport { if (request.hasSpatialFilteringProfileSpatialFilter()) { c.add(SpatialRestrictions.filter(DataEntity.PROPERTY_GEOMETRY_ENTITY, request.getSpatialFilter().getOperator(), getGeometryHandler() .switchCoordinateAxisFromToD...
/** * Check if a Spatial Filtering Profile filter is requested and add to * criteria * * @param c * Criteria to add crtierion * @param request * GetObservation request * @param session * Hiberante Session * * @throws OwsExceptionRep...
Check if a Spatial Filtering Profile filter is requested and add to criteria
checkAndAddSpatialFilteringProfileCriterion
{ "repo_name": "EHJ-52n/SOS", "path": "hibernate/common/src/main/java/org/n52/sos/ds/hibernate/dao/observation/AbstractObservationDAO.java", "license": "gpl-2.0", "size": 62555 }
[ "org.hibernate.Criteria", "org.hibernate.Session", "org.n52.series.db.beans.DataEntity", "org.n52.shetland.ogc.ows.exception.OwsExceptionReport", "org.n52.shetland.ogc.sos.request.GetObservationRequest", "org.n52.sos.ds.hibernate.util.SpatialRestrictions" ]
import org.hibernate.Criteria; import org.hibernate.Session; import org.n52.series.db.beans.DataEntity; import org.n52.shetland.ogc.ows.exception.OwsExceptionReport; import org.n52.shetland.ogc.sos.request.GetObservationRequest; import org.n52.sos.ds.hibernate.util.SpatialRestrictions;
import org.hibernate.*; import org.n52.series.db.beans.*; import org.n52.shetland.ogc.ows.exception.*; import org.n52.shetland.ogc.sos.request.*; import org.n52.sos.ds.hibernate.util.*;
[ "org.hibernate", "org.n52.series", "org.n52.shetland", "org.n52.sos" ]
org.hibernate; org.n52.series; org.n52.shetland; org.n52.sos;
1,129,032
public SDVariable swish(SDVariable x) { SDValidation.validateNumerical("swish", "x", x); return new org.nd4j.linalg.api.ops.impl.transforms.strict.Swish(sd,x).outputVariable(); }
SDVariable function(SDVariable x) { SDValidation.validateNumerical("swish", "x", x); return new org.nd4j.linalg.api.ops.impl.transforms.strict.Swish(sd,x).outputVariable(); }
/** * Element-wise "swish" function: out = x * sigmoid(b*x) with b=1.0<br> * See: <a href="https://arxiv.org/abs/1710.05941">https://arxiv.org/abs/1710.05941</a><br> * * @param x Input variable (NUMERIC type) * @return output Output variable (NUMERIC type) */
Element-wise "swish" function: out = x * sigmoid(b*x) with b=1.0 See: HREF
swish
{ "repo_name": "deeplearning4j/deeplearning4j", "path": "nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDNN.java", "license": "apache-2.0", "size": 59569 }
[ "org.nd4j.autodiff.samediff.SDVariable" ]
import org.nd4j.autodiff.samediff.SDVariable;
import org.nd4j.autodiff.samediff.*;
[ "org.nd4j.autodiff" ]
org.nd4j.autodiff;
2,157,035
List<Fold> getFolds(RSyntaxTextArea textArea);
List<Fold> getFolds(RSyntaxTextArea textArea);
/** * Returns a list of all folds in the text area. * * @param textArea The text area whose contents should be analyzed. * @return The list of folds. If this method returns <code>null</code>, * it is treated as if no folds were found. */
Returns a list of all folds in the text area
getFolds
{ "repo_name": "intuit/Tank", "path": "tools/agent_debugger/src/main/java/org/fife/ui/rsyntaxtextarea/folding/FoldParser.java", "license": "epl-1.0", "size": 1128 }
[ "java.util.List", "org.fife.ui.rsyntaxtextarea.RSyntaxTextArea" ]
import java.util.List; import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
import java.util.*; import org.fife.ui.rsyntaxtextarea.*;
[ "java.util", "org.fife.ui" ]
java.util; org.fife.ui;
1,125,810
public Lang getLang() { return lang; }
Lang function() { return lang; }
/** * <p> * Getter for the field <code>lang</code>. * </p> * * @return a {@link org.beangle.commons.dao.query.Lang} object. */
Getter for the field <code>lang</code>.
getLang
{ "repo_name": "beangle/library", "path": "commons/model/src/main/java/org/beangle/commons/dao/query/builder/QueryBean.java", "license": "lgpl-3.0", "size": 4341 }
[ "org.beangle.commons.dao.query.Lang" ]
import org.beangle.commons.dao.query.Lang;
import org.beangle.commons.dao.query.*;
[ "org.beangle.commons" ]
org.beangle.commons;
2,139,013
private float[] applyCurveXEffect(float offset) { for (int i = 0; i < 6; i++) for (int j = 0; j < 51; j++) { if (mDirection == TouchDisableView.DIRECTION_RIGHT) { meshVerts[i * 102 + 2 * j] = originVerts[i * 102 + 2 * j]; meshVerts[i * 102 ...
float[] function(float offset) { for (int i = 0; i < 6; i++) for (int j = 0; j < 51; j++) { if (mDirection == TouchDisableView.DIRECTION_RIGHT) { meshVerts[i * 102 + 2 * j] = originVerts[i * 102 + 2 * j]; meshVerts[i * 102 + 2 * j + 1] = originVerts[i * 102 + 2 * j + 1] + (float) (SIN_A * (1 - offset) * Math.sin(origin...
/** * f(x)=SIN_A*(1-offset)*sin(x*x/SIN_lENGTH_FACTOR) * <p/> * Notice: when x is in 0~720 , it works well. You can see the Graph through * this link. * https://www.google.com/?gws_rd=ssl#newwindow=1&q=y%3D64+sin(x*x%2F20000)+ * <p/> * for other screen resolution , may be need other f...
f(x)=SIN_A*(1-offset)*sin(x*x/SIN_lENGTH_FACTOR) Notice: when x is in 0~720 , it works well. You can see the Graph through this link. HREF(x*x%2F20000)+ for other screen resolution , may be need other function
applyCurveXEffect
{ "repo_name": "Chenantao/Translation", "path": "slide_library/src/main/java/com/dk/view/folder/extension/CoreCalc.java", "license": "apache-2.0", "size": 7124 }
[ "com.dk.view.folder.TouchDisableView" ]
import com.dk.view.folder.TouchDisableView;
import com.dk.view.folder.*;
[ "com.dk.view" ]
com.dk.view;
2,896,410
public void testSetDataByteArrayInt() { t.setData(dataMin, 0); try { t.setData(new byte[] {}, 0); fail("should throw"); } catch (final KNXIllegalArgumentException e) {} assertTrue(Arrays.equals(dataMin, t.getData())); t.setData(dataMax, 0); assertTrue(Arrays.equals(dataMax, t.getData())); t....
void function() { t.setData(dataMin, 0); try { t.setData(new byte[] {}, 0); fail(STR); } catch (final KNXIllegalArgumentException e) {} assertTrue(Arrays.equals(dataMin, t.getData())); t.setData(dataMax, 0); assertTrue(Arrays.equals(dataMax, t.getData())); t.setData(dataValue2, 2); byte[] d = t.getData(); assertEquals(...
/** * Test method for {@link tuwien.auto.calimero.dptxlator.DPTXlator#setData(byte[], int)}. */
Test method for <code>tuwien.auto.calimero.dptxlator.DPTXlator#setData(byte[], int)</code>
testSetDataByteArrayInt
{ "repo_name": "CumpsD/calimero", "path": "test/tuwien/auto/calimero/dptxlator/DPTXlator64BitSignedTest.java", "license": "gpl-2.0", "size": 10192 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,080,716
public void schedule(SchedulerTask schedulerTask, DeploymentIterator iterator) { Date time = iterator.next(); if (time == null) { schedulerTask.cancel(); } else { synchronized (schedulerTask.lock) { schedulerTask.state = SchedulerTask.SCHEDULED; ...
void function(SchedulerTask schedulerTask, DeploymentIterator iterator) { Date time = iterator.next(); if (time == null) { schedulerTask.cancel(); } else { synchronized (schedulerTask.lock) { schedulerTask.state = SchedulerTask.SCHEDULED; scheduler.scheduleWithFixedDelay(schedulerTask, 10, 10, TimeUnit.SECONDS); } } }
/** * Schedules the specified task for execution according to the specified schedule. * If times specified by the <code>ScheduleIterator</code> are in the past they are * scheduled for immediate execution. * * @param schedulerTask task to be scheduled * @param iterator iterator that d...
Schedules the specified task for execution according to the specified schedule. If times specified by the <code>ScheduleIterator</code> are in the past they are scheduled for immediate execution
schedule
{ "repo_name": "jsdjayanga/wso2-axis2", "path": "modules/kernel/src/org/apache/axis2/deployment/scheduler/Scheduler.java", "license": "apache-2.0", "size": 3263 }
[ "java.util.Date", "java.util.concurrent.TimeUnit" ]
import java.util.Date; import java.util.concurrent.TimeUnit;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
865,670
@Test public void testForkJoinNoCycle() { WorkflowStep a = wf.addStep(new SimpleStep("a")); WorkflowStep b = wf.addStep(new SimpleStep("b")); WorkflowStep c = wf.addStep(new SimpleStep("c")); WorkflowStep d = wf.addStep(new SimpleStep("d")); WorkflowStep e = wf.addStep(ne...
void function() { WorkflowStep a = wf.addStep(new SimpleStep("a")); WorkflowStep b = wf.addStep(new SimpleStep("b")); WorkflowStep c = wf.addStep(new SimpleStep("c")); WorkflowStep d = wf.addStep(new SimpleStep("d")); WorkflowStep e = wf.addStep(new SimpleStep("e")); WorkflowUtils.linkSteps(a, b); WorkflowUtils.linkSte...
/** * <pre> * -- b * / * a -- * \ * -- c -- d -- e * </pre> */
<code> -- b a -- \ -- c -- d -- e </code>
testForkJoinNoCycle
{ "repo_name": "alien4cloud/alien4cloud", "path": "alien4cloud-core/src/test/java/alien4cloud/paas/wf/CycleDetectionTest.java", "license": "apache-2.0", "size": 6583 }
[ "org.alien4cloud.tosca.model.workflow.WorkflowStep" ]
import org.alien4cloud.tosca.model.workflow.WorkflowStep;
import org.alien4cloud.tosca.model.workflow.*;
[ "org.alien4cloud.tosca" ]
org.alien4cloud.tosca;
1,223,914
//---------------------------------------------------------------------------- public IParagraphPropertyStore getParagraphPropertyStore() throws TextException { return new ParagraphPropertyStore(this); }
IParagraphPropertyStore function() throws TextException { return new ParagraphPropertyStore(this); }
/** * Gets the property store of the paragraph * * @return the paragprah property store * * @throws TextException if any error occurs * * @author Sebastian Rösgen */
Gets the property store of the paragraph
getParagraphPropertyStore
{ "repo_name": "LibreOffice/noa-libre", "path": "src/ag/ion/bion/officelayer/internal/text/Paragraph.java", "license": "lgpl-2.1", "size": 10024 }
[ "ag.ion.bion.officelayer.text.IParagraphPropertyStore", "ag.ion.bion.officelayer.text.TextException" ]
import ag.ion.bion.officelayer.text.IParagraphPropertyStore; import ag.ion.bion.officelayer.text.TextException;
import ag.ion.bion.officelayer.text.*;
[ "ag.ion.bion" ]
ag.ion.bion;
223,261
public List<Pair<String, String>> generateAlignment(File inMSA, File inNuc) { try { return this.generateAlignment(new BufferedReader(new FileReader(inMSA)), new BufferedReader(new FileReader(inNuc))); // Transforms input files into buffers // then use them to generate the new alignment } c...
List<Pair<String, String>> function(File inMSA, File inNuc) { try { return this.generateAlignment(new BufferedReader(new FileReader(inMSA)), new BufferedReader(new FileReader(inNuc))); } catch (FileNotFoundException e) { System.err.println(STR+e.getMessage()); } return new ArrayList<Pair<String, String>>(); }
/** * Creates the new alignment * @param inMSA a file with the input template MSA * @param inNuc a file with the input nucleic acid sequences * @return */
Creates the new alignment
generateAlignment
{ "repo_name": "javieriserte/XI-bio-seq", "path": "XI-Bio-Seq/src/org/jiserte/bioseq/alignnucbyprot/AlignNucByProt.java", "license": "gpl-2.0", "size": 10582 }
[ "java.io.BufferedReader", "java.io.File", "java.io.FileNotFoundException", "java.io.FileReader", "java.util.ArrayList", "java.util.List" ]
import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.util.ArrayList; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
933,258
WindowPostRenderer getWindowPostRenderer();
WindowPostRenderer getWindowPostRenderer();
/** * Returns a post-renderer to invoke after drawing each window, unless the GUI system or individual windows has * their own renderers set. If {@code null}, no post-renderer will be done (unless the GUI system or the windows * has a post-renderer). * @return A {@link com.googlecode.lanterna.gui2.W...
Returns a post-renderer to invoke after drawing each window, unless the GUI system or individual windows has their own renderers set. If null, no post-renderer will be done (unless the GUI system or the windows has a post-renderer)
getWindowPostRenderer
{ "repo_name": "avl42/lanterna", "path": "src/main/java/com/googlecode/lanterna/graphics/Theme.java", "license": "lgpl-3.0", "size": 2593 }
[ "com.googlecode.lanterna.gui2.WindowPostRenderer" ]
import com.googlecode.lanterna.gui2.WindowPostRenderer;
import com.googlecode.lanterna.gui2.*;
[ "com.googlecode.lanterna" ]
com.googlecode.lanterna;
1,663,520
List<SMObject> readObjects(String schema, List<SMCondition> conditions) throws InvalidSchemaException, DatastoreException;
List<SMObject> readObjects(String schema, List<SMCondition> conditions) throws InvalidSchemaException, DatastoreException;
/** * Reads a list of objects matching the given query fields from the datastore. * * @param schema the name of the relevant object model * @param conditions the list of conditions which comprise the query * @return a list of all documents matching the query * @throws InvalidSchemaException if the sch...
Reads a list of objects matching the given query fields from the datastore
readObjects
{ "repo_name": "stackmob/stackmob-customcode-sdk", "path": "src/main/java/com/stackmob/sdkapi/DataService.java", "license": "apache-2.0", "size": 16732 }
[ "com.stackmob.core.DatastoreException", "com.stackmob.core.InvalidSchemaException", "java.util.List" ]
import com.stackmob.core.DatastoreException; import com.stackmob.core.InvalidSchemaException; import java.util.List;
import com.stackmob.core.*; import java.util.*;
[ "com.stackmob.core", "java.util" ]
com.stackmob.core; java.util;
1,133,906
static Set<String> getDescendants( String parentName, SimpleDirectedGraph<String, Relationship> graph ) { Map<String, String> vx = new HashMap<>(); // TreeSet will return in sorted order with case insensitive comparator: Set<String> children = new TreeSet<>( String.CASE_INSENSITIVE_ORDER...
static Set<String> getDescendants( String parentName, SimpleDirectedGraph<String, Relationship> graph ) { Map<String, String> vx = new HashMap<>(); Set<String> children = new TreeSet<>( String.CASE_INSENSITIVE_ORDER ); vx.put( VERTEX, parentName.toUpperCase() ); getDescendants( vx, graph, children ); return children; }
/** * Recursively traverse the hierarchical graph and return all of the descendants for a given node. * * @param parentName maps to vertex to determine parentage. * @param graph contains a reference to simple digraph {@code org.jgrapht.graph.SimpleDirectedGraph}. * @return Set of names tha...
Recursively traverse the hierarchical graph and return all of the descendants for a given node
getDescendants
{ "repo_name": "PennState/directory-fortress-core-1", "path": "src/main/java/org/apache/directory/fortress/core/impl/HierUtil.java", "license": "apache-2.0", "size": 26832 }
[ "java.util.HashMap", "java.util.Map", "java.util.Set", "java.util.TreeSet", "org.apache.directory.fortress.core.model.Relationship", "org.jgrapht.graph.SimpleDirectedGraph" ]
import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.TreeSet; import org.apache.directory.fortress.core.model.Relationship; import org.jgrapht.graph.SimpleDirectedGraph;
import java.util.*; import org.apache.directory.fortress.core.model.*; import org.jgrapht.graph.*;
[ "java.util", "org.apache.directory", "org.jgrapht.graph" ]
java.util; org.apache.directory; org.jgrapht.graph;
879,414
@Test public void replaceUrlKey() { assertEquals(REDACTED_ACCOUNT_KEY_RESPONSE_BODY, new RecordingRedactor().redact(ACCOUNT_KEY_RESPONSE_BODY)); assertEquals(REDACTED_AUTH_HEADER_RESPONSE_BODY, new RecordingRedactor().redact(AUTH_HEADER_RESPONSE_BODY)); }
void function() { assertEquals(REDACTED_ACCOUNT_KEY_RESPONSE_BODY, new RecordingRedactor().redact(ACCOUNT_KEY_RESPONSE_BODY)); assertEquals(REDACTED_AUTH_HEADER_RESPONSE_BODY, new RecordingRedactor().redact(AUTH_HEADER_RESPONSE_BODY)); }
/** * Verify if the value in the json key {@code httpUrl} is redacted successfully. */
Verify if the value in the json key httpUrl is redacted successfully
replaceUrlKey
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/core/azure-core-test/src/test/java/com/azure/core/test/RecordingRedactorTests.java", "license": "mit", "size": 11280 }
[ "com.azure.core.test.models.RecordingRedactor", "org.junit.jupiter.api.Assertions" ]
import com.azure.core.test.models.RecordingRedactor; import org.junit.jupiter.api.Assertions;
import com.azure.core.test.models.*; import org.junit.jupiter.api.*;
[ "com.azure.core", "org.junit.jupiter" ]
com.azure.core; org.junit.jupiter;
2,712,266
protected void processExchange(Exchange exchange) throws Exception { if (LOG.isDebugEnabled()) { MailMessage msg = (MailMessage) exchange.getIn(); LOG.debug("Processing message: {}", MailUtils.dumpMessage(msg.getMessage())); } getProcessor().process(exchange); }
void function(Exchange exchange) throws Exception { if (LOG.isDebugEnabled()) { MailMessage msg = (MailMessage) exchange.getIn(); LOG.debug(STR, MailUtils.dumpMessage(msg.getMessage())); } getProcessor().process(exchange); }
/** * Strategy to process the mail message. */
Strategy to process the mail message
processExchange
{ "repo_name": "DariusX/camel", "path": "components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java", "license": "apache-2.0", "size": 25224 }
[ "org.apache.camel.Exchange" ]
import org.apache.camel.Exchange;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
1,807,063
public static Statement createStatement(URI subjectURI, URI predicateURI, URI objectURI) { return VF.createStatement( (subjectURI), (predicateURI), (objectURI), (getUniqueURI())); }
static Statement function(URI subjectURI, URI predicateURI, URI objectURI) { return VF.createStatement( (subjectURI), (predicateURI), (objectURI), (getUniqueURI())); }
/** * Create a new quad with the given subject, predicate and object with a unique named graph URI. * @param subjectURI subject URI * @param predicateURI predicate URI * @param objectURI object URI * @return quad */
Create a new quad with the given subject, predicate and object with a unique named graph URI
createStatement
{ "repo_name": "mifeet/FusionTool-DPU", "path": "sources/src/test/java/eu/unifiedviews/plugins/transformer/fusiontool/testutils/FTDPUTestUtils.java", "license": "apache-2.0", "size": 6432 }
[ "org.openrdf.model.Statement" ]
import org.openrdf.model.Statement;
import org.openrdf.model.*;
[ "org.openrdf.model" ]
org.openrdf.model;
2,517,103
public UploadInfo createProject(String projectName, ArrayList<RProjectField> fields) { UploadInfo info = new UploadInfo(); String projResult = ""; String fieldResult = ""; try { JSONObject postData = new JSONObject(); postData.put("email", email); postData.put("password", password); postData....
UploadInfo function(String projectName, ArrayList<RProjectField> fields) { UploadInfo info = new UploadInfo(); String projResult = STRSTRemailSTRpasswordSTRproject_nameSTRprojectsSTRSTRPOSTSTRidSTRproject_idSTRfield_typeSTRnameSTRunitSTRemailSTRpasswordSTRfieldSTRfieldsSTRSTRPOSTSTRidSTRmsgSTRerrorSTRmsgSTRerror"); } c...
/** * Creates a new project on iSENSE. The Field objects in the second * parameter must have at a type and a name, and can optionally have a unit. * This is an authenticated function. * * @param projectName * The name of the new project to be created * @param fields * An ArrayList ...
Creates a new project on iSENSE. The Field objects in the second parameter must have at a type and a name, and can optionally have a unit. This is an authenticated function
createProject
{ "repo_name": "bdonald25/iSENSE-API", "path": "Java/API/src/edu/uml/cs/isense/api/API.java", "license": "mit", "size": 30136 }
[ "edu.uml.cs.isense.objects.RProjectField", "java.util.ArrayList" ]
import edu.uml.cs.isense.objects.RProjectField; import java.util.ArrayList;
import edu.uml.cs.isense.objects.*; import java.util.*;
[ "edu.uml.cs", "java.util" ]
edu.uml.cs; java.util;
212,957
@Override protected void removeHandler(ThingHandler thingHandler) { if (thingHandler instanceof NestBridgeHandler) { ServiceRegistration<?> reg = discoveryService.get(thingHandler.getThing().getUID()); if (reg != null) { // Unregister the discovery service. ...
void function(ThingHandler thingHandler) { if (thingHandler instanceof NestBridgeHandler) { ServiceRegistration<?> reg = discoveryService.get(thingHandler.getThing().getUID()); if (reg != null) { NestDiscoveryService service = (NestDiscoveryService) bundleContext.getService(reg.getReference()); service.deactivate(); re...
/** * Removes the handler for the specific thing. This also handles disabling the discovery * service when the bridge is removed. */
Removes the handler for the specific thing. This also handles disabling the discovery service when the bridge is removed
removeHandler
{ "repo_name": "Mr-Eskildsen/openhab2-addons", "path": "addons/binding/org.openhab.binding.nest.test/src/test/java/org/openhab/binding/nest/test/NestTestHandlerFactory.java", "license": "epl-1.0", "size": 3371 }
[ "org.eclipse.smarthome.core.thing.binding.ThingHandler", "org.openhab.binding.nest.handler.NestBridgeHandler", "org.openhab.binding.nest.internal.discovery.NestDiscoveryService", "org.osgi.framework.ServiceRegistration" ]
import org.eclipse.smarthome.core.thing.binding.ThingHandler; import org.openhab.binding.nest.handler.NestBridgeHandler; import org.openhab.binding.nest.internal.discovery.NestDiscoveryService; import org.osgi.framework.ServiceRegistration;
import org.eclipse.smarthome.core.thing.binding.*; import org.openhab.binding.nest.handler.*; import org.openhab.binding.nest.internal.discovery.*; import org.osgi.framework.*;
[ "org.eclipse.smarthome", "org.openhab.binding", "org.osgi.framework" ]
org.eclipse.smarthome; org.openhab.binding; org.osgi.framework;
1,350,047
public int repairAsync(String keyspace, Map<String, String> options);
int function(String keyspace, Map<String, String> options);
/** * Invoke repair asynchronously. * You can track repair progress by subscribing JMX notification sent from this StorageServiceMBean. * Notification format is: * type: "repair" * userObject: int array of length 2, [0]=command number, [1]=ordinal of ActiveRepairService.Status * *...
Invoke repair asynchronously. You can track repair progress by subscribing JMX notification sent from this StorageServiceMBean. Notification format is: type: "repair" userObject: int array of length 2, [0]=command number, [1]=ordinal of ActiveRepairService.Status
repairAsync
{ "repo_name": "hobinyoon/apache-cassandra-3.0.5-src", "path": "src/java/org/apache/cassandra/service/StorageServiceMBean.java", "license": "apache-2.0", "size": 23501 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,417,467
public static int lengthOfPlain(final CharSequence text, final int fromIndex, final int toIndex) { int i = CharSequences.indexOf(text, START, fromIndex, toIndex); if (i < 0) { return CharSequences.codePointCount(text, fromIndex, toIndex); } int last = fromIndex; ...
static int function(final CharSequence text, final int fromIndex, final int toIndex) { int i = CharSequences.indexOf(text, START, fromIndex, toIndex); if (i < 0) { return CharSequences.codePointCount(text, fromIndex, toIndex); } int last = fromIndex; int length = 0; search: do { final int start = i; i += START.length()...
/** * Returns the number of Unicode code points in the given string without the ANSI escape codes. * This is equivalent to <code>{@linkplain CharSequences#codePointCount(CharSequence) * CharSequences.codePointCount}({@linkplain #plain plain}(text))</code> without the * cost of creating a temporary s...
Returns the number of Unicode code points in the given string without the ANSI escape codes. This is equivalent to <code>CharSequences#codePointCount(CharSequence) CharSequences.codePointCount(#plain plain(text))</code> without the cost of creating a temporary string
lengthOfPlain
{ "repo_name": "apache/sis", "path": "core/sis-utility/src/main/java/org/apache/sis/internal/util/X364.java", "license": "apache-2.0", "size": 12964 }
[ "org.apache.sis.util.CharSequences" ]
import org.apache.sis.util.CharSequences;
import org.apache.sis.util.*;
[ "org.apache.sis" ]
org.apache.sis;
1,255,787
@Override public ParameterService getParameterService() { return parameterService; }
ParameterService function() { return parameterService; }
/** * Gets the parameterService attribute. * * @return Returns the parameterService. */
Gets the parameterService attribute
getParameterService
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/tem/service/impl/PerDiemServiceImpl.java", "license": "agpl-3.0", "size": 36338 }
[ "org.kuali.rice.coreservice.framework.parameter.ParameterService" ]
import org.kuali.rice.coreservice.framework.parameter.ParameterService;
import org.kuali.rice.coreservice.framework.parameter.*;
[ "org.kuali.rice" ]
org.kuali.rice;
37,613
private void selectedScanResultChanged() { ScanOneResult selectedScanResult = this.getSelectedScanOneResult(); this.lodColumnComboBox.removeAllItems(); if(selectedScanResult != null) { if(selectedScanResult.getPermutationsWereCalculated()) { ...
void function() { ScanOneResult selectedScanResult = this.getSelectedScanOneResult(); this.lodColumnComboBox.removeAllItems(); if(selectedScanResult != null) { if(selectedScanResult.getPermutationsWereCalculated()) { boolean alphaAlreadyInList = false; int itemCount = this.thresholdComboBox.getItemCount(); for(int i = ...
/** * Respond to a change in the selected scan result */
Respond to a change in the selected scan result
selectedScanResultChanged
{ "repo_name": "churchill-lab/j-qtl", "path": "modules/main/src/java/org/jax/qtl/scan/gui/ScanOneSummaryPanel.java", "license": "gpl-3.0", "size": 37564 }
[ "org.jax.qtl.scan.ConfidenceThresholdState", "org.jax.qtl.scan.ScanOneResult" ]
import org.jax.qtl.scan.ConfidenceThresholdState; import org.jax.qtl.scan.ScanOneResult;
import org.jax.qtl.scan.*;
[ "org.jax.qtl" ]
org.jax.qtl;
2,854,348
EList<String> getText();
EList<String> getText();
/** * Returns the value of the '<em><b>Text</b></em>' attribute list. * The list contents are of type {@link java.lang.String}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Text</em>' attribute list isn't clear, * there really should be more of a description here... * ...
Returns the value of the 'Text' attribute list. The list contents are of type <code>java.lang.String</code>. If the meaning of the 'Text' attribute list isn't clear, there really should be more of a description here...
getText
{ "repo_name": "markus1978/clickwatch", "path": "analysis/de.hub.clickwatch.specificmodels.brn/src/de/hub/clickwatch/specificmodels/brn/device_wifi_data_power_systempower/Settxpower.java", "license": "apache-2.0", "size": 8733 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,110,963
private WebApp createMockWebAppWithRunAs() { final WebApp webArchive = mockery.mock(WebApp.class); final List<SecurityRole> securityRoles = new ArrayList<SecurityRole>(); final SecurityRole securityRole = mockery.mock(SecurityRole.class); securityRoles.add(securityRole); fi...
WebApp function() { final WebApp webArchive = mockery.mock(WebApp.class); final List<SecurityRole> securityRoles = new ArrayList<SecurityRole>(); final SecurityRole securityRole = mockery.mock(SecurityRole.class); securityRoles.add(securityRole); final List<Servlet> servlets = new ArrayList<Servlet>(); final Servlet se...
/** * Create a WebArchive which has all the necessary mocks for runAs test * * @return */
Create a WebArchive which has all the necessary mocks for runAs test
createMockWebAppWithRunAs
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.webcontainer.security/test/com/ibm/ws/webcontainer/security/metadata/SecurityServletConfiguratorHelperTest.java", "license": "epl-1.0", "size": 80008 }
[ "com.ibm.ws.javaee.dd.common.EnvEntry", "com.ibm.ws.javaee.dd.common.RunAs", "com.ibm.ws.javaee.dd.common.SecurityRole", "com.ibm.ws.javaee.dd.common.SecurityRoleRef", "com.ibm.ws.javaee.dd.web.WebApp", "com.ibm.ws.javaee.dd.web.common.Servlet", "com.ibm.ws.javaee.dd.web.common.ServletMapping", "java....
import com.ibm.ws.javaee.dd.common.EnvEntry; import com.ibm.ws.javaee.dd.common.RunAs; import com.ibm.ws.javaee.dd.common.SecurityRole; import com.ibm.ws.javaee.dd.common.SecurityRoleRef; import com.ibm.ws.javaee.dd.web.WebApp; import com.ibm.ws.javaee.dd.web.common.Servlet; import com.ibm.ws.javaee.dd.web.common.Servl...
import com.ibm.ws.javaee.dd.common.*; import com.ibm.ws.javaee.dd.web.*; import com.ibm.ws.javaee.dd.web.common.*; import java.util.*; import org.jmock.*;
[ "com.ibm.ws", "java.util", "org.jmock" ]
com.ibm.ws; java.util; org.jmock;
2,816,504
@Test public void testAdminDbPrivileges() throws Exception { createDb(ADMIN1, DB1); policyFile .setUserGroupMapping(StaticUserGroup.getStaticMapping()); writePolicyFile(policyFile); Connection adminCon = context.createConnection(ADMIN1); Statement adminStmt = context.createStatemen...
void function() throws Exception { createDb(ADMIN1, DB1); policyFile .setUserGroupMapping(StaticUserGroup.getStaticMapping()); writePolicyFile(policyFile); Connection adminCon = context.createConnection(ADMIN1); Statement adminStmt = context.createStatement(adminCon); String tabName = DB1 + "." + STR; adminStmt.execute...
/** * Test Case 2.11 admin user create a new database DB_1 and grant ALL to * himself on DB_1 should work */
Test Case 2.11 admin user create a new database DB_1 and grant ALL to himself on DB_1 should work
testAdminDbPrivileges
{ "repo_name": "joshuayao/incubator-sentry", "path": "sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestCrossDbOps.java", "license": "apache-2.0", "size": 27091 }
[ "java.sql.Connection", "java.sql.Statement", "org.junit.Assert" ]
import java.sql.Connection; import java.sql.Statement; import org.junit.Assert;
import java.sql.*; import org.junit.*;
[ "java.sql", "org.junit" ]
java.sql; org.junit;
45,265
@Override public String toString() { return ToStringUtil.toString(this, context); }
String function() { return ToStringUtil.toString(this, context); }
/** * Return a String representation of this component. */
Return a String representation of this component
toString
{ "repo_name": "Nickname0806/Test_Q4", "path": "java/org/apache/catalina/loader/WebappLoader.java", "license": "apache-2.0", "size": 20467 }
[ "org.apache.catalina.util.ToStringUtil" ]
import org.apache.catalina.util.ToStringUtil;
import org.apache.catalina.util.*;
[ "org.apache.catalina" ]
org.apache.catalina;
1,288,966
@Test public void validatePath() throws InvalidPathException { // check valid paths PathUtils.validatePath("/foo/bar"); PathUtils.validatePath("/foo/bar/"); PathUtils.validatePath("/foo/./bar/"); PathUtils.validatePath("/foo/././bar/"); PathUtils.validatePath("/foo/../bar"); PathUtils.va...
void function() throws InvalidPathException { PathUtils.validatePath(STR); PathUtils.validatePath(STR); PathUtils.validatePath(STR); PathUtils.validatePath(STR); PathUtils.validatePath(STR); PathUtils.validatePath(STR); ArrayList<String> invalidPaths = new ArrayList<>(); invalidPaths.add(null); invalidPaths.add(STRvali...
/** * Tests the {@link PathUtils#validatePath(String)} method. * * @throws InvalidPathException thrown if the path is invalid */
Tests the <code>PathUtils#validatePath(String)</code> method
validatePath
{ "repo_name": "EvilMcJerkface/alluxio", "path": "core/common/src/test/java/alluxio/util/io/PathUtilsTest.java", "license": "apache-2.0", "size": 14808 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,874,504
@Override public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws CoreException { RefactoringStatus result= new RefactoringStatus(); pm.beginTask("", 100); //$NON-NLS-1$ if (fSelectionStart < 0 || fSelectionLength == 0) return mergeTextSelectionStatus(result); IFile[] changedFiles= ...
RefactoringStatus function(IProgressMonitor pm) throws CoreException { RefactoringStatus result= new RefactoringStatus(); pm.beginTask("", 100); if (fSelectionStart < 0 fSelectionLength == 0) return mergeTextSelectionStatus(result); IFile[] changedFiles= ResourceUtil.getFiles(new ICompilationUnit[]{fCUnit}); result.mer...
/** * Checks if the refactoring can be activated. Activation typically means, if a * corresponding menu entry can be added to the UI. * * @param pm a progress monitor to report progress during activation checking. * @return the refactoring status describing the result of the activation check. * @throws Core...
Checks if the refactoring can be activated. Activation typically means, if a corresponding menu entry can be added to the UI
checkInitialConditions
{ "repo_name": "elucash/eclipse-oxygen", "path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodRefactoring.java", "license": "epl-1.0", "size": 56144 }
[ "org.eclipse.core.resources.IFile", "org.eclipse.core.runtime.CoreException", "org.eclipse.core.runtime.IProgressMonitor", "org.eclipse.core.runtime.SubProgressMonitor", "org.eclipse.jdt.core.ICompilationUnit", "org.eclipse.jdt.core.dom.Modifier", "org.eclipse.jdt.internal.corext.codemanipulation.StubUt...
import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.dom.Modifier; import org.eclipse.jdt.internal.corext.cod...
import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; import org.eclipse.jdt.core.dom.*; import org.eclipse.jdt.internal.corext.codemanipulation.*; import org.eclipse.jdt.internal.corext.refactoring.*; import org.eclipse.jdt.internal.corext.refactoring.util.*; import org...
[ "org.eclipse.core", "org.eclipse.jdt", "org.eclipse.ltk" ]
org.eclipse.core; org.eclipse.jdt; org.eclipse.ltk;
2,100,906
public boolean isQuorumSynced(QuorumVerifier qv) { HashSet<Long> ids = new HashSet<Long>(); if (qv.getVotingMembers().containsKey(self.getId())) ids.add(self.getId()); synchronized (forwardingFollowers) { for (LearnerHandler learnerHandler: forwardingFollowers){ ...
boolean function(QuorumVerifier qv) { HashSet<Long> ids = new HashSet<Long>(); if (qv.getVotingMembers().containsKey(self.getId())) ids.add(self.getId()); synchronized (forwardingFollowers) { for (LearnerHandler learnerHandler: forwardingFollowers){ if (learnerHandler.synced() && qv.getVotingMembers().containsKey(learn...
/** * Returns true if a quorum in qv is connected and synced with the leader * and false otherwise * * @param qv, a QuorumVerifier */
Returns true if a quorum in qv is connected and synced with the leader and false otherwise
isQuorumSynced
{ "repo_name": "ervinyang/tutorial_zookeeper", "path": "zookeeper-trunk/src/java/main/org/apache/zookeeper/server/quorum/Leader.java", "license": "mit", "size": 52293 }
[ "java.io.IOException", "java.net.BindException", "java.net.ServerSocket", "java.util.HashSet", "java.util.concurrent.ConcurrentHashMap", "java.util.concurrent.ConcurrentLinkedQueue", "java.util.concurrent.ConcurrentMap", "org.apache.zookeeper.server.ZooKeeperCriticalThread", "org.apache.zookeeper.se...
import java.io.IOException; import java.net.BindException; import java.net.ServerSocket; import java.util.HashSet; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ConcurrentMap; import org.apache.zookeeper.server.ZooKeeperCriticalThread; impo...
import java.io.*; import java.net.*; import java.util.*; import java.util.concurrent.*; import org.apache.zookeeper.server.*; import org.apache.zookeeper.server.quorum.flexible.*;
[ "java.io", "java.net", "java.util", "org.apache.zookeeper" ]
java.io; java.net; java.util; org.apache.zookeeper;
1,065,457
public void addUrlPatterns(String... urlPatterns) { Assert.notNull(urlPatterns, "UrlPatterns must not be null"); Collections.addAll(this.urlPatterns, urlPatterns); } /** * Convenience method to {@link #setDispatcherTypes(EnumSet) set dispatcher types}
void function(String... urlPatterns) { Assert.notNull(urlPatterns, STR); Collections.addAll(this.urlPatterns, urlPatterns); } /** * Convenience method to {@link #setDispatcherTypes(EnumSet) set dispatcher types}
/** * Add URL patterns that the filter will be registered against. * @param urlPatterns the URL patterns */
Add URL patterns that the filter will be registered against
addUrlPatterns
{ "repo_name": "habuma/spring-boot", "path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/AbstractFilterRegistrationBean.java", "license": "apache-2.0", "size": 9139 }
[ "java.util.Collections", "java.util.EnumSet", "org.springframework.util.Assert" ]
import java.util.Collections; import java.util.EnumSet; import org.springframework.util.Assert;
import java.util.*; import org.springframework.util.*;
[ "java.util", "org.springframework.util" ]
java.util; org.springframework.util;
1,182,132
public KualiDecimal getTotalOriginalFringeBenefit() { return EffortCertificationDetail.getTotalOriginalFringeBenefit(effortCertificationDetailLines); }
KualiDecimal function() { return EffortCertificationDetail.getTotalOriginalFringeBenefit(effortCertificationDetailLines); }
/** * Gets the totalOriginalFringeBenefit attribute. * * @return Returns the totalOriginalFringeBenefit. */
Gets the totalOriginalFringeBenefit attribute
getTotalOriginalFringeBenefit
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/ec/document/EffortCertificationDocument.java", "license": "agpl-3.0", "size": 30737 }
[ "org.kuali.kfs.module.ec.businessobject.EffortCertificationDetail", "org.kuali.rice.core.api.util.type.KualiDecimal" ]
import org.kuali.kfs.module.ec.businessobject.EffortCertificationDetail; import org.kuali.rice.core.api.util.type.KualiDecimal;
import org.kuali.kfs.module.ec.businessobject.*; import org.kuali.rice.core.api.util.type.*;
[ "org.kuali.kfs", "org.kuali.rice" ]
org.kuali.kfs; org.kuali.rice;
1,330,171
private void logIfThereAreRunningTasks() throws IOException { Set<String> runningTasks = runningTasks(adminClient().performRequest(new Request("GET", "/_tasks"))); // Ignore the task list API - it doesn't count against us runningTasks.remove(ListTasksAction.NAME); runningTasks.remove...
void function() throws IOException { Set<String> runningTasks = runningTasks(adminClient().performRequest(new Request("GET", STR))); runningTasks.remove(ListTasksAction.NAME); runningTasks.remove(ListTasksAction.NAME + "[n]"); if (runningTasks.isEmpty()) { return; } List<String> stillRunning = new ArrayList<>(runningTa...
/** * Logs a message if there are still running tasks. The reasoning is that any tasks still running are state the is trying to bleed into * other tests. */
Logs a message if there are still running tasks. The reasoning is that any tasks still running are state the is trying to bleed into other tests
logIfThereAreRunningTasks
{ "repo_name": "coding0011/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java", "license": "apache-2.0", "size": 46074 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.Collections", "java.util.List", "java.util.Set", "org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksAction", "org.elasticsearch.client.Request" ]
import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Set; import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksAction; import org.elasticsearch.client.Request;
import java.io.*; import java.util.*; import org.elasticsearch.action.admin.cluster.node.tasks.list.*; import org.elasticsearch.client.*;
[ "java.io", "java.util", "org.elasticsearch.action", "org.elasticsearch.client" ]
java.io; java.util; org.elasticsearch.action; org.elasticsearch.client;
1,744,729
public Map<String, Inet6Address> inet6Entries() { return inet6Entries; }
Map<String, Inet6Address> function() { return inet6Entries; }
/** * The IPv6 entries * @return the IPv6 entries */
The IPv6 entries
inet6Entries
{ "repo_name": "bryce-anderson/netty", "path": "resolver/src/main/java/io/netty/resolver/HostsFileEntries.java", "license": "apache-2.0", "size": 1961 }
[ "java.net.Inet6Address", "java.util.Map" ]
import java.net.Inet6Address; import java.util.Map;
import java.net.*; import java.util.*;
[ "java.net", "java.util" ]
java.net; java.util;
1,336,255
@Test public void whenConvertListArrayIntegerToListInteger() { ConvertList convertList = new ConvertList(); List<int[]> list = new ArrayList<>(); list.add(new int[]{1, 2}); list.add(new int[]{3, 4, 5, 6}); List<Integer> result = convertList.convert(list); List<In...
void function() { ConvertList convertList = new ConvertList(); List<int[]> list = new ArrayList<>(); list.add(new int[]{1, 2}); list.add(new int[]{3, 4, 5, 6}); List<Integer> result = convertList.convert(list); List<Integer> expected = new ArrayList<>(); for (int i = 1; i < 7; i++) { expected.add(i); } assertThat(resul...
/** * Test whenConvertListArrayIntegerToListInteger. */
Test whenConvertListArrayIntegerToListInteger
whenConvertListArrayIntegerToListInteger
{ "repo_name": "kochanovalexey/akochanov", "path": "chapter_003/src/test/java/ru/job4j/convertlist/ConvertListTest.java", "license": "apache-2.0", "size": 1822 }
[ "java.util.ArrayList", "java.util.List", "org.hamcrest.core.Is", "org.junit.Assert" ]
import java.util.ArrayList; import java.util.List; import org.hamcrest.core.Is; import org.junit.Assert;
import java.util.*; import org.hamcrest.core.*; import org.junit.*;
[ "java.util", "org.hamcrest.core", "org.junit" ]
java.util; org.hamcrest.core; org.junit;
1,737,102
private static String getMessageWithoutStackTrace(EvalException ex) { if (ex instanceof EvalExceptionWithStackTrace) { return ((EvalExceptionWithStackTrace) ex).getOriginalMessage(); } return ex.getMessage(); }
static String function(EvalException ex) { if (ex instanceof EvalExceptionWithStackTrace) { return ((EvalExceptionWithStackTrace) ex).getOriginalMessage(); } return ex.getMessage(); }
/** * Returns the message of the given exception after removing the stack trace, if present. */
Returns the message of the given exception after removing the stack trace, if present
getMessageWithoutStackTrace
{ "repo_name": "Asana/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleConfiguredTargetBuilder.java", "license": "apache-2.0", "size": 20889 }
[ "com.google.devtools.build.lib.syntax.EvalException", "com.google.devtools.build.lib.syntax.EvalExceptionWithStackTrace" ]
import com.google.devtools.build.lib.syntax.EvalException; import com.google.devtools.build.lib.syntax.EvalExceptionWithStackTrace;
import com.google.devtools.build.lib.syntax.*;
[ "com.google.devtools" ]
com.google.devtools;
1,593,343
@Override public void run() { try { PrivilegedCarbonContext.startTenantFlow(); PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(tenantId); PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(true); ...
void function() { try { PrivilegedCarbonContext.startTenantFlow(); PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(tenantId); PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(true); while (true) { try { readLock.lock(); readLock.unlock(); Event event = eventQueue.take(); readLock....
/** * When an object implementing interface <code>Runnable</code> is used * to create a thread, starting the thread causes the object's * <code>run</code> method to be called in that separately executing * thread. * <p/> * The general contract of the method <code>ru...
When an object implementing interface <code>Runnable</code> is used to create a thread, starting the thread causes the object's <code>run</code> method to be called in that separately executing thread. The general contract of the method <code>run</code> is that it may take any action whatsoever
run
{ "repo_name": "chanakaudaya/carbon-analytics-common", "path": "components/event-receiver/org.wso2.carbon.event.receiver.core/src/main/java/org/wso2/carbon/event/receiver/core/internal/management/QueueInputEventDispatcher.java", "license": "apache-2.0", "size": 5494 }
[ "org.wso2.carbon.context.PrivilegedCarbonContext", "org.wso2.carbon.event.processor.manager.core.Manager", "org.wso2.carbon.event.receiver.core.internal.ds.EventReceiverServiceValueHolder", "org.wso2.siddhi.core.event.Event" ]
import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.event.processor.manager.core.Manager; import org.wso2.carbon.event.receiver.core.internal.ds.EventReceiverServiceValueHolder; import org.wso2.siddhi.core.event.Event;
import org.wso2.carbon.context.*; import org.wso2.carbon.event.processor.manager.core.*; import org.wso2.carbon.event.receiver.core.internal.ds.*; import org.wso2.siddhi.core.event.*;
[ "org.wso2.carbon", "org.wso2.siddhi" ]
org.wso2.carbon; org.wso2.siddhi;
2,186,191
public boolean inRange(final AbsoluteDate date) { final double dt = date.durationFrom(start); return (dt >= -0.001) && (dt <= duration + 0.001); }
boolean function(final AbsoluteDate date) { final double dt = date.durationFrom(start); return (dt >= -0.001) && (dt <= duration + 0.001); }
/** Check if a date is in validity range. * @param date date to check * @return true if date is in validity range */
Check if a date is in validity range
inRange
{ "repo_name": "liscju/Orekit", "path": "src/main/java/org/orekit/bodies/PosVelChebyshev.java", "license": "apache-2.0", "size": 6676 }
[ "org.orekit.time.AbsoluteDate" ]
import org.orekit.time.AbsoluteDate;
import org.orekit.time.*;
[ "org.orekit.time" ]
org.orekit.time;
2,171,932
public static String formatPeriodISO(long startMillis, long endMillis) { return formatPeriod(startMillis, endMillis, ISO_EXTENDED_FORMAT_PATTERN, TimeZone.getDefault()); }
static String function(long startMillis, long endMillis) { return formatPeriod(startMillis, endMillis, ISO_EXTENDED_FORMAT_PATTERN, TimeZone.getDefault()); }
/** * <p>Formats the time gap as a string.</p> * <p/> * <p>The format used is the ISO8601 period format.</p> * * @param startMillis the start of the duration to format * @param endMillis the end of the duration to format * @return the time as a String */
Formats the time gap as a string. The format used is the ISO8601 period format
formatPeriodISO
{ "repo_name": "songwie/elasticsearch-river-jdbc", "path": "src/main/java/org/xbib/elasticsearch/plugin/jdbc/util/DurationFormatUtil.java", "license": "apache-2.0", "size": 22885 }
[ "java.util.TimeZone" ]
import java.util.TimeZone;
import java.util.*;
[ "java.util" ]
java.util;
1,041,059
public ParameterDefinitionsValue withAllowedValues(List<Object> allowedValues) { this.allowedValues = allowedValues; return this; }
ParameterDefinitionsValue function(List<Object> allowedValues) { this.allowedValues = allowedValues; return this; }
/** * Set the allowed values for the parameter. * * @param allowedValues the allowedValues value to set * @return the ParameterDefinitionsValue object itself. */
Set the allowed values for the parameter
withAllowedValues
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/policy/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/policy/v2019_09_01/ParameterDefinitionsValue.java", "license": "mit", "size": 3439 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,782,518
public List<TinyMCECustomPlugin> getCustomPlugins() { return customPlugins; }
List<TinyMCECustomPlugin> function() { return customPlugins; }
/** * Get all custom TinyMCE plugins * * @return List containing the plugins or an empty set. */
Get all custom TinyMCE plugins
getCustomPlugins
{ "repo_name": "RLDevOps/Demo", "path": "src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/richText/plugins/TinyMCECustomPluginFactory.java", "license": "apache-2.0", "size": 2613 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
88,900
public static String createFilePath(File cacheDir, String key) { try { // Use URLEncoder to ensure we have a valid filename, a tad hacky but it will do for // this example return cacheDir.getAbsolutePath() + File.separator + CACHE_FILENAME_PREFIX + URLEncoder.encode(key.replace("*", ""), "UTF-8"); } cat...
static String function(File cacheDir, String key) { try { return cacheDir.getAbsolutePath() + File.separator + CACHE_FILENAME_PREFIX + URLEncoder.encode(key.replace("*", STRUTF-8"); } catch (final UnsupportedEncodingException e) { } return null; }
/** * Creates a constant cache file path given a target cache directory and an image key. * * @param cacheDir * @param key * @return */
Creates a constant cache file path given a target cache directory and an image key
createFilePath
{ "repo_name": "xuhongjia/RxAndroidEvents", "path": "lzlibrary/src/main/java/com/external/album/utils/DiskLruCache.java", "license": "apache-2.0", "size": 9448 }
[ "java.io.File", "java.io.UnsupportedEncodingException", "java.net.URLEncoder" ]
import java.io.File; import java.io.UnsupportedEncodingException; import java.net.URLEncoder;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
2,671,242
private TypePrimaryKeys getPrimaryKeyColumnFields(String primaryKeyFeilds) { TypePrimaryKeys primaryKeys = new TypePrimaryKeys(); String[] primaryKeyColumnsFields = StringUtils.split(primaryKeyFeilds, Constants.LOAD_TYPE_NEW_TABLE_VALUE_SEPERATOR); if(primaryKeyColumnsFields !=null && primaryKeyColumnsFields.l...
TypePrimaryKeys function(String primaryKeyFeilds) { TypePrimaryKeys primaryKeys = new TypePrimaryKeys(); String[] primaryKeyColumnsFields = StringUtils.split(primaryKeyFeilds, Constants.LOAD_TYPE_NEW_TABLE_VALUE_SEPERATOR); if(primaryKeyColumnsFields !=null && primaryKeyColumnsFields.length>0){ TypeKeyFields primaryTyp...
/** * Creates primary key fields * @param primaryKeyFeilds * @return */
Creates primary key fields
getPrimaryKeyColumnFields
{ "repo_name": "capitalone/Hydrograph", "path": "hydrograph.ui/hydrograph.ui.engine/src/main/java/hydrograph/ui/engine/converter/impl/OutputTeradataConverter.java", "license": "apache-2.0", "size": 10709 }
[ "org.apache.commons.lang.StringUtils" ]
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
2,255,051
void setProperties( Properties props ); /** * @return the last resultset from the last query executed * IUnifiedResultSet getResultSet();
void setProperties( Properties props ); /** * @return the last resultset from the last query executed * IUnifiedResultSet getResultSet();
/** * Sets the properties to be used when the connection is made. The standard * keys for the properties are defined in this interface * @param props */
Sets the properties to be used when the connection is made. The standard keys for the properties are defined in this interface
setProperties
{ "repo_name": "hzssean/soas", "path": "soas-core/soas-service/src/main/java/org/saiku/datasources/connection/ISaikuConnection.java", "license": "gpl-2.0", "size": 3464 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
1,738,509
EAttribute getTHumanInteractions_QueryLanguage();
EAttribute getTHumanInteractions_QueryLanguage();
/** * Returns the meta object for the attribute '{@link org.wso2.developerstudio.eclipse.humantask.model.ht.THumanInteractions#getQueryLanguage <em>Query Language</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Query Language</em>'. * @see org.wso2.de...
Returns the meta object for the attribute '<code>org.wso2.developerstudio.eclipse.humantask.model.ht.THumanInteractions#getQueryLanguage Query Language</code>'.
getTHumanInteractions_QueryLanguage
{ "repo_name": "chanakaudaya/developer-studio", "path": "humantask/org.wso2.tools.humantask.model/src/org/wso2/carbonstudio/eclipse/humantask/model/ht/HTPackage.java", "license": "apache-2.0", "size": 247810 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,563,431
public void setArchitecture(String arch) throws IOException { if (arch == null) throw new NullPointerException(); architecture = arch; // delete old file File fArch = new File(folder + Resolver.folder + ArchitectureFileName); fArch.delete(); // create new file FileWriter bw = new FileWriter(fArch)...
void function(String arch) throws IOException { if (arch == null) throw new NullPointerException(); architecture = arch; File fArch = new File(folder + Resolver.folder + ArchitectureFileName); fArch.delete(); FileWriter bw = new FileWriter(fArch); bw.write(arch); bw.flush(); bw.close(); }
/** * Set specific architecture * * @param arch * @throws IOException */
Set specific architecture
setArchitecture
{ "repo_name": "Jery77/TOSCA_references_resolver", "path": "src/tosca/CSAR_handler.java", "license": "epl-1.0", "size": 8062 }
[ "java.io.File", "java.io.FileWriter", "java.io.IOException" ]
import java.io.File; import java.io.FileWriter; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,489,948
public static void loadCommonOperationPolicies(String organization) { ApiMgtDAO apiMgtDAO = ApiMgtDAO.getInstance(); try { Set<String> existingPolicies = apiMgtDAO.getCommonOperationPolicyNames(organization); String policySpecLocation = CarbonUtils.getCarbonHome() + File.se...
static void function(String organization) { ApiMgtDAO apiMgtDAO = ApiMgtDAO.getInstance(); try { Set<String> existingPolicies = apiMgtDAO.getCommonOperationPolicyNames(organization); String policySpecLocation = CarbonUtils.getCarbonHome() + File.separator + APIConstants.COMMON_OPERATION_POLICY_SPECIFICATIONS_LOCATION; ...
/** * Load the common policies for the organization at the first startup. This will only copy the policies to the * database if the total policies for this organization is zero. * * @param organization organization name */
Load the common policies for the organization at the first startup. This will only copy the policies to the database if the total policies for this organization is zero
loadCommonOperationPolicies
{ "repo_name": "ruks/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java", "license": "apache-2.0", "size": 564037 }
[ "java.io.File", "java.io.IOException", "java.util.Set", "org.apache.commons.io.FileUtils", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.api.model.OperationPolicyData", "org.wso2.carbon.apimgt.api.model.OperationPolicyDefinition", "org.wso2.carbon.apimgt.api.model.Operat...
import java.io.File; import java.io.IOException; import java.util.Set; import org.apache.commons.io.FileUtils; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.OperationPolicyData; import org.wso2.carbon.apimgt.api.model.OperationPolicyDefinition; import org.wso2.carbon....
import java.io.*; import java.util.*; import org.apache.commons.io.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.impl.dao.*; import org.wso2.carbon.utils.*;
[ "java.io", "java.util", "org.apache.commons", "org.wso2.carbon" ]
java.io; java.util; org.apache.commons; org.wso2.carbon;
889,469
public static boolean eventsApplicable(CamelContext context) { ManagementStrategy management = context.getManagementStrategy(); if (management == null) { return false; } EventFactory factory = management.getEventFactory(); if (factory == null) { retur...
static boolean function(CamelContext context) { ManagementStrategy management = context.getManagementStrategy(); if (management == null) { return false; } EventFactory factory = management.getEventFactory(); if (factory == null) { return false; } List<EventNotifier> notifiers = management.getEventNotifiers(); if (notif...
/** * Checks whether event notifications is applicable or not */
Checks whether event notifications is applicable or not
eventsApplicable
{ "repo_name": "DariusX/camel", "path": "core/camel-support/src/main/java/org/apache/camel/support/EventHelper.java", "license": "apache-2.0", "size": 41283 }
[ "java.util.List", "org.apache.camel.CamelContext", "org.apache.camel.spi.EventFactory", "org.apache.camel.spi.EventNotifier", "org.apache.camel.spi.ManagementStrategy" ]
import java.util.List; import org.apache.camel.CamelContext; import org.apache.camel.spi.EventFactory; import org.apache.camel.spi.EventNotifier; import org.apache.camel.spi.ManagementStrategy;
import java.util.*; import org.apache.camel.*; import org.apache.camel.spi.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
1,326,675
public boolean isBefore(@NonNull CalendarDay other) { if(other == null) { throw new IllegalArgumentException("other cannot be null"); } if (year == other.year) { return ((month == other.month) ? (day < other.day) : (month < other.month)); } else { ...
boolean function(@NonNull CalendarDay other) { if(other == null) { throw new IllegalArgumentException(STR); } if (year == other.year) { return ((month == other.month) ? (day < other.day) : (month < other.month)); } else { return year < other.year; } }
/** * Determine if this day is before the given instance * * @param other the other day to test * @return true if this is before other, false if equal or after */
Determine if this day is before the given instance
isBefore
{ "repo_name": "flaviojmendes/hefesto", "path": "matcalendar/src/main/java/com/prolificinteractive/materialcalendarview/CalendarDay.java", "license": "gpl-3.0", "size": 8096 }
[ "android.support.annotation.NonNull" ]
import android.support.annotation.NonNull;
import android.support.annotation.*;
[ "android.support" ]
android.support;
1,140,707
protected final void resetXML11() throws XNIException { // Reset XML 1.1 components fXML11NSDocScanner.reset(this); fXML11DTDScanner.reset(this); } // resetXML11() // // other methods //
final void function() throws XNIException { fXML11NSDocScanner.reset(this); fXML11DTDScanner.reset(this); } //
/** * Reset all XML 1.1 components before parsing */
Reset all XML 1.1 components before parsing
resetXML11
{ "repo_name": "ronsigal/xerces", "path": "src/org/apache/xerces/impl/xs/opti/SchemaParsingConfig.java", "license": "apache-2.0", "size": 37982 }
[ "org.apache.xerces.xni.XNIException" ]
import org.apache.xerces.xni.XNIException;
import org.apache.xerces.xni.*;
[ "org.apache.xerces" ]
org.apache.xerces;
1,217,766
boolean isBroadcastPoint(Topology topology, ConnectPoint connectPoint);
boolean isBroadcastPoint(Topology topology, ConnectPoint connectPoint);
/** * Indicates whether broadcast is allowed for traffic received on the * given connection point. * * @param topology topology descriptor * @param connectPoint connection point * @return true if broadcast allowed; false otherwise */
Indicates whether broadcast is allowed for traffic received on the given connection point
isBroadcastPoint
{ "repo_name": "Shashikanth-Huawei/bmp", "path": "core/api/src/main/java/org/onosproject/net/topology/TopologyStore.java", "license": "apache-2.0", "size": 6853 }
[ "org.onosproject.net.ConnectPoint" ]
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.*;
[ "org.onosproject.net" ]
org.onosproject.net;
2,249,013
private void createNewDistributionGroup(int dimension) throws ZookeeperException, BBoxDBException, ResourceAllocationException { final DistributionGroupConfiguration configuration = DistributionGroupConfigurationBuilder .create(dimension) .withPlacementStrategy("org.bboxdb.distribution.placement.Dum...
void function(int dimension) throws ZookeeperException, BBoxDBException, ResourceAllocationException { final DistributionGroupConfiguration configuration = DistributionGroupConfigurationBuilder .create(dimension) .withPlacementStrategy(STR, "") .build(); distributionGroupZookeeperAdapter.deleteDistributionGroup(TEST_GR...
/** * Create a new distribution group * * @param dimension * @throws ZookeeperException * @throws BBoxDBException * @throws ResourceAllocationException */
Create a new distribution group
createNewDistributionGroup
{ "repo_name": "jnidzwetzki/scalephant", "path": "bboxdb-server/src/test/java/org/bboxdb/test/distribution/partition/TestKDtreeSpacePartitioner.java", "license": "apache-2.0", "size": 14239 }
[ "org.bboxdb.distribution.placement.ResourceAllocationException", "org.bboxdb.distribution.zookeeper.ZookeeperException", "org.bboxdb.misc.BBoxDBException", "org.bboxdb.storage.entity.DistributionGroupConfiguration", "org.bboxdb.storage.entity.DistributionGroupConfigurationBuilder" ]
import org.bboxdb.distribution.placement.ResourceAllocationException; import org.bboxdb.distribution.zookeeper.ZookeeperException; import org.bboxdb.misc.BBoxDBException; import org.bboxdb.storage.entity.DistributionGroupConfiguration; import org.bboxdb.storage.entity.DistributionGroupConfigurationBuilder;
import org.bboxdb.distribution.placement.*; import org.bboxdb.distribution.zookeeper.*; import org.bboxdb.misc.*; import org.bboxdb.storage.entity.*;
[ "org.bboxdb.distribution", "org.bboxdb.misc", "org.bboxdb.storage" ]
org.bboxdb.distribution; org.bboxdb.misc; org.bboxdb.storage;
1,490,952
public static int measureIndentLength(CharSequence line, int tabSize) { return IndentManipulation.measureIndentInSpaces(line, tabSize); } // public static String trimIndent(String line, int indentsToRemove, // IScriptProject project) { // return IndentManipulation.trimIndent(line, indentsToRemove, // CodeF...
static int function(CharSequence line, int tabSize) { return IndentManipulation.measureIndentInSpaces(line, tabSize); }
/** * Computes the visual length of the indentation of a * <code>CharSequence</code>, counting a tab character as the size until the * next tab stop and every other whitespace character as one. * * @param line * the string to measure the indent of * @param tabSize * the visual siz...
Computes the visual length of the indentation of a <code>CharSequence</code>, counting a tab character as the size until the next tab stop and every other whitespace character as one
measureIndentLength
{ "repo_name": "vovagrechka/fucking-everything", "path": "phizdets/phizdets-idea/eclipse-src/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/corext/util/Strings.java", "license": "apache-2.0", "size": 20974 }
[ "org.eclipse.php.internal.core.ast.rewrite.IndentManipulation" ]
import org.eclipse.php.internal.core.ast.rewrite.IndentManipulation;
import org.eclipse.php.internal.core.ast.rewrite.*;
[ "org.eclipse.php" ]
org.eclipse.php;
975,155
@Override public void query(long id, String to, String from, Serializable payload) { Mailbox mailbox = getMailbox(to); if (mailbox != null) { mailbox.query(id, to, from, payload); return; } // on startup, queue the messages until the startup completes if (isBeforeActive()...
void function(long id, String to, String from, Serializable payload) { Mailbox mailbox = getMailbox(to); if (mailbox != null) { mailbox.query(id, to, from, payload); return; } if (isBeforeActive() && addStartupPacket(new Query(id, to, from, payload))) { } else { super.query(id, to, from, payload); } }
/** * Sends a query to the destination mailbox. */
Sends a query to the destination mailbox
query
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/hemp/broker/HempBroker.java", "license": "gpl-2.0", "size": 19369 }
[ "com.caucho.bam.mailbox.Mailbox", "com.caucho.bam.packet.Query", "java.io.Serializable" ]
import com.caucho.bam.mailbox.Mailbox; import com.caucho.bam.packet.Query; import java.io.Serializable;
import com.caucho.bam.mailbox.*; import com.caucho.bam.packet.*; import java.io.*;
[ "com.caucho.bam", "java.io" ]
com.caucho.bam; java.io;
2,323,002
private SelectablePart getPart(DbContext ctx, SelectableRow row, int index) throws EventException { SelectablePart selectablePart; if (row instanceof QuotationEditor.Row) { ctx.out().println("Row" + index + " ->editing quotationRow"); selectablePart = ((QuotationEditor.Row) row).getProduct(); } e...
SelectablePart function(DbContext ctx, SelectableRow row, int index) throws EventException { SelectablePart selectablePart; if (row instanceof QuotationEditor.Row) { ctx.out().println("Row" + index + STR); selectablePart = ((QuotationEditor.Row) row).getProduct(); } else if (row instanceof InvoiceEditor.Row) { ctx.out(...
/** * Gets value of field product according to whether the current table row is an instance of * QuotationEditor.Row or InvoiceEditor.Row. * * @param ctx The database context. * @param row The current table row. * @param index The index of the current row. * @return The value of the field product ...
Gets value of field product according to whether the current table row is an instance of QuotationEditor.Row or InvoiceEditor.Row
getPart
{ "repo_name": "abassoftware/ajo-examples", "path": "src/de/abas/examples/abstractclass/SalesHelperClass.java", "license": "epl-1.0", "size": 15378 }
[ "de.abas.erp.axi.event.EventException", "de.abas.erp.db.DbContext", "de.abas.erp.db.SelectableRow", "de.abas.erp.db.schema.part.SelectablePart", "de.abas.erp.db.schema.sales.InvoiceEditor", "de.abas.erp.db.schema.sales.PackingSlipEditor", "de.abas.erp.db.schema.sales.QuotationEditor" ]
import de.abas.erp.axi.event.EventException; import de.abas.erp.db.DbContext; import de.abas.erp.db.SelectableRow; import de.abas.erp.db.schema.part.SelectablePart; import de.abas.erp.db.schema.sales.InvoiceEditor; import de.abas.erp.db.schema.sales.PackingSlipEditor; import de.abas.erp.db.schema.sales.QuotationEditor;
import de.abas.erp.axi.event.*; import de.abas.erp.db.*; import de.abas.erp.db.schema.part.*; import de.abas.erp.db.schema.sales.*;
[ "de.abas.erp" ]
de.abas.erp;
2,395,212
public EList<Diagnostic> getErrors() { if (terminateReload) { // the contents' state is currently unclear return new BasicEList<Diagnostic>(); } return new eu.hyvar.mspl.manifest.resource.hymanifest.util.HymanifestCopiedEList<Diagnostic>(super.getErrors()); }
EList<Diagnostic> function() { if (terminateReload) { return new BasicEList<Diagnostic>(); } return new eu.hyvar.mspl.manifest.resource.hymanifest.util.HymanifestCopiedEList<Diagnostic>(super.getErrors()); }
/** * Returns all errors that are associated with this resource. */
Returns all errors that are associated with this resource
getErrors
{ "repo_name": "HyVar/DarwinSPL", "path": "plugins/eu.hyvar.mspl.manifest.resource.hymanifest/src-gen/eu/hyvar/mspl/manifest/resource/hymanifest/mopp/HymanifestResource.java", "license": "apache-2.0", "size": 36687 }
[ "org.eclipse.emf.common.util.BasicEList", "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.BasicEList; import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,669,499
@XmlElement(name = "action") public Entry getActionEntry() { return actionEntry; }
@XmlElement(name = STR) Entry function() { return actionEntry; }
/** * Method description * * * @return */
Method description
getActionEntry
{ "repo_name": "Fosstrak/fosstrak-webadapters", "path": "src/main/java/org/fosstrak/webadapters/epcis/model/events/ObjectEvent.java", "license": "gpl-3.0", "size": 6128 }
[ "javax.xml.bind.annotation.XmlElement", "org.fosstrak.webadapters.epcis.model.Entry" ]
import javax.xml.bind.annotation.XmlElement; import org.fosstrak.webadapters.epcis.model.Entry;
import javax.xml.bind.annotation.*; import org.fosstrak.webadapters.epcis.model.*;
[ "javax.xml", "org.fosstrak.webadapters" ]
javax.xml; org.fosstrak.webadapters;
1,633,674
public Date getCertificateNotBefore(String certificateId) { XmlChainItem cert = getCertificate(certificateId); if (cert != null) { return cert.getNotBefore(); } return null; }
Date function(String certificateId) { XmlChainItem cert = getCertificate(certificateId); if (cert != null) { return cert.getNotBefore(); } return null; }
/** * This method returns the notBefore date for a given certificate * * @param certificateId * the certificate id * @return the notBefore date */
This method returns the notBefore date for a given certificate
getCertificateNotBefore
{ "repo_name": "esig/dss", "path": "dss-simple-certificate-report-jaxb/src/main/java/eu/europa/esig/dss/simplecertificatereport/SimpleCertificateReport.java", "license": "lgpl-2.1", "size": 13121 }
[ "eu.europa.esig.dss.simplecertificatereport.jaxb.XmlChainItem", "java.util.Date" ]
import eu.europa.esig.dss.simplecertificatereport.jaxb.XmlChainItem; import java.util.Date;
import eu.europa.esig.dss.simplecertificatereport.jaxb.*; import java.util.*;
[ "eu.europa.esig", "java.util" ]
eu.europa.esig; java.util;
2,160,336
Context getActivityContext();
Context getActivityContext();
/** * Get the Activity Context. */
Get the Activity Context
getActivityContext
{ "repo_name": "nexus06/EverNote", "path": "evernoteForMobile/src/main/java/es/puliware/android/evernote/utils/ContextView.java", "license": "gpl-3.0", "size": 416 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
2,187,549
public Timestamp getLastHarvestDate() { return _lastHarvestDate; }
Timestamp function() { return _lastHarvestDate; }
/** * Gets last harvest date. * @return last harvest date */
Gets last harvest date
getLastHarvestDate
{ "repo_name": "treejames/GeoprocessingAppstore", "path": "src/com/esri/gpt/catalog/management/MmdRecord.java", "license": "apache-2.0", "size": 13266 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,749,628
@Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.save, menu); return super.onCreateOptionsMenu(menu); }
boolean function(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.save, menu); return super.onCreateOptionsMenu(menu); }
/*** * Used for the items in the ActionBar * * Instructions from http://developer.android.com * */
Used for the items in the ActionBar Instructions from HREF
onCreateOptionsMenu
{ "repo_name": "crysmeira/Shopping-List", "path": "ShoppingCart/src/br/com/shoppinglist/EditList.java", "license": "gpl-3.0", "size": 5505 }
[ "android.view.Menu", "android.view.MenuInflater" ]
import android.view.Menu; import android.view.MenuInflater;
import android.view.*;
[ "android.view" ]
android.view;
2,715,161
public void startDownloadForPreview(OCFile file) { Fragment detailFragment = FileDetailFragment.newInstance(file, getAccount()); setSecondFragment(detailFragment); mWaitingToPreview = file; requestForDownload(); updateFragmentsVisibility(true); updateActionBarTitleAnd...
void function(OCFile file) { Fragment detailFragment = FileDetailFragment.newInstance(file, getAccount()); setSecondFragment(detailFragment); mWaitingToPreview = file; requestForDownload(); updateFragmentsVisibility(true); updateActionBarTitleAndHomeButton(file); setFile(file); }
/** * Requests the download of the received {@link OCFile} , updates the UI * to monitor the download progress and prepares the activity to preview * or open the file when the download finishes. * * @param file {@link OCFile} to download and preview. */
Requests the download of the received <code>OCFile</code> , updates the UI to monitor the download progress and prepares the activity to preview or open the file when the download finishes
startDownloadForPreview
{ "repo_name": "asifdahir/nscloud", "path": "src/com/nscloud/android/ui/activity/FileDisplayActivity.java", "license": "gpl-2.0", "size": 74556 }
[ "android.support.v4.app.Fragment", "com.nscloud.android.datamodel.OCFile", "com.nscloud.android.ui.fragment.FileDetailFragment" ]
import android.support.v4.app.Fragment; import com.nscloud.android.datamodel.OCFile; import com.nscloud.android.ui.fragment.FileDetailFragment;
import android.support.v4.app.*; import com.nscloud.android.datamodel.*; import com.nscloud.android.ui.fragment.*;
[ "android.support", "com.nscloud.android" ]
android.support; com.nscloud.android;
1,762,484
protected void addFaultReasonExpressionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FaultMediator_faultReasonExpression_feature"), getStr...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), MediatorsPackage.Literals.FAULT_MEDIATOR__FAULT_REASON_EXPRESSION, true, false, false, null, null...
/** * This adds a property descriptor for the Fault Reason Expression feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Fault Reason Expression feature.
addFaultReasonExpressionPropertyDescriptor
{ "repo_name": "thiliniish/developer-studio", "path": "esb/org.wso2.developerstudio.eclipse.esb.edit/src/org/wso2/developerstudio/eclipse/esb/mediators/provider/FaultMediatorItemProvider.java", "license": "apache-2.0", "size": 17892 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.wso2.developerstudio.eclipse.esb.mediators.MediatorsPackage" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.wso2.developerstudio.eclipse.esb.mediators.MediatorsPackage;
import org.eclipse.emf.edit.provider.*; import org.wso2.developerstudio.eclipse.esb.mediators.*;
[ "org.eclipse.emf", "org.wso2.developerstudio" ]
org.eclipse.emf; org.wso2.developerstudio;
1,838,917
EReference getScope_Members();
EReference getScope_Members();
/** * Returns the meta object for the containment reference list '{@link org.yakindu.sct.model.sgraph.Scope#getMembers <em>Members</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference list '<em>Members</em>'. * @see org.yakindu.sct.model.sgraph.Scop...
Returns the meta object for the containment reference list '<code>org.yakindu.sct.model.sgraph.Scope#getMembers Members</code>'.
getScope_Members
{ "repo_name": "Yakindu/statecharts", "path": "plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/SGraphPackage.java", "license": "epl-1.0", "size": 72772 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,162,666
public static void main(String[] args) { weka.core.logging.Logger.log(weka.core.logging.Logger.Level.INFO, "Logging started"); try { // scan for -offline for (int i = 0; i < args.length; i++) { if (args[i].equals("-offline")) { m_offline = true; String[] temp = n...
static void function(String[] args) { weka.core.logging.Logger.log(weka.core.logging.Logger.Level.INFO, STR); try { for (int i = 0; i < args.length; i++) { if (args[i].equals(STR)) { m_offline = true; String[] temp = new String[args.length - 1]; if (i > 0) { System.arraycopy(args, 0, temp, 0, i); } System.arraycopy(arg...
/** * Main method for using the package manager from the command line * * @param args command line arguments */
Main method for using the package manager from the command line
main
{ "repo_name": "ModelWriter/Deliverables", "path": "WP2/D2.5.2_Generation/Jeni/lib/weka-src/src/main/java/weka/core/WekaPackageManager.java", "license": "epl-1.0", "size": 87570 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,492,518
public ByteSizeValue getAsMemory(String setting, String defaultValue) throws SettingsException { return MemorySizeValue.parseBytesSizeValueOrHeapRatio(get(setting, defaultValue), setting); }
ByteSizeValue function(String setting, String defaultValue) throws SettingsException { return MemorySizeValue.parseBytesSizeValueOrHeapRatio(get(setting, defaultValue), setting); }
/** * Returns the setting value (as size) associated with the setting key. Provided values can either be * absolute values (interpreted as a number of bytes), byte sizes (eg. 1mb) or percentage of the heap size * (eg. 12%). If it does not exists, parses the default value provided. */
Returns the setting value (as size) associated with the setting key. Provided values can either be absolute values (interpreted as a number of bytes), byte sizes (eg. 1mb) or percentage of the heap size (eg. 12%). If it does not exists, parses the default value provided
getAsMemory
{ "repo_name": "s1monw/elasticsearch", "path": "server/src/main/java/org/elasticsearch/common/settings/Settings.java", "license": "apache-2.0", "size": 58667 }
[ "org.elasticsearch.common.unit.ByteSizeValue", "org.elasticsearch.common.unit.MemorySizeValue" ]
import org.elasticsearch.common.unit.ByteSizeValue; import org.elasticsearch.common.unit.MemorySizeValue;
import org.elasticsearch.common.unit.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
2,482,004
static protected void encodeClose(boolean end, PrintWriter out) { if (end) out.println("/>"); else out.println('>'); }
static void function(boolean end, PrintWriter out) { if (end) out.println("/>"); else out.println('>'); }
/** * Encodes a closing of a start tag */
Encodes a closing of a start tag
encodeClose
{ "repo_name": "adamrduffy/trinidad-1.0.x", "path": "trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/xml/encode/AbstractXMLEncoder.java", "license": "apache-2.0", "size": 9893 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,999,550
private void fillParameterValues( final String method, final String operation, final ParameterValueGroup parameters) throws FactoryException, SQLException { final PreparedStatement stmt = prepareStatement( "ParameterValues", ...
void function( final String method, final String operation, final ParameterValueGroup parameters) throws FactoryException, SQLException { final PreparedStatement stmt = prepareStatement( STR, STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR); stmt.setString(1, method); stmt.setString(2, opera...
/** * Fill parameter values in the specified group. * * @param method The EPSG code for the operation method. * @param operation The EPSG code for the operation (conversion or transformation). * @param parameters The parameter values to fill. * @throws SQLException if a SQL statement faile...
Fill parameter values in the specified group
fillParameterValues
{ "repo_name": "geotools/geotools", "path": "modules/library/referencing/src/main/java/org/geotools/referencing/factory/epsg/AbstractEpsgFactory.java", "license": "lgpl-2.1", "size": 176972 }
[ "java.io.File", "java.net.URISyntaxException", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "javax.measure.Unit", "org.geotools.metadata.i18n.ErrorKeys", "org.geotools.metadata.i18n.Errors", "org.opengis.parameter.InvalidParameterValueException", "org.opengis.parame...
import java.io.File; import java.net.URISyntaxException; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import javax.measure.Unit; import org.geotools.metadata.i18n.ErrorKeys; import org.geotools.metadata.i18n.Errors; import org.opengis.parameter.InvalidParameterValueExcepti...
import java.io.*; import java.net.*; import java.sql.*; import javax.measure.*; import org.geotools.metadata.i18n.*; import org.opengis.parameter.*; import org.opengis.referencing.*;
[ "java.io", "java.net", "java.sql", "javax.measure", "org.geotools.metadata", "org.opengis.parameter", "org.opengis.referencing" ]
java.io; java.net; java.sql; javax.measure; org.geotools.metadata; org.opengis.parameter; org.opengis.referencing;
1,516,093
public void compileItsOwnLists(Vertex[] allFileVerts, float[][] allTexCoords){ indexArray = new short[faces.size()*3]; if (allTexCoords.length > 0){ texCoordIndexArray = new int[faces.size()*3]; } for (int i = 0; i < faces.size(); i++) { AFace currentFace = faces.get(i); ...
void function(Vertex[] allFileVerts, float[][] allTexCoords){ indexArray = new short[faces.size()*3]; if (allTexCoords.length > 0){ texCoordIndexArray = new int[faces.size()*3]; } for (int i = 0; i < faces.size(); i++) { AFace currentFace = faces.get(i); Vertex v0 = allFileVerts[currentFace.p0]; Vertex v1 = allFileVert...
/** * Uses the faces attached to this group during the parsing process and the lists with * all vertex and all texture coordinates of the obj file to create arrays for this group * with vertices and texture coords that only belong to this single group. * * @param allFileVerts * @param allTexCoo...
Uses the faces attached to this group during the parsing process and the lists with all vertex and all texture coordinates of the obj file to create arrays for this group with vertices and texture coords that only belong to this single group
compileItsOwnLists
{ "repo_name": "steffe/MT4J_KTSI", "path": "src/org/mt4j/util/modelImporter/file3ds/Model3dsFileFactory.java", "license": "gpl-2.0", "size": 24835 }
[ "org.mt4j.util.math.Vertex" ]
import org.mt4j.util.math.Vertex;
import org.mt4j.util.math.*;
[ "org.mt4j.util" ]
org.mt4j.util;
382,668
public void setDataSource(DataSource dataSource) { this.dataSource = dataSource; this.jdbcTemplate = new JdbcTemplate(dataSource); }
void function(DataSource dataSource) { this.dataSource = dataSource; this.jdbcTemplate = new JdbcTemplate(dataSource); }
/** * Set the {@link DataSource} to use. * @param dataSource the data source */
Set the <code>DataSource</code> to use
setDataSource
{ "repo_name": "michael-simons/spring-boot", "path": "spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/jdbc/DataSourceHealthIndicator.java", "license": "apache-2.0", "size": 5568 }
[ "javax.sql.DataSource", "org.springframework.jdbc.core.JdbcTemplate" ]
import javax.sql.DataSource; import org.springframework.jdbc.core.JdbcTemplate;
import javax.sql.*; import org.springframework.jdbc.core.*;
[ "javax.sql", "org.springframework.jdbc" ]
javax.sql; org.springframework.jdbc;
1,305,464
public void getChildren(String path, boolean watch, Children2Callback cb, Object ctx) { getChildren(path, watch ? watchManager.defaultWatcher : null, cb, ctx); }
void function(String path, boolean watch, Children2Callback cb, Object ctx) { getChildren(path, watch ? watchManager.defaultWatcher : null, cb, ctx); }
/** * The asynchronous version of getChildren. * * @since 3.3.0 * * @see #getChildren(String, boolean, Stat) */
The asynchronous version of getChildren
getChildren
{ "repo_name": "felix-tien/TechLab", "path": "ZooKeeperLab/zookeeper/src/org/apache/zookeeper/ZooKeeper.java", "license": "apache-2.0", "size": 127600 }
[ "org.apache.zookeeper.AsyncCallback" ]
import org.apache.zookeeper.AsyncCallback;
import org.apache.zookeeper.*;
[ "org.apache.zookeeper" ]
org.apache.zookeeper;
881,769
public List topologicalSort() { List result = new ArrayList(); List queue = new ArrayList(nodesWithNoPredecessor()); int nodeCount = nodeCount(); while (result.size() < nodeCount) { sortStep(result, queue); } return result; }
List function() { List result = new ArrayList(); List queue = new ArrayList(nodesWithNoPredecessor()); int nodeCount = nodeCount(); while (result.size() < nodeCount) { sortStep(result, queue); } return result; }
/** * This operation destroys the graph that it is operating on. */
This operation destroys the graph that it is operating on
topologicalSort
{ "repo_name": "jsampson/mayfly", "path": "src/net/sourceforge/mayfly/graph/Graph.java", "license": "apache-2.0", "size": 4346 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
448,089
public static boolean intersectRayTriangles (Ray ray, float[] vertices, short[] indices, int vertexSize, Vector3 intersection) { float min_dist = Float.MAX_VALUE; boolean hit = false; if (indices.length % 3 != 0) throw new RuntimeException("triangle list size is not a multiple of 3"); for (int i = 0; i < i...
static boolean function (Ray ray, float[] vertices, short[] indices, int vertexSize, Vector3 intersection) { float min_dist = Float.MAX_VALUE; boolean hit = false; if (indices.length % 3 != 0) throw new RuntimeException(STR); for (int i = 0; i < indices.length; i += 3) { int i1 = indices[i] * vertexSize; int i2 = indic...
/** Intersects the given ray with list of triangles. Returns the nearest intersection point in intersection * * @param ray The ray * @param vertices the vertices * @param indices the indices, each successive 3 shorts index the 3 vertices of a triangle * @param vertexSize the size of a vertex in floats * @p...
Intersects the given ray with list of triangles. Returns the nearest intersection point in intersection
intersectRayTriangles
{ "repo_name": "yuripourre/abby", "path": "src/main/java/com/badlogic/gdx/math/Intersector.java", "license": "lgpl-3.0", "size": 49923 }
[ "com.badlogic.gdx.math.collision.Ray" ]
import com.badlogic.gdx.math.collision.Ray;
import com.badlogic.gdx.math.collision.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
2,830,360
public static byte[] readSaslMessage(InputStream in) throws IOException { DataTransferEncryptorMessageProto proto = DataTransferEncryptorMessageProto.parseFrom(vintPrefixed(in)); if (proto.getStatus() == DataTransferEncryptorStatus.ERROR_UNKNOWN_KEY) { throw new InvalidEncryptionKeyException(pro...
static byte[] function(InputStream in) throws IOException { DataTransferEncryptorMessageProto proto = DataTransferEncryptorMessageProto.parseFrom(vintPrefixed(in)); if (proto.getStatus() == DataTransferEncryptorStatus.ERROR_UNKNOWN_KEY) { throw new InvalidEncryptionKeyException(proto.getMessage()); } else if (proto.get...
/** * Reads a SASL negotiation message. * * @param in stream to read * @return bytes of SASL negotiation messsage * @throws IOException for any error */
Reads a SASL negotiation message
readSaslMessage
{ "repo_name": "cnfire/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl/DataTransferSaslUtil.java", "license": "apache-2.0", "size": 20238 }
[ "java.io.IOException", "java.io.InputStream", "org.apache.hadoop.hdfs.protocol.datatransfer.InvalidEncryptionKeyException", "org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos" ]
import java.io.IOException; import java.io.InputStream; import org.apache.hadoop.hdfs.protocol.datatransfer.InvalidEncryptionKeyException; import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos;
import java.io.*; import org.apache.hadoop.hdfs.protocol.datatransfer.*; import org.apache.hadoop.hdfs.protocol.proto.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,253,719
EClass getAllPatternEntry();
EClass getAllPatternEntry();
/** * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.AllPatternEntry <em>All Pattern Entry</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>All Pattern Entry</em>'. * @see hu.bme.mit.inf.dslr...
Returns the meta object for class '<code>hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.AllPatternEntry All Pattern Entry</code>'.
getAllPatternEntry
{ "repo_name": "viatra/VIATRA-Generator", "path": "Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/ApplicationConfigurationPackage.java", "license": "epl-1.0", "size": 236178 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,261,692
EClass getValueCase();
EClass getValueCase();
/** * Returns the meta object for class '{@link org.tud.inf.st.mbt.functions.ValueCase <em>Value Case</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Value Case</em>'. * @see org.tud.inf.st.mbt.functions.ValueCase * @generated */
Returns the meta object for class '<code>org.tud.inf.st.mbt.functions.ValueCase Value Case</code>'.
getValueCase
{ "repo_name": "paetti1988/qmate", "path": "MATE/org.tud.inf.st.mbt.emf/src-gen/org/tud/inf/st/mbt/functions/FunctionsPackage.java", "license": "apache-2.0", "size": 134465 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,666,151
@Reference( name = "carbon.metrics.management.service", service = MetricManagementService.class, cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC, unbind = "unsetMetricManagementService" ) protected void setMetricManag...
@Reference( name = STR, service = MetricManagementService.class, cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC, unbind = STR ) void function(MetricManagementService metricManagementService) { StreamProcessorStatisticDataHolder.getInstance().setMetricsManagementService(metricManagementSe...
/** * Get the carbon metrics MetricManagementService service. * This is the bind method that gets called for ConfigProvider service registration that satisfy the policy. * * @param metricManagementService the carbon metrics MetricManagementService service that is registered as a service. */
Get the carbon metrics MetricManagementService service. This is the bind method that gets called for ConfigProvider service registration that satisfy the policy
setMetricManagementService
{ "repo_name": "tishan89/carbon-analytics", "path": "components/org.wso2.carbon.stream.processor.statistics/src/main/java/org/wso2/carbon/stream/processor/statistics/internal/service/ConfigServiceComponent.java", "license": "apache-2.0", "size": 4442 }
[ "org.osgi.service.component.annotations.Reference", "org.osgi.service.component.annotations.ReferenceCardinality", "org.osgi.service.component.annotations.ReferencePolicy", "org.wso2.carbon.metrics.core.MetricManagementService", "org.wso2.carbon.stream.processor.statistics.internal.StreamProcessorStatisticD...
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.ReferenceCardinality; import org.osgi.service.component.annotations.ReferencePolicy; import org.wso2.carbon.metrics.core.MetricManagementService; import org.wso2.carbon.stream.processor.statistics.internal.StreamProce...
import org.osgi.service.component.annotations.*; import org.wso2.carbon.metrics.core.*; import org.wso2.carbon.stream.processor.statistics.internal.*;
[ "org.osgi.service", "org.wso2.carbon" ]
org.osgi.service; org.wso2.carbon;
1,975,153
public VersionNumber getSplitWhen() { return splitWhen; }
VersionNumber function() { return splitWhen; }
/** * Get the Jenkins version from which the plugin was detached. * * @return The Jenkins version from which the plugin was detached. */
Get the Jenkins version from which the plugin was detached
getSplitWhen
{ "repo_name": "rsandell/jenkins", "path": "core/src/main/java/jenkins/plugins/DetachedPluginsUtil.java", "license": "mit", "size": 9247 }
[ "hudson.util.VersionNumber" ]
import hudson.util.VersionNumber;
import hudson.util.*;
[ "hudson.util" ]
hudson.util;
2,403,032
@TargetApi(Build.VERSION_CODES.LOLLIPOP) public static Bitmap createBadgedIconBitmap( Drawable icon, UserHandleCompat user, Context context) { float scale = FeatureFlags.LAUNCHER3_DISABLE_ICON_NORMALIZATION ? 1 : IconNormalizer.getInstance().getScale(icon, null); Bitm...
@TargetApi(Build.VERSION_CODES.LOLLIPOP) static Bitmap function( Drawable icon, UserHandleCompat user, Context context) { float scale = FeatureFlags.LAUNCHER3_DISABLE_ICON_NORMALIZATION ? 1 : IconNormalizer.getInstance().getScale(icon, null); Bitmap bitmap = createIconBitmap(icon, context, scale); return badgeIconForUs...
/** * Returns a bitmap suitable for the all apps view. The icon is badged for {@param user}. * The bitmap is also visually normalized with other icons. */
Returns a bitmap suitable for the all apps view. The icon is badged for user. The bitmap is also visually normalized with other icons
createBadgedIconBitmap
{ "repo_name": "michelelacorte/FlickLauncher", "path": "src/com/android/launcher3/Utilities.java", "license": "apache-2.0", "size": 94038 }
[ "android.annotation.TargetApi", "android.content.Context", "android.graphics.Bitmap", "android.graphics.drawable.Drawable", "android.os.Build", "com.android.launcher3.compat.UserHandleCompat", "com.android.launcher3.config.FeatureFlags", "com.android.launcher3.util.IconNormalizer" ]
import android.annotation.TargetApi; import android.content.Context; import android.graphics.Bitmap; import android.graphics.drawable.Drawable; import android.os.Build; import com.android.launcher3.compat.UserHandleCompat; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.util.IconNormalize...
import android.annotation.*; import android.content.*; import android.graphics.*; import android.graphics.drawable.*; import android.os.*; import com.android.launcher3.compat.*; import com.android.launcher3.config.*; import com.android.launcher3.util.*;
[ "android.annotation", "android.content", "android.graphics", "android.os", "com.android.launcher3" ]
android.annotation; android.content; android.graphics; android.os; com.android.launcher3;
647,664
@WebMethod @WebResult(name = "rval", targetNamespace = "https://adwords.google.com/api/adwords/mcm/v201809") @RequestWrapper(localName = "getPendingInvitations", targetNamespace = "https://adwords.google.com/api/adwords/mcm/v201809", className = "com.google.api.ads.adwords.jaxws.v201809.mcm.ManagedCustomerS...
@WebResult(name = "rval", targetNamespace = STRgetPendingInvitationsSTRhttps: @ResponseWrapper(localName = "getPendingInvitationsResponseSTRhttps: List<PendingInvitation> function( @WebParam(name = "selectorSTRhttps: PendingInvitationSelector selector) throws ApiException ;
/** * * Returns the pending invitations for the customer IDs in the selector. * @param selector the manager customer ids (inviters) or the client customer ids (invitees) * @throws ApiException when there is at least one error with the request * * * @pa...
Returns the pending invitations for the customer IDs in the selector
getPendingInvitations
{ "repo_name": "googleads/googleads-java-lib", "path": "modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201809/mcm/ManagedCustomerServiceInterface.java", "license": "apache-2.0", "size": 11278 }
[ "java.util.List", "javax.jws.WebParam", "javax.jws.WebResult", "javax.xml.ws.ResponseWrapper" ]
import java.util.List; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.ResponseWrapper;
import java.util.*; import javax.jws.*; import javax.xml.ws.*;
[ "java.util", "javax.jws", "javax.xml" ]
java.util; javax.jws; javax.xml;
2,883,733
public BytesRef hash() { return hash; }
BytesRef function() { return hash; }
/** * Returns a variable length hash of the file represented by this metadata object. This can be the file * itself if the file is small enough. If the length of the hash is <tt>0</tt> no hash value is available */
Returns a variable length hash of the file represented by this metadata object. This can be the file itself if the file is small enough. If the length of the hash is 0 no hash value is available
hash
{ "repo_name": "dmiszkiewicz/elasticsearch", "path": "src/main/java/org/elasticsearch/index/store/StoreFileMetaData.java", "license": "apache-2.0", "size": 5506 }
[ "org.apache.lucene.util.BytesRef" ]
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.*;
[ "org.apache.lucene" ]
org.apache.lucene;
1,330,798
public ByteArray getPinCode() { return pinCode; }
ByteArray function() { return pinCode; }
/** * Gets PIN Code. * * @return the PIN Code */
Gets PIN Code
getPinCode
{ "repo_name": "zsmartsystems/com.zsmartsystems.zigbee", "path": "com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/doorlock/UnlockDoorCommand.java", "license": "epl-1.0", "size": 3709 }
[ "com.zsmartsystems.zigbee.zcl.field.ByteArray" ]
import com.zsmartsystems.zigbee.zcl.field.ByteArray;
import com.zsmartsystems.zigbee.zcl.field.*;
[ "com.zsmartsystems.zigbee" ]
com.zsmartsystems.zigbee;
1,569,277
void setOrg(Org orgIn);
void setOrg(Org orgIn);
/** * Setter for org * @param orgIn to set */
Setter for org
setOrg
{ "repo_name": "dmacvicar/spacewalk", "path": "java/code/src/com/redhat/rhn/domain/errata/Errata.java", "license": "gpl-2.0", "size": 8951 }
[ "com.redhat.rhn.domain.org.Org" ]
import com.redhat.rhn.domain.org.Org;
import com.redhat.rhn.domain.org.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
1,347,507
public SpPr getSpPr() { return shapeProps; }
SpPr function() { return shapeProps; }
/** * return the OOXML shape property for this axis * * @return */
return the OOXML shape property for this axis
getSpPr
{ "repo_name": "Maxels88/openxls", "path": "src/main/java/org/openxls/formats/XLS/charts/Axis.java", "license": "gpl-3.0", "size": 92982 }
[ "org.openxls.formats.OOXML" ]
import org.openxls.formats.OOXML;
import org.openxls.formats.*;
[ "org.openxls.formats" ]
org.openxls.formats;
786,020
public void setRefEntityTagValue(YangString refEntityTagValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "ref-entity-tag", refEntityTagValue, childrenNames()); }
void function(YangString refEntityTagValue) throws JNCException { setLeafValue(Epc.NAMESPACE, STR, refEntityTagValue, childrenNames()); }
/** * Sets the value for child leaf "ref-entity-tag", * using instance of generated typedef class. * @param refEntityTagValue The value to set. * @param refEntityTagValue used during instantiation. */
Sets the value for child leaf "ref-entity-tag", using instance of generated typedef class
setRefEntityTagValue
{ "repo_name": "jnpr-shinma/yangfile", "path": "hitel/src/hctaEpc/mmeSgsn/statistics/sd/Relay.java", "license": "apache-2.0", "size": 11310 }
[ "com.tailf.jnc.YangString" ]
import com.tailf.jnc.YangString;
import com.tailf.jnc.*;
[ "com.tailf.jnc" ]
com.tailf.jnc;
1,211,876
public Unit createUnitType(Element unit) { String id = unit.getAttribute(ID); Unit newType = new Unit(id, new Player(), new Tile(DEFAULT,DEFAULT, new GameMap(DEFAULT, DEFAULT))); //set attributes Element attributes = (Element) unit.getElementsByTagName(ATTRIBUTES).it...
Unit function(Element unit) { String id = unit.getAttribute(ID); Unit newType = new Unit(id, new Player(), new Tile(DEFAULT,DEFAULT, new GameMap(DEFAULT, DEFAULT))); Element attributes = (Element) unit.getElementsByTagName(ATTRIBUTES).item(0); StatCollection targetAttributes = (StatCollection) newType.getStatCollection...
/** * This method creates "UnitType" object used by game authoring environment. * @param unit * @return */
This method creates "UnitType" object used by game authoring environment
createUnitType
{ "repo_name": "dylangsjackson/MissingNoEngine", "path": "src/data/decoder/UnitDecoder.java", "license": "mit", "size": 6679 }
[ "org.w3c.dom.Element" ]
import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
799,027
LocatedBlocks getBlockLocations(String clientMachine, String src, long offset, long length) throws IOException { LocatedBlocks blocks = getBlockLocations(src, offset, length, true, true, true); if (blocks != null) { //sort the blocks DatanodeDescriptor client = host2DataNodeMap.getDatanodeBy...
LocatedBlocks getBlockLocations(String clientMachine, String src, long offset, long length) throws IOException { LocatedBlocks blocks = getBlockLocations(src, offset, length, true, true, true); if (blocks != null) { DatanodeDescriptor client = host2DataNodeMap.getDatanodeByHost( clientMachine); for (LocatedBlock b : bl...
/** * Get block locations within the specified range. * * @see #getBlockLocations(String, long, long) */
Get block locations within the specified range
getBlockLocations
{ "repo_name": "davidl1/hortonworks-extension", "path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java", "license": "apache-2.0", "size": 218585 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.protocol.LocatedBlock", "org.apache.hadoop.hdfs.protocol.LocatedBlocks" ]
import java.io.IOException; import org.apache.hadoop.hdfs.protocol.LocatedBlock; import org.apache.hadoop.hdfs.protocol.LocatedBlocks;
import java.io.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,232,221
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String url = "/index.jsp"; String username = request.getParameter("username"); String password = request.getParameter("password"); String firstna...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String url = STR; String username = request.getParameter(STR); String password = request.getParameter(STR); String firstname = request.getParameter(STR); String lastname = request.getParameter(STR); String ema...
/** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> * methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods
processRequest
{ "repo_name": "Bsmalhi/Web-Project-CS3520", "path": "WebProject_CS3520/src/java/com/willsuwei/cs3520/SignUp.java", "license": "apache-2.0", "size": 3477 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
1,330,841
public Map<String, Object> toTemplate() { return toTemplate(null); }
Map<String, Object> function() { return toTemplate(null); }
/** * Get this template with all default variables. * * @return The template. */
Get this template with all default variables
toTemplate
{ "repo_name": "LarsDenBakker/LBCoreModules", "path": "src/main/java/nl/larsdenbakker/configuration/ConfigurationTemplate.java", "license": "gpl-2.0", "size": 3681 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,620,206
public FacesConfigType<T> removeAllName() { childNode.removeChildren("name"); return this; } // --------------------------------------------------------------------------------------------------------|| // ClassName: FacesConfigType ElementName: javaee:faces-config-navigation-ruleType Elem...
FacesConfigType<T> function() { childNode.removeChildren("name"); return this; }
/** * Removes the <code>name</code> element * @return the current instance of <code>FacesConfigType<T></code> */
Removes the <code>name</code> element
removeAllName
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/facesconfig21/FacesConfigTypeImpl.java", "license": "epl-1.0", "size": 40579 }
[ "org.jboss.shrinkwrap.descriptor.api.facesconfig21.FacesConfigType" ]
import org.jboss.shrinkwrap.descriptor.api.facesconfig21.FacesConfigType;
import org.jboss.shrinkwrap.descriptor.api.facesconfig21.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
266,020