query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Mark a queued packet as having been acknowledged. Will remove from sending queue. | public void markPacketAsAcked(INetworkDevice inDevice, byte inAckNum) {
NetAddress deviceAddr = inDevice.getAddress();
mLastDeviceAckId.put(deviceAddr, inAckNum);
mDeviceSendWithoutAckCount.put(deviceAddr, 0);
} | [
"public void confirmSent() {\n\t\tthis.acknowledged = true;\n\t\tthis.timer.killThread();\n\t}",
"public void markDelivered() {\n mResponseDelivered = true;\n }",
"public void ack(){\n gfh.getCurrent().ack(this.player);\n }",
"public void ack() throws AckFailedException {\n\n if (nu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clear all the files created using tesing. | private void clearFiles() {
File file = new File("test_files/upload");
File[] files = file.listFiles();
for (File delFile : files) {
delFile.delete();
}
} | [
"public static void clearTemps() {\n\t\tclearTemps(System.getProperty(\"java.io.tmpdir\") + Engine.ID);\n\t}",
"private void clearFiles() {\r\n File file = new File(\"test_files/upload\");\r\n File[] files = file.listFiles();\r\n for (File delFile : files) {\r\n delFile.delete();\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Enable Left & Right Unlinking. It will also disable sequential mode and multithread evaluation as these are incompatible with L&R unlinking. | public void setLRUnlinkingEnabled(boolean enabled) {
checkCanChange(); // throws an exception if a change isn't possible;
this.lrUnlinkingEnabled = enabled;
if (enabled && isSequential()) {
throw new IllegalArgumentException(
"Sequential mode cannot be used when Left & Right Unlinking is enabled.");
}
... | [
"public static void disable() {\n if (lock.compareAndSet(false, true)) {\n\n RxJavaPlugins.setOnCompletableAssembly(null);\n RxJavaPlugins.setOnSingleAssembly(null);\n RxJavaPlugins.setOnMaybeAssembly(null);\n\n RxJavaPlugins.setOnObservableAssembly(null);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__DefCore__NumcoreAssignment_4" $ANTLR start "rule__RTCTL__OpAssignment_0_0" InternalDsl.g:37499:1: rule__RTCTL__OpAssignment_0_0 : ( ( '(' ) ) ; | public final void rule__RTCTL__OpAssignment_0_0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:37503:1: ( ( ( '(' ) ) )
// InternalDsl.g:37504:2: ( ( '(' ) )
{
// InternalDsl.g:37504:2: ( ( '(' ) )
... | [
"public final void rule__RTCTL__Group_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:17541:1: ( ( ( rule__RTCTL__OpAssignment_0_0 ) ) )\n // InternalDsl.g:17542:1: ( ( rule__RTCTL__OpAssignment_0_0 ) )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test case number: 27 / 2 covered goals: 1 org.apache.commons.collections4.IteratorUtils.getIterator(Ljava/lang/Object;)Ljava/util/Iterator;: I3 Branch 24 IFNONNULL L1049 false 2 org.apache.commons.collections4.IteratorUtils.emptyIterator()Lorg/apache/commons/collections4/ResettableIterator;: rootBranch | @Test
public void test27() throws Throwable {
fr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1348,"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test27");
IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode("");
iIOMetadataNode0.getNodeValue();
Iterator<?> iterator0 = It... | [
"@Test\n public void test4() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1350,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test4\");\n OrderedIterator<Object> orderedIterator0 = IteratorUtils.emptyOrderedIterator();\n assertEquals(false, orderedIterat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the bean property name of the feature associated with this binding. | public String getPropertyName() {
final StringBuffer buf = new StringBuffer();
final EStructuralFeature[] path = featurePath.getFeaturePath();
for (int i = 0; i < path.length; i++) {
buf.append(path[i].getName());
if (i+1 < path.length) {
buf.append(".");
}
}
return buf.toString();
} | [
"public String getName() {\n return propertyDescriptor.getName();\n }",
"public default String beanName() {\r\n return beanType().getName();\r\n }",
"public String getFeatureName() {\n return featureName;\n }",
"public String getFeatureName() {\n if (featureName == null) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds an evaluator definition class to the registry using the evaluator class name. The class will be loaded and the corresponting evaluator ID will be added to the registry. In case there exists an implementation for that ID already, the new implementation will replace the previous one. | public void addEvaluatorDefinition(String className) {
this.evaluatorRegistry.addEvaluatorDefinition( className );
} | [
"public void registerEvaluator(String name, Evaluator evaluator);",
"public void addEvaluatorDefinition(EvaluatorDefinition def) {\r\n this.evaluatorRegistry.addEvaluatorDefinition( def );\r\n }",
"public <K extends Expression> EvaluationManager map(Class<K> clazz, Evaluator<K> evaluator) {\n e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper menu for gamemode selection | private String gamemodeMenu(JSONObject base, ArrayList<String> gameModes) {
while(true) {
JSONObject opt = new JSONObject();
opt.put("value", base.getString("gamemode"));
opt.put("options", gameModes);
String input = "";
try{
visual.ren... | [
"private void doMenuSelection() {\n switch (gameMode) {\n case PAUSED:\n switch(this.pauseMenuSelection) {\n case RESTART:\n CONVERSATION.clear();\n gameMode = GAME_MODE.RUNNING;\n loadLevel(1);\n break;\n case CONTINUE:\n if(CO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a new Graph with the same nodes as this Graph but the edges are all Trace objects. | public Graph<N, Object> toTrace()
{
Graph<N, Object> trace = new Graph<N, Object>();
for (Trace<N> t : this.getMap().keySet())
{
trace.add(t);
}
return trace;
} | [
"public Graph copy();",
"@Override\n public Graph clone ()\n {\n return new Graph (adj.clone (), label.clone (), inverse);\n }",
"@Override\n public Object clone()\n {\n try {\n MutableGraphAdapter<V> newGraph = TypeUtil.uncheckedCast(super.clone());\n\n newGra... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Define o valor do atributo tamanho. | public void setTamanho(Long tamanho) {
this.tamanho = tamanho;
} | [
"public void setTamanhoDeposito(int tamanhoDeposito){this.tamanhoDeposito = tamanhoDeposito;}",
"void setNilMaxLength();",
"public void setLength(int value) {\r\n this.length = value;\r\n }",
"public void setTamanhoMaximo(String tamanhoMaximo) {\r\n\t\tthis.tamanhoMaximo = tamanhoMaximo;\r\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface to implement a writable packet. | public interface WritablePacket extends Packet {
/**
* Write this packet to the buffer.
*
* @param buffer the buffer.
* @return true if writing was successful.
*/
boolean write(@NotNull ByteBuffer buffer);
/**
* Return an expected data length of this packet or -1.
... | [
"public abstract void writePacket(byte[] packet) throws IOException;",
"public interface PacketHandler{\n\t\tvoid send(byte[] data);\n\t}",
"public void writePacket(DataOutputStream dataOutputStream) throws IOException;",
"void write(PacketConnection connection);",
"public interface Packet {\n /**\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to create Right Hand side Nav bar in CQL Workspace. | private void buildLeftHandNavNar() {
setCurrentSelectedDefinitionObjId(null);
setCurrentSelectedParamerterObjId(null);
setCurrentSelectedFunctionObjId(null);
getFunctionArgumentList().clear();
getFunctionArgNameMap().clear();
rightHandNavPanel.clear();
NavPills navPills = new NavPills();
navPills.setSta... | [
"public VerticalPanel getRightHandNavPanel() {\n\t\treturn rightHandNavPanel;\n\t}",
"@Override\n\tpublic JComponent getSideBar() {\n\t\tif (sideBar == null) {\n\t\t\tsideBar = new MacroBeanShellPanel(uiController);\n\t\t}\n\t\treturn sideBar;\n\t}",
"public JMenuBar myBar() {\n // menu bar\n JMen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if this verification script is from a multi signature account. | public boolean isMultiSigScript() {
if (script.length < 42) {
return false;
}
try {
BinaryReader reader = new BinaryReader(this.script);
int n = reader.readPushInteger(); // Signing Threshold (n of m)
if (n < 1 || n > NeoConstants.MAX_PUBLIC_KEYS_P... | [
"public boolean canAddThreePid() {\n return (supportStage(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY) && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY))\n || (supportStage(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN) && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN));\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the squareFootage value for this Account. | public void setSquareFootage(java.lang.String squareFootage) {
this.squareFootage = squareFootage;
} | [
"public void setSquare(Square square) {\n this.square = square;\n }",
"public void setSquareFeet(double squareFeet) {\n\t\tthis.squareFeet = squareFeet;\n\t}",
"protected void setSquareType(SquareType squareType){\n this.squareType = squareType;\n }",
"public java.lang.String getSquareFoot... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get all the relations from the specific word outputs two lists, first gives relation words, second relation names | public Map<Integer, String> GetRelations(int wordIndx) {
Map<Integer, String> wordRelMap = new HashMap<Integer, String>();
List<SemanticGraphEdge> it = m_dependencyTree.edgeListSorted();
String relWord = "";
for(int i = 0;i < it.size(); i++) {
SemanticGraphEdge edge = it.get(i);
if(edge.g... | [
"public String[] listRelations();",
"public ArrayList<Relation> extractRelations(LexicalizedParser lp) {\n \t\tBreakIterator iterator = BreakIterator.getSentenceInstance(Locale.US);\n \t\titerator.setText(body);\n \t\tint start = iterator.first();\n \t\tfor (int end = iterator.next();\n \t\t\t\tend != BreakIterat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unsets the "Longitude" element | void unsetLongitude(); | [
"void unsetLatitude();",
"void removeHasLongitude(Object oldHasLongitude);",
"public void unsetLocation()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(LOCATION$18, 0);\n }\n }",
"public void unsetLocation()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new LogEventoPresupuestoDao with an attached configuration | @Autowired
public LogEventoPresupuestoDao(Configuration configuration) {
super(LogEventoPresupuesto.LOG_EVENTO_PRESUPUESTO, matera.jooq.tables.pojos.LogEventoPresupuesto.class, configuration);
} | [
"public LogEventoPresupuestoDao() {\n\t\tsuper(LogEventoPresupuesto.LOG_EVENTO_PRESUPUESTO, matera.jooq.tables.pojos.LogEventoPresupuesto.class);\n\t}",
"@Autowired\n\tpublic PresupuestoDao(Configuration configuration) {\n\t\tsuper(Presupuesto.PRESUPUESTO, matera.jooq.tables.pojos.Presupuesto.class, configuration... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the size, in bytes, of the field 'addr' | public static int size_addr() {
return (16 / 8);
} | [
"public String getAddressSize() {\n\t\treturn id[2];\n\t}",
"public static int getAddressSize() {\n\t\treturn Unsafe.get().addressSize();\n\t}",
"public static BigInteger addressSize() {\n\t\tMessageDigest md = null;\n\t\ttry {\n\t\t\tmd = MessageDigest.getInstance(\"MD5\");\n\t\t} catch (NoSuchAlgorithmExcepti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method hadles the OK button response to the InadequatePermissionsDialog. We dismiss the dialog and shut down the application as it is useless without any location permissions. | private void handleCloseInadequatePermissionsDialog ()
{
inadequatePermissionsDialog = null;
finish ();
} | [
"public void showLocationDeniedDialog(){\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(this)\n .setTitle(\"Permission to access current location denied\")\n .show();\n }",
"private void requestLocationPermission() {\n if (ActivityComp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when the vibrator state has changed. | void onVibratorStateChanged(boolean isVibrating); | [
"@SystemApi\n public interface OnVibratorStateChangedListener {\n /**\n * Called when the vibrator state has changed.\n *\n * @param isVibrating If true, the vibrator has started vibrating. If false,\n * it's stopped vibrating.\n */\n void... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
When one philosopher is done talking stuff, others can feel free to start talking. | public synchronized void endTalk()
{
//when a philosopher has finished talking, he should signal that he is finished talking so that a
//philosopher waiting to speak can begin talking.
notify();
System.out.println("Other philosophers are now free to express their thoughts.");
} | [
"public void talk() {\n //Task 1: Implementation of talk()\n System.out.println(\"Philosopher \" + getTID() + \" has started talking.\");\n yield();\n saySomething();\n yield();\n System.out.println(\"Philosopher \" + getTID() + \" is done talking\");\n }",
"public voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setPer_direccion method, of class Persona. | @Test
public void testSetPer_direccion() {
System.out.println("setPer_direccion");
String per_direccion = "";
Persona instance = null;
instance.setPer_direccion(per_direccion);
// TODO review the generated test code and remove the default call to fail.
fail("The test ... | [
"@Test\n public void testGetPer_direccion() {\n System.out.println(\"getPer_direccion\");\n Persona instance = null;\n String expResult = \"\";\n String result = instance.getPer_direccion();\n assertEquals(expResult, result);\n // TODO review the generated test code and ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XMemberFeatureCall__Group_1_1_0_0__1" $ANTLR start "rule__XMemberFeatureCall__Group_1_1_0_0__1__Impl" InternalDroneScript.g:8476:1: rule__XMemberFeatureCall__Group_1_1_0_0__1__Impl : ( ( rule__XMemberFeatureCall__Alternatives_1_1_0_0_1 ) ) ; | public final void rule__XMemberFeatureCall__Group_1_1_0_0__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDroneScript.g:8480:1: ( ( ( rule__XMemberFeatureCall__Alternatives_1_1_0_0_1 ) ) )
// InternalDroneScript.g:8481... | [
"public final void rule__XMemberFeatureCall__Group_1_1_3__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8554:1: ( ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates the cost of this tile being placed before another given tile. The cost is the difference between this tile's c and the next tile's a plus the difference between this tile's d and the next tile's b. | public double penaltyIfNextTile(Tile other)
{
return Math.abs(other.a-c)+Math.abs(other.b-d);
} | [
"public int getCost(Tile<T> n1, Tile<T> n2);",
"@Override\n\t\tpublic int compare(Board board1, Board board2){\n\t\t\tint board1Cost = board1.getDepth() + board1.misPlacedTiles();\n\t\t\tint board2Cost = board2.getDepth() + board2.misPlacedTiles();\n\t\t\treturn board1Cost - board2Cost;\n\t\t}",
"@Override\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field891' field. doc for field891 | public java.lang.CharSequence getField891() {
return field891;
} | [
"public java.lang.CharSequence getField891() {\n return field891;\n }",
"java.lang.String getField1987();",
"java.lang.String getField1301();",
"public java.lang.CharSequence getField889() {\n return field889;\n }",
"java.lang.String getField1978();",
"java.lang.String getField1393();",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Keep probability for dropout. This is only used if use_dropout is true. optional float dropout_keep_probability = 3 [default = 0.5]; | float getDropoutKeepProbability(); | [
"public Builder setDropoutKeepProbability(float value) {\n bitField0_ |= 0x00000004;\n dropoutKeepProbability_ = value;\n onChanged();\n return this;\n }",
"@java.lang.Override\n public float getDropoutKeepProbability() {\n return dropoutKeepProbability_;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
si no hay un masterDef lanza una excepcion | private void insertMaster(String[] result) throws Exception {
if(masterDefId.isEmpty())
{
throw new Exception("Debe ingresar un masterDefId");
}
if(masterTypeId.isEmpty())
{
throw new Exception("Debe ingresar un masterTypeId");
}
String json = generateJsonDataRawFromResult(result);
if (sendJson... | [
"void checkMaster() {\n zk.getData(\"/master\", false, masterCheckCallback, null);\n }",
"void masterExists() {\n zk.exists(\"/master\", \n masterExistsWatcher, \n masterExistsCallback, \n null);\n }",
"public boolean hasMaster() {\n return sup... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if an array of Objects is empty or null. | public boolean isEmpty(Object[] array) {
return array == null || array.length == 0;
} | [
"public static boolean isEmpty( Object[] array ) {\n return array == null || array.length == 0;\n }",
"public static boolean isEmpty(Object []array) {\n\t\treturn array==null || array.length==0;\n\t}",
"public static boolean isEmpty(Object[] array) {\r\n return (array == null || array.length == 0);\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Adds reversed "that" list at the beginning of current (this) list | @Override
public LinkedList<A> prependAllReversed(LinkedList<A> that) {
LinkedList<A> list = this;
LinkedList<A> reversedThatCursor = that;
while(reversedThatCursor.isNotNil()){
list = list.prepend(reversedThatCursor.head());
reversedThatCursor = reversedThatCursor.t... | [
"@Override\n public LinkedList<A> prependAll(LinkedList<A> that) {\n LinkedList<A> list = this;\n LinkedList<A> reversedThatCursor = that.reverse();\n\n while(reversedThatCursor.isNotNil()){\n list = list.prepend(reversedThatCursor.head());\n reversedThatCursor = revers... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an instance of the PriceSummaryModel | PriceSummaryModel createInstanceOfPriceSummaryModel(); | [
"PriceModel createInstanceOfPriceModel();",
"public ItemPrice() {\n }",
"NFP_Price createNFP_Price();",
"@Valid\n\tvoid create(Price Price);",
"MetricModel createMetricModel();",
"public PricingModel(Game game) {\n this.game = game;\n this.currentPrice = SavingCard.INITIAL_COST;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a Waiter using an instance paramgroup progress checker, and returns the final DBInstance when waiting is done. In case of error never returns null, throws instead. | private DBInstance waitTilParamGroupIsPendingReboot(String instanceId, DBInstance initialInstance,
DBParameterGroup stageParamGroup,
RdsInstanceStatus expectedInitialState)
{
LOGGER.info(liveContext() + "Wa... | [
"private DBInstance waitTilInstanceIsAvailable(String instanceId, DBInstance initialInstance,\n RdsInstanceStatus expectedInitialState)\n {\n LOGGER.info(liveContext() + \"Waiting for instance to become available\");\n RdsInstanceProgressChecker progressChecker ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test successful retrieval of milestones | @Test
public void retrieveMilestonesTest() {
} | [
"@Test\r\n public void TestMilestoneCrud() throws JsonProcessingException {\r\n Map<String, Object> prerequisiteMap = TestDataPreRequisites.createMilestonePrerequisite();\r\n Long id = insertGpiPoint();\r\n testAddMilestonApi(id);\r\n testDeleteMilestoneApi(id);\r\n deleteGpiPo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the PerfDownload field. | public void setPerfDownload(gw.lang.Blob value); | [
"public void setDownloaded(java.lang.Long value) {\n this.downloaded = value;\n }",
"public void setDownloads(int downloads){\n this.downloads =downloads;\n }",
"public trans.encoders.tordnsel.Tordnsel.Builder setDownloaded(java.lang.Long value) {\n validate(fields()[2], value);\n this.d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method completeLap this method is used to complete a single lap in the race. It takes in the average lap time and generates probability for each lap event. The occuring lap events are printed out to the screen and the affected time is added to the current lap time | private void completeLap(int avgLapTime, int lapNo)
{
RNG generator = new RNG(1,9); // 9 exclusive
RNG overtakingGenerator = new RNG(10,21); // 21 exclusive
RNG percentageGenerator = new RNG(1,101); // 101 exclusive
Validation validator = new Validation();
for(int i = 0; i < ... | [
"public void addLap() {\n\n\t\t\n\t\tString timeNumbers = (\"Lap \" + lapCount + \" :\"+ hours_String_Holder + \":\" + minutes_String_Holder + \":\" + seconds_String_Holder);\n\t\tlapCount++;\n\t\tlistData.addElement(timeNumbers);\n\t}",
"public abstract void logLap(int currentLap);",
"public void addLap(Long ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column sys_company_role.updated_at | public Long getUpdatedAt() {
return updatedAt;
} | [
"@Generated(value = \"org.mybatis.generator.api.MyBatisGenerator\", date = \"2020-04-12T12:59:05.835+09:00\", comments = \"Source field: USER.updatedTime\")\r\n public String getUpdatedtime() {\r\n return updatedtime;\r\n }",
"public Timestamp getAccountUpdatedDatetime() {\r\n\t\treturn accountUpdat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Decompiling method: getXHi Signature: ()D Max stack: 2, locals: 1, params: 1 Code length: 5 bytes, Code offset: 2061 Line Number Table found: 1 entries Parameter 0 added: Name this Type Lsun/awt/geom/Crossings; At 0 5 Range 0 4 Init 0 fixed RetValue 1 added: Name Type D At 0 5 Range 0 4 Init 0 fixed | public final double getXHi() {
/* 38 */return xhi;
} | [
"public static Object exch_xy(Object... arg) {\nUNSUPPORTED(\"2vxya0v2fzlv5e0vjaa8d414\"); // static inline point exch_xy(point p)\nUNSUPPORTED(\"erg9i1970wdri39osu8hx2a6e\"); // {\nUNSUPPORTED(\"c0j3k9xv06332q98k2pgpacto\"); // point r;\nUNSUPPORTED(\"60cojdwc2h7f0m51s9jdwvup7\"); // r.x = p.y;\nUNSUPPORTE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of titles department unit unit groups where titlesId = &63; and departmentId = &63; and unitId = &63; and unitGroupId = &63;. | public int countByTitlesDepartmentUnitNoneUnitGroup(long titlesId,
long departmentId, long unitId, long unitGroupId)
throws com.liferay.portal.kernel.exception.SystemException; | [
"public int countByTitlesDepartmentUnitUnitGroup(long titlesId,\n\t\tlong departmentId, long unitId, long unitGroupId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"@Override\n\tpublic int getTitlesUnitUnitGroupsCount()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\tr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this method generates a random flight handling time for runway directors | public void handleFlight(Flight flight) {
long random = 5 + (long)Math.random()*5;
try {
Thread.sleep(random*1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
flight.addAirportTime(random*1000);
} | [
"public synchronized int setArrivalTime(){\n\t\t return random.nextInt((30-1)+1)+1;\n\n\t}",
"public static double genRandomServiceTime() {\n return Simulator.randomGenerator.genServiceTime();\n }",
"public int generateServiceTime()\n\t{\n\t\tmyRandom = new Random();\n\t\treturn myRandom.nextInt(this.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create new subject or update IMPORTANT 1. Once subject gets created then institution can't be changed | public Subject createSubject(Subject subject, Long institutionID) {
if(subject.getId() == null) {
// create
Institution institution = mInstitutionRepository.findById(institutionID).get();
subject.setInstitution(institution);
subject.setId(sequenceGeneratorService.getSequenceNumber(Subject.SUBJECT_SE... | [
"org.hl7.fhir.ResourceReference addNewSubject();",
"private void updateSubject() {\n\n if(clientSession.isTeacherRole())\n return;\n\n LinkedTreeMap subjectMap = (LinkedTreeMap) packet.getArgument(\"subject\");\n\n Subject subject = Subject.parse(subjectMap);\n\n if(clientDa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds an attachment to the mail. | void addAttachment(File attachment); | [
"public void addAttachment(Attachment a);",
"public boolean addAttachment(Attachment file) throws Exception;",
"private void addAttachment(MimeMultipart multipart, String filePath) throws MessagingException, IOException {\n\n MimeBodyPart part = new MimeBodyPart();\n File file = new File(filePath)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ To get the index of a cartLine in the list | public int getIndexOfCartLine(Long product_id) {
int index = -1, i=0;
for(CartLine cline : this.cartLines) {
if(cline.getProduct().getId().equals(product_id))
{
index= i;
}
i++;
}
return index;
} | [
"private int getLineIndex(Line l) {\r\n\t\t/*\r\n\t\t * docIterator holds the document's iterator so that we may loop\r\n\t\t * over each line in the document.\r\n\t\t */\r\n\t\tIterator<Line> docIterator = document.iterator();\r\n\t\t\r\n\t\t/* line holds the current line in the document */\r\n\t\tLine line;\r\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end checkforDead(); Assigns targets to towers. Has a small pause. | public void assignTargets(EnemyManager enemy, Tower t){
double currentMin, previousMin = 20000;//20000 is just a random value to make things work.
//System.out.println("assigning targets");
if(t.pause >= 0f || stillActiveBullets(t)){
t.pause -= Gdx.graphics.getDeltaTime();
... | [
"void bringOutYourDead()\n\t{\n\t\tIterator<Enemy> it = enemylist.iterator();\n\t\twhile (it.hasNext())\n\t\t\tif (it.next().isDead())\n\t\t\t\tit.remove();\n\t}",
"void targetDrop() {\n mazeWorld.removeAllGoals();\n for (MazeState state : mazeWorld.getDrops()) {\n if (reachableCells.cont... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a Presence Source | public ApiResponse<Source> getPresenceSource(ApiRequest<Void> request) throws IOException {
try {
return pcapiClient.invoke(request, new TypeReference<Source>() {});
}
catch (ApiException exception) {
@SuppressWarnings("unchecked")
ApiResponse<Source> response = (ApiResponse<Source>)(ApiRe... | [
"public Source getPresenceSource(GetPresenceSourceRequest request) throws IOException, ApiException {\n try {\n ApiResponse<Source> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Source>() {});\n return response.getBody();\n }\n catch (ApiException | IOException exception... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the POAutoApprovalCurrencyCode value for this Account. | public void setPOAutoApprovalCurrencyCode(java.lang.String POAutoApprovalCurrencyCode) {
this.POAutoApprovalCurrencyCode = POAutoApprovalCurrencyCode;
} | [
"public java.lang.String getPOAutoApprovalCurrencyCode() {\n return POAutoApprovalCurrencyCode;\n }",
"public void setAccountCurrencyCode(String accountCurrencyCode) {\r\n this.accountCurrencyCode = accountCurrencyCode;\r\n }",
"public void setCURRENCY_CODE(BigDecimal CURRENCY_CODE) {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a myCollection manager instance. | ExistMyCollectionManager(@NotNull ExistMomcaConnection momcaConnection) {
super(momcaConnection);
} | [
"protected abstract Collection createCollection();",
"public UsersCollectionManager() {\n users = new HashSet<>();\n init();\n }",
"StoreCollection getOrCreateCollection( String name);",
"public Collection createCollection(String name) {\n\n\t\tCollection col = null;\n\t\ttry {\n\t\t\tcol = c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Default constructor for test class NoQuarterStateTest | public NoQuarterStateTest()
{
} | [
"public HasQuarterStateTest()\n {\n }",
"public WeeklyNewspaperTest() {\n /**\n * Empty constructor for test class\n */\n }",
"public BudgetQuarter() {\n initComponents();\n }",
"protected TestBench() {}",
"protected QRuleTest () {\n }",
"public WithdrawalTest()\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
instance structure handling input object is already "saved as" busObject Bus obj. selected for saveas clonedBusObject New object created from busObject | private BusinessObject buildInstance(Context _context, BusinessObject clonedBusObject, BusinessObject busObject, Hashtable busIDSaveAsNameTable, Hashtable busIDTargetRevTable,
Hashtable busObjExtendedTable) throws Exception {
// Get all the relatinships of it's children, i.e. dependees
java.... | [
"protected BusinessObject saveAsInstanceObject(Context _context, String boID, String busSaveAsName, String busTargetRev, String famObjID, String newFamName, Hashtable busIDSaveAsNameTable)\n throws Exception {\n BusinessObject famObj = new BusinessObject(famObjID);\n\n famObj.open(_context)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string grp_id = 1; | java.lang.String getGrpId(); | [
"public Builder setGrpId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n grpId_ = value;\n onChanged();\n return this;\n }",
"public void setGroupId(int tmp) {\n this.groupId = tmp;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Count of public projects. | @ApiModelProperty(value = "Count of public projects.")
@JsonProperty("publicProjectCount")
public Integer getPublicProjectCount() {
return publicProjectCount;
} | [
"Integer getProjectCount( String key ){\n return developer.projects.size();\n }",
"public int getProjectCount(){\n\t\treturn projectRepository.getProjectCount();\n\t}",
"public int getNumberOfProjects() {\r\n return numberOfProjects;\r\n }",
"public int size(){\n\t\treturn projects.size();\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR start "atom" org\\antlr\\grammar\\v3\\TreeToNFAConverter.g:568:1: atom[String scopeName] returns [StateCluster g=null] : ( ^(r= RULE_REF (rarg= ARG_ACTION )? (as1= ast_suffix )? ) | ^(t= TOKEN_REF (targ= ARG_ACTION )? (as2= ast_suffix )? ) | ^(c= CHAR_LITERAL (as3= ast_suffix )? ) | ^(s= STRING_LITERAL (as4= ast... | public final TreeToNFAConverter.atom_return atom(String scopeName) throws RecognitionException {
TreeToNFAConverter.atom_return retval = new TreeToNFAConverter.atom_return();
retval.start = input.LT(1);
GrammarAST r=null;
GrammarAST rarg=null;
GrammarAST t=null;
G... | [
"public final TreeToNFAConverter.atom_return atom(String scopeName) throws RecognitionException {\n\t\tTreeToNFAConverter.atom_return retval = new TreeToNFAConverter.atom_return();\n\t\tretval.start = input.LT(1);\n\n\t\tGrammarAST r=null;\n\t\tGrammarAST rarg=null;\n\t\tGrammarAST t=null;\n\t\tGrammarAST targ=null... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an intent for the RestService to read a single Model object | public static Intent getReadByIdIntent(int modelId, Class<?> modelClass, Activity activity, RestResponseReceiver receiver){
if(modelId < 1){
throw new IllegalArgumentException("modelId must be > 0");
}
if(!Model.class.isAssignableFrom(modelClass)){
throw new IllegalArgumentException("model class must imp... | [
"public static Intent getCreateIntent(Model modelObj, Activity activity, RestResponseReceiver receiver){\n\t\t\n\t\tif(modelObj.getId() != null && modelObj.getId() > 0){\n\t\t\tthrow new IllegalArgumentException(\"Models can only be created with Id < 1. For updates/edits, use RestService.getUpdateIntent().\");\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the event classes defined in the log and used in the relations | XEventClasses getEventClasses(); | [
"public String getEventClass() {\n return eventClass;\n }",
"public EventClass getEventClass();",
"private HashSet<String> getEventTypes(HLPetriNet hlPN) {\n\t\tHashSet<String> returnEvtTypes = new HashSet<String>();\n\t\tIterator<Transition> transitionsIt = hlPN.getPNModel().getTransitions()\n\t\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/Usage in DummyGenerator: generators.add(new TailDrop(Locale.GERMANY)); generators.add(new TailDrop(Locale.US)); | public TailDrop(Locale locale) {
super("TailDrop", locale);
} | [
"public GermanEnglishSplitter(WordParser wordParser) {\n\t\tsuper(wordParser);\n\t}",
"private void generateLegend( Locale locale, Sink sink )\n {\n sink.table();\n sink.tableCaption();\n sink.bold();\n sink.text( getI18nString( locale, \"legend\" ) );\n sink.bold_();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the checks if is rcd pfmc log. | public void setIsRcdPfmcLog(Boolean isRcdPfmcLog) {
this.isRcdPfmcLog = isRcdPfmcLog;
} | [
"public void setIsRcdErrLog(Boolean isRcdErrLog) {\r\n\t\tthis.isRcdErrLog = isRcdErrLog;\r\n\t}",
"public void setPreciousLogs(boolean preciousLogs) {\n this.preciousLogs = preciousLogs;\n }",
"public boolean isPreciousLogs() {\n return preciousLogs;\n }",
"void setLog(boolean log) \r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given two packages one to be installed and the other installed, return a List of the packages that need to be newly installed. For example, refer to shared_dependecies.json toInstall("A","B") If package A needs to be installed and packageB is already installed, return the list ["A", "C"] since D will have been installe... | public List<String> toInstall(String newPkg, String installedPkg) throws CycleException, PackageNotFoundException {
// if the package is not in the graph, throw the exception
if(!graph.getAllVertices().contains(newPkg)) {
throw new PackageNotFoundException();
}
// if the package is not in the ... | [
"public List<String> getInstallPackageNames() {\n List<String> res = new ArrayList<>();\n res.addAll(getLocalPackagesToInstall().keySet());\n res.addAll(getNewPackagesToDownload().keySet());\n Collections.sort(res);\n return res;\n }",
"List<ImportedPackage> getDynamicImporte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the Start Position | public Position getStartPosition() {
return start;
} | [
"Position getStart();",
"public int getStartPosition() {\n return this.startPosition;\n }",
"public int getStartOffset() {\n return _startPos.getOffset();\n }",
"public int getStartOffset() {\n return startPosition.getOffset();\n }",
"public Point getStartPoint()\r\n\t{\r\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Provide a uniform return value for undefined attribute values. XDM supports full fidelty so this deviates slightly from the DOM specification in that the return value for an undefined attribute is null instead of "". This method normalizes the return value for an undefined element to null. | public String normalizeUndefinedAttributeValue(String value) {
return value;
} | [
"public String getNullAttribute();",
"@SuppressWarnings(\"SameReturnValue\")\n @BasicFunction(classification = Constant.class)\n static public Object undef() {\n return null;\n }",
"public static DataEvent ofUndefined() {\n\t\treturn UNDEFINED;\n\t}",
"public boolean isUndefined() {\n r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test case number: 11 / 3 covered goals: 1 org.apache.commons.collections4.trie.KeyAnalyzer.compare(Ljava/lang/Object;Ljava/lang/Object;)I: I17 Branch 7 IFNONNULL L141 false 2 org.apache.commons.collections4.trie.KeyAnalyzer.()V: rootBranch 3 org.apache.commons.collections4.trie.KeyAnalyzer.compare(Ljava/lang/Object;Lja... | @Test
public void test11() throws Throwable {
fr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1248,"org.apache.commons.collections4.trie.KeyAnalyzerEvoSuiteTest.test11");
StringKeyAnalyzer stringKeyAnalyzer0 = new StringKeyAnalyzer();
int int0 = stringKeyAnalyzer0.compare("XE44Cq\"Ww<<j sxT:"... | [
"@Test\n public void test9() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1256,\"org.apache.commons.collections4.trie.KeyAnalyzerEvoSuiteTest.test9\");\n StringKeyAnalyzer stringKeyAnalyzer0 = new StringKeyAnalyzer();\n int int0 = stringKeyAnalyzer0.compare((String) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'var113' field. | public java.lang.Float getVar113() {
return var113;
} | [
"public java.lang.Float getVar113() {\n return var113;\n }",
"public java.lang.Integer getVar114() {\n return var114;\n }",
"public java.lang.Integer getVar232() {\n return var232;\n }",
"public java.lang.Integer getVar213() {\n return var213;\n }",
"public java.lang.Integer getVar114() ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the ruleAttribute2 value for this Account. | public java.lang.String getRuleAttribute2() {
return ruleAttribute2;
} | [
"public void setRuleAttribute2(java.lang.String ruleAttribute2) {\n this.ruleAttribute2 = ruleAttribute2;\n }",
"public String getAttribute2() {\n return attribute2;\n }",
"public String getAttribute2() {\r\n return (String)getAttributeInternal(ATTRIBUTE2);\r\n }",
"public String... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the findSubprogramChairRole method to ensure it returns a SubprogramChair object if the user is a Subprogram Chair and null otherwise. Tests two distinct partitions: A user who is a Subprogram Chair, and a user who is not a Subprogram Chair. | @Test
public void testFindSubprogramChairRole() {
assertFalse(testUserWithSubprogramChairRole.findSubprogramChairRole().equals(null));
assertTrue(testUserWithNoRole.findSubprogramChairRole() == null);
} | [
"@Test\r\n\tpublic void testHasRoleForUserWithSubprogramChairRole() {\r\n\t\tassertTrue(testUserWithSubprogramChairRole.hasRole(testConference1, new SubprogramChair(testConference1), testUserWithSubprogramChairRole));\r\n\t}",
"@Test\r\n\tpublic void testRemoveMyRoleForUserWithSubprogramChairRole() {\r\n\t\ttestU... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
metodo para pesquisar um contato na agenda pelo nome. retorna true se encontrar e false se nao encontrar | public boolean pesquisarNome(String nome)
{
return pesquisarNome(nome, raiz);
} | [
"public Boolean buscarUsuario(String nom) {\n Nodo aux = inicio;\n if (esVacia()) {\n System.out.println(\"No hay un Usuario con ese nombre\");\n } else {\n while (aux != null) {\n if (aux.getDato().getUsuario().compareTo(nom) == 0) {\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deserializes from the given input. The deserialized object is written to the given object. The serialization is done by a thread local serialization handler. | public static void readExternal(final ObjectInput in, CustomSerializable obj) throws IOException {
CSHandler handler = getInstance();
handler.setDataInput(new BasicTypeDataInputImpl(new InputStream() {
public boolean markSupported() {
return false;
}
... | [
"public abstract Object deserialize(Object object);",
"Object deserialize(ByteBuf input);",
"public interface ObjectInput extends DataInput\n{\n\n /** \n * Read and return an object. The class that implements this interface\n * defines where the object is \"read\" from.\n *\n * @return the ob... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
use this function if this similarity is describing/used by a COTS map update the data for owning COTS based on passed control points | @Override
public final void deriveSimilarityFromCntlPts(myPointf[] cntlPts, Base_ControlFlags flags) {
myPointf[] e0 = new myPointf[] {cntlPts[0],cntlPts[1]},
e1 = new myPointf[] {cntlPts[3],cntlPts[2]},
e0Ortho = new myPointf[] {e0[0],e1[0]},
e1Ortho = new myPointf[] {e0[1],e1[1]};
trans[0].buildTrans... | [
"private void updateMowerCords() {\n\t\tfor (int i = 0; i < this.map.size(); i++) {\r\n\t\t\tfor (int j = 0; j < this.map.get(i).size(); j++) {\r\n\t\t\t\tif (this.map.get(i).get(j) == this.mower) {\r\n\t\t\t\t\tthis.x = j;\r\n\t\t\t\t\tthis.y = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'field767' field | public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField767() {
field767 = null;
fieldSetFlags()[767] = false;
return this;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField232() {\n field232 = null;\n fieldSetFlags()[232] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField987() {\n field987 = null;\n fieldSetFlags()[987] = false;\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interpolates a String with the arguments defined in the given Map. | public static String interpolate(final String string, final Map<?, ?> variables)
{
return new MapVariableInterpolator(string, variables).toString();
} | [
"public String interpolate(String str)\n {\n PatternMatcherInput input = new PatternMatcherInput(str);\n Map keys = new HashMap();\n\n // map all found varaiable expressions with their environment variable...\n while (_matcher.contains(input, _variablesPattern))\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bool file_err = 5; | boolean getFileErr(); | [
"public Boolean getIserr() {\r\n return iserr;\r\n }",
"public int errorCheck() {\r\n return errorFlag;\r\n }",
"public boolean hasStreamFailed() {\n return fieldSetFlags()[6];\n }",
"public boolean getLogErrStat() {\n\t\treturn ((read(new File(pathToLogErr)).equals(\"\")) ? true :... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert Month MM Name to Integer Number | public String convertMonthNameToNumAsString(String name) {
String month = null;
name = name.substring(0,3);
if (name.equals("Jan")) { month = "01"; }
if (name.equals("Feb")) { month = "02"; }
if (name.equals("Mar")) { month = "03"; }
if (name.equals("Apr")) { ... | [
"public int convertMonthNameToNumAsInt(String name) {\n\t\t int month = 0;\n\t\t name = name.substring(0,3);\n\t\t if (name.equals(\"Jan\")) { month = 1; }\n\t\t if (name.equals(\"Feb\")) { month = 2; }\n\t\t if (name.equals(\"Mar\")) { month = 3; }\n\t\t if (name.equals(\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column AMS.T_CM_MAC.ADD_MOVE_FEE | public Integer getAddMoveFee() {
return addMoveFee;
} | [
"public Integer getAddMacFee() {\r\n return addMacFee;\r\n }",
"public Integer getAddCheckFee() {\r\n return addCheckFee;\r\n }",
"public BigDecimal getLBR_DIFAL_TaxAmtICMSUFDest();",
"public void setAddMoveFee(Integer addMoveFee) {\r\n this.addMoveFee = addMoveFee;\r\n }",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this method shows the smallInfoBox with some details about the Spot | public void showDetailsSmall(BeerSpot spot)
{
FragmentTransaction ft = getFragmentManager().beginTransaction();
Fragment newFragment = MapSpotDetailsSmall.newInstance(spot, googleMap.getMyLocation());
ft.replace(R.id.infoContainer, newFragment);
infoBoxSmall_frame.setTag("showDetailS... | [
"public void displaySquareDetails() {\r\n\t\tsuper.displaySquareDetails();\r\n\t}",
"protected void showInfo() {\n String text =\n \"This application is part of deegree.\\n\"\n + \"http://deegree.sourceforge.net\\n\\n\"\n + \"lat/lon\"\n + \"Fitzke/Fr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This Rest End point will fetch the Employee by its code | @GetMapping("/byCode/{empCode}")
public ResponseEntity<EmployeeMasterDetails> getByEmpCode(@PathVariable String empCode)
{
return ResponseEntity.ok(employeeMasterService.findByCode(empCode)) ;
} | [
"@RequestMapping(value = \"/instEmployees/getEmplInfoByCode/{code}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<InstEmployee> getEmplInfoByCode(@PathVariable String code)\n throws URISyntaxException {\n return Opti... | {
"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.DATE_RENEW_INIT | public void setDATE_RENEW_INIT(Date DATE_RENEW_INIT) {
this.DATE_RENEW_INIT = DATE_RENEW_INIT;
} | [
"public Date getDATE_RENEW_INIT() {\r\n return DATE_RENEW_INIT;\r\n }",
"public void setDATE_REPLACED_INIT(Date DATE_REPLACED_INIT) {\r\n this.DATE_REPLACED_INIT = DATE_REPLACED_INIT;\r\n }",
"public Date getDATE_REPLACED_INIT() {\r\n return DATE_REPLACED_INIT;\r\n }",
"public vo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
adds a frame to the game | public void addFrame(Frame frame) throws BowlingException
{
if(frames.size()==10)
throw new BowlingException();
else
frames.add(frame);
//to be implemented
} | [
"private void addFrame() {\n String name = selectString(\"What is the name of this frame?\");\n ReferenceFrame frame = selectFrame(\"What frame are you defining this frame relative to?\");\n double v = selectDouble(\"How fast is this frame moving (as a fraction of c)?\", -1, 1);\n try {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Randomises the binary encoding for this individual. | public void randomiseBinary()
{
for (int i = 0; i < binary.length; i++)
binary[i] = Math.random() >= 0.5;
} | [
"protected byte[] randomData() {\n int length = random.nextInt(1024);\n byte[] rv = new byte[length];\n for (int i = 0; i < length; i++) {\n rv[i] = (byte) random.nextInt(255);\n }\n return rv;\n }",
"private void nextRandomBytes(byte[] buffer) {\n if (rnd !... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a Long for the given name. If the name does not exist, return null. | @Override
public Long getLongObject(String name)
{
return getLongObject(name, null);
} | [
"public long getLong(String name) {\n Enumeration enumer = LONGS.elements();\n while(enumer.hasMoreElements()) {\n SimpleMessageObjectLongItem item = (SimpleMessageObjectLongItem) enumer.nextElement();\n if(item.getName().compareTo(name) == 0) {\n return item.getV... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the RewrittenToNewAccountDestinationJoinArray field. | public void setRewrittenToNewAccountDestinationJoinArray(entity.PolicyPolicyRewrite[] value) {
__getInternalInterface().setFieldValue(REWRITTENTONEWACCOUNTDESTINATIONJOINARRAY_PROP.get(), value);
} | [
"private void setRewrittenToNewAccountDestinationJoinArray(entity.PolicyPolicyRewrite[] value) {\n __getInternalInterface().setFieldValue(REWRITTENTONEWACCOUNTDESTINATIONJOINARRAY_PROP.get(), value);\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public entity.PolicyPolicyRewrite[] getRewrittenToNewAcc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads the TemplateTypeMapping for the given TemplateType | public TemplateTypeMapping getTemplateTypeMapping(TemplateType type); | [
"Map<String, String> getTemplateMappings();",
"Map<TypeDescription, Class<?>> initialize(DynamicType dynamicType, ClassLoader classLoader, ClassLoadingStrategy classLoadingStrategy);",
"public LoadedTypeMap(){\n\t\tthis.loadedTypes = new HashMap<>();\n\t}",
"public void setTemplateType(String templateType)\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the web socket client that this game client uses to communicate with the Interactive service. | public InteractiveWebSocketClient getWebSocketClient() {
return webSocketClient;
} | [
"public Socket getSocket()\r\n {\r\n return client.getSocket();\r\n }",
"public static SocketIOClient getInstance() {\n\t\tif (client == null)\n\t\t\tclient = new SocketIOClient(URI.create(\"http://chatter-7482.onmodulus.net\"), new SocketHelper());\n\n\t\treturn client;\n\t}",
"public WebSocket ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the current allocated ram. | public int getCurrentAllocatedRam() {
return currentAllocatedRam;
} | [
"public int getCurrentRequestedRam() {\n\t\treturn getRam();\n\t}",
"public long GetAvailableRAM(){\n ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo();\n ActivityManager activityManager = (ActivityManager) mcontext.getSystemService(Context.ACTIVITY_SERVICE);\n activityManager.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method that removes every airport record from the database | public static void removeAllAirports() {
Connection conn = DataBaseInfo.getConnection();
PreparedStatement ps;
ResultSet rs;
String getAddressID = "SELECT `address_ID` FROM `Airports`";
String RemoveAddresses = "DELETE FROM `Addresses` WHERE `address_ID` = ?";
String removeAirportsQuery = "DELETE FROM `Airp... | [
"void removeAirport(Long id);",
"public void deleteSingleAirport(Airport airport, HashMap<Integer, Route> routeHashMap, ObservableList<Route> currentlyLoadedRoutes, HashMap<String, Airport> airportHashMap, ObservableList<Airport> currentlyLoadedAirports) {\n\n //Set up the database and objects\n Dat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Replicates a provided event and applies the event to a state machine. | private void replicateEvent(String path, Event event) {
if (event.getEventType() == EventType.BEGIN) {
// Get the task state machine for this target
StateMachine<Status, EventType> stateMachine = StateMachineRepository
.getStateMachineBean(event.getTargetId());
... | [
"public void processEvent(Event event) {\n List<Transition> matches = transitions.get(event.code());\n if(matches==null) return;\n for(Transition tran: matches)\n if(tran.isApplicable()) { \n String newMaybe = tran.action();\n if(newMaybe!=null) ma... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Completes the HTTP Post call and returns an object of the HTTPResponse class | public HTTPResponse finish() {
HTTPResponse response = new HTTPResponse();
try {
super.CreateConnection();
outputStream = super.httpConn.getOutputStream();
writer = new PrintWriter(new OutputStreamWriter(outputStream, super.charset),
... | [
"public HTTPResponse finish() {\n HTTPResponse response = new HTTPResponse();\n try {\n //create the HTTP connection\n super.CreateConnection();\n //write the JSON data via DataOutputStream\n DataOutputStream dataOutputStream = new Da... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads unigrams and bigrams from the binary file. Doesn't store a full memory representation of the dictionary. | static void readUnigramsAndBigramsBinary(final DictDecoder dictDecoder,
final Map<Integer, String> words, final Map<Integer, Integer> frequencies,
final Map<Integer, ArrayList<PendingAttribute>> bigrams) throws IOException,
UnsupportedFormatException {
// Read header
... | [
"public void readInDictionary() {\n ScrabbleDictionaryTrie = new Trie();\n File file = new File(\"ScrabbleDictionary.txt\");\n try (BufferedReader br = new BufferedReader(new FileReader(file))) {\n String line;\n while ((line = br.readLine()) != null){\n Scr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new postal address use. | private PostalAddressUse(String code, String codeSystem)
{
CODE = code;
CODE_SYSTEM = codeSystem;
} | [
"Address createAddress();",
"public Address createAddress(String address);",
"public @NotNull Address newAddress();",
"Adresse createAdresse();",
"public Address() {\r\n\t\tsuper();\r\n\t}",
"Adressen createAdressen();",
"AddressType createAddressType();",
"public Address(){}",
"public static Addres... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use current picture generator to write in a picture. currentPictureGnerator would use the passedin picture as a starting point | public void writePicture(Picture p){
//Generate Pixel 2D array
Pixel[][] copiedP = new Pixel[p.height()][p.width()];
for(int j = 0; j < copiedP.length; j++){
for(int i = 0; i < copiedP[j].length; i++){
copiedP[j][i] = new Pixel(i, j, p);
}
}
... | [
"private synchronized void recordImage()\n {\n String prefix = \"out_\";\n String outFilePath = outputFolder + \"\\\\\";\n outFilePath += prefix + \"R\" + regionCurrentVar + \"_\" + iteration + \".png\" ;\n\n if (Constants.DEBUG) {\n System.out.println(\"output: \" + outFil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the value associated with the column: examination_required | public java.lang.String getExaminationRequired () {
return examinationRequired;
} | [
"public void setExaminationRequired (java.lang.String examinationRequired) {\n\t\tthis.examinationRequired = examinationRequired;\n\t}",
"int getInvalidMatrixDetailsValue();",
"public String getAssistExam() {\n return assistExam;\n }",
"io.dstore.values.BooleanValue getRequired();",
"public java.l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is used to "tag" the functions which requires a request to execute. | public interface RequestFunction {} | [
"Map<RequestUtil.RequestType, RequestFunction> getFunctions();",
"public void handleRequest(Request req) {\n\n }",
"private void addRequest(InstanceRequest request) {\r\n\t\t\r\n\t}",
"Object handle(Object request);",
"@Override\n public void execute(String tagName, Map<String, Object> parameters)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates whether a sensor and box intersect. | public static boolean doesSensorCollideWithBox(Sensor sensor, Box box) {
return doSquaresIntersect(sensor.getX(), sensor.getY(), sensor.getWidth(), sensor.getHeight(), box.getX(), box.getY(), box.getWidth(), box.getHeight());
} | [
"public abstract boolean intersectsBoundingBox(BoundingBox box);",
"boolean IntersectedBox(Ray ray);",
"boolean intersects( Geometry gmo );",
"public abstract boolean intersects(Rectangle rect);",
"public boolean isIntersect(float tX, float tY) {\n //If X falls between left and right of button\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts this Validation to an Option. If the Validation is a Success, Some is returned otherwise None. | public Option<B> toOption() {
return isSuccess() ? Option.some(getSuccess()) : Option.<B> none();
} | [
"default Optional<V> toOptional() {\n V item = orElseNull();\n return item == null ? Optional.empty() : Optional.of( item );\n }",
"public ValidationResult getValidationResult();",
"public OptionalCandidate<S, T> tryout(S candidate) {\n mapper.apply(candidate).ifPresent(value... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the trending regions sorted by popularity. | @Finder("get_trending_by_popularity")
public List<Trending> getTrendingByPopularity(@PagingContextParam PagingContext pagingContext)
{
return null;
} | [
"protected HRegionInfo[] getMostLoadedRegions() {\n ArrayList<HRegionInfo> regions = new ArrayList<HRegionInfo>();\n synchronized (onlineRegions) {\n for (HRegion r : onlineRegions.values()) {\n if (regions.size() < numRegionsToReport) {\n regions.add(r.getRegionInfo());\n } ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Post the User's data to hastebin. | public String postDataToHastebin(UserData data) {
HttpClient client = HttpClientBuilder.create().build();
HttpPost post = new HttpPost("https://hastebin.com/documents");
try {
post.setEntity(new StringEntity(new GsonBuilder().setPrettyPrinting().create().toJson(data)));
... | [
"private void sendUserData() {\n FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();\n DatabaseReference myref = firebaseDatabase.getReference(Objects.requireNonNull(firebaseAuth.getUid()));\n UserProfile userProfile = new UserProfile(name, email, post, 0);\n myref.setVal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates Scanner over the given file, throws RuntimeException if File isnt correct or not exist | private static Scanner prepareFileScanner(final String filePath) {
try {
return new Scanner(new File(filePath), StandardCharsets.UTF_8.toString());
} catch (FileNotFoundException e) {
throw new IllegalArgumentException("first command line argument has to be valid path to valid an... | [
"public static Scanner createScanner(File file)\n {\n //Attempt to create a scanner from the file\n Scanner s = null;\n try\n {\n s = new Scanner(file);\n }\n // If file cannot be found throw an exception and return null\n catch (FileNotFoundException e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The "user password" of the PDF document. If the document is encrypted, then the value of this key will be the user password for the document; if unspecified, the user password will be the empty string. The value of this key must be a CFStringRef which can be represented in ASCII encoding; only the first 32 bytes will b... | @NotNull
@Generated
@CVariable()
public static native CFStringRef kCGPDFContextUserPassword(); | [
"@NotNull\n @Generated\n @CVariable()\n public static native CFStringRef kCGPDFContextOwnerPassword();",
"@Generated\n @CFunction\n public static native boolean CGPDFDocumentUnlockWithPassword(@Nullable CGPDFDocumentRef document,\n @NotNull @UncertainArgument(\"Options: java.string, c.co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Problem 7: 10001st prime By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the 10 001st prime number? See also . | @Test
public void shouldSolveProblem7() {
assertThat(primeNo(1)).isEqualTo(2);
assertThat(primeNo(2)).isEqualTo(3);
assertThat(primeNo(3)).isEqualTo(5);
assertThat(primeNo(4)).isEqualTo(7);
assertThat(primeNo(5)).isEqualTo(11);
assertThat(primeNo(6)).isEqualTo(13);
... | [
"private void p0007()\n {\n int index = 0;\n double i = 1;\n double lastPrimeNumber = 0;\n\n while (index != 10001)\n {\n i++;\n if (BaseMath.isPrimeNumber(i))\n {\n lastPrimeNumber = i;\n index++;\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface to allow the babou system to see the changes to the repo and to commit the local changes. | public interface RepoManager {
/**
* Gets the current changes in the local repository.
*
* @return The {@link BabouChangeset} that represents the local changes.
*/
public BabouChangeset getChanges();
/**
* Commits the changes that are in the provided {@link BabouChangeset}.
*
* @param cha... | [
"public interface GitService extends Service {\n\n /**\n * Checks that project has selected branches\n *\n * @param project project for checking\n * @param branches branches that need to be checked\n * @param isCommon if true - checking will occur for all selected branches, if false - for at... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Register new specie if not exist other specie with same name | public void registerSpecies(Specie specie) {
if(specieExist(specie.getName()))
throw new IllegalArgumentException("Already exist other specie with this name");
this.Species.add(specie);
} | [
"public void addDummySpecies() {\n\t\tSpecies species1 = new Species();\n\t\tspecies1.setName(\"dog\");\n\t\tspeciesRepo.save(species1);\n\t\tSpecies species2 = new Species();\n\t\tspecies2.setName(\"cat\");\n\t\tspeciesRepo.save(species2);\n\t}",
"private boolean specieExist(String specieName){\n for(Spec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Part of the activity's life cycle, StartAppAd should be integrated here for the home button exit ad integration. | @Override
public void onPause() {
super.onPause();
startAppAd.onPause();
} | [
"@Override\n public void onResume() {\n super.onResume();\n startAppAd.onResume();\n }",
"@Override\n public void onBackPressed() {\n /*startAppAd.onBackPressed();\n super.onBackPressed();*/\n\n if(blnExit)\n {\n super.onBackPressed();\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve a list of all resources (wrapped in views) required for the resource contained within this view | public List<ResourceView> getRequiredResources() {
ImmutableList.Builder<ResourceView> reqRes = ImmutableList.builder();
for (Resource res : resource.getRequiredResources()) {
reqRes.add(new ResourceView(res));
}
return reqRes.build();
} | [
"public ResourceSetDescription views() {\n return this.views;\n }",
"List<ViewResourcesMapping> get(String viewResourceId) throws Exception;",
"public List<Resource> getResources() {\n return resources;\n }",
"public List <Resource> getResources() { return _resources; }",
"Set<? extends... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column x$wait_classes_global_by_latency.max_latency | public void setMaxLatency(Long maxLatency) {
this.maxLatency = maxLatency;
} | [
"public void setMax_latency(Long max_latency) {\n this.max_latency = max_latency;\n }",
"public void setMax_latency(String max_latency) {\n this.max_latency = max_latency == null ? null : max_latency.trim();\n }",
"public void setMaxWait(int maxWait)\r\n\t{\r\n\t\tthis.maxWait = maxWait;\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
When data changes, this method updates the list of recipeEntries and notifies the adapter to use the new values on it | public void setRecipes(List<Recipe> recipeEntries) {
mRecipeEntries = recipeEntries;
notifyDataSetChanged();
} | [
"private void updateRecipeAdapter() {\n for (Recipe recipe : recipes) {\n if ((current_category.equals(\"Alle\") || recipe.getData().getCategory().equals(current_category))\n && (StringUtility.search(searchString, recipe.getData().getTitle())))\n recipeAdapter.add... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |