query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
This method was generated by MyBatis Generator. This method sets the value of the database column TB_PAY_REPARTITION.CR_TIME | public void setCR_TIME(Date CR_TIME) {
this.CR_TIME = CR_TIME;
} | [
"public void setCR_TIME(Date CR_TIME) {\n\t\tthis.CR_TIME = CR_TIME;\n\t}",
"public void setCrtime(Date crtime) {\r\n\t\tthis.crtime = crtime;\r\n\t}",
"public Date getCR_TIME() {\n return CR_TIME;\n }",
"public Date getCR_TIME() {\n\t\treturn CR_TIME;\n\t}",
"public void setCrtTime(Date crtTime) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form FrameLogon | public FrameLogon() {
initComponents();
LoadINI();
this.jPasswordField1.requestFocus();
this.setTitle(keyarch.VERSION_BANNER);
} | [
"protected void createFrame() {\n MyInternalFrame frame = new MyInternalFrame();\n frame.setVisible(true); //necessary as of 1.3\n desktop.add(frame);\n try {\n frame.setSelected(true);\n } catch (java.beans.PropertyVetoException e) {}\n }",
"public CreateAccFrame(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the current input data factory, responsible for handling objectFactory input data. | @Override
public IInputDataFactory getInputDataFactory() {
if (this.inputDataFactory == null) {
this.inputDataFactory = getObjectFactory().getNamedObject("inputDataFactory", IInputDataFactory.class);
if (this.inputDataFactory == null) {
log.debug("Falling back to non application context based instantiation.");
this.inputDataFactory = getObjectFactory().instantiate(InputDataFactory.class);
}
}
return this.inputDataFactory;
} | [
"public static IInputFactory getInputFactory() {\n\n return m_InputFactory;\n\n }",
"public OWLDataFactory getFactory() {\n\t\treturn factory;\n\t}",
"public ObjectFactory getObjectFactory();",
"public ObjectifyFactory factory() {\n return ofy().factory();\n }",
"public OBStoreFactory getFactory(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the volume option in DB. If the option with given key already exists for the volume, it will be updated, else inserted. | private void updateOptionInDb(final GlusterVolumeOptionEntity option) {
// update the option value if it exists, else add it
GlusterVolumeOptionEntity existingOption = getGlusterVolume().getOption(option.getKey());
if (existingOption != null) {
getGlusterOptionDao().updateVolumeOption(existingOption.getId(), option.getValue());
} else {
getGlusterOptionDao().save(option);
}
} | [
"public void addOption(OptionKey key, Option opt);",
"@Override\n\tpublic int updateDBOptionPrice(Automobile tempAuto, String optionname, String option, float newprice) {\n\t\tProperties props = new Properties();\n\t\tint res=1;\t\n\t\ttry {\n\t\t\tConnection connection = getConnection();\n\t\t\tStatement stateme... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column FreeHost_CDN_analog.vpsname | public void setVpsname(String vpsname) {
this.vpsname = vpsname == null ? null : vpsname.trim();
} | [
"public String getVpsname() {\r\n return vpsname;\r\n }",
"public Builder setPvname(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n pvname_ = value;\n onChanged();\n return this;\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Bind parameters and create the XML request for add agent. | public void submitAddAgent (){
} | [
"private AddAgentResponse addAgent(AddAgentRequest request) {\n\t\tRemoteNode commander = this.createRemoteNode(request.getCommander());\n\t\tthis.setCommander(commander);\n\t\tAddAgentResponse response = new AddAgentResponse();\n\t\tresponse.setErrorCode(ActionErrorCode.SUCCESS);\n\t\treturn response;\n\t}",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new CurrencyConversion. It's a default Constructor, which sets the class variables to null. | public CurrencyConversion()
{
currency1 = null;
currency2 = null;
conversionFactor = null;
} | [
"public CurrencyConversion() {\n }",
"public Currency() {\n // Instances built via this constructor have undefined behavior.\n }",
"public Currency(){\n\n }",
"public CurrencyFormatter() {\n \n }",
"public Currency() {\n name = \"EUR\";\n symbol = \"€\";\n parityToEu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the qDS elements. | List<QualityDataSetDTO> getQDSElements(String measureId, String verision); | [
"public List<QueryResultsDataObj> getQueryResultsDataObjs()\n {\n return qrdos;\n }",
"public AbstractElement[] getElements() {\r\n\t\tenter();\r\n\t\ttry {\r\n\t\t\treturn application.getElements();\r\n\t\t} finally {\r\n\t\t\texit();\r\n\t\t}\r\n\t}",
"public DSDataSet<Q> getDataSet();",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validate an inventory title. throws IllegalArgumentException If the title exceed 32 characters. | public static void validateTitle(String title) {
if(title.length() > 32)
throw new IllegalArgumentException("Title length must be lower than 32 characters.");
} | [
"public void testInvalidTitle() {\n\t\tassertFalse(Item.isTitleValid(\"pop1corn\"));\n\t\tSystem.out.println(\"Title failure. Invalid characters encountered. testInvalidTitle()\\n\");\n\t\t\n\t}",
"private void checkTitle() {\n\t\tif (title == null) {\n\t\t\tinvalidArgs.add(MESSAGE_INVALID_TITLE);\n\t\t}\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set whether an this resolver should autogenerate data encryption credentials. | public void setAutoGenerateDataEncryptionCredential(final boolean flag) {
autoGenerateDataEncryptionCredential = flag;
} | [
"public boolean isAutoGenerateDataEncryptionCredential() {\n return autoGenerateDataEncryptionCredential;\n }",
"public void setEncrypt(Boolean Encrypt) {\n this.Encrypt = Encrypt;\n }",
"public abstract void setEncryptMode();",
"final public boolean requiresEncryption()\r\n {\r\n retu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Used to get the Road that connects 2 given cities | public n2009108991_Estrada getRoad(int x,int y){
/**Origin city*/
n2009108991_Cidade origem= getCity(x);
/**Destination city*/
n2009108991_Cidade destino= getCity(y);
/**Auxiliary road allows to travel the list*/
n2009108991_Estrada aux= listaEstradas.get(0);
for(int i =0;i<listaEstradas.size();i++){
aux = listaEstradas.get(i);
// caution the next line used both origin and destination for verification, because the road can connect city A to B, but roads are double sided, so at the same time it connects B to A
if (aux.getOrigem().getNome().equals(origem.getNome()) && aux.getDestino().getNome().equals(destino.getNome()) || aux.getOrigem().getNome().equals(destino.getNome()) && aux.getDestino().getNome().equals(origem.getNome()) )
return aux;
}
return aux;
} | [
"@Override\r\n public String getRoad(String town1, String town2) {\r\n return graph.getEdge(new Town(town1), new Town(town2)).getName();\r\n\r\n }",
"@Override\r\n\tpublic String getRoad(String town1, String town2) \r\n\t{\r\n\t\tTown t = new Town(town1);\r\n\t\tTown t2 = new Town(town2);\r\n\t\tretur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string apkVersName = 16; | public java.lang.String getApkVersName() {
java.lang.Object ref = apkVersName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
apkVersName_ = s;
}
return s;
}
} | [
"java.lang.String getApkVersName();",
"int getApkVers();",
"public java.lang.String getApkVersName() {\r\n java.lang.Object ref = apkVersName_;\r\n if (!(ref instanceof java.lang.String)) {\r\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\r\n .toStringUtf8();\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a JTS Polygon from GisFeature | private static Polygon createPolygon(GisFeature feature) {
GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
List<GISCoordinate> featureCoordinates = feature.getCoordinates();
Coordinate[] coordinates = new Coordinate[featureCoordinates.size()];
int i = 0;
for(GISCoordinate featureCoordinate:featureCoordinates) {
coordinates[i] = new Coordinate(featureCoordinate.getX(), featureCoordinate.getY());
i++;
}
Polygon polygon = geometryFactory.createPolygon(coordinates);
return polygon;
} | [
"public static Geometry ST_Polygonize(Geometry geometry) {\n Polygonizer polygonizer = new Polygonizer(true);\n polygonizer.add(geometry);\n return polygonizer.getGeometry();\n }",
"public static com.vividsolutions.jts.geom.Polygon toJTS(final EnvelopeType gmlEnvelope)\n throws NoSuchAuthorit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Registers an event to the registry Note: To register more than one event to a value use the name of the value and append a '.' and a name for the event. This name must be unique for the value. | public void register(String key, Event event) {
KeyItem k = index.getKey(key);
if(k==null){
index.addKey(key);
k = index.getKey(key);
}
registry.put(k, event);
} | [
"public void Add_event_value(String v)\n {\n\n event_value = new String(v);\t\n }",
"void register(String name, K key, V value);",
"public void setEventName(String value) {\n setAttributeInternal(EVENTNAME, value);\n }",
"public void setEventName(String name);",
"private void registerEvent(Ev... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new SummarySymmetryGroup with the params from the profile symmetry group and the new estimated value/stddev from value. | public static SummarySymmetryGroup create(ProfileSymmetryGroup psg,
EmpiricalValue value) {
return new SummarySymmetryGroup(psg.getCount(), psg.getRole(), psg.getID(),
psg.getStrategy(), value.getValue(), value.getStandardDeviation());
} | [
"public static SummarySymmetryGroup create(ProfileSymmetryGroup psg, ObservationSymmetryGroup osg) {\n\t\tif (psg.getID() == osg.getID())\n\t\t\treturn new SummarySymmetryGroup(psg.getCount(), psg.getRole(), psg.getID(), \n\t\t\t\t\tpsg.getStrategy(), osg.getPayoff(), osg.getPayoffSD());\n\t\treturn null;\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set project current page | void setProjectCurrentPage(int position); | [
"int getProjectCurrentPage();",
"public void setCurrentProject(Finalproject currentProject) {\n this.currentProject = currentProject;\n }",
"void setCurrentPage(int index);",
"Project getCurrentProject();",
"synchronized void setCurrentProject(AbstractProject project) {\n this.currentProjec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Merge left with right; fills left, frees right | private BPTreePage merge(BPTreePage left, BPTreePage right, int dividingSlot) {
if ( logging(log) ) {
log(log, ">> merge(@%d): %s", dividingSlot, this);
log(log, ">> left: %s", left);
log(log, ">> right: %s", right);
}
// /==\ + key + /==\ ==> /====\
Record splitKey = records.get(dividingSlot);
BPTreePage page = left.merge(right, splitKey);
// Must release right (not done in merge)
if ( logging(log) )
log(log, "-- merge: %s", page);
left.write();
left.release();
right.free();
if ( page == right )
BPT.error("Returned page is not the left");
if ( BPT.CheckingNode ) {
if ( isLeaf ) {
// If two data blocks, then the split key is not included
// (it's already there, with its value).
// Size is N+N and max could be odd so N+N and N+N+1 are
// possible.
if ( left.getCount() + 1 != left.getMaxSize() && left.getCount() != left.getMaxSize() )
BPT.error("Inconsistent data node size: %d/%d", left.getCount(), left.getMaxSize());
} else if ( !left.isFull() ) {
// If not two data blocks, the left side should now be full
// (N+N+split)
BPT.error("Inconsistent node size: %d/%d", left.getCount(), left.getMaxSize());
}
}
// Remove from parent (which is "this")
shuffleDown(dividingSlot);
this.write();
internalCheckNodeDeep();
if ( logging(log) ) {
log(log, "<< merge: %s", this);
log(log, "<< left: %s", left);
}
return left;
} | [
"private static BPTreeNode merge(BPTreeNode left, Record splitKey, BPTreeNode right) {\n\n left.records.add(splitKey);\n\n // Copy over right to top of left.\n right.records.copyToTop(left.records);\n right.ptrs.copyToTop(left.ptrs);\n\n // Update count\n left.count = left.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Original signature : int sd_journal_sendv(iovec, int) native declaration : /usr/include/systemd/sdjournal.h:54 | public static int sd_journal_sendv(Pointer iov, int n) {
return sd_journal_sendv(Pointer.getPeer(iov), n);
} | [
"private native int mq_send(int mqdes, Pointer msg, long msgLen, int msgPrio);",
"public static int sd_journal_sendv_with_location(Pointer<Byte > file, Pointer<Byte > line, Pointer<Byte > func, Pointer iov, int n) {\n\t\treturn sd_journal_sendv_with_location(Pointer.getPeer(file), Pointer.getPeer(line), Pointer.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a diagnostic error, typically from a standalone parser configuration. | public void error(Diagnostic diagnostic) {
error(diagnostic.getMessage() + " in line " + diagnostic.getLine(), null, null, ErrorCodes.FROM_PARSER);
} | [
"public void addError(IError error);",
"public ListASTNode<N> addError( ErrorASTNode error );",
"public void addDiagnostic(Diagnostic diagnostic) {\n if (diagnostic.getKind() == DiagnosticKind.ERROR) {\n hasErrors = true;\n }\n this.diagnostics.add(diagnostic);\n }",
"privat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the subset of instances which have at least one deployment on a lower version than the given one, or which have no production deployments | public InstanceList onLowerVersionThan(Version version) {
return matching(id -> instance(id).productionDeployments().isEmpty()
|| instance(id).productionDeployments().values().stream()
.anyMatch(deployment -> deployment.version().isBefore(version)));
} | [
"public InstanceList byIncreasingDeployedVersion() {\n return sortedBy(comparing(id -> instance(id).productionDeployments().values().stream()\n .map(Deployment::version)\n .min(naturalOrder())\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use PredictionLog.newBuilder() to construct. | private PredictionLog(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"private PredictLog(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"com.tencent.angel.serving.apis.prediction.PredictionLogProtos.PredictLogOrBuilder getPredictLogOrBuilder();",
"com.tencent.angel.serving.apis.prediction.PredictionLogProtos.PredictLog getPredictLog(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the standard ID for this property which is defined as [CID]_[SSID]. This is commonly used in OpenHAB. | public String getStandardID() {
return parentDevice.getSSID() + "_" + SSID;
} | [
"public @Nullable String getSSID() {\n return mSSID;\n }",
"public String getSSID() {\r\n\t\treturn SSID;\r\n\t}",
"public String getSSID() {\n return SSID;\n }",
"String getSecId();",
"public Integer getSsid() {\n return ssid;\n }",
"public java.lang.String getSSKeyId() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__PartiturHandler__Group__6" $ANTLR start "rule__PartiturHandler__Group__6__Impl" InternalPartitur.g:1040:1: rule__PartiturHandler__Group__6__Impl : ( ( rule__PartiturHandler__ConditionsAssignment_6 ) ) ; | public final void rule__PartiturHandler__Group__6__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalPartitur.g:1044:1: ( ( ( rule__PartiturHandler__ConditionsAssignment_6 ) ) )
// InternalPartitur.g:1045:1: ( ( rule__PartiturHandler__ConditionsAssignment_6 ) )
{
// InternalPartitur.g:1045:1: ( ( rule__PartiturHandler__ConditionsAssignment_6 ) )
// InternalPartitur.g:1046:2: ( rule__PartiturHandler__ConditionsAssignment_6 )
{
before(grammarAccess.getPartiturHandlerAccess().getConditionsAssignment_6());
// InternalPartitur.g:1047:2: ( rule__PartiturHandler__ConditionsAssignment_6 )
// InternalPartitur.g:1047:3: rule__PartiturHandler__ConditionsAssignment_6
{
pushFollow(FOLLOW_2);
rule__PartiturHandler__ConditionsAssignment_6();
state._fsp--;
}
after(grammarAccess.getPartiturHandlerAccess().getConditionsAssignment_6());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__PartiturHandler__Group_7__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:1232:1: ( ( ( rule__PartiturHandler__ConditionsAssignment_7_1 ) ) )\n // InternalPartitur.g:1233:1: ( ( ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
MARK: Segment Calculates the 2D shape created by the intersection of two given 2D segments. | public static Shape2D intersection(Segment2D segment1, Segment2D segment2) {
// algorithm developed by Paul Bourke:
// http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/
// store segment endpoint component values, in world coords, for easy access
Vector2D p1 = segment1.toWorld(segment1.getStart());
Vector2D p2 = segment1.toWorld(segment1.getEnd());
Vector2D p3 = segment2.toWorld(segment2.getStart());
Vector2D p4 = segment2.toWorld(segment2.getEnd());
double x1 = p1.getX();
double y1 = p1.getY();
double x2 = p2.getX();
double y2 = p2.getY();
double x3 = p3.getX();
double y3 = p3.getY();
double x4 = p4.getX();
double y4 = p4.getY();
// compute shared denominator
double denom = (y4 - y3)*(x2 - x1) - (x4 - x3)*(y2 - y1);
// compute determinate numerators
double numA = (x4 - x3)*(y1 - y3) - (y4 - y3)*(x1 - x3);
double numB = (x2 - x1)*(y1 - y3) - (y2 - y1)*(x1 - x3);
// if determinate denom is 0, the segments are parallel
boolean parallel = (denom == 0);
// if segments not parallel, then the intersection is a single point
if (!parallel) {
// compute determinate values
double detA = numA / denom;
double detB = numB / denom;
// if either determinate value is outside the range [0, 1],
// then the segments do not intersect
if (detA < 0 || detA > 1 || detB < 0 || detB > 1)
throw new IntersectException("Given shapes do not intersect");
// at this point we know the segments intersect at a single point
// create and return that point
double x = x1 + detA*(x2 - x1);
double y = y1 + detA*(y2 - y1);
return new Point2D(x, y);
}
// at this point, we know that the given segments are parallel
// if either numerator is not 0 segments are not coincidental
// and thus do not intersect
if (numA != 0 || numB != 0)
throw new IntersectException("Given shapes do not intersect");
// coincidental at this point... check for endpoint containment
// if the segments do intersect, then the two contained endpoints
// will make the endpoints of the intersection segment
Vector2D endpoint1 = null;
Vector2D endpoint2 = null;
// p3:
if (LinAlg2D.contains(segment1, p3))
endpoint1 = p3;
// p4:
if (LinAlg2D.contains(segment1, p4)) {
if (endpoint1 == null)
endpoint1 = p4;
else
endpoint2 = p4;
}
// p1:
if (LinAlg2D.contains(segment2, p1)) {
if (endpoint1 == null)
endpoint1 = p1;
else
endpoint2 = p1;
}
// p2:
if (LinAlg2D.contains(segment2, p2)) {
if (endpoint1 == null)
endpoint1 = p2;
else
endpoint2 = p2;
}
// if no points are contained, the segments do not intersect
if (endpoint1 == null || endpoint2 == null)
throw new IntersectException("Given shapes do not intersect");
// if the two endpoints are the same, return a point
if (endpoint1.equals(endpoint2))
return new Point2D(endpoint1);
// create intersection segment and return
return new Segment2D(endpoint1, endpoint2);
} | [
"public static int[] intersects (int ax0, int ay0, int ax1, int ay1,\n \t\t\tint bx0, int by0, int bx1, int by1) {\n \t\n \tax0 <<= 16;\n \tay0 <<= 16;\n \tax1 <<= 16;\n \tay1 <<= 16;\n \t\n \tbx0 <<= 16;\n \tby0 <<= 16;\n \tbx1 <<= 16;\n \tby1 <<= 16;\n \t\n \tint adx = (ax1 ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper method to select a particular action plan. | public SPResponse selectPlan(User user, Object[] params) {
final SPResponse resp = new SPResponse();
String actionPlanId = (String) params[0];
Assert.hasText(actionPlanId, "Organization Plan id is required.");
// validate the action plan
try {
getActionPlan(actionPlanId);
} catch (DashboardRedirectException e) {
log.warn("Action plan not found.", e);
removeActionPlan(user, actionPlanId);
throw e;
}
// get the user action plan selection and set the selected action plan id
UserActionPlan userActionPlan = actionPlanFactory.getUserActionPlan(user);
ActionPlanProgress actionPlanProgress = userActionPlan.getActionPlanProgress(actionPlanId);
// validate if the action plan is applicable for the user
Assert.notNull(actionPlanProgress, MessagesHelper.getMessage("service.growl.message2"));
userActionPlan.setSelectedActionPlan(actionPlanId);
actionPlanFactory.updateUserActionPlan(userActionPlan);
return resp.isSuccess();
} | [
"@Override\n\tpublic TurnAction selectAction() {\n\t\tJSONObject message = new JSONObject();\n\t\tmessage.put(\"function\", \"select\");\n\t\tmessage.put(\"type\", \"action\");\n\n\t\tthis.sendInstruction(message);\n\t\tString selected = this.getResponse();\n\t\treturn TurnAction.valueOf(selected);\n\t}",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A logger is responsible for the generation of a complete trace, composed of several feedlets. Once a Logger has been created, the programmer can proceed to create feedlets. The IGenericLogger interface is not meant to be directly implemented, it mainly serves to express functionality common to both ILogger and IConversionLogger. | public interface IGenericLogger {
/**
* Create a timer event and register it with the logger.
*
* @param name
* The name of the timer event.
* @return The new ITimerEvent instance.
*/
public ITimerEvent makeTimerEvent(String name);
/**
* Create a bookmark event and register it with the logger.
*
* @param name
* The name of the bookmark event.
* @return The new IBookmarkEvent instance.
*/
public IBookmarkEvent makeBookmarkEvent(String name);
/*
* Create a timer event which can occur in multiple feedlets at the same
* time and register it with the logger.
*
* FIXME: turned off for 1.0.3 release because still not entirely stable
*
* @param name The name of the timer event. @return The new ITimerEvent
* instance.
*/
// public ITimerEvent makePerFeedletTimerEvent(String name);
/**
* Create a value event and register it with the logger.
*
* @param name
* The name of the value event.
* @return The new IValueEvent instance.
*/
public IValueEvent makeValueEvent(String name);
public void addEventType(EventType et);
/**
* Add a string to the string table.
*
* @param value
* The string to add.
*/
public int addString(String value);
/**
* Add a property to the trace file.
*
* @param propertyName
* The name of the property.
* @param value
* The property value.
*/
public void addProperty(String propertyName, String value);
/**
* An Oscilloscope figure is used for viewing Timer events in TuningFork.
* This method allows you to define a group of Timer events that will show
* up in the "Predefined Figures" portion of the TuningFork feed explorer.
*
* @param name
* The name for the figure.
* @param events
* An array of Timer events which will comprise the figure.
*/
public void defineOscilloscopeFigure(String name, ITimerEvent[] events);
/**
* A Pie Chart figure is used for viewing durations of Timer events in
* TuningFork. This method allows you to define a group of Timer events that
* can be opened together as a Histogram from the "Predefined Figures"
* portion of the TuningFork feed explorer.
*
* @param name
* The name for the figure.
* @param events
* An array of Timer events which will comprise the figure.
*/
public void definePieChartFigure(String name, ITimerEvent[] events);
/**
* A Histogram figure is used for viewing durations of Timer events in
* TuningFork. This method allows you to define a group of Timer events that
* can be opened together as a Histogram from the "Predefined Figures"
* portion of the TuningFork feed explorer.
*
* @param name
* The name for the figure.
* @param events
* An array of Timer events which will comprise the figure.
*/
public void defineHistogramFigure(String name, ITimerEvent[] events);
/**
* A TimeSeries figure is used for viewing value events in TuningFork.
* Intervals can also be superimposed. This method allows you to define a
* group of Value and Timer events that will show up in the "Predefined
* Figures" portion of the TuningFork feed explorer.
*
* @param name
* The name for the figure.
* @param values
* An array of Value events which will be shown in the
* figure.
* @param intervals
* An array of Timer events which will be shown in the
* figure.
*/
public void defineTimeSeriesFigure(String name, IValueEvent[] values,
ITimerEvent[] intervals);
/**
* This method can be called on shutdown to ensure that data is flushed to
* the file or socket. Normally, the JVM will automatically activate this on
* regular shutdown because the library installs a shutdown hook.
*/
public void close();
} | [
"public GenericLogger()\r\n\t{\r\n\t\tPackageLoggingController.setLogger(this);\r\n\t}",
"public interface Logger {\n\n /**\n * Logs a message string at the specified severity level.\n * \n * @param level This is the severity level at which the message should be\n * logged.\n * @param msg This is the... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a data graph this function identifies all 'flats' on the graph. For the definition of a flat see the findAllFlatsOfAtLeastLength(int length, BaseGraph graph) function in this class | public static GraphFlatCollection<IGraphFlat> findAllFlats(BaseGraph<AbstractGraphPoint> graph) {
//NB a 'FLAT' must be at least 2 seconds long
GraphFlatCollection<IGraphFlat> result = DTUtil.findAllFlatsOfAtLeastLength(2, graph);
return result;
} | [
"public static GraphFlatCollection<IGraphFlat> findAllFlatsOfAtLeastLength(int length, BaseGraph<AbstractGraphPoint> graph) {\r\n GraphFlatCollection<IGraphFlat> result = new GraphFlatCollection<IGraphFlat>(graph);\r\n if (0 < length && graph != null) {\r\n if (1 < graph.size()) {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method registers the given ComponentSystemEventListener that should be notified when this DeferredFragment is ready to be rendered. | public void addReadyListener(ComponentSystemEventListener listener) {
listeners.add(listener);
} | [
"@Override\n public ComponentSystemEventListener getComponentSystemEventListener() {\n if (compListener == null) {\n compListener = new InsertComponent.PreRenderViewListener(this);\n }\n return compListener;\n }",
"private void notifyViewReady() {\n ViewEvent e = new V... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo responsavel por listar os emprestimos em que o usuario eh o dono do item, em ordem alfabetica pelo nome do item. | public String listarEmprestimosEmprestandoOrdenadosPorNomeItem(Usuario usuario) {
List<Emprestimo> listaEmprestimos = retornaListaEmprestimos(usuario, true);
if (listaEmprestimos.isEmpty())
return "Nenhum item emprestado";
Collections.sort(listaEmprestimos, new OrdenaItemEmprestadoAlfabetico());
String stringEmprestimos = "Emprestimos: ";
for (Emprestimo emprestimo : listaEmprestimos) {
stringEmprestimos += emprestimo.toString() + "|";
}
return stringEmprestimos;
} | [
"public String listarEmprestimosRequerenteOrdenadosPorNomeItem(Usuario usuario) {\n\n\t\tList<Emprestimo> listaEmprestimos = retornaListaEmprestimos(usuario, false);\n\n\t\tif (listaEmprestimos.isEmpty())\n\t\t\treturn \"Nenhum item pego emprestado\";\n\n\t\tCollections.sort(listaEmprestimos, new OrdenaItemEmpresta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts this V1CreateModifierOptionRequest into string format. | @Override
public String toString() {
return "V1CreateModifierOptionRequest [" + "body=" + body + "]";
} | [
"public String toString() {\n return toString(mModifier);\n }",
"@Override\r\n public String toString() {\r\n return \"CatalogModifier [\" + \"name=\" + name + \", priceMoney=\" + priceMoney + \", ordinal=\"\r\n + ordinal + \", modifierListId=\" + modifierListId + \"]\";\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Callback when the continue button is clicked. The scenario and side have now been selected and are set in the game object. | private void continueButton() {
Side side = view.getRadioButtonAllies().isSelected() ? Side.ALLIES : Side.AXIS;
game.setNew();
game.setScenario(scenarioViewModel.getScenario().getValue());
game.setHumanSide(side);
game.setSavedGameName(Resource.DEFAULT_SAVED_GAME);
startGame();
navigate.goNext(this.getClass(), stage);
} | [
"@Override\n public void onContinueDialogYesButtonClick() {\n startNewGame();\n }",
"protected void changeSideClicked(ActionEvent e) {\n blackPlayer = 1 - blackPlayer;\n updateTurnInfo();\n startNewGame();\n }",
"@FXML\n\tpublic void onPressedContinue()\n\t{\n\t\teditButton.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Model__Group__0__Impl" $ANTLR start "rule__Model__Group__1" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3243:1: rule__Model__Group__1 : rule__Model__Group__1__Impl rule__Model__Group__2 ; | public final void rule__Model__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3247:1: ( rule__Model__Group__1__Impl rule__Model__Group__2 )
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3248:2: rule__Model__Group__1__Impl rule__Model__Group__2
{
pushFollow(FOLLOW_rule__Model__Group__1__Impl_in_rule__Model__Group__17074);
rule__Model__Group__1__Impl();
state._fsp--;
if (state.failed) return ;
pushFollow(FOLLOW_rule__Model__Group__2_in_rule__Model__Group__17077);
rule__Model__Group__2();
state._fsp--;
if (state.failed) return ;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__Model__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3218:1: ( rule__Model__Gr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the menu matching the passed in name. | public Menu findMenuByName(String menuName); | [
"public Menu getMenu(String name) {\n\t\treturn getMenu(new StringBinding() {\n\t\t\t@Override\n\t\t\tprotected String computeValue() {\n\t\t\t\treturn name;\n\t\t\t}\n\t\t});\n\t}",
"public MenuItem getMenuItem(String name) {\n return menuItems.stream().filter(i -> i.getName().equalsIgnoreCase(name)).findFirs... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This constructs the frame and its characteristics for the freeze user page | public AdminFreezeUserPage(IUserAccount user, ResourceBundle languageRB) {
this.languageRB = languageRB;
String freezeUserLabelText =languageRB.getString("freezeUserLabelText");
freezeUsers.addAll(tradingSystemGUINavigator.getFlaggedNavigator());
freezeUserPageFrame = new JFrame();
freezeUserPageFrame.setTitle(freezeUserLabelText);
freezeUserPageFrame.setSize(1200,(freezeUsers.size())*20+150);
freezeUserPageFrame.setLocationRelativeTo(null);
freezeUserPageFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
freezeUserPageFrame.setResizable(true);
JPanel content = new JPanel();
freezeUserPageFrame.getContentPane().add(content);
LayoutManager layout = new BoxLayout(content, BoxLayout.Y_AXIS);
Box boxes[] = new Box[3];
boxes[0] = Box.createHorizontalBox();
boxes[1] = Box.createHorizontalBox();
boxes[2] = Box.createHorizontalBox();
boxes[0].createGlue();
boxes[1].createGlue();
boxes[2].createGlue();
content.add(boxes[0]);
content.add(boxes[1]);
content.add(boxes[2]);
JPanel panel = new JPanel();
JPanel panel2 = new JPanel();
JPanel panel3 = new JPanel();
panel.setPreferredSize(new Dimension(1200,50));
panel2.setPreferredSize(new Dimension(1200,(freezeUsers.size())*20));
panel3.setPreferredSize(new Dimension(1200,100));
boxes[0].add(panel);
boxes[1].add(panel2);
boxes[2].add(panel3);
JLabel headerLabel2 = new JLabel(freezeUserLabelText, JLabel.CENTER);
panel.add(headerLabel2);
freezeUserPageOption(user, panel2, panel3);
} | [
"protected void createFrame() {\n MyInternalFrame frame = new MyInternalFrame();\n frame.setVisible(true); //necessary as of 1.3\n desktop.add(frame);\n try {\n frame.setSelected(true);\n } catch (java.beans.PropertyVetoException e) {}\n }",
"public void createFram... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the theDataSourceDT property. | public void setTheDataSourceDT(DataSourceDT aTheDataSourceDT)
{
theDataSourceDT = aTheDataSourceDT;
setItDirty(true);
} | [
"public DataSourceDT getTheDataSourceDT()\n {\n return theDataSourceDT;\n }",
"static public void setDataSource(DataSource source) {\n ds = source;\n }",
"public void setDataSource(DataSource dataSource) {\n this.dataSource = dataSource;\n }",
"public void setDataSource(DataSo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR start "group_by" C:\\Users\\asd\\workspaceBambrikii\\KBParser\\src\\test\\java\\org\\bambrikii\\kbParser\\dql\\grammar\\DqlGrammar.g:35:1: group_by : GROUP_BY ( WS )+ column ( elements_delimiter column ) ; | public final DqlGrammarParser.group_by_return group_by() throws RecognitionException {
DqlGrammarParser.group_by_return retval = new DqlGrammarParser.group_by_return();
retval.start = input.LT(1);
int group_by_StartIndex = input.index();
Object root_0 = null;
Token GROUP_BY27=null;
Token WS28=null;
DqlGrammarParser.column_return column29 = null;
DqlGrammarParser.elements_delimiter_return elements_delimiter30 = null;
DqlGrammarParser.column_return column31 = null;
Object GROUP_BY27_tree=null;
Object WS28_tree=null;
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 6) ) { return retval; }
// C:\\Users\\asd\\workspaceBambrikii\\KBParser\\src\\test\\java\\org\\bambrikii\\kbParser\\dql\\grammar\\DqlGrammar.g:35:10: ( GROUP_BY ( WS )+ column ( elements_delimiter column )* )
// C:\\Users\\asd\\workspaceBambrikii\\KBParser\\src\\test\\java\\org\\bambrikii\\kbParser\\dql\\grammar\\DqlGrammar.g:36:2: GROUP_BY ( WS )+ column ( elements_delimiter column )*
{
root_0 = (Object)adaptor.nil();
GROUP_BY27=(Token)match(input,GROUP_BY,FOLLOW_GROUP_BY_in_group_by204);
GROUP_BY27_tree = (Object)adaptor.create(GROUP_BY27);
adaptor.addChild(root_0, GROUP_BY27_tree);
// C:\\Users\\asd\\workspaceBambrikii\\KBParser\\src\\test\\java\\org\\bambrikii\\kbParser\\dql\\grammar\\DqlGrammar.g:36:13: ( WS )+
int cnt13=0;
loop13:
do {
int alt13=2;
int LA13_0 = input.LA(1);
if ( (LA13_0==WS) ) {
alt13=1;
}
switch (alt13) {
case 1 :
// C:\\Users\\asd\\workspaceBambrikii\\KBParser\\src\\test\\java\\org\\bambrikii\\kbParser\\dql\\grammar\\DqlGrammar.g:36:13: WS
{
WS28=(Token)match(input,WS,FOLLOW_WS_in_group_by206);
}
break;
default :
if ( cnt13 >= 1 ) break loop13;
EarlyExitException eee =
new EarlyExitException(13, input);
throw eee;
}
cnt13++;
} while (true);
pushFollow(FOLLOW_column_in_group_by210);
column29=column();
state._fsp--;
adaptor.addChild(root_0, column29.getTree());
// C:\\Users\\asd\\workspaceBambrikii\\KBParser\\src\\test\\java\\org\\bambrikii\\kbParser\\dql\\grammar\\DqlGrammar.g:36:23: ( elements_delimiter column )*
loop14:
do {
int alt14=2;
int LA14_0 = input.LA(1);
if ( (LA14_0==WS||LA14_0==COMMA) ) {
alt14=1;
}
switch (alt14) {
case 1 :
// C:\\Users\\asd\\workspaceBambrikii\\KBParser\\src\\test\\java\\org\\bambrikii\\kbParser\\dql\\grammar\\DqlGrammar.g:36:25: elements_delimiter column
{
pushFollow(FOLLOW_elements_delimiter_in_group_by214);
elements_delimiter30=elements_delimiter();
state._fsp--;
pushFollow(FOLLOW_column_in_group_by217);
column31=column();
state._fsp--;
adaptor.addChild(root_0, column31.getTree());
}
break;
default :
break loop14;
}
} while (true);
}
retval.stop = input.LT(-1);
retval.tree = (Object)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
}
return retval;
} | [
"public final void groupby() throws RecognitionException {\r\n try {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:213:2: ( GROUP_BY fieldname ( comma fieldname )* )\r\n // D:\\\\entornotr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Refresh the table to reflect its content. | public void refresh() {
getTableViewer().refresh();
} | [
"public void refreshTable() {\n\t\tmyTable.refreshTable();\n\t}",
"private void refreshTable() {\n data = getTableData();\n updateTable();\n }",
"private void refresh() {\r\n\t\tthis.updateFine();\r\n\t\tthis.fillTable();\r\n\t}",
"public void refreshTable() {\n loadInTaskView();\n }",
"pri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unsets the "signalPeriod" attribute | void unsetSignalPeriod(); | [
"void unsetValuePeriod();",
"void unsetPeriod();",
"void setSignalPeriod(double signalPeriod);",
"public void unsetPeriod()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(PERIOD$6, 0);\n }\n }",
"public void unsetPeriod()\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
From the specified side and block metadata retrieves the blocks texture. Args: side, metadata | public int getBlockTextureFromSideAndMetadata(int par1, int par2)
{
par2 &= 3;
return par2 == 1 ? 63 : (par2 == 2 ? 79 : (par2 == 3 ? 30 : super.getBlockTextureFromSideAndMetadata(par1, par2)));
} | [
"public int getBlockTextureFromSideAndMetadata(int par1, int par2)\n {\n if (par2 > 7)\n {\n par2 -= 8;\n }\n\n switch (par2)\n {\n case 1:\n return 210;\n\n case 2:\n return 194;\n\n case 3:\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves this Entity's parent. | public Entity getParent() {
return parent;
} | [
"public E getParentEntity() {\n return parentEntity;\n }",
"public Resource getParent()\n {\n if(parent == null)\n {\n if(parentId != -1)\n {\n try\n {\n parent = new ResourceRef(coral.getStore().getResource(parentId... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds a method using its name and parameter types. | public Method findMethod(final String methodName, final List<Type> parameterTypes) {
GeneratorHelper.checkJavaMethodName("parameter:methodName", methodName);
Checker.notNull("parameter:parameterTypes", parameterTypes);
Method found = null;
final Iterator<Method> methods = this.getMethods().iterator();
while (methods.hasNext()) {
final Method method = methods.next();
if (false == method.getName().equals(methodName)) {
continue;
}
final List<MethodParameter> methodParameters = method.getParameters();
if (methodParameters.size() != parameterTypes.size()) {
continue;
}
found = method;
final Iterator<MethodParameter> methodParametersIterator = methodParameters.iterator();
final Iterator<Type> parameterTypesIterator = parameterTypes.iterator();
while (parameterTypesIterator.hasNext()) {
final Type type = parameterTypesIterator.next();
final MethodParameter parameter = methodParametersIterator.next();
if (false == type.equals(parameter.getType())) {
found = null;
break;
}
}
if (null != found) {
break;
}
}
return found;
} | [
"public MethodInfo findMethodInfo( String name, Signature sig ) ;",
"public static Method findMethod(Class<?> clazz, String name, Class<?>... paramTypes) {\n Class<?> searchType = clazz;\n while (searchType != null) {\n Method[] methods = (searchType.isInterface() ? searchType.getMethods(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves the policy set | public String getPolicySet(); | [
"PolicySet createPolicySet();",
"PoliciesClient getPolicies();",
"public ParameterMap getPolicies() {\n return policyParams;\n }",
"Policy getPolicy();",
"public List<PolicyType> getPoliciesChild() {\n List<PolicyType> policies = new ArrayList<PolicyType>();\n if (policySetOrPolicyOrPoli... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ This method correctly toggles fillBox by considering other relevant properties of the drawing panel. This method takes a boolean argument and toggles the filled property along with other relevant properties. | private void setFillBox(boolean booleanFlag) {
// Toggle fill on.
if (booleanFlag) {
fillBox.setSelected(true);
drawPanel.setIsFilled(true);
lineWidthTextField.setEnabled(false);
dashLengthTextField.setEnabled(false);
dashBox.setEnabled(false);
}
// Toggle fill off.
else {
fillBox.setSelected(false);
drawPanel.setIsFilled(false);
lineWidthTextField.setEnabled(true);
dashLengthTextField.setEnabled(true);
dashBox.setEnabled(true);
}
} | [
"public void toggleFill() {\n\t\tfill = !fill;\n\t}",
"private void fillShape(){\n\t\tif (chkFill.isSelected()) {\r\n\t\t\tellipse.setFill(Color.LIGHTSEAGREEN);\r\n\t\t\trectangle.setFill(Color.DEEPSKYBLUE);\r\n\t\t\tcircle.setFill(Color.DEEPPINK);\r\n\t\t}\r\n\t\t//When checkbox is not selected, make shapes tran... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve a columns' list of database and table | public List<String> getColumns(String database, String table)
throws SQLException; | [
"List<String> getColumns();",
"List<Column> getAllColumns();",
"public List<GenTableColumn> selectDbTableColumnsByName(String tableName);",
"List<Column> getQueryColumns();",
"public List getDbColumns() {\n return _dbColumns;\n }",
"public List<String> getColumnsName();",
"java.util.List<com.google.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the package instance. Because the package instance can only be loaded once, the package proxy should always be used. | public PackageProxy(){
if(packages==null){
try {
packages = Packages.getInstance();
} catch ( UnsupportedOperationException ex) {
LOG.fatal("Could not initialize packages: {}", ex.getMessage(), ex);
}
}
} | [
"Package createPackage();",
"DomainPackage createDomainPackage();",
"public static TinyDP newDeploymentPackage()\n {\n return new TinyDPImpl( new DPBuilder(), null, new Bucket(), StoreFactory.defaultStore() );\n }",
"@Override\n public java.lang.AutoCloseable createInstance() {\n logger... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the time elapsed between the two clocks in seconds. | public static int timeElapsed(Clock firstClock, Clock secondClock) {
int time;
int hoursElapsed;
int minutesElapsed;
int secondsElapsed;
if (firstClock == secondClock){
time =0;
}else{
hoursElapsed= firstClock.hours - secondClock.hours;
minutesElapsed = firstClock.minutes- secondClock.minutes;
secondsElapsed = firstClock.seconds - firstClock.seconds;
time = secondsElapsed + (minutesElapsed*60)+ (hoursElapsed*3600);
}
return time;
} | [
"public long elapsedSeconds(){\n if(isRunning){\n return ((System.currentTimeMillis() - t0) / 1000L);\n }else{\n return ((t1 - t0) / 1000L);\n }\n }",
"public static long timeDiff(Calendar c1, Calendar c2) {\n\t\treturn (c2.getTimeInMillis() - c1.getTimeInMillis()) / ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called by the Spring MVC controller to display the service assembly view page. | @RequestMapping({"/assemblyView.html", "/assemblyView.htm"})
public String viewAssembly(@RequestParam(value = "baseNamespace") String baseNamespace,
@RequestParam(value = "filename") String filename, @RequestParam(value = "version") String version,
HttpSession session, Model model) {
String targetPage = null;
try {
RepositorySecurityManager securityManager = getSecurityManager();
UserPrincipal user = getCurrentUser( session );
RepositoryItem item = getRepositoryManager().getRepositoryItem( baseNamespace, filename, version );
checkItemType( item, RepositoryItemType.ASSEMBLY );
if (securityManager.isReadAuthorized( user, item )) {
FreeTextSearchService searchService = FreeTextSearchServiceFactory.getInstance();
String assemblyIndexId = IndexingUtils.getIdentityKey( item );
AssemblySearchResult assembly = searchService.getAssembly( assemblyIndexId, true );
if (assembly == null) {
throw new RepositoryException( "The requested release cannot be displayed." );
}
List<ReleaseSearchResult> providerReleases =
searchService.getReleases( assembly.getReferencedProviderIds(), true );
List<ReleaseSearchResult> consumerReleases =
searchService.getReleases( assembly.getReferencedConsumerIds(), true );
Collections.sort( providerReleases, (ReleaseSearchResult r1, ReleaseSearchResult r2) -> r1
.getReleaseName().compareTo( r2.getReleaseName() ) );
Collections.sort( consumerReleases, (ReleaseSearchResult r1, ReleaseSearchResult r2) -> r1
.getReleaseName().compareTo( r2.getReleaseName() ) );
model.addAttribute( IMAGE_RESOLVER, new SearchResultImageResolver() );
model.addAttribute( PAGE_UTILS, new PageUtils() );
model.addAttribute( "item", item );
model.addAttribute( "assembly", assembly );
model.addAttribute( "providerReleases", providerReleases );
model.addAttribute( "consumerReleases", consumerReleases );
model.addAttribute( "externalProviders", assembly.getExternalProviders() );
model.addAttribute( "externalConsumers", assembly.getExternalConsumers() );
} else {
setErrorMessage( ASSEMBLY_NOT_AUTHORIZED, model );
targetPage = new SearchController().defaultSearchPage( session, model );
}
} catch (Exception e) {
log.error( "An error occured while displaying the assembly.", e );
setErrorMessage( "An error occured while displaying the assembly (see server log for details).", model );
targetPage = new SearchController().defaultSearchPage( session, model );
}
if (targetPage == null) {
targetPage = applyCommonValues( model, "assemblyView" );
}
return targetPage;
} | [
"@GetMapping(\"/service\")\n\tpublic String showService() {\n\t\treturn \"service\";\n\t}",
"@Override\n public String getAssembly() {\n return assemblyView.getText();\n }",
"public String showPage() {\n\n return SUCCESS;\n }",
"@RequestMapping(\"/companyCalendar\")\n\tpublic String get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value for child leaf "fulldomainname", using a String value. | public void setFullDomainNameValue(String fullDomainNameValue)
throws JNCException {
setFullDomainNameValue(new YangString(fullDomainNameValue));
} | [
"public void setFullDomainNameValue(YangString fullDomainNameValue)\n throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"full-domain-name\",\n fullDomainNameValue,\n childrenNames());\n }",
"public void setFullname(String value) {\n setAttributeInt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the arguments (parameters) for the BackendListenerClient to be executed with. | public void setArguments(Arguments args) {
// Bug 59173 - don't save new default argument
args.removeArgument(GraphiteBackendListenerClient.USE_REGEXP_FOR_SAMPLERS_LIST,
GraphiteBackendListenerClient.USE_REGEXP_FOR_SAMPLERS_LIST_DEFAULT);
setProperty(new TestElementProperty(ARGUMENTS, args));
} | [
"public void setArgs(String args) {\n this.additionalArgs = args;\n }",
"void setBindArguments(String[] bindArgs);",
"void setArguments(String arguments);",
"public void setArguments(List<CommandLineBinding> arguments) {\n this.arguments = arguments;\n }",
"protected void setAllowedArg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A Simple Payment Setup Protocol service delivers queries and payment setup messages to receivers. | public interface SpspService {
/**
* The sender (this service) queries the receiver endpoint to get information about the type of
* payment that can be made to this receiver:
*
* @param endpoint
* The address of the receiver endpoint
* @return
* Information about the receiver
*/
Receiver query(URI endpoint);
/**
* The sender submits payment information to the receiver to set up a payment.
*
* @param endpoint
* The address of the receiver endpoint
* @param amount
* The amount. Only relevant to payee receivers, not invoices
* @param senderIdentifier
* Identifies the sender
* @param memo
* A message for the recipient linked to the payment. Only relevant to payee receivers, not
* invoices.
* @return
*/
PaymentRequest setupPayment(URI endpoint, String amount, String senderIdentifier, String memo);
} | [
"public void send_setup()\n {\n out.println(\"chain_setup\");\n }",
"public ACQIPPSETUPSetup()\n\t{\n\t\tinitComponents();\n\t}",
"void makePayment(Order order, TourPackage tourPackageOrder, User currentUser, StatusOrder statusOrder) throws ServiceException;",
"public void do_payment() {\r\n\t\tt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Count the number of sites in the persistent store. | public long countSites() {
return siteOids.size();
} | [
"int getStoreCount();",
"public int numberOfOpenSites() {\r\n\r\n\t\treturn count;\r\n\t}",
"public int numberOfOpenSites() {\n return count;\n }",
"public int openSites() {\n return count;\n }",
"public int numberOfOpenSites() {\n \treturn num;\r\n }",
"int getDomainsCount();",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column CTSCARDS_MGT_HST.MAILING_PO_BOX | public void setMAILING_PO_BOX(String MAILING_PO_BOX) {
this.MAILING_PO_BOX = MAILING_PO_BOX == null ? null : MAILING_PO_BOX.trim();
} | [
"public void setPO_BOX(String PO_BOX)\r\n {\r\n\tthis.PO_BOX = PO_BOX == null ? null : PO_BOX.trim();\r\n }",
"public void setPO_BOX(String PO_BOX) {\r\n this.PO_BOX = PO_BOX == null ? null : PO_BOX.trim();\r\n }",
"public String getMAILING_PO_BOX() {\r\n return MAILING_PO_BOX;\r\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ name of port list | public static String[] commonPortsListNames(){
String[] portNames = {
"File Transfer Protocol (FTP) Data Transfer"
,"File Transfer Protocol (FTP) Command Control"
,"Secure Shell (SSH) Secure Login"
,"Telnet remote login service, unencrypted text messages"
,"Simple Mail Transfer Protocol (SMTP) E-mail routing"
,"Domain Name System (DNS) service"
,"Hypertext Transfer Protocol (HTTP) used in World Wide Web"
,"Protocol standard for a NetBIOS service on a TCP/UDP transport: Concepts and methods"
,"HTTP Secure (HTTPS) HTTP over TLS/SSL"
,"MS Networking access"
,"Microsoft SQL Server database management system (MSSQL) server"
,"Microsoft SQL Server database management system (MSSQL) monitor"
,"MySQL database system"
,"Microsoft Terminal Server (RDP) officially registered as Windows Based Terminal (WBT)"
," Alternative port for HTTP"};
return portNames;
} | [
"java.lang.String getNamedPort();",
"private void listPorts() {\n\t\tint i = 1;\n\t\tfor (Portfolio port : getContext().getUserPorts())\n\t\t\tSystem.out.println(i++ + \": \" + port.getName());\n\t\tSystem.out.print(\"Select a portfolio to view by their number (integer): \");\n\t}",
"public ArrayList<Port> getP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an instance of UiNodeTextAttributes given an JSON string | public static UiNodeTextAttributes fromJson(String jsonString) throws IOException {
return JSON.getGson().fromJson(jsonString, UiNodeTextAttributes.class);
} | [
"public static Attr fromJson(String s) {\n try {\n return YAML_OBJECT_MAPPER.readValue(s, Attr.class);\n } catch (JsonProcessingException e) {\n throw new IllegalArgumentException(\"Failed to create attribute from JSON\", e);\n }\n }",
"boolean supportsTextAttributes();",
"public abstract NS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return a list of OperatorApplication | public List<OperatorApplication> processOperatorApplication(OperatorApplication opApp) {
List<OperatorApplication> basicOpApps = new ArrayList<OperatorApplication>();
if (opApp.getOpType().name().equals("BASIC")) {
basicOpApps.add(opApp);
logger.info("Type:" + opApp.getOpType().name());
logger.info("Operator Execution Name: " + opApp.getAnnOperatorName());
logger.info("id:" + opApp.getOperatorID());
logger.info("name:" + opApp.getOperatorName());
logger.info("Type name " + opApp.getOperatorTypeName());
for (SimpleParameter sparams : opApp.getSimpleParameters()) {
logger.info("simple:" + sparams.getDataPropertyID());
logger.info("simple:" + sparams.getDataPropertyName());
logger.info("simple:" + sparams.getDataType());
logger.info("simple:" + sparams.getValue());
}
for (Parameter params : opApp.getParameters()) {
logger.info("Param" + params.getInstClassID());
logger.info("Param" + params.getInstID());
logger.info("Param" + params.getInstName());
logger.info("Param" + params.getInstTypeName());
logger.info("Param" + params.getRoleID());
logger.info("Param" + params.getRoleName());
}
for (IOObjectDescription desc: opApp.getProducedObject()) {
logger.info("Produces id: " + desc.getIOObjectID());
logger.info("Produces type id: " + desc.getIOObjectTypeID());
logger.info("Produces name: " + desc.getIOObjectName());
logger.info("Produces location: " + desc.getIOOLocation());
logger.info("Produces type: " + desc.getIOObjectType());
logger.info("Produces role: " + desc.getRoleName());
logger.info("Produces RM: " + desc.getRMRoleName());
}
for (IOObjectDescription desc: opApp.getUsedObject()) {
logger.info("Uses id: " + desc.getIOObjectID());
logger.info("Uses type id: " + desc.getIOObjectTypeID());
logger.info("Uses name: " + desc.getIOObjectName());
logger.info("Uses location: " + desc.getIOOLocation());
logger.info("Uses type: " + desc.getIOObjectType());
logger.info("Uses role: " + desc.getRoleName());
logger.info("User RM: " + desc.getRMRoleName());
}
}
else {
for (OperatorApplication steps : opApp.getSteps()) {
basicOpApps.addAll(processOperatorApplication(steps));
}
}
return basicOpApps;
} | [
"public List<Application> getApplications();",
"public ArrayList<Application> getApplications() { // it will come back and call this to get the applications\n return applications;\n }",
"java.util.List<com.google.cloud.talent.v4beta1.Application> getApplicationsList();",
"List<MobileApplication> get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
PUT /customerComplaintss > Updates an existing customerComplaints. | @RequestMapping(value = "/customerComplaintss", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_VALUE)
@Timed
@Transactional
public ResponseEntity<CustomerComplaints> updateCustomerComplaints(HttpServletRequest request,
@RequestBody CustomerComplaints customerComplaints) throws URISyntaxException, Exception {
log.debug("REST request to update CustomerComplaints : {}", customerComplaints);
if (customerComplaints.getId() == null) {
return createCustomerComplaints(request, customerComplaints);
}
CustomerComplaints customerComplaints1 = customerComplaintsRepository.findOne(customerComplaints.getId());
customerComplaints1.setStatus(customerComplaints1.getStatus() + 1);
customerComplaints1.setAdjustmentAmt(customerComplaints.getAdjustmentAmt());
customerComplaints1.setAdjustmentBillId(customerComplaints.getAdjustmentBillId());
CustomerComplaints result = customerComplaintsRepository.save(customerComplaints1);
approveApplication(customerComplaints.getId(), customerComplaints.getRemarks());
if (CPSConstants.UPDATE.equals(workflowService.getMessage()) && customerComplaints.getComplaintTypeMaster().getId() ==1) {
CustDetails custDetails = custDetailsRepository.findByCanForUpdate(customerComplaints.getCan());
Adjustments adjustments = new Adjustments();
TransactionTypeMaster ttm = null;
BigDecimal amount = new BigDecimal(customerComplaints.getAdjustmentAmt().toString());
adjustments.setBillFullDetails(null);
adjustments.setCan(customerComplaints.getCan());
adjustments.setRemarks(customerComplaints.getRemarks());
adjustments.setTxnTime(ZonedDateTime.now());
adjustments.setStatus(TxnStatus.INITIATED);
adjustments.setCustDetails(custDetails);
adjustments.setAmount(amount.abs());
/*Float amt = customerComplaints.getAdjustmentAmt(); //commented by mohib after changing float to bigdecimal
if (amt < 0) { //Debit
ttm = transactionTypeMasterRepository.findOne(2L);
} else if (amt > 0) { //Credit
ttm = transactionTypeMasterRepository.findOne(1L);
}*/
BigDecimal amt = customerComplaints.getAdjustmentAmt();
int res = amt.compareTo(new BigDecimal("0"));
if (res == -1) { //Debit
ttm = transactionTypeMasterRepository.findOne(2L);
} else if (res == 1) { //Credit
ttm = transactionTypeMasterRepository.findOne(1L);
}
adjustments.setTransactionTypeMaster(ttm);
adjustments.setCustomerComplaints(customerComplaints);
adjustmentsRepository.save(adjustments);
}
return ResponseEntity.ok()
.headers(
HeaderUtil.createEntityUpdateAlert("customerComplaints", customerComplaints.getId().toString()))
.body(result);
} | [
"@RequestMapping(value = \"/customerComplaintss\", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)\n\t@Timed\n\tpublic ResponseEntity<CustomerComplaints> createCustomerComplaints(HttpServletRequest request,\n\t\t\t@RequestBody CustomerComplaints customerComplaints) throws URISyntaxExceptio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test for addMove() method. | @Test
public void addMoveTest() {
assertEquals(0, builder.build().getAnimations().size());
this.builder.addMove("O", 5, 5, 12, 12, 11, 15);
assertEquals(1, builder.build().getAnimations().size());
} | [
"@Test\n public void testAddMove() {\n turn.getHarbourDisplay().add(personCard);\n turn.addMove(player1, personCard);\n int indexLastMove = turn.getMoves().size()-1;\n Assert.assertEquals(turn.getMoves().get(indexLastMove).getPlayer(), player1);\n Assert.assertEquals(turn.getMo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clean up application registration by ID | public HttpResponse cleanUpApplicationRegistrationByApplicationId(int applicationId, String applicationName)
throws APIManagerIntegrationTestException {
try {
checkAuthentication();
String requestData =
"action=cleanUpApplicationRegistrationByApplicationId&appId=" + applicationId + "&applicationName="
+ applicationName + "&keyType=PRODUCTION";
return HTTPSClientUtils.doPost(new URL(
backendURL + "store-old/site/blocks/subscription/subscription-add/ajax/subscription-add.jag?"
+ requestData), "", requestHeaders);
} catch (Exception e) {
throw new APIManagerIntegrationTestException("Unable to cleanup application - "
+ applicationName + ". Error: " + e.getMessage(), e);
}
} | [
"public void clearApplicationID() {\n genClient.clear(CacheKey.applicationID);\n }",
"public void remApplicationId(ApplicationId applicationId);",
"public boolean removeUserApplication(int id);",
"public void deleteRegistration(UUID id);",
"public void deleteApplication(int theId);",
"public void dele... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Retorna Todos Los usuarios Que PErtenecen al ROL dado. OJO: Es lo mimso que el de arriba, pero se llenana mas datos del DTO y en el RolID se setea el id del ROL. | public ArrayList usuariosByRol(Long idRol, String tipoHab); | [
"public List<RolModel> listarRolUsuario();",
"private void recuperarUsuarios() {\r\n\t\tusuarios = Factories.persistence.createUsuarioDao()\r\n\t\t\t\t.getUsuariosInactiveFirst();\r\n\t\tLog.debug(\"Obtenida lista de usuarios conteniendo [%d] usuarios\", \r\n\t\t\t\tusuarios.size());\r\n\t}",
"public ArrayList<... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bool call_method_supported = 10; | @java.lang.Override
public boolean getCallMethodSupported() {
return callMethodSupported_;
} | [
"boolean getCallMethodSupported();",
"@java.lang.Override\n public boolean getCallMethodSupported() {\n return callMethodSupported_;\n }",
"public Builder setCallMethodSupported(boolean value) {\n \n callMethodSupported_ = value;\n onChanged();\n return this;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create an alert dialog to warn the user before deleting any record | private void showDeleteConfirmationDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(R.string.delete_book_warning);
builder.setPositiveButton(R.string.delete_button, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
deletebook();
}
});
builder.setNegativeButton(R.string.cancel_button, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
if (dialogInterface != null) {
dialogInterface.dismiss();
}
}
});
//show alert dialog upon deletion
AlertDialog alertDialog = builder.create();
alertDialog.show();
} | [
"protected void getRecordDeletionConfirmation()\r\n {\r\n dialogBuilder.setTitle(R.string.view_person_delete_confirm_dialog_title);\r\n dialogBuilder.setMessage(R.string.view_person_delete_confirm_dialog_message);\r\n\r\n dialogBuilder.setPositiveButton(\r\n R.string.view_pers... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Click Edit Outlet in Summary page | public void clickEditOutlet() {
wait.until(ExpectedConditions.visibilityOfElementLocated(btn_expand));
scrollIntoView(driver.findElement(btn_expand));
wait.until(ExpectedConditions.elementToBeClickable(driver.findElement(btn_expand))).click();
wait.until(ExpectedConditions.visibilityOfElementLocated(btn_edit_outlet)).click();
System.out.println("Navigated to Edit outlet page");
} | [
"public void clickEdit() {\r\n\t\tEdit.click();\r\n\t}",
"public void clickEdit(){\n\t\tdriver.findElement(edit).click();\n\t}",
"public void clickEditLink() {\r\n\t\tbtn_EditLink.click();\r\n\t}",
"public void clickEditButton(){\r\n\t\t\r\n\t\tMcsElement.getElementByXpath(driver, \"//div[contains(@class,'x-t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.proto.Game game = 4; | proto.Game getGame(); | [
"proto.GameOrBuilder getGameOrBuilder();",
"com.protobuftest.protobuf.GameProbuf.Game.Result getResult();",
"GameMessage.ServerRequest.GameType getGame();",
"com.protobuftest.protobuf.GameProbuf.Game.ResultOrBuilder getResultOrBuilder();",
"com.protobuftest.protobuf.GameProbuf.Game.MsgType getType();",
"c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Chord__Group__3__Impl" $ANTLR start "rule__Chord__Group__4" ../ufscar.Compiladores2.ui/srcgen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2963:1: rule__Chord__Group__4 : rule__Chord__Group__4__Impl ; | public final void rule__Chord__Group__4() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2967:1: ( rule__Chord__Group__4__Impl )
// ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2968:2: rule__Chord__Group__4__Impl
{
pushFollow(FOLLOW_rule__Chord__Group__4__Impl_in_rule__Chord__Group__46018);
rule__Chord__Group__4__Impl();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__Chord__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2936:1: ( rule__Chord__Group__3__Impl rule__Cho... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Populate the action table of the specified state. | private void buildActionTable( Grammar grammar, State state, List<Action> tshifts, List<Action> ntshifts)
{
Collections.sort( tshifts);
createSymbolTable( grammar, state, tshifts, ntshifts);
state.gotos = new State[ grammar.rules().size()];
log.debugf( "\nState: %d -----------------------\n%s", state.index, itemSet( state));
for( int i=0; i<tshifts.size(); i++)
{
Action action = tshifts.get( i);
if ( action.omit) continue;
switch( action.type)
{
case tshift: state.stackOps[ i].next = action.itemSet.state; break;
case reduce: state.stackOps[ i].reduce = action.item.rule; break;
case accept: state.stackOps[ i].next = null; break;
}
state.stackOps[ i].next = (action.itemSet != null)? action.itemSet.state: null;
log.debugf( " %s", action);
}
for( int i=0; i<ntshifts.size(); i++)
{
Action action = ntshifts.get( i);
if ( action.omit) continue;
state.gotos[ action.symbols[ 0]] = action.itemSet.state;
log.debugf( " %s", action);
}
resolveConflicts( grammar, state, tshifts, ntshifts);
} | [
"private static void populateStateTable() {\n /*\n * These are the items we'll be using while populating the state transition table.\n */\n TRANSITION_ITEMS.clear();\n TRANSITION_ITEMS.add(Pair.of(\"${1}\", new String[] {\"unlocked\", \"locked\"}));\n TRANSITION_ITEMS.add... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ isVector Return true if this is a vector value type. | public boolean isVector() {
return isSimple() ? V.isVector() : isExtendedVector();
} | [
"public boolean isVector() {\n return mat.getNumRows() == 1 || mat.getNumCols() == 1;\n }",
"public boolean is64BitVector() {\n\t\tif (!isSimple())\n\t\t\treturn isExtended64BitVector();\n\n\t\tSimpleValueType svt = V.getSimpleType();\n\n\t\treturn (svt == SimpleValueType.v8i8 || svt == SimpleValueType... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Failure test for private method initialize(). Failure cause: The attributes for document content manager is invalid, ContestManagementException is expected. | public void test_Initialize_Failure12_SocketDocumentContentManager_attr_miss()
throws Exception {
context.addEntry("unitName", "contestManager");
context.addEntry("activeContestStatusId", new Long(1));
context.addEntry("defaultDocumentPathId", new Long(1));
context.addEntry("documentContentManagerClassName",
"com.topcoder.service.studio.contest.documentcontentmanagers.SocketDocumentContentManager");
context.addEntry("documentContentManagerAttributeKeys",
"serverAddress,serverPort");
// context.addEntry("serverAddress", "127.0.0.1");
context.addEntry("serverPort", new Integer(40000));
Method method = beanUnderTest.getClass()
.getDeclaredMethod("initialize",
new Class[0]);
method.setAccessible(true);
try {
method.invoke(beanUnderTest, new Object[0]);
fail("ContestManagementException is expected.");
} catch (InvocationTargetException e) {
// success
}
} | [
"public void test_Initialize_Failure9_miss_documentManagerClassName()\r\n throws Exception {\r\n context.addEntry(\"unitName\", \"contestManager\");\r\n context.addEntry(\"activeContestStatusId\", new Long(1));\r\n context.addEntry(\"defaultDocumentPathId\", new Long(1));\r\n cont... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Callback to allow the application to handle an exception in the main run() loop. | public void handleException(Exception e); | [
"@Override\r\n\tpublic void eventLoopException(Throwable exception) {\n\t\t\r\n\t\tMessageDialog.openWarning(shell, \"unexpected\", \"caughtunhandled\");\r\n\t}",
"public void handleException();",
"protected void handleException(Exception err)\n\t{\n\t\tif (killed)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\terr.printSta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Stores the passed record complying with the historyRecordStructure. | void addRecord(HistoryRecord record) throws IOException; | [
"void addRecord(HistoryRec record);",
"private void guardaRecord() {\n // Guardamos el record\n SharedPreferences datos = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor miEditor = datos.edit();\n miEditor.putInt(\"RECORD\", record);\n miEditor.ap... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Displays an httpauthentication dialog. | void showHttpAuthentication(final HttpAuthHandler handler, String host, String realm) {
mHttpAuthenticationDialog = new HttpAuthenticationDialog(WebViewActivity.this, host, realm);
mHttpAuthenticationDialog.setOkListener(new HttpAuthenticationDialog.OkListener() {
public void onOk(String host, String realm, String username, String password) {
setHttpAuthUsernamePassword(host, realm, username, password);
handler.proceed(username, password);
mHttpAuthenticationDialog = null;
}
});
mHttpAuthenticationDialog.setCancelListener(new HttpAuthenticationDialog.CancelListener() {
public void onCancel() {
handler.cancel();
mHttpAuthenticationDialog = null;
}
});
mHttpAuthenticationDialog.show();
} | [
"public static void authenticate() {\n\n Stage window = new Stage();\n\n final String url = OAUTH_URL + getQuery();\n\n BorderPane borderPane = new BorderPane();\n WebView browser = new WebView();\n WebEngine webEngine = browser.getEngine();\n\n webEngine.load(url);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SEARCH /_search/contactDetailss/:query > search for the contactDetails corresponding to the query. | @RequestMapping(value = "/_search/contactDetailss/{query}",
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
@Timed
public List<ContactDetails> searchContactDetailss(@PathVariable String query) {
return StreamSupport
.stream(contactDetailsSearchRepository.search(queryString(query)).spliterator(), false)
.collect(Collectors.toList());
} | [
"List<ShipmentInfoPODDTO> search(String query);",
"private void searchContacts(String query) {\n\t\tcontacts_name.clear();\n\t\tcontacts_id.clear();\n\t\tCursor c = db.searchContacts(query);\n\t\tif (c.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tcontacts_name.add(c.getString(1));\n\t\t\t\tcontacts_id.add(c.getInt(0));\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all the talks according to the date | public List<Talk> GetTalksbyDate(String date)
{
SQLiteHelper dbHelper = new SQLiteHelper(getActivity());
SQLiteDatabase db = dbHelper.getReadableDatabase();
//create the format of our date, in this case it will be like this : 08/06/2016 18:00:00
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss");
Room room;
Date startDate = new Date();
Date endDate = new Date();
List<Talk> talks = new ArrayList<Talk>();
String [] projection = {
SQLModel.TalksEntry.KEY_ID,
SQLModel.TalksEntry.KEY_TITLE,
SQLModel.TalksEntry.KEY_DESCRIPTION,
SQLModel.TalksEntry.KEY_STARTDATE,
SQLModel.TalksEntry.KEY_ENDDATE,
SQLModel.TalksEntry.KEY_IDROOM,
SQLModel.TalksEntry.KEY_KEYWORDS,
SQLModel.TalksEntry.KEY_TIMESTAMP
};
//We want to find all the talks according to the date
Cursor c = db.query(false, SQLModel.TalksEntry.Table_Talks, projection, "StartDate LIKE '%"+date+"%'", null, null, null, "StartDate ASC",null);
c.moveToFirst();
//for each talk that we found, we put the talk in the array
while(!c.isAfterLast()){
try {
//convert the startDate and the endDate that in format String to the format Date according to our SimpleDateFormat
startDate = sdf.parse(c.getString(3));
endDate = sdf.parse(c.getString(4));
} catch (ParseException e) {
//Handle exception here, most of the time you will just log it.
e.printStackTrace();
}
//get the room of the talk
room = searchRoombyId(Integer.parseInt(c.getString(5)));
Talk talk = new Talk((Integer.parseInt(c.getString(0))),c.getString(1),c.getString(2),startDate,endDate,room,c.getString(6));
talks.add(talk);
c.moveToNext();
}
db.close();
return talks;
} | [
"public List<Meeting> getMeetingsMatchDate(Date date) {\n List<Meeting> currentMeetings = new ArrayList<>();\n for (int i = 0; i < mMeetings.size(); i++) {\n Meeting meeting = mMeetings.get(i);\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yyyy\", Locale.FRANCE);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Split up and find the seats based on availability in each row | private synchronized String[] splitAndReserveSeats(int numSeats) {
String[] seatNumbers = new String[numSeats];
int itr = 0;
for(int i=rows-1;i>=0&&numSeats>0;i--){
for(int j=0;j<columns&&numSeats>0;j++){
if(!seatArray[i][j]){
numSeats--;
seatArray[i][j] = true;
rowAvailability[i]--;
seatNumbers[itr++] = (char)(i+65)+String.valueOf(j+1);
}
}
}
if(itr!=seatNumbers.length) return null;
return seatNumbers;
} | [
"private AvailableSeats getSpecifiedSeatsFromAvailableSeats(ArrayList<Seat> availableSeats, int numSeats, int seatNumber, String rowName) {\r\n int length = availableSeats.size();\r\n int current=0,left=0,right=0;\r\n for(current=0;current<length;current++){\r\n if(availableSeats.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
interaction with backdrop // | @Test
public void testClickOnBackdrop() {
var prompt = openPrompt();
prompt.getBackdrop().click();
assertNoDisplayedModalDialog();
assertPromptInputNotApplied();
} | [
"public void cycleBackdrop() {\n \t\tRandom rand = new Random();\n \t\tint randBackdrop = rand.nextInt(backdrops.size());\n \t\tbackdrop = backdrops.get(randBackdrop);\n \t}",
"void onDropped();",
"void onDismissByBgPressed();",
"@Override\n public final void downloadBackdrop(Context context) {\n su... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads shots in the format (x.x, y.y) | public void read_shots(String path) {
String script[];
try (BufferedReader br = new BufferedReader(new FileReader(path))) {
String sCurrentLine;
while ((sCurrentLine = br.readLine()) != null) {
int xx= sCurrentLine.indexOf(",");
double x,y;
x=Double.valueOf(sCurrentLine.substring(1, xx));
y=Double.valueOf(sCurrentLine.substring(xx+1, sCurrentLine.length()));
take_shot(new Vector2d(x,y));
}
} catch (Exception e) {
System.out.println("File not found or error while reading the file.");
}
} | [
"public DartShot[] getShots(int rot) {\n\t\t// Set up sources\n\t\tdouble[] fromLeft = {10.5, 8.5};\n\t\tdouble[] fromRight = {2.5, 8.5};\n\t\tdouble[] fromC = {2.5, 5.5};\n\t\tdouble[] from50 = {6.6, 8.5};\n\t\tdouble[] from30 = {8.5, 8.5};\n\t\tdouble[] from60 = {5.5, 8.5};\n\t\tdouble[] fromPipe = {7.0, 5.75};\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Feature: familyRec getter for familyRec gets | public FSArray getFamilyRec() {
if (GEDCOMType_Type.featOkTst && ((GEDCOMType_Type)jcasType).casFeat_familyRec == null)
jcasType.jcas.throwFeatMissing("familyRec", "net.myerichsen.gedcom.GEDCOMType");
return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((GEDCOMType_Type)jcasType).casFeatCode_familyRec)));} | [
"String getFamily();",
"public FamilyInfo[] getFamilyInfo() {\n return familyInfo;\n }",
"public SubFamily getSubFamily() {\r\n return pic_.getSubFamily();\r\n }",
"public String getFamilyPerson(String familyId);",
"public Person[] getFamilyList() {\r\n\t\treturn fam.getFamilyList();\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates diagnosis data with everything (more or less steps and all timepoints) | private void diagnosticData2() throws IOException {
System.out.println("Diagnostic data2");
// remove("ALSFRS_Data.csv", steps+"_ALSFRS_DATA.csv",path, steps);
// remove("SVC_Data.csv", steps+"_SVC_DATA.csv",path, steps);
// remove("Vitals_Data.csv", steps+"_Vitals_DATA.csv",path, steps);
String alsfrs = path+ "ALSFRS_Data.csv";
String svc = path + "SVC_Data.csv";
String Demo = path + "Demo_Data.csv";
String Vitals = path + "Vitals_Data.csv";
BufferedReader inALS = new BufferedReader(new FileReader(alsfrs));
BufferedReader inDemo = new BufferedReader(new FileReader(Demo));
BufferedReader inVitals = new BufferedReader(new FileReader(Vitals));
BufferedReader inSVC = new BufferedReader(new FileReader(svc));
BufferedWriter outTrain = new BufferedWriter(new FileWriter(diagnosisOutput+"DiagnoseData.csv"));
String line1,line2,line3,line4;
line1 = inSVC.readLine();
line2 = inALS.readLine();
line4 = inDemo.readLine();
line3 = inVitals.readLine();
String[] splitHeight = line3.split(",",-1);
String[] split4 = line4.split(",",-1);
String patient = split4[0].replace(' ', '_')+",";
patient += split4[4].replace(' ', '_') + "," + split4[11].replace(' ', '_') + ","+ splitHeight[4].replace(' ', '_') + ",";
String[] split = line1.split(",",-1);
patient += split[2].replace(' ', '_').replace('%', 'P') + "," + split[5].replace(' ', '_')+ "," +
split[6].replace(' ', '_') + "," + split[7].replace(' ', '_')+ ",";
String[] split3 = line3.split(",",-1);
patient += split3[2].replace(' ', '_') + "," + split3[3].replace(' ', '_')+ "," + split3[6].replace(' ', '_')+ ","
+ split3[7].replace(' ', '_')+ "," + split3[8].replace(' ', '_') + "," + split3[9].replace(' ', '_') + ",";
String[] split2 = line2.split(",",-1);
patient += split2[15].replace(' ', '_');
outTrain.write(patient+'\n');
int last = 0;
ArrayList<String> lines1 = new ArrayList<String>();
while ((line1 = inSVC.readLine()) != null) {
String[] splited = line1.split(",",-1);
if(last == 0){
last = Integer.parseInt(splited[0]);
lines1.add(line1);
continue;
}
if(last == Integer.parseInt(splited[0])){
lines1.add(line1);
}else{
ArrayList<String> lines2 = new ArrayList<String>();
while ((line2 = inALS.readLine()) != null) {
String[] splitedALS = line2.split(",",-1);
if(last == Integer.parseInt(splitedALS[0])){
lines2.add(line2);
}else{
if(lines2.size() > 0){
ArrayList<String> lines3 = new ArrayList<String>();
while ((line3 = inVitals.readLine()) != null) {
String[] splitedVitals = line3.split(",",-1);
if(last == Integer.parseInt(splitedVitals[0])){
lines3.add(line3);
}else{
if(lines3.size() > 0){
ArrayList<String> lines4 = new ArrayList<String>();
while ((line4 = inDemo.readLine()) != null) {
String[] splitedDemo = line4.split(",",-1);
if(last == Integer.parseInt(splitedDemo[0])){
lines4.add(line4);
}else{
if(lines4.size() > 0){
if(last == 168510){
@SuppressWarnings("unused")
int j = 0;
}
splitHeight = lines3.get(0).split(",",-1);
split4 = lines4.get((lines4.size()-1)).split(",",-1);
patient = last+ ",";
patient += split4[4] + "," + split4[11] + ","+ splitHeight[4] + ",";
int len = Math.min(lines1.size(), lines2.size());
len = Math.min(len, lines3.size());
for(int i=0 ; i < len; i++){
splitHeight = lines3.get(0).split(",",-1);
split4 = lines4.get((lines4.size()-1)).split(",",-1);
patient = last+ ",";
patient += split4[4] + "," + split4[11] + ","+ splitHeight[4] + ",";
split = lines1.get(((lines1.size()-len)+i)).split(",",-1);
patient += normalize(3,split[2]) + "," + normalize(4,split[5]) + "," + normalize(5,split[6])
+ "," + normalize(6,split[7])+",";
split3 = lines3.get(((lines3.size()-len)+i)).split(",",-1);
patient += normalize(7,split3[2]) + "," + normalize(8,split3[3]) + "," + normalize(9,split3[6]) + ","
+ normalize(10,split3[7]) + "," + normalize(11,split3[8]) + "," + normalize(12,split3[9]) + ",";
split2 = lines2.get(((lines2.size()-len)+i)).split(",",-1);
String discret = discretize(13,split2[15]);
patient += discret;
outTrain.write(patient+'\n');
}
lines1 = new ArrayList<String>();
lines2 = new ArrayList<String>();
lines3 = new ArrayList<String>();
lines4 = new ArrayList<String>();
inDemo.close();
break;
}
}
}
inDemo = new BufferedReader(new FileReader(Demo));
inDemo.readLine();
inVitals.close();
break;
}
}
}
inVitals = new BufferedReader(new FileReader(Vitals));
inVitals.readLine();
inALS.close();
break;
}
}
}
inALS = new BufferedReader(new FileReader(alsfrs));
inALS.readLine();
last = Integer.parseInt(splited[0]);
lines1.add(line1);
}
}
inALS.close();
inSVC.close();
inDemo.close();
inVitals.close();
outTrain.close();
CSV2arff(diagnosisOutput,"DiagnoseData");
} | [
"private void diagnosticData() throws IOException {\n\t\tSystem.out.println(\"Diagnostic data\");\n\t\tremove(\"ALSFRS_Data.csv\", steps+\"_ALSFRS_DATA.csv\",path, steps);\n\t\tremove(\"SVC_Data.csv\", steps+\"_SVC_DATA.csv\",path, steps);\n\t\tremove(\"Vitals_Data.csv\", steps+\"_Vitals_DATA.csv\",path, steps);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
greedy approximation set cover algorithm: finds the minimum number of zip codes needed to cover all store IDs | private static List<String> approximateZipCodes(List<String> allZipCodes, HashMap<String, List<String>> allZipCodeLocations) {
List<String> remainingZipCodes = new ArrayList<>(allZipCodes);
List<String> optimalZipCodes = new ArrayList<>();
Set<String> uncoveredIds = new HashSet<>(allIds);
while(!uncoveredIds.isEmpty()) {
//greedy algorithm, find the highest ids covered in the zip code set
int maxIdsCovered = 0;
Set<String> maxSetIdsCovered = null;
String maxZipCode = null;
for(String zipCode : remainingZipCodes) {
int idsCovered = 0;
Set<String> setIdsCovered = new HashSet<>();
for(String id : allZipCodeLocations.get(zipCode)) {
if(uncoveredIds.contains(id)) {
setIdsCovered.add(id);
idsCovered++;
}
}
if(idsCovered > maxIdsCovered) {
maxZipCode = zipCode;
maxIdsCovered = idsCovered;
maxSetIdsCovered = setIdsCovered;
}
}
//add zip code to set
uncoveredIds.removeAll(maxSetIdsCovered);
optimalZipCodes.add(maxZipCode);
}
return optimalZipCodes;
} | [
"private static void feasible(int[] candidate, int[][] state, double[] cost, int[] coverCount, Integer[] sortedEle, Integer[] sortedSet)\n\t{\n\t\tint numSet = state.length;\n\t\tint numEle = state[0].length;\n\t\t\n\t\tfor(int i = 0; i < sortedEle.length; i++)\n\t\t{\n\t\t\tint indEle = sortedEle[i];\n\t\t\tif(cov... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the Name first part. It fires the change event to notify the corresponding feature for the change. | public void setNameFirstpart(String nameFirstpart) {
String oldValue = this.nameFirstpart;
this.nameFirstpart = nameFirstpart;
propertySupport.firePropertyChange(NAME_FIRST_PART_PROPERTY, oldValue, nameFirstpart);
} | [
"private void respondToNameChange () {\n String text = nameField.getText();\n mainCondition.setName(text);\n }",
"public void setName()\n {\n validStaffName = textFields[1].getText();\n callback.tell(validStaffName, 5);\n \n \n }",
"public void setFirstNm(String aFirstNm... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes a new instance of the UploadMetadata class for use with unit testing. | protected UploadMetadata() {
this.encodingName = StandardCharsets.UTF_8.name();
} | [
"public UploadManager() {\n }",
"public Metadata() {}",
"public Metadata() {\n }",
"public UploadFileTest() {\r\n }",
"public FileMetadata() {\n this(DEFAULT_NAME);\n }",
"public MinimalMetadata() {\n }",
"public UploadMetadata(String metadataFilePath, UploadParameters uploadParame... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: this works, but TODO: essentially turns off the benefits of dictionary support TODO: even if the underlying delegate supports it. TODO: we should support it here. ( | @Override
public boolean hasDictionarySupport() {
return false;
} | [
"public interface Dictionary {\n\t\n\t/**\n\t * add key value pair to the dictionary\n\t * @param key as a String\n\t * @param value as a String\n\t * @return boolean - true/false\n\t * @throws Exception if something goes wrong\n\t */\n\tpublic boolean add(String key, String value) throws Exception;\n\n\t/**\n\t * ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indirizzo della cartella di aggiornamento sul server FTP. | private static String getDirFTP() {
return "/algosUpdate/";
} | [
"public static void connectFtp()\n\t{\n\t\tftp.connectServer(servIP,username,pwd,\"\");\n\t\tLogger(\"Ftp connected successfully.\");\n\t}",
"public ClienteFTP(String servidor) {\n // crea cliente FTPClient\n cliente = new FTPClient();\n\n // Abre conexion el cliente con el servidor\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns this component's world. | public World getWorld() {
return world;
} | [
"public World getWorld() {\n return location.getWorld();\n }",
"public static World getWorld() {\n\t\treturn world;\n\t}",
"public GameData getWorld() {\r\n return world;\r\n }",
"public World getWorld()\r\n\t{\r\n\t\tDebug.debugln(\"Entity: getWorld \" + world);\r\n\t\treturn world;\r\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a resource reference with Application.class scope and the given name. All resource references constructed with this constructor must have unique names since they all have the same Applicationwide scope that is the org.apache.wicket.Application.class | public ResourceReference(final String name)
{
this(Application.class, name);
} | [
"public ResourceReference(final Class< ? > scope, final String name)\n\t{\n\t\tthis(scope, name, null, null);\n\t}",
"public final void bind(final Application application)\n\t{\n\t\t// Try to resolve resource\n\t\tif (resource == null)\n\t\t{\n\t\t\tSharedResources sharedResources = application.getSharedResources... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the investorFlag value for this Account. | public java.lang.String getInvestorFlag() {
return investorFlag;
} | [
"public java.lang.String getAccountFlag() {\n return accountFlag;\n }",
"public java.lang.String getFundEligibleFlag() {\n return fundEligibleFlag;\n }",
"public void setInvestorFlag(java.lang.String investorFlag) {\n this.investorFlag = investorFlag;\n }",
"public String getPayI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
DELETE /propertyserves/:id : delete the "id" propertyServe. | @DeleteMapping("/property-serves/{id}")
public ResponseEntity<Void> deletePropertyServe(@PathVariable Long id) {
log.debug("REST request to delete PropertyServe : {}", id);
propertyServeService.delete(id);
return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();
} | [
"public void delete(String id) {\n log.debug(\"Request to delete Property : {}\", id);\n propertyRepository.deleteById(id);\n propertySearchRepository.deleteById(id);\n }",
"void removeProperty(String id);",
"@DeleteMapping(\"/market-variety-properties/{id}\")\n @Timed\n public Res... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Methode getAankomendeReservering Roept methode zoekReserveringenVanAuto voor iedere auto in de gegeven ArrayList | public ArrayList<Reservering> getAankomendeReservering(ArrayList<Auto> autos){
ArrayList<Reservering> deReserveringen = new ArrayList<Reservering>();
for(Auto a: autos){
ArrayList<Reservering> res = zoekReserveringenVanAuto(a.getID());
for(Reservering r: res){
deReserveringen.add(r);
}
}
return deReserveringen;
} | [
"public ArrayList<Reservering> zoekReserveringenVanAuto(int autoid){\r\n\t\tArrayList<Reservering> terug = new ArrayList<Reservering>();\r\n\t\ttry{\r\n\t\t\tString sql = \"SELECT * FROM Reservering WHERE autoid=\" + autoid;\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of tipoEntidadRespondioModified | public void setTipoEntidadRespondioModified(boolean tipoEntidadRespondioModified)
{
this.tipoEntidadRespondioModified = tipoEntidadRespondioModified;
} | [
"public boolean isTipoEntidadRespondioModified()\r\n\t{\r\n\t\treturn tipoEntidadRespondioModified;\r\n\t}",
"public void setIdEntidadRespondioModified(boolean idEntidadRespondioModified)\r\n\t{\r\n\t\tthis.idEntidadRespondioModified = idEntidadRespondioModified;\r\n\t}",
"public boolean isIdEntidadRespondioMod... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Visit (a part of) a file in a range of files | void visitFile(StorageUnit unit, long off, long lim); | [
"boolean getFileRange(String path, OutputStream stream, long startByteIndex, long endByteIndex) throws NotFoundException, IOException;",
"void matchFilePattern(String pattern, List<OperationFile> targetFiles) throws Exception;",
"public void visit(FilenameNode node);",
"public void foundFile(File file);",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
the variance: get values by subtracting mean from each value in the list, square each of these values, add all of the squres together, divide the sum by the number of values. | public int variance() {
int sumofSquare = 0;
for (int i = 0; i < number.length; i++)
{
sumofSquare += Math.pow(number[i] - averageValue(), 2);
}
return sumofSquare;
} | [
"public double variance(){\n\t\tdouble mean = this.average();\n\t\tdouble sum = 0.0;\n\t\tfor (int i = 0; i < this.length; i++) {\n\t\t\tdouble var = this.x[i] - mean;\n\t\t\tdouble var2 = var * var;\n\t\t\tsum = sum + var2;\n\t\t}\n\t\tdouble n = (double)this.length;\n\t\tdouble out = sum/(n - 1.0);\n\t\treturn ou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Queue "seed" documents. Seed documents are the starting places for crawling activity. Documents are seeded when this method calls appropriate methods in the passed in ISeedingActivity object. This method can choose to find repository changes that happen only during the specified time interval. The seeds recorded by this method will be viewed by the framework based on what the getConnectorModel() method returns. It is not a big problem if the connector chooses to create more seeds than are strictly necessary; it is merely a question of overall work required. The end time and seeding version string passed to this method may be interpreted for greatest efficiency. For continuous crawling jobs, this method will be called once, when the job starts, and at various periodic intervals as the job executes. When a job's specification is changed, the framework automatically resets the seeding version string to null. The seeding version string may also be set to null on each job run, depending on the connector model returned by getConnectorModel(). Note that it is always ok to send MORE documents rather than less to this method. The connector will be connected before this method can be called. | @Override
public String addSeedDocuments(ISeedingActivity activities, Specification spec,
String lastSeedVersion, long seedTime, int jobMode)
throws ManifoldCFException, ServiceInterruption {
String dropboxPath = StringUtils.EMPTY;
int i = 0;
while (i < spec.getChildCount()) {
SpecificationNode sn = spec.getChild(i);
if (sn.getType().equals(JOB_STARTPOINT_NODE_TYPE)) {
dropboxPath = sn.getAttributeValue(JOB_PATH_ATTRIBUTE);
break;
}
i++;
}
getSession();
GetSeedsThread t = new GetSeedsThread(dropboxPath);
try {
t.start();
boolean wasInterrupted = false;
try {
XThreadStringBuffer seedBuffer = t.getBuffer();
// Pick up the paths, and add them to the activities, before we join with the child thread.
while (true) {
// The only kind of exceptions this can throw are going to shut the process down.
String docPath = seedBuffer.fetch();
if (docPath == null)
break;
// Add the pageID to the queue
activities.addSeedDocument(docPath);
}
} catch (InterruptedException e) {
wasInterrupted = true;
throw e;
} catch (ManifoldCFException e) {
if (e.getErrorCode() == ManifoldCFException.INTERRUPTED)
wasInterrupted = true;
throw e;
} finally {
if (!wasInterrupted)
t.finishUp();
}
} catch (InterruptedException e) {
t.interrupt();
throw new ManifoldCFException("Interrupted: " + e.getMessage(), e,
ManifoldCFException.INTERRUPTED);
} catch (DropboxException e) {
Logging.connectors.warn("DROPBOX: Error adding seed documents: " + e.getMessage(), e);
handleDropboxException(e);
}
return "";
} | [
"@Test\n public void testNumberOfJobsCreatedBySeedJobPerInvocation() {\n int batchJobsPerSeed = 10;\n engineRule.getProcessEngineConfiguration().setBatchJobsPerSeed(10);\n\n Batch batch = helper.migrateProcessInstancesAsync(batchJobsPerSeed * 2 + 4);\n\n // when\n helper.executeSeedJob(batch);\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A convenience method that allows retrieval of the part of speech object given the tag. Accepts both lower and upper case characters. | public static POS getPartOfSpeech(char tag) {
switch(tag){
case('N'): // capital, fall through
case('n'): return NOUN;
case('V'): // capital, fall through
case('v'): return VERB;
case('R'): // capital, fall through
case('r'): return ADVERB;
case('s'): // special case, 's' for adjective satellite, fall through
case('S'): // capital, fall through
case('A'): // capital, fall through
case('a'): return ADJECTIVE;
}
return null;
} | [
"public static POS getPartOfSpeech(char tag){\r\n switch (tag) {\r\n case ('N'): // capital, fall through\r\n case ('n'):\r\n return NOUN;\r\n case ('V'): // capital, fall through\r\n case ('v'):\r\n return VERB;\r\n case ('R'): // capital, fall through\r\n case ('r'):\r\n return ADVER... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Store an object in the object store, and assign its ownership to owner. This function is experimental. | <T> ObjectRef<T> put(T obj, BaseActorHandle owner); | [
"public static <T> ObjectRef<T> put(T obj, BaseActorHandle owner) {\n return internal().put(obj, owner);\n }",
"public void store(Book object)\r\n {\r\n storePersisent(object);\r\n }",
"void store(T object);",
"public void storeObject(String key, Object object) {\n\t\tsynchronized (mutex) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new BeanWrapperImpl, allowing specification of whether event propagation is enabled. | public BeanWrapperImpl(Object object, boolean eventPropagationEnabled) throws BeansException {
this.eventPropagationEnabled = eventPropagationEnabled;
setObject(object);
} | [
"public BeanWrapperImpl(Object object) throws BeansException {\n\t\tthis(object, DEFAULT_EVENT_PROPAGATION_ENABLED);\n\t}",
"public static BeanWrapper createWrapper(Object bean) {\r\n BeanWrapper wrapper;\r\n wrapper = PropertyAccessorFactory.forBeanPropertyAccess(bean);\r\n try {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
POST /tipdocs : Create a new tipdoc. | @PostMapping("/tipdocs")
@Timed
public ResponseEntity<Tipdoc> createTipdoc(@Valid @RequestBody Tipdoc tipdoc) throws URISyntaxException {
log.debug("REST request to save Tipdoc : {}", tipdoc);
if (tipdoc.getId() != null) {
return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, "idexists", "A new tipdoc cannot already have an ID")).body(null);
}
Tipdoc result = tipdocRepository.save(tipdoc);
tipdocSearchRepository.save(result);
return ResponseEntity.created(new URI("/api/tipdocs/" + result.getId()))
.headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))
.body(result);
} | [
"@PreAuthorize(\"isAuthenticated()\")\n\t@RequestMapping(value = \"/create\", method = RequestMethod.POST, produces = \"application/json\")\n\tpublic String create(@RequestBody Tip tip) {\n\t\tthis.logger.debug(\"landed at /ugc/tips/create\");\n\n\t\ttip.setUsr(User.getLoggedInUser());\n\t\t/*\n\t\tJsonArray errors... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a copy of the value of the VolumeLimit property | public long getPropertyVolumeLimit()
{
return iPropertyVolumeLimit.getValue();
} | [
"public long getPropertyVolumeLimit();",
"public long getPropertyVolumeMax();",
"public long getPropertyVolume();",
"public boolean setPropertyVolumeLimit(long aValue);",
"public long getPropertyVolumeMax()\n {\n return iPropertyVolumeMax.getValue();\n }",
"public long getBuyBackLimitVol() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to perform Question Classification with the help of Voters | private static void performAmbiguosQuestionClassification(Question question,List<String> tnerlist){
String nerConfidence = performOtherNERValidation(question);
String verbsConfidence = performOtherVerbsValidation(question);
String nounsConfidence = performOtherNounsValidation(question);
String rootConfidence = performRootsValidation(question);
int countOfCategoryMusicMovie = getCountOfCategoryMusicMovie(
nerConfidence, verbsConfidence, nounsConfidence,
rootConfidence);
//Perform classification based on what majority of voters think is the category
int countOfMusic = (nounsConfidence.equals(CATEGORY_MUSIC)) ? 1 : 0;
question.qnCategory = (countOfCategoryMusicMovie > countOfMusic) ? CATEGORY_MUSIC_MOVIE
: CATEGORY_MUSIC;
} | [
"private static void performUniqueQuestionClassification(Question question,List<String> tnerlist) {\n\t\t//Checks for unique verbs identifiers in the categories\n\t\tif (!Collections.disjoint(UNIQUE_MOVIE_VERBS, question.verbList)\n\t\t\t\t|| !Collections.disjoint(WIN_SYNONYMS, question.verbList)) {\n\t\t\tquestion... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Resets the interpreter back to its starting state. | public void resetInterpreter() {
env.clear();
} | [
"public void resetState();",
"public void reset()\n {\n sstack = new State[ 128];\n pstack = new int[ 128];\n sindex = 0;\n \n sstack[ 0] = start;\n pstack[ 0] = 0;\n }",
"public static void reset() {\r\n\t\t// System.out.println(\"ExPar.reset()\");\r\n\t\t// new RuntimeException().printStac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Default constructor which takes the name of the facet and the string representing this hierarchical facet entry. | public HierarchicalFacet(String fieldName, String facetString){
this.count = 0;
this.fieldName = fieldName;
this.value = facetString;
this.facetTiers = unpackTiers(facetString);
} | [
"public FacetEntry() {\n\t\tsuper();\n\t}",
"public AbstractFacetCollector(String facetName) {\n\t\tthis.facetName = facetName;\n\t}",
"public HierarchicalFacetTier(String facetString) throws InvalidHierarchicalFacetException {\n\t\t\tString facetComponents[] = facetString.split(searchSettings.getFacetSubfieldD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tells whether the Java version is compatible with Java 14. | public boolean isJava14Compatible() {
return javaSpecVersionNumber.getMajor() >= 14;
} | [
"public boolean isJava14() {\n return \"14\".equals(javaSpecVersion);\n }",
"public boolean isJava17Compatible() {\n return javaSpecVersionNumber.getMajor() >= 17;\n }",
"public boolean isJava18Compatible() {\n return javaSpecVersionNumber.getMajor() >= 18;\n }",
"public boolean isJava17() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |