query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Sets the field separator string as an escaped regex. | public void setFieldSeparatorRegex(String fieldSeparatorRegex)
{
this.fieldSeparatorRegex = fieldSeparatorRegex;
} | [
"void setFieldSeparator(final String fieldSeparator);",
"public String getFieldSeparatorRegex()\n\t{\n\t\treturn fieldSeparatorRegex;\n\t}",
"public void setFieldSeparator(String fieldSeparator) {\n\t\tthis.fieldSeparator = fieldSeparator;\n\t}",
"public void setFieldSeparator(String fieldSeparator)\n\t{\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes pickable and non pickable items and adding them to rooms | public static void createItem() {
//Initializing an item and putting it in a room airport
itemLocation.addItem(airport, new PickableItem("Bottle", "This is a bottle that have been left behind by someone", 2, false));
itemLocation.addItem(airport, new PickableItem("Boardingpass", "This is a board... | [
"private void addItemsToRooms(){\n fountain.addItem(items.get(\"key\"));\n }",
"private void initRooms() {\r\n\t\tRoom kitchen = new Room(\"Kitchen\", 1, \"K\");\r\n\t\tRoom study = new Room(\"Study\", 2, \"S\");\r\n\t\tRoom lounge = new Room(\"Lounge\", 3, \"L\");\r\n\t\tRoom conservatory = new Room(\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all the container within a city. ATTENTION this is not implemented by city now, it is just all containers | @Override
public List<Container> getAllContainers(City city) {
List<Container> l = new ArrayList<Container>();
if (getStore() != null) {
try {
KeyValueIterator<String,String> k = getStore().all();
while (k.hasNext()) {
l.add(jsonParser.fromJson(k.next().value, Container.class));
}
} catch(I... | [
"private void getAllContainers() {\n AID ams = getAMS();\n QueryPlatformLocationsAction queryPlatformLocationsAction = new QueryPlatformLocationsAction();\n sendRequest(new Action(ams, queryPlatformLocationsAction));\n MessageTemplate mt = MessageTemplate.and(\n MessageTem... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for objects of class FileIO | public FileIO()
{
} | [
"public File() {}",
"public TFileFactory() {\n this(PhysicalFileSystem.instance);\n }",
"public FileObjectFactory() {\n }",
"private FileUtils() {\n super();\n }",
"public interface IOFactory {\n\n public FileIO newFile(String path);\n\n}",
"IOFile createIOFile();",
"private DataFile... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The stage of the Cluster definition allowing to specify azureActiveDirectory. | interface WithAzureActiveDirectory {
/**
* Specifies the azureActiveDirectory property: The AAD authentication settings of the cluster..
*
* @param azureActiveDirectory The AAD authentication settings of the cluster.
* @return the next definition stage.
... | [
"public AzureActiveDirectory azureActiveDirectory() {\n return this.azureActiveDirectory;\n }",
"HybridAksClusterProvisioningState provisioningState();",
"interface WithCreate extends DefinitionStages.WithTags {\n /**\n * Executes the create request.\n *\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column regsat_regist.adr_lineb | public void setAdrLineb(String adrLineb) {
this.adrLineb = adrLineb;
} | [
"public void setAdrLinea(String adrLinea) {\n this.adrLinea = adrLinea;\n }",
"public void setAdrLinec(String adrLinec) {\n this.adrLinec = adrLinec;\n }",
"public String getAdrLineb() {\n return adrLineb;\n }",
"public void setFrnAddressLine1(String frnAddressLine1) {\n \tthi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
updates our step size based on the current frequency | private void updateStepSize()
{
float currFreq = getRate();
if ( prevFreq != currFreq )
{
stepSize = currFreq * oneOverSampleRate;
prevFreq = currFreq;
}
} | [
"@Override\n\tprotected void sampleRateChanged()\n\t{\n\t\ttimeStepSize = 1/sampleRate();\n\t}",
"public void setStepSize(double step) {\n dblMaxStep = step;\n }",
"private synchronized void updateMaxFrequency(int steps) {\n\t\tthis.maxFrequency = 0.f;\n\n\t\tfor (int i = 0; i < steps; i++) {\n\t\t\tt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column t_mp_num.countyAgent | public Long getCountyagent() {
return countyagent;
} | [
"public void setCountyagent(Long countyagent) {\n this.countyagent = countyagent;\n }",
"public Long getCityagent() {\n return cityagent;\n }",
"public String getAddrcounty() {\n return addrcounty;\n }",
"public String getCounty() {\n return _county;\n }",
"public String ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form DataPresensiAdmin | public DataPresensiAdmin() {
initComponents();
} | [
"protected void creaPagine() {\n Pagina pag;\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* crea la pagina e aggiunge campi e pannelli */\n pag = this.addPagina(\"generale\");\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__JvmFormalParameter__Group__0__Impl" $ANTLR start "rule__JvmFormalParameter__Group__1" ../com.avaloq.tools.dslsdk.check.ui/srcgen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:13987:1: rule__JvmFormalParameter__Group__1 : rule__JvmFormalParameter__Group__1__Impl ; | public final void rule__JvmFormalParameter__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:13991:1: ( rule__JvmFo... | [
"public final void rule__JvmFormalParameter__Group__1() 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:11015:1: ( r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub ch.pipeline().addLast("tcpOutHandler", new TcpOutBoundHandler()); ch.pipeline().addLast("tcpEncoder", new MessageEncoder()); | @Override
protected void initChannel(SocketChannel ch) throws Exception {
ch.pipeline().addLast("tcpDecoder", new MessageDecoder());
ch.pipeline().addLast("tcpHandler", new TcpServerHandler(ac));
} | [
"public TcpOutgoing(EventQueue eventQueue, AsyncPipe<Object> pipe, int mss, int winSize, long seqNum) {\n\t\tthis(eventQueue, pipe, mss, winSize, seqNum, null);\n\t}",
"@Override\n\tprotected void initChannel(SocketChannel ch) throws Exception {\n\t\tch.pipeline().addLast(\"tcpDecoder\", new MessageDecoder());\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove a collection of TvShowViewModel to the collection. | @Override
public void removeAll(Collection<TvShowViewModel> tvShowViewModels) {
tvShowViewModels.removeAll(tvShowViewModels);
} | [
"@Override\n public void remove(TvShowViewModel tvShowViewModel) {\n tvShows.remove(tvShowViewModel);\n }",
"private void removeShow() {\n\t\tCinema cinemaToRemoveFrom = ConsoleBoundary.printRemoveShow();\n\t\tif(cinemaToRemoveFrom == null)\n\t\t\treturn;\n\t\tShow showToRemove = ConsoleBoundary.prin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a state that will handle all decryption for NTLM. | public DecryptingState(NTLMCrypt crypt) {
this.crypt = crypt;
} | [
"public abstract void setDecryptMode();",
"public void initCryptAsym() {\n if (this.client.getCryptAsymArt().equals(\"RSA\")) {\n this.setCryptAsym(new CryptRSA());\n } else {\n this.setCryptAsym(new CryptRSA());\n }\n }",
"BlobCrypter getStateCrypter();",
"privat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
gets the last index of the entity set if it exists otherrwise returns INVALID_ENTITY_INDEX. e.g. [0,1,2,3] > gets 3 | public final <T extends Component> int getLastSetIndex(Class<T> setType)
{
ArrayList<Integer> tmp =
getComponentPackedVector(setType).get_packed_indicies();
if (tmp.size() == 0)
return INVALID_ENTITY_INDEX;
else
return tmp.get(tmp.size() - 1);
} | [
"long maybeLastIndex() {\n int entryNum = entries.size();\n while (entryNum != 0) {\n try {\n return entries.get(entryNum - 1).getCurrLogIndex();\n } catch (IndexOutOfBoundsException e) {\n // the exception is thrown when there is a concurrent deletion, which is rare, so a retry\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the localized error mandatory message of this form item in the language. Uses the default language if no localization exists for the requested language. | @Override
public java.lang.String getErrorMandatoryMessage(java.util.Locale locale) {
return _formItem.getErrorMandatoryMessage(locale);
} | [
"@Override\n\tpublic java.lang.String getErrorMandatoryMessage(\n\t\tjava.lang.String languageId) {\n\t\treturn _formItem.getErrorMandatoryMessage(languageId);\n\t}",
"@Override\n\tpublic java.lang.String getErrorMandatoryMessage(\n\t\tjava.lang.String languageId, boolean useDefault) {\n\t\treturn _formItem.getEr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns names (as one string) of modes in which this manager is working (for instance "Client BootstrapServer"). | private String getModesNamesAsOneString() {
String[] names = getModesNames();
StringBuilder builder = new StringBuilder();
for (int i = 0; i < names.length; i++) {
builder.append(names[i] + " ");
}
return builder.toString();
} | [
"String getModes();",
"public String[] getModeNames(){\n return modeNames;\n }",
"public abstract List<MODE> getModes();",
"Set<String> getRunModes();",
"public Map<String, ArrayList<Integer>> modes() {\n return this.modes;\n }",
"public static synchronized String[] getModeNames() {\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Whether tile walkable. imgTileEnum = Value to associate. imgFile = Filename (just name and extension, no path). imgKey = Key associated with image used with asset manager hash map. walkable = Whether tile walkable. | private ImgTileEnum(int imgTileEnum, String imgFile, String imgKey, boolean walkable)
{
// The constructor sets the values for each enumeration.
this.imgTileEnum = imgTileEnum;
this.imgFile = imgFile;
this.imgKey = imgKey;
this.walkable = walkable;
... | [
"boolean isImageTileType();",
"public int getValue() \n {\n return imgTileEnum;\n }",
"private boolean isImage() {\n return SlidingTilesBoard.getType().equals(\"Image tiles\");\n }",
"public static Image getAttackTile(){\r\n return attackTile;\r\n }",
"ImageTile ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine if the RFFreqMin is configured. | public boolean isSetRFFreqMin() {
return (this.rfFreqMin != null ? this.rfFreqMin.isSetValue() : false);
} | [
"public boolean isSetRFChannelFreqMin() {\n return (this.rfChannelFreqMin != null ? this.rfChannelFreqMin.isSetValue() : false);\n }",
"public boolean isSetFreqMin() {\n return (this.freqMin != null ? this.freqMin.isSetValue() : false);\n }",
"public boolean hasMinRequirements() {\n\t\t// FIXME MIN inpu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method: firstInFirstOut() Purpose: Reads from 4 given files, places data into array structures, then sorts them based on First In First Out algorithm. Prints out frame at each step and page fault total | private static void firstInFirstOut() throws IOException {
//File names
String fileBank[] = new String[] {"ReferenceString1.txt", "ReferenceString2.txt",
"ReferenceString3.txt", "ReferenceString4.txt"};
//for-loop: go through each file
for(int currentFile = 0; currentFile < fileBank.length; currentFil... | [
"public void initialPass(TapeDrive in, TapeDrive out1, TapeDrive out2) {\n // TODO: Implement me for 15 points!\n \tint tapeCount = 0;\n \tint outCount = 2;\n \twhile (tapeCount < tapeSize) {\n \t\tif (outCount % 2 == 0) {\n \t\t\tfor (int i = 0; i < memorySize; i++) {\n \t\tmemory[... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To remove the local subscription | public void removeLocalSubscription(LocalSubscription subscription) throws AndesException {
localSubscriptionProcessor.removeSubscription(subscription);
removeSubscriptionDirectly(subscription);
} | [
"void removeSubscriptions(Subscription subscription);",
"public void unsetSubscription()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SUBSCRIPTION$50, 0);\n }\n }",
"void wipeSubscriptions(String sessionID);",
"private voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests that when the RandomGeneration is fed a randomization string (see: Randomizer.java), for its height in args[6], it correctly sets the end column of the RandomGeneration to be startCol + [randomly generated number based on randomization String] In this case, endCol must be from 12 and 15 because the RandomGenerati... | @Test
public void testRandomHeight() {
String[] args = {"Random", "2", "RIGHT:DOWN", "7", "10", "2", "R(3,4,6;0.5,0.25,0.25)"};
RandomGeneration inst = new RandomGeneration(NUM_ROWS, NUM_COLS, args);
assertEquals(10, inst.getStartCol());
assertTrue(inst.getEndCol() >= 12);
assertTrue(inst.getEndC... | [
"@Test\n public void testRandomStartCol() {\n String[] args = {\"Random\", \"2\", \"RIGHT:DOWN\", \"5\", \"U(4:13)\", \"3\", \"2\"};\n RandomGeneration inst = new RandomGeneration(NUM_ROWS, NUM_COLS, args);\n\n int maxStartCol = Integer.MIN_VALUE;\n int minStartCol = Integer.MAX_VALUE;\n\n for (int ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the last ram in the ordered set where time LIKE &63;. | public com.nlu.entity.model.Ram findByDate_Last(java.util.Date time,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException,
com.nlu.entity.NoSuchRamException; | [
"public com.nlu.entity.model.Ram fetchByDate_Last(java.util.Date time,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public com.nlu.entity.model.Ram findByDate_First(java.util.Date time,\n\t\tcom.liferay.portal.kernel.u... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Task Definition'. This implementation returns null; returning a nonnull result will terminate the switch. | public Object caseSpem_TaskDefinition(org.topcased.spem.TaskDefinition object) {
return null;
} | [
"public Object caseTaskDefinition(TaskDefinition object) {\n\t\treturn null;\n\t}",
"public Object caseLanguageTaskDefinition(LanguageTaskDefinition object) {\n\t\treturn null;\n\t}",
"public String getTaskDefinition() {\n return this.taskDefinition;\n }",
"public Object caseDomainTaskDefinition(Dom... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Searches for ShopMaterial associated with currency character. | public static ShopMaterial getCurrency(final char currencyIdentifier) throws InvalidSignException {
final Character searchCharacter = Character.valueOf(currencyIdentifier);
if(!currencies.containsKey(searchCharacter)) throw new InvalidSignException();
return currencies.get(searchCharacter);
} | [
"public static ShopMaterial getShopMaterial(final String name) throws InvalidMaterialException {\r\n\t\treturn getShopMaterial(name,true);\r\n\t}",
"private Optional<MaterialCompactorInfo> findForMaterial(Material material) {\n for (MaterialCompactorInfo info : materialCompactorInfoList) {\n if ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the xml format for this document, for example "oai_dc," "adn," "dlese_ims," or "dlese_anno". | public String getDocType() throws Exception {
return (String) getConfigAttributes().get("xmlFormat");
} | [
"public String getXmlFormat();",
"protected String xmlType()\n {\n return PRS_XML;\n }",
"String documentFormat();",
"public String getDocumentFormat() {\n return this.documentFormat;\n }",
"private String getFormatTypeToIndex() {\n\t\t// Format type 'canonical_nsdl_dc' or 'native'\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests if the given name is an empty string. | private Boolean isNameEmpty(String name) {
return name.equals("");
} | [
"public boolean noName() {\n\t\treturn name == null || name.isEmpty();\n\t}",
"public boolean isEmpty() {\n\t\treturn name.isEmpty();\n\t}",
"public boolean isEmpty(String studentName)\r\n {\r\n return (studentName.isEmpty() || studentName.trim().isBlank());\r\n }",
"public boolean empty(String s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets (as xml) the "IsTrialAccount" element | public org.apache.xmlbeans.XmlBoolean xgetIsTrialAccount()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlBoolean target = null;
target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(ISTRIALACCOUNT$60, 0);
return... | [
"public boolean getIsTrialAccount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ISTRIALACCOUNT$60, 0);\n if (target == nu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__EInterfaceType__Group__4" $ANTLR start "rule__EInterfaceType__Group__4__Impl" InternalAADMParser.g:8137:1: rule__EInterfaceType__Group__4__Impl : ( RULE_END ) ; | public final void rule__EInterfaceType__Group__4__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalAADMParser.g:8141:1: ( ( RULE_END ) )
// InternalAADMParser.g:8142:1: ( RULE_END )
{
// InternalAADMParser... | [
"public final void rule__EInterfaceType__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:8130:1: ( rule__EInterfaceType__Group__4__Impl )\n // InternalAADMParser.g:8131:2: rule__EInterfaceType__Group_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ renamed from: android.support.v4.media.session.b / compiled from: IMediaSession | public interface C0394b extends IInterface {
/* renamed from: android.support.v4.media.session.b$a */
/* compiled from: IMediaSession */
public static abstract class C0395a extends Binder implements C0394b {
/* renamed from: android.support.v4.media.session.b$a$a */
/* compiled from: IMedi... | [
"public interface IMediaControllerCallback extends IInterface {\n\n /* renamed from: android.support.v4.media.session.IMediaControllerCallback$Stub */\n public static abstract class Stub extends Binder implements IMediaControllerCallback {\n private static final String DESCRIPTOR = \"android.support.v4... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Override for custom equals method. Checks if the passed object is equal to the instance of RankingHistory | @Override
public boolean equals(Object o) {
if (this == o)
return true;
if (!(o instanceof RankingHistory))
return false;
RankingHistory rank = (RankingHistory) o;
return Objects.equals(this.player, rank.player) && Objects.equals(this.topScore, rank.topScore)
&& Objects.equals(this.lowScore... | [
"@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (obj instanceof RevisionData) {\n\t\t\treturn this.getRevision().equals(((RevisionData) obj).getRevision());\n\t\t}\n\n\t\treturn false;\n\t}",
"@Override\r\n public boolean equals(Object o) {\r\n // If 2 data objects are being compared\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set accessor for persistent attribute: fecha_termino | public abstract void setFecha_termino(java.lang.String newFecha_termino); | [
"public abstract java.lang.String getFecha_termino();",
"public void setFecha(Fecha fecha){\n this.fecha = fecha;\n }",
"public abstract void setFecha_inicio(java.lang.String newFecha_inicio);",
"public void setFecha(Fecha fecha) {\r\n this.fecha = fecha;\r\n }",
"public abstract void se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the module groups | public void setModuleGroups(Collection<ModuleGroup> groups) {
this.groups = new HashMap<>();
for (ModuleGroup group : groups) {
this.groups.put(group.getName(), group);
}
} | [
"public void setGroups(Set<SymbolGroup> groups) {\n this.groups = groups;\n }",
"public void setAllGroups(String groups)\n {\n m_allGroups = groups;\n }",
"void setGroup(InternalGroup group);",
"public void setLookupGroups( String[] groups ) throws RemoteException {\n\t\tStringBuff... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Example using window operator > It periodically subdivide items from an Observable into Observable windows and emit these windows rather than emitting the items one at a time | protected void doSomeWorkWindow() {
Observable.interval(1, TimeUnit.SECONDS).take(12)
.window(3, TimeUnit.SECONDS)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(getConsumer());
} | [
"public static void main(String[] args) throws InterruptedException {\n /*\n Observable.range(1,30)\n .buffer(4)\n .subscribe(System.out::println);\n\n Observable.interval(500, TimeUnit.MILLISECONDS)\n .buffer(1,TimeUnit.SECONDS,2) //as time based worked on computation based scheduler.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Encapsulates settings affecting the overall execution of a view process. | public interface ViewExecutionOptions {
/**
* Gets the cycle execution sequence.
*
* @return the cycle execution sequence, not null
*/
ViewCycleExecutionSequence getExecutionSequence();
/**
* Gets the set of flags defining aspects of the execution behaviour in relation to the execution optio... | [
"public abstract void viewRun();",
"View(Process p){\n\t\t\tthis.process = p;\n\t\t}",
"@Override\n public void updateView() {\n mainSettingsController.getProgramView().getMidiSettingsPage().getScored().setSetting(mainSettingsController.getProgramModel().getSaveFile().getMidiSettingsRowData(MIDI_POINT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Triangle triangle=new Triangle(); BeanFactory factory=new XmlBeanFactory(new FileSystemResource("spring.xml")); Triangle triangle=(Triangle) factory.getBean("triangle"); | public static void main(String[] args) {
ApplicationContext context=new ClassPathXmlApplicationContext("spring.xml");
Triangle triangle=(Triangle) context.getBean("triangle");
triangle.draw();
} | [
"public static void main(String[] args) {\n\t\n\t\n\tResource r = new ClassPathResource(\"employee.xml\");\n\tBeanFactory bf = new XmlBeanFactory(r);\n\tObject obj = bf.getBean(\"t\");\n\tTest t1=(Test)obj;\n\n}",
"@Test\n public void testOrders(){\n ClassPathXmlApplicationContext context=\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper method check ssidBytes if all Ascii. | public static boolean isAllAscii(byte[] ssidBytes) {
if (ssidBytes == null) {
return false;
}
int length = ssidBytes.length;
for (int i = 0; i < length; i ++) {
if (ssidBytes[i] < 0) {
return false;
}
}
return true;
... | [
"private static boolean judgeSSID(String ssid) {\n\t\tchar[] contentCharArr = ssid.toCharArray();\n\t\tfor (int i = 0; i < contentCharArr.length; i++) {\n\t\t\tif (contentCharArr[i] <= 0x20 || contentCharArr[i] == 0x7F) {\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private sta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
[Output Only] Last start timestamp in RFC3339 text format. optional string last_start_timestamp = 443830736; | @java.lang.Override
public java.lang.String getLastStartTimestamp() {
java.lang.Object ref = lastStartTimestamp_;
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 = ... | [
"public java.lang.String getLastStartTimestamp() {\n java.lang.Object ref = lastStartTimestamp_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n lastStartTimestamp_ = s;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/To get the ComputerName | public static String getComputerName() throws Exception{
String hostname = "Unknown";
try
{
InetAddress addr;
addr = InetAddress.getLocalHost();
hostname = addr.getHostName();
}
catch (UnknownHostException ex) {
ex.fillInStackTrace(... | [
"public static String getComputerName()\r\n {\r\n String rval = \"null\";\r\n if(queryRegistry(COMPUTER_NAME_CMD, REGSTR_TOKEN) != null)\r\n {\r\n rval = queryRegistry(COMPUTER_NAME_CMD, REGSTR_TOKEN);\r\n }\r\n return rval;\r\n }",
"public String getComputerNam... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ensures compaction instant is in expected state and performs Compaction for the workload stored in instanttime. | private JavaRDD<WriteStatus> compact(String compactionInstantTime, boolean shouldComplete) {
HoodieTable<T> table = HoodieTable.create(config, hadoopConf);
HoodieTimeline pendingCompactionTimeline = table.getActiveTimeline().filterPendingCompactionTimeline();
HoodieInstant inflightInstant = HoodieTimeline.g... | [
"public boolean scheduleCompactionAtInstant(String instantTime, Option<Map<String, String>> extraMetadata) throws HoodieIOException {\n LOG.info(\"Scheduling compaction at instant time :\" + instantTime);\n Option<HoodieCompactionPlan> plan = HoodieTable.create(config, hadoopConf)\n .scheduleCompaction... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create new arena settings | @Override
protected ArenaSettings createSettings() {
return new MobArenaSettings(this);
} | [
"void setArena(Arena arena);",
"@Before\n public void ArenaSetUp() {\n arena = new Arena();\n }",
"public void setup() {\n\t\tarenas.clear();\n\t\tSet<String> arenas = SettingsManager.getInstance().getArenas().getKeys(false);\n\t\tfor (String arena : arenas) {\n\t\t\tif (!arena.equals(\"main-spawn\")) {\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Execute process and optionally wait for its completion | @PublicAtsApi
public void execute( boolean waitForCompletion ) {
isProcessAlreadyStarted = true;
this.processExecutor.execute(waitForCompletion);
} | [
"public void waitForCompletion()\n {\n if ( null != process )\n {\n try\n {\n final int rc = process.waitFor();\n setReturnCode(rc);\n setError(errorGobbler.getResult());\n setResultat(outputGobbler.getResult());\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__AstType__Group_0_1_1_2__1__Impl" $ANTLR start "rule__AstType__Group_0_1_1_2__2" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20489:1: rule__AstType__Group_0_1_1_2__2 : rule__AstType__Group_0_1_1_2__2__Impl ; | public final void rule__AstType__Group_0_1_1_2__2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20493:1: ( rule__AstType__Group_0_1_1_2__2__Im... | [
"public final void rule__AstType__Group_0_1_0_2__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20305:1: ( rule__AstType__Group_0_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use reflection to create and return a monitor class of the specified name. Note that the monitor must have a default (no arguments) constructor. | public final static RuntimeMonitor createMonitor(String monitorName) {
ReflectionFactory rf = new ReflectionFactory();
List<String> packagePath = new ArrayList<String>();
packagePath.add("simulator.elevatorcontrol.");
packagePath.add("simulator.elevatormodules.");
... | [
"private ChainMonitor createMonitor(String monitorClassName) {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n try {\n return (ChainMonitor) classLoader.loadClass(monitorClassName)\n .newInstance();\n } catch (Exception e) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The frame converter used to convert STOMP frames into HazelcastMQ messages. | public FrameConverter getFrameConverter() {
return frameConverter;
} | [
"public void setFrameConverter(FrameConverter frameConverter) {\n this.frameConverter = frameConverter;\n }",
"public T convert(MessageContainer message);",
"public StompFrameDecoder() {\n this(DEFAULT_MAX_FRAME_SIZE);\n }",
"public interface FMPPacket {\n\n /**\n * Represent the PACKET_MAX_BYT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the selected icon. | public void setSelectedIcon(String selectedIcon)
{
myButton.setSelectedIcon(getIcon(selectedIcon));
} | [
"@Override\n\tpublic ImageIcon getSelectedIcon() {\n\t\treturn new ImageIcon(highlightedImage);\n\t}",
"public void setIcon(String value) {\n icon = value;\n }",
"Icon getSelectedIcon(final String key);",
"private void onIconSetClicked(PageIconSet selectedIconSet) {\n setValue(selectedIconSet... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Build all the tunnels, from cheapest to most expensive | private static void buildTunnels()
{
//Initialize necessary member variables
totalCost = 0;
connectedHills = 1;
//Create a disjoint set for all of the hills on the current campus
h = scan.nextInt();
campus = new DisjointSet(h);
//Read how man... | [
"public void tunnel() {\r\n\t\tboolean status = true;\r\n\t\tfor (CellStorage i : node) {\r\n\t\t\tif (i.getCell().tunnelTo != null) {\r\n\t\t\t\tCellStorage tunnelTo = null;\r\n\t\t\t\t// Searching for destinated node from the tunnel\r\n\t\t\t\tfor (int k = 0; k < node.size(); k++) {\r\n\t\t\t\t\tif (node.get(k).g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
1 finding the highest int in the 2d array x | public static int findMax(int [][] x){
int max = x[0][0];
for (int rows=0; rows<x.length; rows++){
for (int cols=0; cols<x[rows].length; cols++){
if (x[rows][cols]>max){
max = x[rows][cols];
}
}
}
return max;
} | [
"public int theHighest() {\r\n\t\tint highest = 0;\r\n\t\tfor(int i = 0; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\t\tif(game[i][j].getValue() > highest)\r\n\t\t\t\t\thighest = game[i][j].getValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn highest;\r\n\t}",
"public static int findMa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a count of how many grades fall within 10% bounds. This is used to determine the size of each bar in the graph. | public int[] getGraphCount()
{
int[] count = new int[10];
float totalRange = upperBound - lowerBound;
// Determine what falls within what range
for (int i = 0; i < data.size(); i++)
{
float rawValue = data.get(i);
float percent = (rawValue - lowerBound) / totalRange;
if (percent >= .9)
{
coun... | [
"public int[] countGrades(int[] grades) {\n int[] gradeFrequencies = new int[11];\n for (int grade : grades) {\n gradeFrequencies[grade]++;\n }\n return gradeFrequencies;\n }",
"public double getPercentageOfStudentsPassed(int[] grades) throws ArithmeticException {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fill in between layers of a stack. Interpolate between image intensities. | public ImageStack fillShort(ImageStack stack, int fillLayers)
{
int slices = stack.getSize();
int height = stack.getHeight();
int width = stack.getWidth();
ImageStack filledStack = new ImageStack(width, height);
ImageProcessor prevProc = stack.getProcessor(2);
short[] prev... | [
"private void createNewStack(){\n\t\taltStack = new ImageStack(width, height);\n\t\t\n\t\tfor(int i = 1 ; i <= depth ; i++){\n\t\t\tbyte[] slice = new byte[height * width];\n\t\t\tSystem.arraycopy(raw, (i-1) * height * width, slice, 0, height * width);\n\t\t\taltStack.addSlice(new ByteProcessor(width,height,slice,n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface for DIACHRON records. | public interface Record extends DiachronEntity {
public String getSubject();
public void setSubject(String subject);
public void addRecordAttribute(RecordAttribute recAttr);
public Collection<RecordAttribute> getRecordAttributes();
} | [
"public interface BaseRecord extends Serializable {\n\t/**\n\t * @return comma separated representation\n\t */\n\tpublic String csvData();\n\n\t/**\n\t * @return description of csv fields\n\t */\n\tpublic String csvFields();\n\n\t/**\n\t * Milliseconds since 0000 UTC Jan 1st 1970 data was observation.\n\t * \n\t * ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Build an Id from an instance id. | public static Id.Builder id(final String instanceId) {
return Id.newBuilder().setId(instanceId);
} | [
"public TFSABuilder createId(int id);",
"Builder id(OpenstackVtapId id);",
"private static UUID form(long id) {\n\t\treturn UUID.fromString(Long.toString(id));\n\t}",
"OpenstackVtapId id();",
"protected String generateInstanceID() {\n \t\tString orgID = \"opennaas.org\";\n \t\t// String localID = this.getCl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send the record collection to the sLS(es) services. The registration client dispatcher is used to determine per URN which sLS to be sent to. URNMask is used to mask certain URNS from being saved. This method wont try to delete the existing records before inserting new ones. | public void sendTosLSNoDelete(SLSRegistrationClientDispatcher registrationClientDispatcher, URNMask urnMask) throws LSClientException, ParserException, Exception {
sendTosLS(registrationClientDispatcher, null, urnMask);
} | [
"public void sendTosLS(SLSRegistrationClientDispatcher registrationClientDispatcher, SLSClientDispatcher clientDispatcher, URNMask urnMask) throws LSClientException, ParserException, Exception {\n logger.info(\"event=RecordsCollection.sendTosLS.start guid=\" + this.logGUID);\n // Will be handy to do t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ProcessGeneration__ProcessAssignment_2" $ANTLR start "rule__StepGeneration__StepAssignment_2" InternalDsl.g:39486:1: rule__StepGeneration__StepAssignment_2 : ( ruleTemplate ) ; | public final void rule__StepGeneration__StepAssignment_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:39490:1: ( ( ruleTemplate ) )
// InternalDsl.g:39491:2: ( ruleTemplate )
{
// InternalDsl.g:39491:... | [
"public final void rule__StepGeneration__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:24399:1: ( ( ( rule__StepGeneration__StepAssignment_2 ) ) )\n // InternalDsl.g:24400:1: ( ( rule__StepGeneration... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get number of eggs from chicken Calculates the number of eggs from selected chicken (x2 if happy) and makes chicken sad | public int getEggsFromChicken() {
if (this.hearts <= 0) {
System.out.println("You can't get eggs from a dead chicken!");
} else {
// check if chicken is happy or sad
if (this.happyOrSad) {
double eggMath = this.seed / 0.25;
this.eggs = ... | [
"public static int animalLegs(int chickens, int cows, int pigs){\n return 4*(cows + pigs + chickens/2);\n }",
"public int goose()\n {\n ducks=\"\";\n int numberOfDucks=g.random();\n for(int i =0; i<numberOfDucks;++i){ ducks+= \"Duck, \"; }//puts a random # of... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes a new DataSource instance. | public DataSource()
{
} | [
"public DataSource() {\r\n\t}",
"public DataSource()\n\t{\n\t\tthis(null);\n\t}",
"public DataSource() {\n\t\tthis(\"basic_DS\");\n\t}",
"public DataSourceFactory() {}",
"protected void initializeDataSource()\n {\n if (bds == null)\n {\n bds = new Jdbc3SimpleDataSource();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test method for availableAnimalsDayRange | @Test
public void testAvailableAnimalsDayRange() {
testRescue.addAnimal(new Dog(name, birthday, size, houseTrained, goodWithKids, notes, new Date(11, 1, 2019), breed));
testRescue.addAnimal(new Dog("Buster", new Date(12, 11, 2018), size, houseTrained, goodWithKids, notes, new Date(10, 14, 2019), breed));
tes... | [
"@Test\r\n\tpublic void testAvailableAnimalsAge() {\r\n\t\ttestRescue.addAnimal(new Dog(name, new Date(9, 13, 2019), size, houseTrained, goodWithKids, notes, new Date(11, 1, 2019), breed));\r\n\t\ttestRescue.addAnimal(new Dog(\"Buster\", new Date(9, 13, 2017), size, houseTrained, goodWithKids, notes, new Date(10, 1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get StopsDisabledPages List By FlowId | @Select("SELECT page_id FROM flow_stops WHERE enable_flag=1 and is_disabled=1 and fk_flow_id=#{flowId}")
public List<String> getStopsDisabledPagesListByFlowId(@Param(value = "flowId") String flowId); | [
"public List<StopsVo> getStopsByFlowIdAndPageIds(String flowId, String[] pageIds);",
"@SelectProvider(type = StopsMapperProvider.class, method = \"getStopsListByFlowId\")\n @Results({@Result(id = true, column = \"id\", property = \"id\"),\n @Result(column = \"is_checkpoint\", property = \"isCheckpoi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create concurrency group instance at runtime. | ConcurrencyGroup createConcurrencyGroup(String name, int maxConcurrency, List<RayFunc> funcs); | [
"public TaskGroup createTaskGroup() {\n TaskGroup result = null;\n synchronized (this) {\n this.currentTaskGroup++;\n result = new TaskGroup(this.currentTaskGroup);\n\n }\n return result;\n }",
"Workgroup createWorkgroup();",
"public CreateGroup() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The method allows the user to pass a word to the Iterator so that is can be found and definition with the page numbers it apperars on | public void searchWord() {
Iterator<WordEntry> valueIterator = wordIndex.values().iterator();
Scanner s = new Scanner(System.in);
while (valueIterator.hasNext()) {
System.out.println("Enter word you wish to search: ");
System.out.println("Do you wish to return to menu: Enter [Y]");
WordEntry value = val... | [
"public Iterator<IPosition> positions(String word) throws WordException;",
"public Iterator<String> words();",
"public MySet<PageEntry> getPagesWhichContainWord (String str) {\n\t\tMySet<PageEntry> set = new MySet<>();\n\t\t\tMyLinkedList<WordEntry> Words = (MyLinkedList<WordEntry>)(ipData.getipList()[ipData.ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set selected status to false. | @Override
public void deselect() {
selected = false;
} | [
"public void setUnselected()\n {\n isSelected = false;\n }",
"public void deselect() {\n selected = false;\n }",
"public void toggle(){\n\t\tsetSelected(!selected);\n\t}",
"public void toggleSelected() {\n\t\tselected = !selected;\n\t}",
"public void toggleSelected() { selected = !selecte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Initializes Traffic Demand for each link | public void initializeTrafficDemand() {
//int studentID1[] = {2, 0, 2, 1, 3, 0};
int studentID1[] = {2, 0, 2, 1, 3, 0, 6, 7, 0, 9, 2, 0, 2, 1, 3, 0, 6, 7, 0, 9};
b = new int[numberOfNodes][numberOfNodes];
System.out.println("Input Traffic demand matrix bij");
for(int i = 0; i < b.length; i++) {... | [
"public TrafficInfo(int sources, int dataAmount, int delta, int deadline, int weight, int type){\n this.sources = sources;\n this.dataAmount = dataAmount;\n this.delta = delta;\n this.deadline = deadline;\n this.weight = weight;\n if(type == 1){\n this.type = 1;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the update operation on a nonexistent attribute. | @Test
public void testUpdateNonExistingAttribute() {
restaurantHourService.add(restaurant.getId(), restaurantHours.getDay(), 1000, 3000);
int id = restaurantHourService.all().get(0).getId();
assertEquals(ATTRIBUTE_NOT_FOUND, restaurantHourService.update(id, "a", "a"));
} | [
"public void testUpdateAttribute_NullNewElement() throws Exception {\n try {\n extractor.updateAttribute(null);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }",
"@Test(description = \"update inter... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Query to select all questions for a given lesson | public ArrayList<ArrayList<ArrayList<String>>> getAllQuestions(int lesson_id) {
open();
ArrayList<ArrayList<ArrayList<String>>> allQs = new ArrayList<>();
// Gets each difficulty individually so problems of the same difficulty are grouped together
for (int i = 1; i < 4; i++) {
... | [
"List<Question> getQuestions(String surveyId);",
"public ArrayList<String> selectQuestionText(int lesson_id, int difficulty){\n open();\n\n Cursor c = myDatabase.rawQuery(\"SELECT question_text, numbers, answer_1, answer_2, answer_3\" +\n \", answer_4, correct_answer FROM Answers JOIN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove the physical link, link layer, and transport layer that were created in setup, verify they are gone. | @After
public void tearDown() throws IOException, InterruptedException
{
try
{
//------Remove transport layer--------
RemoteTransportLayerUtils.removeTransportLayer(transportUuid, socket);
//------Remove link layer--------
RemoteLinkLa... | [
"@Test\n public void removeValidConnectedPhysicalMachine(){\n //represents a physical machine which should both added to and later removed from the list of connected physical machines\n PhysicalMachine pm1 = new PMBuilder().build();\n //represents a physical machine which should be just adde... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the processor build from the processor update chain(UpdateParams.UPDATE_CHAIN) | private UpdateRequestProcessor getProcessor(SolrQueryRequest req, SolrQueryResponse rsp) {
UpdateRequestProcessorChain processorChain =
req.getCore().getUpdateProcessingChain(req.getParams().get(UpdateParams.UPDATE_CHAIN));
return processorChain.createProcessor(req, rsp);
} | [
"public EntryProcessor getProcessor()\n {\n return m_processor;\n }",
"private ProcessChain getProcessChain()\n\t{\n\t\tProcessChain currentProcessChain=null;\n\t\t\n\t\ttry{\n\t\t\tProcessChainDao processChainProvider=ProcessChainDaoFactory.create();\n\t\t\tProcessChain[] escProcessChain=\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will check whether the default box types were created in the file | public ArrayList<Object> validateDefaultBoxTypes(){
ArrayList<Object> btList = new ArrayList<Object>();
if(getList(PRODUCT_PATH)==null){
btList.addAll(defaultBoxTypes());
return btList;
}
for(int i=0; i< defaultBoxTypes().size(); i++){
if(defaultBoxTypes().get(i).equals(getList(PRODUCT_PA... | [
"public boolean readFileTypeBox()throws IOException, EOFException {\r\n int length;\r\n long longLength=0;\r\n int pos;\r\n int nComp;\r\n boolean foundComp=false;\r\n\r\n // Get current position in file\r\n pos = in.getPos();\r\n \r\n // Read box lengt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Debemos recordar que el sprite contiene una imagen en la clase Animacion que es la que se muestra, por ello utilizamos la clase animacion para obtener la imagen y luego su ancho. Lo mismo sucede en el caso de querer obtener la altura. Sirve para obtener el ancho del sprite | public double getAncho() throws Exception{
//Se obtiene la informacion del frame actual
FrameInfo i = animaciones.get(indiceAnimacion).getFrame().getFrameInfo();
//Se obtiene la matriz escalar de 2x2
Matriz escalar = Matriz.getMatrizEscalar(escalaX, escalaY);
//Se crea una matriz con las dimensiones del fra... | [
"private BufferedImage getFrameAnimacionActual() {\n return mov.get(movimientoHacia).getFrameActual();\n }",
"Hero(Bitmap a_res, int a_x, int a_y, int a_hero_type){\n m_x = a_x;\n m_y = a_y;\n m_newxLocation = a_x;\n m_newyLocation = a_y;\n m_width = 128;\n m_he... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Test to check that all the key value (currency rates) pairs in tableMap are from apiMap and there are no additional outside key value pair | @Test
public void checkNoElementInTableOutsideAPI() throws ParseException
{
// Table Data
Map<String, Object> tableMap = dashboardPage.addRowDataToMap();
// API Data
responsePage = new APIResponsePageObject(driver);
Map<String, Object> apiMap = responsePage.getRateDataFromAPI();
// Map that has key - v... | [
"@Test\n\tpublic void checkAllAPICrncyInTable() throws ParseException\n\t{\n\t\t// Table Data\n\t\tMap<String, Object> tableMap = dashboardPage.addRowDataToMap();\n\t\t// API Data\n\t\tresponsePage = new APIResponsePageObject(driver);\n\t\tMap<String, Object> apiMap = responsePage.getRateDataFromAPI();\n\t\t\n\t\t/... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
define bean for Coach AND inject dependency | @Bean
public Coach LifeCoach() {
return new LifeCoach(randomFortuneService());
} | [
"@Bean\r\n\tpublic ICoach swimCoach()\r\n\t{\r\n\t\treturn new SwimCoach(sadFortuneService());\t\t//CONSTRUCTOR DEPENDENCY \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//(call the sadFortuneService Class who implements the IFortuneService)\r\n\t}",
"@Bean\n public Coach swimCoach(){\n return new SwimCoach(sadFortu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The constructor is used if your are instantiating an empty GraphicsLayer (see the class description for an example of this usage) | public void Initialize()
{
setObject(new GraphicsLayer());
} | [
"public GraphicLayer() {\r\n super();\r\n }",
"public Layer() {\r\n }",
"public PaintContainer() {\n\t\tsuper();\n\t\tinit();\n\t}",
"private GraphicsManager() {\r\n }",
"public MultiShapeLayer() {}",
"public GraphicsException()\n {\n super();\n }",
"protected GraphicsContex... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the caller's caller's stack frame. | public static StackFrame getCallerCallerStackFrame() {
return getStackFrame(3);
} | [
"public static StackFrame getCallerStackFrame() {\n return getStackFrame(2);\n }",
"public StackFrame getStackFrame();",
"public static StackTraceElement getCallerStackFrame(int PopFrame) {\n\t\treturn getCallerStackTrace(PopFrame + 1)[0];\n\t}",
"public static StackFrame getCurrentStackFrame() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes a message to the brick's screen on a particular line if valid | public static void writeToScreen(String message, int line){
if ((line >= 0)&&(line <=7)){
LCD.drawString(" ", 0, line);
LCD.drawString(message, 0, line);
LCD.refresh();
}
} | [
"public void message ( String msg )\n {\n\tinsertLine( msg , _messageStyle ,true ) ;\n }",
"public void displayMessageLine( String message ) \n {\n System.out.println( message ); \n }",
"protected abstract boolean definitelyNotLastLine(String message);",
"public void writeStatusLineError(String t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the name of the DataSource | public String getDataSourceName() {
ResourceBundle bundle = ResourceBundle.getBundle("ApplicationResources") ;
String dataSourceName = bundle.getString("app.datasource.name") ;
return (dataSourceName == null || dataSourceName.equals("") ? "???" : dataSourceName) ;
} | [
"public String getDataSourceName() {\n return this.dataSourceName;\n }",
"public String getDataSourceName()\n {\n return dataSourceName;\n }",
"String getDataSourceName() {\n\t\treturn dataSourceName_;\n\t}",
"public String getDataSourceName() {\n\treturn strDSName;\n }",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given multiple possible view candidates, find the one whose sourceUrl pattern best matches the current request url. | protected String findMatchingTargetUrl(ValidationFailureView[] failViews, String[] controllerPaths, HttpServletRequest request) {
Map<String, String> sourceTargetMap = new HashMap<String, String>();
for (ValidationFailureView failView : failViews) {
if (failView.sourceUrl().isEmpty()) {
throw new IllegalArgu... | [
"UrlMappingInfo match(String uri);",
"private BeaconPatternMatch selectPlaceFromCurrentlySetNextLocation(\n Collection<BeaconPatternMatch> candidates)\n {\n String nextLocation = null;\n try\n {\n nextLocation = lDB.getNextLocation( user.getId() );\n }\n catch (SQLException... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rulePostgreSQL" $ANTLR start "entryRuleAmazonWebServices" InternalMyDsl.g:5988:1: entryRuleAmazonWebServices returns [EObject current=null] : iv_ruleAmazonWebServices= ruleAmazonWebServices EOF ; | public final EObject entryRuleAmazonWebServices() throws RecognitionException {
EObject current = null;
EObject iv_ruleAmazonWebServices = null;
try {
// InternalMyDsl.g:5988:58: (iv_ruleAmazonWebServices= ruleAmazonWebServices EOF )
// InternalMyDsl.g:5989:2: iv_ruleA... | [
"public final EObject ruleAmazonWebServices() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token lv_name_1_0=null;\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:6001:2: ( (otherlv_0= 'AmazonWebServices' ( (lv_name_1_0= RULE_I... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inflate the layout for this fragment Bundle bundle = this.getArguments(); username = bundle.getString("USER_NAME"); useremail = bundle.getString("USER_EMAIL"); userphone = bundle.getString("USER_PHONE"); usergender = bundle.getString("USER_GENDER"); | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
SharedPreferences prefs =getContext().getSharedPreferences(MY_PREFS_NAME, MODE_PRIVATE);
username= prefs.getString("USER_MOBILE", null);
useremail= prefs... | [
"public void initInfo(Bundle savedInstanceState) {\n if (savedInstanceState == null) {\n Bundle extras = getIntent().getExtras();\n if (extras == null) {\n username = null;\n animeList = null;\n questionNb = 0;\n score = 0;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the trigger goal. | @NonNull
public ScreenTriggerBuilder setGoal(double goal) {
this.goal = goal;
return this;
} | [
"@NonNull\n public RegionTriggerBuilder setGoal(double goal) {\n this.goal = goal;\n return this;\n }",
"@NonNull\n public LifeCycleTriggerBuilder setGoal(double goal) {\n this.goal = goal;\n return this;\n }",
"public void setTrigger(java.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Actualiza la asistencia justificada | void actualizarAsistencia(Asistencia asistencia); | [
"public void atualizaPlacar() {\n\t\tplacar.atualiza();\n\t}",
"void actualizar(Prestamo prestamo);",
"public void atualizarData(){\r\n\t\tSystem.out.println(\"Go to hell!\");\r\n\t\tif(presencas != null){\r\n\t\t\tfor (Presenca p : presencas) {\r\n\t\t\t\tp.setData(presenca.getData());\r\n\t\t\t}\r\n\t\t}\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use AddSchoolGuardReqMsg.newBuilder() to construct. | private AddSchoolGuardReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"private AddSchoolGuardRspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private GetSchoolGuardReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private ModifySchoolGuardReqMsg(com.google.protobuf.GeneratedMess... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An item use effect. For example, if my item was a potion which permanently boosted my strength and vitality by two points, it would have two ItemUses attached to it, one to boost strength, and one to boost vitality. | public interface ItemUse {
/** The player uses this item. */
public void use(Player pl);
/** Get the name of the effect, for the menu */
public String getEffectName();
} | [
"public void useItem(String itemName) \n\t{\n\t\tItemConsumable item = (ItemConsumable)inventory.get(itemName); //holding in hand...\n\t\tfor(int i=0;i<item.getEffect().length;i++)\n\t\t{\n\t\t\tswitch(item.getEffect()[i])\n\t\t\t{\n\t\t\t\tcase \"Heal\": healPlayer(item.getEffectValue()[i]); break;\n\t\t\t}\n\t\t}... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the "companyBaseData" element | ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData getCompanyBaseData(); | [
"public ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData getCompanyBaseData()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData target = null;\n target = (ch.crif_online.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves a skill by its unlocalized name, or null if not found | public static final SkillBase getSkillByName(String name) {
for (SkillBase skill : SkillBase.getSkills()) {
if (name.equals(skill.getUnlocalizedName())) {
return skill;
}
}
return null;
} | [
"Skill getSkill(String name);",
"@ApiOperation(value = \"get skill\", nickname = \"get skill\")\n @RequestMapping(path = \"/skills/{skill}\", method = RequestMethod.GET)\n public ResponseEntity getSkill(@PathVariable(value = \"skill\") String name) {\n var skill = skillService.getSkillByName(name);\n if (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
merge() merge a node with its sibling. Use a value to pick node. The value does not need to be in the node; it just identifies which node it would be in if it were in a node. | public void merge( int value )
{
BiNode loc = _root.findLeaf( value );
//////////////////////////////////////////////////////////
// Add code here to complete the merge
//
// The findLeaf( value ) method of BiNode will return the
// leaf of the tree that has the ra... | [
"private void mergeNode(Node n) {\n if (n.topLeft.isLeaf\n && n.topRight.isLeaf\n && n.bottomLeft.isLeaf\n && n.bottomRight.isLeaf\n && n.topRight.val == n.topLeft.val\n && n.bottomLeft.val == n.topLeft.val\n && n.botto... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the URL of the external DIG reasoner | public void setURL(String url); | [
"public static void setUrl() {\n\t\t// expetedUrl=\"https://delaware.craigslist.org\";\n\t\t// expetedUrl=\"https://mercari.com\";\n\t\texpetedUrl = \"https://spicejet.com\";\n\t}",
"void setURL(java.lang.String url);",
"public void setConfigURL(String U) {\n properties.setProperty(\"URL\", U);\r\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .com.mesosphere.dcos.cassandra.common.Volume volume = 9; | com.mesosphere.dcos.cassandra.common.CassandraProtos.VolumeOrBuilder getVolumeOrBuilder(); | [
"com.mesosphere.dcos.cassandra.common.CassandraProtos.Volume getVolume();",
"public com.mesosphere.dcos.cassandra.common.CassandraProtos.VolumeOrBuilder getVolumeOrBuilder() {\n return volume_;\n }",
"public com.mesosphere.dcos.cassandra.common.CassandraProtos.Volume getVolume() {\n return volume_;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to retrieve the information from the server when a powerup needs to be respawned after it has been picked up previously. | public void powerUpRespawn(String receivedPacket) {
String[] message = receivedPacket.split(":");
PowerupType type = (message[1].equals("0") ? PowerupType.SHIELD : PowerupType.SPEED);
if(gameStateReceiver != null)
gameStateReceiver.powerUpRespawn(type, Integer.parseInt(message[2]));
} | [
"public String getCurrentPowerup() {\n return currentPowerup;\n }",
"public int getPowerupTime(){\n return POWERUP_TIME;\n }",
"public object_type getPowerUp() {\n return powerUp;\n }",
"public double getRespawnTime() {\n return respawnTime;\n }",
"private void updatePow... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
save list DeliveryType in database | List<DeliveryType> save(List<DeliveryType> deliveryTypes); | [
"DeliveryType save(DeliveryType deliveryType);",
"public void setDeliveryType(String deliveryType) {\n this.deliveryType = deliveryType;\n }",
"DeliveryType update(DeliveryType deliveryType);",
"@PostMapping(\"/delivery-delivery-types\")\n public ResponseEntity<DeliveryDeliveryType> createDeliver... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/String supplyUrl = ServerAddressUtil.getInstance().getDishSaleUpdateUrl(); TransferReq transferReq = new TransferReq(supplyUrl, req); String url = ServerAddressUtil.getInstance().supplyTransfer(); OpsRequest.Executor executor = OpsRequest.Executor.create(url); executor.requestValue(transferReq) .responseClass(DishSale... | @Override
public void updateDishSaleCount(DishSaleUpdateContract.DishSaleUpdateReq req,
ResponseListener<DishSaleUpdateContract.DishSaleUpdateResp> listener) {
} | [
"void sale(SaleRequest request);",
"@Test\n public void testStoreSaleAdjSale2() {\n String responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"0\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").request().get(String.class);\n responseMsg = target.pat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the policySetId property. | public String getPolicySetId() {
return policySetId;
} | [
"public void setPolicySetId(final String value) {\n this.policySetId = value;\n }",
"public String policyId() {\n return this.policyId;\n }",
"public String getPolicyId() {\n return this.PolicyId;\n }",
"public long getPolicyId() {\n return policyId;\n }",
"public int getPolic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the project path given the path of the a selected file in the workspace and the workspace path | public static String getProjectPathFromFileInWorkspace(String selectedFile,
String workspacePath) {
String toRemove = selectedFile.replace(workspacePath + "\\", "");
String toAdd = toRemove.substring(0, toRemove.indexOf("\\"));
String result = workspacePath.replace(toRemove, "") + "\\" + toAdd;
return result... | [
"private static File getProjectsPath() {\n File projectsPath = loadFilePath();\n if (projectsPath == null) {\n JFileChooser fc = createFileChooser();\n if (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n return fc.getSelectedFile();\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string lastDigits = 3; | public java.lang.String getLastDigits() {
java.lang.Object ref = lastDigits_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
lastDigits_ = s;
return s;
} else {
return (java.lang.String)... | [
"String getLastFourDigits();",
"public Builder setLastDigits(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n lastDigits_ = value;\n onChanged();\n return this;\n }",
"boolean hasLastDigits();",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Syncs the local and remote notes and sets condition based notifications for each new note By time sets notification alarm for requested time By location sets geofence for requested location | @Override
public void onReceive(final Context context, final Intent intent) {
Model.getInstance().init(context);
Model.getInstance().syncNotesFromServer(new Model.GetNotesListener() {
@Override
public void onResult(List<Note> notes) {
Log.d(TAG, "Syncing Data.... | [
"public void changeNoteSyncStatus(List<Note> notes) {\n openDatabase();\n clearValues();\n String clause = MySQLiteOpenHelper.SQL_NOTE_ID + \"=?\";\n for (int i = 0; i < notes.size(); i++) {\n String nId = String.valueOf(notes.get(i).getnId());\n values.put(MySQLite... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this.jdbcTemplate.update("insert in to account (name,sic_category__c)", "hello","helloworld"); | public void insertAccounts(){
this.jdbcTemplate.update("insert into account (name,sic_category__c) values(?,?)", new PreparedStatementSetter(){
public void setValues(PreparedStatement ps) throws SQLException {
ps.setString(1, "hello");
ps.setString(2, "WOCAONIMA");
}});
} | [
"@Insert({\n \"insert into jsh_accounthead (Id, Type, \",\n \"OrganId, HandsPersonId, \",\n \"ChangeAmount, TotalPrice, \",\n \"AccountId, BillNo, \",\n \"BillTime, Remark, \",\n \"tenant_id, delete_Flag)\",\n \"values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine whether the post to the element is based on old information based on a "read" JSON attribute whose value is the date when the posting process originally read the element's data, and the "modified" JSON attribute whose value is the date when the posting process originally modified the element's data. | private boolean inConflictImpl( EmsScriptNode element, JSONObject elementJson,
Date lastModified, String lastModString,
boolean checkRead) {
// TODO -- could check for which properties changed since the "read"
// date to allow concu... | [
"protected void fixReadTimeForConflict( EmsScriptNode element, JSONObject elementJson ) throws JSONException {\n\n if ( elementJson == null ) return;\n Date modTime = ( element == null ? null : element.getLastModified( null ) );\n\n Date now = new Date();\n if ( modTime == null || now.a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves a string representation of the ParamDescrs. | @Override
public String toString() {
return Native.paramDescrsToString(getContext().nCtx(), getNativeObject());
} | [
"java.lang.String getParams();",
"protected String paramsToString() {\n if (params == null) {\n return \"\";\n } else if (algParams != null) {\n return algParams.toString();\n } else {\n return \", params unparsed\";\n }\n }",
"public String getPar... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the color key and color chooser buttons | public JPanel addColorOptions ()
{
String title = "Color Key";
JPanel modelPane = new JPanel();
modelPane.setBorder(BorderFactory.createCompoundBorder(
BorderFactory.createTitledBorder(title),
BorderFactory.createEmptyBorder(5,5,5,5)));
modelPane.setLayout(new GridLayout(3... | [
"public void createButtons() {\n // Loop through the colors hashmap for this palette\n for (String key : mColors.keySet()) {\n\n // Create the image button for each color.\n ImageButton newImageButton = new ImageButton(mContext);\n\n // Set the color of the ImageButton... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Act do whatever the EnemyC wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment. | public void act()
{
if(GameWorld.gamePaused == false)
{
move();
despawn();
if (go == true)
{
super.act();
}
}
} | [
"public void act() \n {\n moveEnemy();\n checkHealth();\n attacked();\n }",
"public void act()\n {\n // handle key events\n String key = Greenfoot.getKey();\n if (key != null)\n {\n handleKeyPress(key);\n } \n\n // handle mou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle 'Add Selected' courses button for batch add courses to elective courses list. Calls service object's addElectiveCourses() method and redirects back to Edit page. This can be invoked by form submission OR a link, therefore request method is GET. | @RequestMapping(value = "/staff/addelectivecourses/{id}", method = RequestMethod.GET)
public ModelAndView addElectiveCourses(@PathVariable("id") Long programID, Long[] courseIDs) {
ModelAndView modelAndView = new ModelAndView("staff/programedit");
try {
programService.addElectiveCourses(programID, courseIDs);
... | [
"@RequestMapping(value = \"/staff/addcorecourses/{id}\", method = RequestMethod.GET)\n\tpublic ModelAndView addCoreCourses(@PathVariable(\"id\") Long programID, Long[] courseIDs) {\n\t\tModelAndView modelAndView = new ModelAndView(\"staff/programedit\");\n\t\ttry {\n\t\t\tprogramService.addCoreCourses(programID, co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Saves this calibration to a file of given name. | public void save(String pName)
{
CalibrationData lCalibrationData =
new CalibrationData(mLightSheetMicroscope);
lCalibrationData.copyFrom(mLightSheetMicroscope);
lCalibrationData.copyFrom(mPositionersMap);
lCalibrationData.saveTo(getFile(pName));
} | [
"public void save()\n {\n save(mCalibrationDataName.get());\n }",
"public void save() {\r\n\t\t\r\n\t\tJFileChooser fileChooser = new JFileChooser(\"C:\\\\Users\\\\fevri\\\\Desktop\\\\University\\\\Java\\\\Save Files\"); // file chooser will open to the specified directory\r\n\t\tint status = fileChooser.sho... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds and returns pathway crossreference | public PathwayXref addPathwayXRef(PathwayXref xref) throws IllegalArgumentException {
if (xref == null) {
throw new IllegalArgumentException("'xref' must not be null");
}
if (pathwayXRefs == null) {
pathwayXRefs = new HashSet<PathwayXref>();
}
pathwayXRefs... | [
"org.hl7.fhir.String addNewReference();",
"x0101.oecdStandardAuditFileTaxPT1.ReferencesDocument.References addNewReferences();",
"public int addCrossRef(CrossRef crossref) throws AlreadyExistsException,ChangeVetoException {\n \n if (this.crossrefs.contains(crossref)) throw new AlreadyExistsExcep... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |