query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
View the details of all of your current OneSignal apps. | public static List<AppResponse> viewApps(String userAuthKey) {
return oneSignal().viewApps(userAuthKey);
} | [
"public static List<AppInfo> getAppList()\r\n {\r\n NomadicAppManager appMangr = NomadicAppManager.getInstance();\r\n return appMangr.getAppsList();\r\n }",
"public void viewActiveAppList() {\n\t\tdeviceCommands.viewActiveAppList();\n\t}",
"public static List<AppInfo> getAppsInfo() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
tm2 Expand branch coverage for switch statement in INCHI_BOND_TYPE.getValue (NONE case) | @Test
public void testINCHI_BOND_TYPEgetValueNONE() throws Exception {
int input = 0;
INCHI_BOND_TYPE output = INCHI_BOND_TYPE.getValue(input);
assertEquals(INCHI_BOND_TYPE.NONE, output);
} | [
"public T caseOsBranchClause(OsBranchClause object) {\n return null;\n }",
"public T caseEquivalentBranch(EquivalentBranch object) {\n\t\treturn null;\n\t}",
"@Test\r\n public void testINCHI_BOND_TYPEgetValueALTERN() throws Exception {\r\n int input = 4;\r\n INCHI_BOND_TYPE output = INCH... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XOrExpression__Group_1__0__Impl" $ANTLR start "rule__XOrExpression__Group_1__1" ../org.xtext.guicemodules.ui/srcgen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5532:1: rule__XOrExpression__Group_1__1 : rule__XOrExpression__Group_1__1__Impl ; | public final void rule__XOrExpression__Group_1__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5536:1: ( rule__XOrExpression__Group_... | [
"public final void rule__XOrExpression__Group_1_0_0__1() 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:5629:1: ( rule__XOrEx... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The "final" field does not have to exist, but if it does then it must be a boolean. | public boolean isFinal() {
return mResult.optBoolean("final", false);
} | [
"void setFinal(boolean isFinal);",
"public boolean isFinal() {\n return this.is_final;\n }",
"public boolean getFinal() {\r\n\t\treturn this.myFinal;\r\n\t}",
"public boolean isFinal(){\n\t\treturn status == INITIAL_FINAL || status == FINAL;\n\t}",
"public void setFinal(boolean newFinal) {\r\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If an EventB polytype for that name already exists that polytype is returned otherwise a new polytype is created and added to the cache. | public String getEventBTypeParamNameForName(final String name) {
try {
final String typeParamName = (name + this.EventBTypeSuffix);
final ITypeParameter polytype = this.polyTypeMap.get(name);
if ((polytype != null)) {
return typeParamName;
}
final ITypeParameter typeParam = The... | [
"BType createBType();",
"Object getFlyweight(String type, String tag) {\n\t\t\treturn cache.get(type + \".\" + tag);\n\t\t}",
"public au.gov.asic.types.bn.OutboundBusinessNameType addNewBusinessName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The response to use optional .search.now.wire.feed.Response response = 2; | com.google.search.now.wire.feed.ResponseProto.Response getResponse(); | [
"com.google.search.now.wire.feed.ResponseProto.Response getInitialResponse();",
"private void setResponse(com.google.search.now.wire.feed.ResponseProto.Response value) {\n if (value == null) {\n throw new NullPointerException();\n }\n response_ = value;\n bitField0_ |= 0x00000002;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ PreCondition: Applied to the root SGFNode. PostCondition: The transformations stored in the board will be applied to any stone placing properties throughout the whole tree. This is applied recursively to the properties ADD_WHITE, ADD_BLACK, WHITE, BLACK, and so should create and equivalent problem. Note that this mea... | public void applyTransformation(GoProblemBoardView board){
this.transformProperties(board);
//If no children, then we're done.
if (this.children == null)
return;
//Otherwise we go recursively.
for(int i = 0; i < this.children.size(); ++i){
SGFNode currentChild = this.children.get(i);
currentChi... | [
"public void RBInsertFixup(RedBlackNode node) {\n if (node != null && node != root && node.getP().getColor().equals(\"Red\")) {\n /*recolor*/\n if(siblingOf(node.getP())!=null && siblingOf(node.getP()).getColor().equals(\"Red\")){\n //System.out.println(\"recolor\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns date of last accessHistoryItem with specified ip | @Query("select max(date) from AccessHistoryItem where ip=?1")
LocalDateTime findMaxDateByIp(String ip); | [
"long getLastAccessAt();",
"public void setLastIP(String ip) {\r\n this.lastIp = ip;\r\n }",
"public Date getLastUsageDate();",
"public final Date getLastVisit()\n {\n return lastVisit;\n }",
"LastAccessTimeTrackingPolicy lastAccessTimeTrackingPolicy();",
"public long getLastAccessTime();",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove the specified List of Moves | public void removeStep(List<Move> moves)
{
// Make sure the List Exists
if(moves == null)
return;
// Remove the Steps
previousStates.addAll(moves);
for(int i = 0; i < moves.size(); i++)
cost += moves.get(i).getCost();
} | [
"public static void removeRedundantMoves(List<AssemblyLine> lines) {\n // Remove all instructions of the form: move x to x\n for (Iterator<AssemblyLine> it = lines.iterator(); it.hasNext();) {\n // Find the line in the assembly and remove it\n AssemblyLine line = it.next();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use FetchDevConfReqMsg.newBuilder() to construct. | private FetchDevConfReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"private FetchDevConfRspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private PushDevConfReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private NotifyDevConfChangedReqMsg(com.google.protobuf.GeneratedMessag... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Subtract two images, returning a new image with the result | public CLImage2D subtract(CLImage2D in1, CLImage2D in2) {
return process(subtractImage, in1, in2);
} | [
"public <I extends Image<?, I>> I subtract(I in1, I in2) {\n\t\tCLQueue queue = context.createDefaultQueue();\n\t\t\n\t\tCLImage2D clin1 = CLImageConversion.convert(context, in1);\n\t\tCLImage2D clin2 = CLImageConversion.convert(context, in2);\n\t\tCLImage2D clout = context.createImage2D(CLMem.Usage.Output, clin1.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
System.out.println("delete all users from domain = " + domain.getName()); | private void deleteUsersFromDomain (Domain domain) throws RemoteException,
RemoveException, FinderException
{
sLog.info("delete all users from domain = " + domain.getName());
Collection users = this.userHome.findByDomain(domain.getName());
//System.out.println("found " + users.size() + " users from domain = " +... | [
"void DeleteUser();",
"public void deleteAllUsers()\r\n \t{\r\n \t\ttry{\r\n \t\t\tconn.createStatement().execute(\"DELETE FROM users\");\r\n \t\t}catch(Exception e)\r\n \t\t{\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n \t}",
"void deleteUser(String username);",
"void deleteAllUserData();",
"public void de... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests get method of the CollisionList using method add. | @Test
public void get() throws Exception {
CollisionList list = new CollisionList();
list.add("key", "value");
assertEquals("value", list.get("key"));
} | [
"@Test\n public void getHead() throws Exception {\n CollisionList list = new CollisionList();\n list.add(\"key\", \"value\");\n assertEquals(\"key\", list.getHead().getKey());\n }",
"@Test\n public void remove() throws Exception {\n CollisionList list = new CollisionList();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field birthPlace is set (has been assigned a value) and false otherwise | public boolean isSetBirthPlace() {
return this.birthPlace != null;
} | [
"public boolean isSetBirthplace()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(BIRTHPLACE$24) != 0;\n }\n }",
"public boolean isSetBirth() {\n\t\treturn this.birth != null;\n\t}",
"public void setBirthPlace(String bir... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update ha master address. | void updateHaMasterAddress(final String newAddr); | [
"public void updateAddress(Address address);",
"public void \n setMasterHostname\n (\n String host\n ) \n {\n pProfile.put(\"MasterHostname\", host);\n }",
"public void setAddress(Client cl, String address) {\n\t\tcl.setAddress(address);\n\t}",
"@Override\n public void setMaster(NIONode master) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
extract message from brackets or remove it | public static String extractMessageOrRemove (String msg, char left, char right, boolean remove) {
int start = 0;
int startFlag = 0;
int endFlag = 0;
for (int i = 0; i < msg.length(); i++) {
if (msg.charAt(i) == left) {
startFlag++;
if (startFlag == endFlag + 1) {
start = i;
}
} else if (... | [
"public String visitMessage(String fixMessage);",
"public String getCleanMessage() {\n String result = \"\";\n for (int i = 0; i < message.length(); i++) {\n char c = message.charAt(i);\n if (c != '\\r') {\n result += c;\n }\n }\n return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The addMileage method increments the mileage field. If mileage exceeds the maximum amount, it rolls over to 0. | public void addMileage() {
if (mileage < MAXIMUM_MILEAGE) {
mileage++;
} else {
mileage = 0;
}
int driven = initialMileage - mileage;
if (driven % MPG == 0) {
fuelGauge.burnFuel();
}
} | [
"public void addMiles(int miles) {\n\t\tmileage += miles;\n\t}",
"public static void addToMileage(Car car, double mileageToAdd) {\n car.setMileage(car.getMileage() + mileageToAdd);\n }",
"public void setMileage(int mileage){\n this.mileage = mileage;\n }",
"public void setMileageLimitAmoun... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Information about the user who added this media item. Note that this is only included when using [mediaItems.search] [google.photos.library.v1.PhotosLibrary.SearchMediaItems] with the ID of a shared album. The album must be created by your app and you must have the sharing scope. .google.photos.types.ContributorInfo co... | public com.google.photos.types.proto.ContributorInfo.Builder getContributorInfoBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getContributorInfoFieldBuilder().getBuilder();
} | [
"@java.lang.Override\n public com.google.photos.types.proto.ContributorInfo getContributorInfo() {\n return contributorInfo_ == null\n ? com.google.photos.types.proto.ContributorInfo.getDefaultInstance()\n : contributorInfo_;\n }",
"@java.lang.Override\n public com.google.photos.types.proto.Co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all the partyRelationships. | @Override
@Transactional(readOnly = true)
public List<PartyRelationshipDTO> findAll() {
log.debug("Request to get all PartyRelationships");
return partyRelationshipRepository.findAll().stream()
.map(partyRelationshipMapper::toDto)
.collect(Collectors.toCollection(LinkedLi... | [
"@Override\n public Iterable<Relationship> relationships()\n {\n if ( cachedRelationships == null )\n cachedRelationships = gatherRelationships( start, end );\n return cachedRelationships;\n }",
"protected List getAllRelationsForParty(String partyId, NbaTXLife nbaTXLife) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a new account label. | void addLabel(final AccountLabel accountLabel); | [
"public void addLabel(final String label);",
"com.microsoft.schemas.xrm._2011.contracts.Label addNewLabel();",
"public abstract Code addLabel(String label);",
"String addLabel(String label);",
"void addLabel(Object newLabel);",
"public void addLabel(Label label) {\n getLabels().add(label);\n }",
"@N... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets (as xml) the "hostname" attribute | public void xsetHostname(org.apache.xmlbeans.XmlString hostname)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlString target = null;
target = (org.apache.xmlbeans.XmlString)get_store().f... | [
"void setHostname(String hostname);",
"public void setHostname(java.lang.String hostname)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by Apache iBATIS ibator. This method returns the value of the database column BLOOD_PRESSURE_MEASURE_INFO.D_CREATE_DATE | public Date getdCreateDate() {
return dCreateDate;
} | [
"public Date getCreateDt() {\t\n return this.createDt;\n }",
"public java.util.Date getCreateDate() {\n\t\treturn _instanceImage.getCreateDate();\n\t}",
"@Override\n\tpublic java.util.Date getCreateDate() {\n\t\treturn _ext_information.getCreateDate();\n\t}",
"@Override\n\tpublic Date getCreateDate(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Run the AbstractPatriciaTrie.TrieEntry addEntry(TrieEntry,int) method test. | @Test
public void testAddEntry_1()
throws Exception {
PatriciaTrie fixture = new PatriciaTrie();
fixture.incrementSize();
fixture.modCount = 1;
AbstractPatriciaTrie.TrieEntry<Object, Object> entry = new AbstractPatriciaTrie.TrieEntry((Object) null, (Object) null, 1);
int lengthInBits = 1;
AbstractPatric... | [
"@Test\n\tpublic void testAddEntry_2()\n\t\tthrows Exception {\n\t\tPatriciaTrie fixture = new PatriciaTrie();\n\t\tfixture.incrementSize();\n\t\tfixture.modCount = 1;\n\t\tAbstractPatriciaTrie.TrieEntry<Object, Object> entry = new AbstractPatriciaTrie.TrieEntry((Object) null, (Object) null, 1);\n\t\tint lengthInBi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test that you cant place a zombie building ontop of itself | @Test
public void testBuildingPlaceOverlap(){
BetterHelper h = new BetterHelper();
LoopManiaWorld world = h.testWorld;
world.loadCard("ZombiePitCard");
assertTrue(world.canPlaceBuilding("ZombiePitCard", 0, 0));
assertFalse(world.canPlaceBuilding("ZombiePitCard... | [
"@Test\n\tpublic void invalidSpawn_2() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tSquare[][] board = gameState.getBoard();\n\t\tassertFalse(\"Should not be able to add off the board\", gameState.addSpawn(new Location(board[0].length, 0)));\n\t}",
"@Test(timeout=10000)\n\tpublic ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Selects one single Allergy by the specified ID | public static Allergy getOne(long iAllergyId, Context iContext) throws MapperException
{
try
{
ArrayList<String> fields = AllergiesTDG.select(iAllergyId, iContext);
Allergy storedAllergy;
Long id = Long.valueOf(fields.get(0));
String allergy = fields.get(1);
String reaction = fi... | [
"public Allergy getAllergy(Integer allergyId);",
"@Override\n @Transactional(readOnly = true)\n public AllergyDTO findOne(String id) {\n log.debug(\"Request to get Allergy : {}\", id);\n Allergy allergy = allergyRepository.findOne(id);\n AllergyDTO allergyDTO = allergyMapper.allergyToAl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates the volume of fluid for a given fluid height, relative to the world coordinates | default int calculateFluidVolume(double fluidHeight) {
double f = (fluidHeight - this.getMinFluidHeight())/(this.getMaxFluidHeight() - this.getMinFluidHeight());
return (int) MathHelper.lerp(f, 0, this.getFluidCapacity());
} | [
"public int calculateVolume() {\n return (int) Math.pow(this.sideLength, 3) ;\n }",
"public double calculateVolume();",
"public abstract float volume();",
"@Override\n\tpublic double getVolume() {\n\t\tdouble volume = (1.0 / 3) * Math.pow(this.side, 2) * this.height;\n\t\treturn volume;\n\t}",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sorts the list of drawable objects by pixel Y location. (This function is used for drawing only.) | public static ArrayList<DrawableObject> sortByDrawIndex(ArrayList<DrawableObject> list) {
QuickSort sort = new QuickSort(list);
return sort.sort();
} | [
"public final void sortGameObjectsOnDrawOrder() {\n GameObject tempGameObject;\n int size = gameObjectsDrawOrderSorted.size();\n for (int i = 0; i < size - 1; i++) {\n if (gameObjectsDrawOrderSorted.gameObjects[i].drawOrder \n > gameObjectsDrawOrderSorted.gameObjec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "expr_value" $ANTLR start "expr" src\\calculator.g:396:1: expr[int tab] returns [String value] : operand[$tab] expr_[$tab] ; | public final String expr(int tab) throws RecognitionException {
String value = null;
String operand79 =null;
String expr_80 =null;
value = null;
try {
// src\\calculator.g:400:2: ( operand[$tab] expr_[$tab] )
// src\\calculator.g:400:4: operand[$ta... | [
"public final String expr_value(int tab) throws RecognitionException {\n String value = null;\n\n\n String expr76 =null;\n\n String expr77 =null;\n\n String expr78 =null;\n\n\n\n \tvalue = null;\n\n try {\n // src\\\\calculator.g:388:2: ( expr[$tab] | '!' expr[$t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Common interface for controllers, which will have an associated View instance. More methods can be added when the GUI is added, so it is known what else controllers need to do. | public interface Controller {
/**
* Get the View associated with the particular device mode
* @return The associated View
*/
public View getView();
/**
* Register the model to manipulate
* @param model Model being manipulated
*/
public void register(Model model);
public void onLButtonPress(Mouse... | [
"public interface IController {\n\n /** Takes as input a path, selected by the user in the view GUI filechooser, and processes the\n * text file as a batch process.\n * @param inputFilePath The .txt file path\n * @throws IOException If the .txt file can not be found\n */\n public void goBatch(String input... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table bpm_instancia_historica | List<BpmInstanciaHistorica> selectByExample(BpmInstanciaHistoricaExample example); | [
"BpmInstanciaHistorica selectByPrimaryKey(Long idreg);",
"public void listarHistorico(){\r\n historicos = historicoDAO.listarHistorico(divida.getId());\r\n }",
"private Hashtable obtenerHistoricosSolicitud(Long oidPais, Long oidSolicitud) throws MareException {\n UtilidadesLog.info(\"MONHistori... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This test will check that each value in the Laboonified array has been squared from its original value. It will not check the last value (the sum) in the array. | @Test
public void testSquares() {
//create new random array at each iteration and create the Laboonified version
for (int i=0;i<10000;i++){
int[] next = newArray();
int[] test = LaboonMethods.laboonify(next);
//traverse arrays
for(int w=0;w<test.length-1;w++){
//check each index of ... | [
"@Test\n\tpublic void testSumofSquares(){\n\t\t\n\t\t//create new random array at each iteration and create the Laboonified version\n\t\tfor (int i=0;i<10000;i++){\n\t\t\t\n\t\t\tint[] next = newArray();\n\t\t\tint[] test = LaboonMethods.laboonify(next);\n\t\t\tint sum = 0;\n\t\t\t\n\t\t\t//Traverse test array and ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes the specified element with the attributes and text. | public void writeElement(String name, XmlAttributes attrs, String text) {
startElement(name, attrs, text);
endElement(name);
} | [
"public void write(Element e) throws IOException {\n writeBeginElement(e);\n\n writeChildNodes(e);\n\n writeEndElement(e);\n }",
"public String serialize(Element element)\n throws IllegalArgumentException {\n\n synchronized (_lock) {\n\n // Make sure this serializer is not yet in use\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column dt_expense_adjstmnt.EXPENSE_ADJSTMNT_ID | public Integer getExpenseAdjstmntId() {
return expenseAdjstmntId;
} | [
"public int getExpenseId() {\n return expenseId;\n }",
"public void setExpenseAdjstmntId(Integer expenseAdjstmntId) {\r\n this.expenseAdjstmntId = expenseAdjstmntId;\r\n }",
"public Long getExpensesId() {\r\n return expensesId;\r\n }",
"public Integer getMadjId() {\r\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The set billPayment flag to true | protected final void setIsBillPaid(boolean isBillPaid) {
this.isBillPaid = isBillPaid;
} | [
"public void setIsBill(String isBill) {\n this.isBill = isBill;\n }",
"public void setPaid() {\n isPaid = true;\n }",
"public CredictBillPayment() {\n initComponents();\n TXT_CHQ_NUMBER.setEnabled(false);\n COMBO_BANK.setEnabled(false);\n TXT_DATE.setEnabled(false... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
provides overview on the different beans that are automatically handled by Spring Boot this is the major advantage of using Spring Boot | @Bean
public CommandLineRunner commandLineRunner(ApplicationContext ctx) {
return args -> {
System.out.println("Let's inspect the beans provided by Spring Boot:");
String[] beanNames = ctx.getBeanDefinitionNames();
Arrays.sort(beanNames);
for (String beanName : beanNames) {
System.out.println(beanN... | [
"@Profile(\"trace\")\n @Bean\n @Autowired\n public CommandLineRunner viewBeansInContext(final ApplicationContext ctx) {\n return args -> {\n\n StringBuilder sb = new StringBuilder(1_000);\n sb.append(\"\\n\").append(LINE);\n sb.append(\"Let's inspect the beans provid... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get not adjusted late marks | public double getNumOfUnPaidLateMarks() {
return numOfUnPaidLateMarks;
} | [
"public int getScentMark();",
"protected Point2D.Double _getTickMarkOffset() {\n\t\tAffineTransform trans = new AffineTransform();\n\t\ttrans.translate(_baseScreenPos.x, _baseScreenPos.y);\n\t\ttrans.scale(_tii.getPixelsPerArcsec(), _tii.getPixelsPerArcsec());\n\t\tPoint2D.Double offset = new Point2D.Double(0.0, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by Apache iBATIS ibator. This method returns the value of the database column client.numPf | public Integer getNumPf() {
return numPf;
} | [
"public int getNifCliente() {\n return this.nif_cliente;\n }",
"public BigDecimal getCLIENT_CIF()\r\n {\r\n\treturn CLIENT_CIF;\r\n }",
"public int getPnr() {\r\n return pnr;\r\n }",
"public int getClientNumber() {\n return clientNumber;\n }",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method that validates a Bank entity | @Override
public void validate(Bank entity) throws ValidationException {
String errors = "";
if (entity.getId() < 0 ) {
errors += "The ID of the BankAddress can't be a negative number!\n";
}
if (!entity.getBankName().matches("^[a-zA-Z\\s]*$")) {
errors += "Th... | [
"public boolean validateBank() {\n\t\treturn this.getBank().length() > 0 && this.getBank().length() <= 30;\n\t}",
"Bank findBankById(Integer bankId) throws BankException;",
"@Test\n public void testIsValidAccountTrue() {\n assertTrue(bankNumber.isValidAccount(\"100000029\"));\n }",
"@Test\n\tpubl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculate the intersection point of the line segment and the sensor circle using the method explained here: All variable names are the same as those in the link the result is sorted from the start to end point direction | private ArrayList<DoublePoint> getIntersectionLineCircle(DoublePoint startPoint, DoublePoint endPoint, DoublePoint center, double radius) {
double h = center.getX();
double k = center.getY();
double x0 = startPoint.getX();
double y0 = startPoint.getY();
double x1 = endPoint.getX(... | [
"Point2D intersectionPoint(Line2D l);",
"public Point intersectionWith(Line other) {\n // Current line represented as a1x + b1y = c1\n double a1 = this.end.getY() - this.start.getY();\n double b1 = this.start.getX() - this.end.getX();\n double c1 = (a1 * this.start.getX()) + (b1 * this... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves a list of CompleteInfo objects from the database based on the scheduled date. | public List<CompleteInfo> getCompleteInfo(Date schDate); | [
"public List<CompleteInfo> getCompleteInfo(Task task, Date startSchDate, Date endSchDate);",
"public CompleteInfo getCompleteInfo(Task task, Date schDate);",
"public List<CompleteInfo> getCompleteInfo(Task task);",
"void listTasksByDueDate();",
"public interface CompleteInfoDAO {\n \n /**\n * Pers... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Replaces the methods of the class under instrumentation, putting the instrumented ones instead of the original ones. | private void replaceMethods() {
classGen.setMethods(new Method[0]);
for (var method: methods) {
method.setMaxLocals();
method.setMaxStack();
removeUselessAttributes(method);
if (!method.isAbstract()) {
method.getInstructionList().setPositions();
StackMapReplacer.of(method);
}
cla... | [
"protected void enhanceMethods() {\n for (int i = 0; i < methodsToAdd.size(); i++) {\n Object o = methodsToAdd.get(i);\n if (o instanceof ClassMethod) {\n ClassMethod method = (ClassMethod) o;\n method.initialise();\n method.execute();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Serializes the list of models in the given file path. | public static void serialize(String filePath) throws IOException {
if (filePath == null) {
throw new IllegalArgumentException("Filepath cannot be null");
}
List<Object> toSave = new ArrayList<>();
toSave.add(models);
if (userData != null) {
toSave.add(userData);
}
try {
Fi... | [
"public static void writeModels(String filePath, List<Model> models) throws IOException {\r\n\r\n\t\tFileWriter fw = new FileWriter(filePath);\r\n\t\tBufferedWriter bw = new BufferedWriter(fw);\r\n\r\n\t\tfor (Model model : models) {\r\n\t\t\tSystem.out.println(model.toString());\r\n\t\t\tbw.write(model.toString())... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the cycle execution sequence. | ViewCycleExecutionSequence getExecutionSequence(); | [
"public int getCycle() {\n return cycle;\n }",
"public Integer getTaskCycle() {\n return taskCycle;\n }",
"int getPlcCycle();",
"public long getEvaluationCycle() {\n return evaluationCycle;\n }",
"public List<Integer> getCycleTimes() {\n return this.cycleTimes;\n }",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reuse browser session between browsers | public boolean isBrowserSessionReuse() {
return browserSessionReuse;
} | [
"public void redirectToHomeSameSession() {\r\n\t\t\r\n\t\ttry{\r\n\t\twebAppDriver.get(baseUrl);\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"HttpSession getCurrentHttpSession();",
"public void copyBrowserCookies() {\n setStoreCookies(true);\n getEnvironment... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Accessor for finding wrapper name to use for property (if any). | public abstract PropertyName getWrapperName(); | [
"@Override\r\n protected String handleGetWrapperName()\r\n {\r\n String wrapperName = null;\r\n if (this.getWrapperMappings() != null &&\r\n this.getWrapperMappings().getMappings().containsFrom(this.handleGetFullyQualifiedName()))\r\n {\r\n wrapperName = this.getWrap... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR start "attitude" flips.g:307:1: attitude : ( pitch | roll | yaw ); | public final flipsParser.attitude_return attitude() throws RecognitionException {
flipsParser.attitude_return retval = new flipsParser.attitude_return();
retval.start = input.LT(1);
CommonTree root_0 = null;
flipsParser.pitch_return pitch147 = null;
flipsParser.roll_return rol... | [
"@Override\n public void setAttitude(String attitude) {\n String[] strings = attitude.split(\";\");\n this.attitudePitch = Integer.valueOf(strings[0].split(\":\")[1]);\n this.attitudeRoll = Integer.valueOf(strings[1].split(\":\")[1]);\n this.attitudeYaw = Integer.valueOf(strings[2].sp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__EPrimary__Group_1__2" $ANTLR start "rule__EPrimary__Group_1__2__Impl" InternalAADMParser.g:15773:1: rule__EPrimary__Group_1__2__Impl : ( ( rule__EPrimary__Relative_pathAssignment_1_2 ) ) ; | public final void rule__EPrimary__Group_1__2__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalAADMParser.g:15777:1: ( ( ( rule__EPrimary__Relative_pathAssignment_1_2 ) ) )
// InternalAADMParser.g:15778:1: ( ( rule__EPrimary__Rel... | [
"public final void rule__EPrimary__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:15750:1: ( ( Relative_path ) )\n // InternalAADMParser.g:15751:1: ( Relative_path )\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The business name to prepend to the message text. This field is required. optional string business_name = 6; | com.google.protobuf.ByteString
getBusinessNameBytes(); | [
"java.lang.String getBusinessName();",
"@Override\n public String getBusinessName() {\n\n if(this.businessName == null){\n\n this.businessName = TestDatabase.getInstance().getClientField(token, id, \"businessName\");\n }\n\n return businessName;\n }",
"public void setBusine... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates how many players claimed the chest, and respawns the chest if all players claimed. includes a loop which counts down the respawn. | private void updatePlayerClaim(){
if(chestProgressLevel!=1){
return; //the chest isnt unlocked!
}
//count the total players, and the players who unlocked it.
int totalPlayers = 0;
int unlockedPlayers = 0;
for(JuggernautPlayer player: JuggernautGame.getInstanc... | [
"private void respawnChest(){\n //remove the physical chest\n this.location.getBlock().setType(Material.AIR);\n\n //increment the level of the chest. If its higher than its max level, shut down.\n if(++this.level >= getMaxLevel()){\n deleteInstance();\n return;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
read the package information from the file file format is fromaddress:toaddress:wt:packagetype packagetype=1 (two day) 2(overnight) | public static void main(String []args){
List<Package> packages = new ArrayList<Package>();
String line=new String();
try{
//read the file and create the objects
File textFile = new File("package.txt");
Scanner scan = new Scanner(textFile);
while(scan.hasNextLine())
{
line=scan.nex... | [
"public static FsgPackage getFsgPackage(File receivedFile) throws FsgException {\n\t\tint packageType = 0;\n\t\tUpdateRequest updateRequest = null;\n\t\tint version = 0;\n\t\tbyte[] payload = null;\n\n\t\tInputStream input = null;\n\n\t\ttry {\n\t\t\tif (receivedFile.length() < 6) {\n\t\t\t\tthrow new FsgException(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the create date of this candidate. | @Override
public void setCreateDate(java.util.Date createDate) {
_candidate.setCreateDate(createDate);
} | [
"@Override\n\tpublic void setCreateDate(java.util.Date createDate) {\n\t\t_esfTournament.setCreateDate(createDate);\n\t}",
"@Override\n public void setCreateDate(java.util.Date createDate) {\n _person.setCreateDate(createDate);\n }",
"@Override\n public void setCreateDate(Date createDate);",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Translates the prefix of a QName according to the rules set in the attributes of xsl:stylesheet. Also registers a QName to assure that the output element contains the necessary namespace declarations. | private String translateQName(QName qname, SymbolTable stable) {
// Break up the QName and get prefix:localname strings
String localname = qname.getLocalPart();
String prefix = qname.getPrefix();
// Treat default namespace as "" and not null
if (prefix == null)
prefix = Constants.EMPTYSTRING;
else i... | [
"private QName importNamespace(final QName qname) {\n String prefix = qname.getPrefix();\n final String namespace = qname.getNamespaceURI();\n boolean prefixInUse = false;\n boolean namespaceInUse = false;\n\n // check if prefix is in use\n if (prefix != null && !prefix.isE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
deleteAll method which returns a message when the user deletes all tasks | public String deleteAll() {
return "All tasks have been deleted!" + "\n";
} | [
"public void deleteAll() {\n tasks = new ArrayList<>();\n }",
"public void deleteAllTasks() {\n int rowsDeleted = getActivity().getContentResolver().delete(taskContract.TaskEntry.CONTENT_URI, null, null);\n Log.v(\"CatalogActivity\", rowsDeleted + \" rows deleted from the database\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the duration days of this application account. | public long getDurationDays(); | [
"public int elapsedTimeDays() {\n\t\treturn (int)((System.currentTimeMillis() - checkedOutTime) / DURATION_DAY);\n\t}",
"public Integer getRemainingDays();",
"public double asDays() {\n\t\treturn asNanoseconds() / DAY;\n\t}",
"public long getDuration() {\n\t\treturn _timesheetTask.getDuration();\n\t}",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for the COM property "TimerTrigger" | @DISPID(31)
// = 0x1f. The runtime will prefer the VTID if present
@VTID(36)
asci.activebatch.enumJobTimerTriggerType timerTrigger(); | [
"public TTrigger getTrigger() {\r\n return _trigger;\r\n }",
"Trigger getTrigger();",
"abstract public TimeTrigger getTimeTrigger();",
"String getTrigger();",
"@DISPID(28)\r\n\t// = 0x1c. The runtime will prefer the VTID if present\r\n\t@VTID(33)\r\n\tboolean enableTimerTriggers();",
"public String ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a LayeredComponent lc1 to another lc2 such that lc2.layer0 is added to lc1.firstLayer, lc2.layer1 is added to lc1.(firstLayer+1) and so on. | public static void addLayerComponent(LayeredComponent lc1, LayeredComponent lc2, int firstLayer) {
int layerInlc1 = firstLayer;
for (int i = 0; i < lc2.numberOfLayers(); i++, layerInlc1++) {
Set<String> tmp = lc2.getLayer(i);
for (String v : tmp)
lc1.addVertex(v, layerInlc1);
}
... | [
"public static boolean theSame(LayeredComponent lc1, LayeredComponent lc2) {\n \tif (lc1.numberOfLayers() != lc2.numberOfLayers()) {\n \t\treturn false;\n \t}\n \n \tfor (int i = 0; i < lc1.numberOfLayers(); i++) {\n \t\tif (lc1.getLayer(i).size() != lc2.getLayer(i).size())\n \t\t\treturn false... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The method that is called by the NetPaint constructor to register the button and mouse listeners. | private void registerListeners() {
line.addActionListener(new LineButtonListener());
rect.addActionListener(new RectButtonListener());
oval.addActionListener(new OvalButtonListener());
image.addActionListener(new ImageButtonListener());
MouseListener listener = new ListenToMouse();
MouseMotionListener mot... | [
"private void init() {\n\t\tframe.setTitle(controller.getTitle());\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tJToolBar toolbar = new JToolBar();\n\t\tint i = 0;\n\t\tfor (String buttonName : controller.getButtonNames()) {\n\t\t\tJButton button = new JButton(buttonName);\n\t\t\tbutton.addActionL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the response message. | public void setResponseMessage( String responseMessage ) {
this.responseMessage = responseMessage;
} | [
"public void setResponseMessage(String responseMessage) { this.responseMessage = responseMessage; }",
"public void setResponseMessage(String responseMessage) {\n this.responseMessage = responseMessage;\n }",
"public void setResponseMessage(java.lang.String responseMessage) {\n this.responseMess... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Failure test for the constructor. IllegalArgumentException should be thrown for null template. | public void test_ctor_failure1() {
try {
new CompetitionSituationTimelineAndPrizeGenerator(
null,
100.0, 200.0, 100.0,
new Date(100000), new Date(300000), 100000);
fail("IllegalArgumentException sho... | [
"public void testCtor_Failure1() {\r\n try {\r\n new TCAuthToken(-2);\r\n fail(\"IllegalArgumentException is expected.\");\r\n } catch (IllegalArgumentException e) {\r\n //success\r\n }\r\n }",
"public void testConstructor_NullMessage() {\r\n try {\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated int64 courseids = 2; | long getCourseids(int index); | [
"java.util.List<java.lang.Long> getCourseidsList();",
"int getCourseidsCount();",
"long getCourseid();",
"public studentList(int size, String course) {\n int IDrange=2*size;\n studentID=new int[size];\n boolean[] usedID=new boolean[IDrange];\n for (int i=0;i<IDrange;i++) usedID[i]=false;\n for (int i=0;i<size... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The resolver which resolved this ResolvedModuleRevision | public DependencyResolver getResolver() {
return resolver;
} | [
"public ProjectDependenciesResolver getDependenciesResolver() {\n return dependenciesResolver;\n }",
"public DependencyResolver getArtifactResolver() {\n return artifactResolver;\n }",
"protected ResolvedSite getResolvedSite()\n\t{\n\t\treturn (ResolvedSite)getResolvedArtifactSource();\n\t}",
"@... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the collection of sprites, as a TreeMap [KEY => VALUE]. | public TreeMap<Integer, Sprite> getSprites()
{
return sprites;
} | [
"ArrayList<Sprite> getSpriteArray();",
"public List<Sprite> getSprites() {\n \t\treturn this.sprites;\n \t}",
"public Map<Point, GameObject> getObjects() {\n\t\tMap<Point, GameObject> map = new LinkedHashMap<Point, GameObject>();\n\t\tfor (int x = 0; x < width; x++) {\n\t\t\tfor (int y = 0; y < height; y++) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ELSE" $ANTLR start "UPTAKE" | public final void mUPTAKE() throws RecognitionException {
try {
int _type = UPTAKE;
int _channel = DEFAULT_TOKEN_CHANNEL;
// C:\\Users\\David\\workspace\\Virtual-Ecology-Workbench\\src\\VEW\\XMLCompiler\\ANTLR\\BACON.g:82:12: ( 'uptake' )
// C:\\Users\\David\\work... | [
"public final void mRULE_KW_ELSE() throws RecognitionException {\n try {\n int _type = RULE_KW_ELSE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalParser.g:29772:14: ( 'else' )\n // InternalParser.g:29772:16: 'else'\n {\n match(\"else\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add/subtract gamma from each image pixel | public void applyGamma(double red, double green, double blue) {
//get image size
int width = rawImage.getWidth();
int height = rawImage.getHeight();
// color information
int A, R, G, B;
int pixel;
//constant value curve
final int MAX_SIZE = 256;
f... | [
"public float getGamma();",
"double getGamma();",
"public native boolean gammaImage(String gamma) throws MagickException;",
"public void setGamma(float gamma);",
"public void TransformacaoGamma(int altura_Imagem1, int largura_Imagem1, int matriz_Imagem1[][],\r\n\t\t\tfloat Gamma, float valor) throws Excepti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column QA_TEST_QRTZ_TRIGGER_REGISTRY.registry_group | public void setRegistryGroup(String registryGroup) {
this.registryGroup = registryGroup;
} | [
"public String getRegistryGroup() {\n return registryGroup;\n }",
"@Override\n\tpublic void setGroupId(long groupId) {\n\t\t_registration.setGroupId(groupId);\n\t}",
"@Override\n public void setGroupId(long groupId) {\n _leagueDay.setGroupId(groupId);\n }",
"public void setRegistry(Regi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the fieldBoxes which contains the state of the field and the GameCards in it. | public List<HBox> getFieldBoxes() {
return fieldBoxes;
} | [
"public ArrayList<Box> getBoxes() {\n Log.d(TAG, \"getBoxes: id: \" + mCurrentDrawingId + \" size: \" + getBoxes(mCurrentDrawingId).size());\n return getBoxes(mCurrentDrawingId);\n }",
"public Box[][] getBoxes()\n {\n return boxes;\n }",
"public List<Box> getBoxes() {\r\n\t\treturn box... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate the contents of the Memory Info box | public static String getMemoryInfo() {
Runtime rt = Runtime.getRuntime();
int maxMemory = (int)(rt.maxMemory() / (1024 * 1024)); // Max memory in MB
int currentTotalMemory = (int)(rt.totalMemory() / (1024 * 1024)); // Total memory in MB
double freeMemory = (double)(((int)rt.freeMemory()) / (1024.0 * 1024.0)... | [
"public static void showMemoryInfo()\r\n\t{ \r\n\t\tRuntime rt = Runtime.getRuntime(); \r\n\t\tpf(\"Maxx : \\t %d Kb\\n\", rt.maxMemory() / 1024); \r\n\t\tpf(\"Free : \\t %d Kb\\n\", rt.freeMemory() / 1024); \r\n\t\tpf(\"Totl : \\t %d Kb\\n\", rt.totalMemory() / 1024); \r\n\t\tpf(\"Used : \\t %d Kb\\n\", (rt.totalM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method should reorder the given list of Cluster Ids by applying any necessary heuristic for this planner For UserConcentratedPodPlanner we need to order the clusters in a zone across pods, by considering those pods first which have more number of VMs for this account This reordering is not done incase the clusters... | @Override
protected List<Long> reorderClusters(final long id, final boolean isZone, final Pair<List<Long>, Map<Long, Double>> clusterCapacityInfo, final VirtualMachineProfile vmProfile,
final DeploymentPlan plan) {
final List<Long> clusterIdsByCapacity = clusterCapac... | [
"@Override\n protected List<Long> reorderPods(final Pair<List<Long>, Map<Long, Double>> podCapacityInfo, final VirtualMachineProfile vmProfile, final DeploymentPlan plan) {\n final List<Long> podIdsByCapacity = podCapacityInfo.first();\n if (vmProfile.getOwner() == null) {\n return podId... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update the internal state of the Actor. This means decrement the cool down counter. | public void update() {
decrementCooldown();
} | [
"public void decrementCooldown() {\n\t\tcoolDownCounter--;\t\t\n\t}",
"public void resetCoolDown() {\n\t\tcoolDownCounter = coolDown;\n\t}",
"public void countDown() {\n\t\t// phaser.arriveAndDeregister();\n\t\tsynchronized (lock) {\n\t\t\tcounter--;\n\t\t\tif (counter == 0) {\n\t\t\t\tlock.notifyAll();\n\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This data encapsulation method sets the votes array. | public void setVotes(int[] votes)
{
this.votes = votes;
} | [
"public int[] getVotes() \r\n {\r\n return votes;\r\n }",
"@Test\n public void testSetVotes() {\n System.out.println(\"setVotes\");\n VotesDTO i2 = new VotesDTO();\n i2.setVotes(votes);\n VoteDTO[] expResult = votes;\n VoteDTO[] result = i2.getVotes();\n a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the trash entry created when this entity manager was moved to the Recycle Bin. The trash entry may belong to one of the ancestors of this entity manager. | @Override
public TrashEntry getTrashEntry() throws PortalException, SystemException; | [
"@Override\n\tpublic com.liferay.portlet.trash.model.TrashEntry getTrashEntry()\n\t\tthrows com.liferay.portal.kernel.exception.PortalException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException {\n\t\treturn _ext_information.getTrashEntry();\n\t}",
"@Override\n public com.liferay.portlet.trash.model.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deinitialize IHA library. Should be called before unloading the DLL. \n Please see the IHA C interface documentation for error codes thrown via IhaJniException. | public void IHADeInit() {
Log.d(TAG, "IHADeInit");
try {
this.service.IHADeInit();
} catch (RemoteException e) {
e.printStackTrace();
Log.d(TAG, "IHADeInit failed");
throw new RuntimeException("IHADeInit failed", e);
}
} | [
"void unInit();",
"public static void cleanUp() {\n CRFPPLoader.cleanUpExtractedNativeLib();\n }",
"private static native int FreeLibrary(long hLibModule);",
"public void deinitDetection() \n throws Exception {\n // Add de-initialisation code here, if any\n }",
"private native void Dest... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new daemon thread factory. | private DaemonThreadFactory() {
} | [
"protected Daemon() {\n this.thread = new Thread(this);\n }",
"public static DaemonThreadFactory getInstance() {\n return instance;\n }",
"public void createThreadManager() {\n threadManager = getConfiguration().makeThreadManager();\n }",
"public void createThread() {\n }",
"pr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'field361' field | public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField361(java.lang.CharSequence value) {
validate(fields()[361], value);
this.field361 = value;
fieldSetFlags()[361] = true;
return this;
} | [
"public void setField361(java.lang.CharSequence value) {\n this.field361 = value;\n }",
"public void setField362(java.lang.CharSequence value) {\n this.field362 = value;\n }",
"public void setField363(java.lang.CharSequence value) {\n this.field363 = value;\n }",
"public void setField359(java.lang... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Show car edit dialog. | public boolean showCarEditDialog(Car car) {
try {
// Load the fxml file and create a new stage for the popup dialog.
FXMLLoader loader = new FXMLLoader();
loader.setLocation(MainApp.class.getResource("/controllers/CarEditDialog.fxml"));
AnchorPane page = (AnchorPane) loader.load();
Stage dialogSt... | [
"@FXML\n public void showEditContactDialog() {\n Contact selectedContact = contactsTableView.getSelectionModel().getSelectedItem();\n if(selectedContact == null){\n noSelectionAllert();\n return;\n }\n FXMLLoader loader = createLoader();\n Dialog<ButtonTyp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Feed observation sequences for training. Os[n][t] = O_t^n, n = 0,...,D 1, t = 0,...,T_n 1. | public void feedData(int[][] Os) {
this.Os = Os;
} | [
"@Before\n\tpublic void generateTrainingSequences() {\n\t\t// Some data points\n\t\tArrayList<Double> a1List = new ArrayList<Double>();\n\t\ta1List.add(-2.0);\n\t\tTrainingSample a1 = new TrainingSample(0, new NDRealVector(a1List));\n\t\t\n\t\tArrayList<Double> a2List = new ArrayList<Double>();\n\t\ta2List.add(-1.9... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
guard concurrent access to display box | @Override
public synchronized Rectangle displayBox() {
return super.displayBox();
} | [
"@Override\n public void run() {\n updateDisplay();\n }",
"private void updateDisplay() {\n }",
"public void updateDisplay() {}",
"@Override\n public void doDisplay() {\n }",
"public void doDisplayState... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets chart cursor settings. | T setChartCursorSettings(ChartCursorSettings chartCursorSettings); | [
"public void setCursor(Cursor cursor)\n \t{\n \t\tcontent.getPanel().setCursor(cursor);\n \t}",
"public void setCursor(Cursor c) {\n _gLayeredPane.setCursor(c);\n _graphPanel.setCursor(c);\n }",
"void setCursorPos( int pos );",
"public void setGameCursor(GameCursor gameCursor);",
"private void setDef... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .cn.wsds.gamemaster.pb.SupportGameInfo gameinfo = 1; | java.util.List<? extends cn.wsds.gamemaster.pb.Proto.SupportGameInfoOrBuilder>
getGameinfoOrBuilderList(); | [
"cn.wsds.gamemaster.pb.Proto.SupportGameInfo getGameinfo(int index);",
"public cn.wsds.gamemaster.pb.Proto.SupportGameInfoOrBuilder getGameinfoOrBuilder(\n int index) {\n if (gameinfoBuilder_ == null) {\n return gameinfo_.get(index); } else {\n return gameinfoBuilder_.getMessage... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return an employer that matches the employer ID | public static Employer getEmployer(String employerID) {
if (mEmployerDB == null) {
mEmployerDB = new EmployerDB();
}
try {
return mEmployerDB.getEmployer(employerID);
} catch (SQLException e) {
e.printStackTrace();
}
return null;
} | [
"java.lang.String getEmployer();",
"public String getEmployer() {\r\n\t return employer;\r\n\t}",
"public Employee getEmployeeByID(String empoyeeID);",
"Employee getEmployee(Long id);",
"public void setEmployer(String employer) {\r\n\t this.employer = employer;\r\n\t}",
"Employee getEmployeeById(Lon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the tokens with a given type | public static List<Token> getTokensWithType(final List<Token> tokens, final int tokenType) {
List<Token> tokensType = new ArrayList<>();
for (final Token token: tokens) {
if (token.getType() == tokenType) {
tokensType.add(token);
}
}
return tokensType;
} | [
"public TokenList getListByType(String type) {\n\t\tTokenList tv = new TokenList();\n\t\tfor(int i = 0; i < tokenList.size(); i++) {\n\t\t\tif(tokenList.get(i).TokenType.equals(type))\n\t\t\t\ttv.addTokenVector(tokenList.get(i));\n\t\t}\n\t\treturn tv;\n\t}",
"public Token nextTokenOf(Type type){\n Token t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the type property: `GeoJSON` type. | public GeoJsonType getType() {
return this.type;
} | [
"public String getType() {\n return getGeometryType();\n }",
"String getJsonType();",
"edu.umn.cse.geoproto.GeoProto.GeometryType getType();",
"@JsonProperty(\"featuresType\")\n public GarageFeatures.Type getType() {\n return type;\n }",
"public String getTypeJson() {\n return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return (comentario.getCuerpo().isEmpty() false; esta comprobacion no la tengo clara, puedo hacerla solo para el cuerpo y usar un if solamente. otra opcion de condicional ternario return (comentario.getCuerpo().isEmpty() && comentario.getAutor().isEmpty()) ? true : false; | private boolean validateComentario (ComentarioDTO comentario){
return (comentario.getCuerpo().isEmpty() || comentario.getAutor().isEmpty()) ? false : true;
} | [
"private boolean comprobarFinalizacion(){\n boolean completo = true;\n for(int i = 0; i < NUMEROJUGADORES; i++){\n if (listaNombres[i] == null){\n completo = false;\n }\n }\n return completo;\n }",
"private boolean camposNoVacios() {\n boo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Provides the basic foliage color based on the biome temperature and rainfall | public int getBiomeFoliageColor()
{
return 11903827;
} | [
"public int getBiomeFoliageColor()\n {\n double d = getFloatTemperature();\n double d1 = getFloatRainfall();\n return ((ColorizerFoliage.getFoliageColor(d, d1) & 0xfefefe) + 0x4e0e4e) / 2;\n }",
"public int getBiomeFoliageColor(int p_150571_1_, int p_150571_2_, int p_150571_3_)\n {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method throws the methodNotFoundException | private static void methodNotFoundException() {
try{
Class c = Class.forName("Test1");
}
catch(ClassNotFoundException ex){
System.out.println("4. method Not Found Exception " +ex);
}
} | [
"private static void noSuchMethodException() {\n\t\ttry{\n\t\t\tTest t = new Test();\n\t\t\tt.getClass().getMethod(\"B\");\n\t\t}\n\t\tcatch(NoSuchMethodException ex){\n\t\t\tSystem.out.println(\"10. No Such Method Exception \" +ex);\n\t\t}\t\n\t\t\n\t}",
"public AmbiguousMethodException() {\n super();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ 'Facility' identifier is ModuleIdentifier ModuleSpecArgList? [FromClause] (externally)? realized by ModuleIdentifier ModuleRealizArgList? [FromClause] ExtensionList? ';' | public static boolean FacilityDecl(PsiBuilder b, int l) {
if (!recursion_guard_(b, l, "FacilityDecl")) return false;
if (!nextTokenIs(b, FACILITY)) return false;
boolean r, p;
Marker m = enter_section_(b, l, _NONE_, FACILITY_DECL, null);
r = consumeToken(b, FACILITY);
r = r && consumeTokens(b, 1... | [
"public static boolean FacilityModuleDecl(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"FacilityModuleDecl\")) return false;\n if (!nextTokenIs(b, FACILITY)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, FACILITY_MODULE_DECL, null);\n r = consumeToken(b, FACILITY);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indicates whether some object is "equal to" this one. Two ClassFinder objects are considered equal if their original context class loaders are all equal. | public boolean equals(Object obj) {
if (obj == this)
return true;
if (!(obj instanceof ClassFinder))
return false;
ClassFinder cf = (ClassFinder) obj;
return origContextClassLoader.equals(cf.origContextClassLoader);
} | [
"@JRubyMethod(name = \"==\", required = 1, compat = RUBY1_9)\n public IRubyObject op_equal_19(ThreadContext context, IRubyObject obj) {\n return this == obj ? context.getRuntime().getTrue() : context.getRuntime().getFalse();\n }",
"U hasSameClassAs(Object value);",
"@Override\n public boolean... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is called when back button is pressed | @Override public void onBackPressed() { } | [
"void onBackButtonClicked();",
"void onBackButtonPressed();",
"public void onBackPressed();",
"@Override\n public void handleOnBackPressed() {\n }",
"@Override\n\tpublic void onBackPressed() {\n\t\tfinal WeemoEngine weemo = Weemo.instance();\n\t\tassert weemo != null;\n\t\tif (weemo.ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the sponsorTemplates attribute value. | public void setSponsorTemplates(List<SubAwardForms> sponsorTemplates) {
this.sponsorTemplates = sponsorTemplates;
} | [
"public List<SubAwardForms> getSponsorTemplates() {\n return sponsorTemplates;\n }",
"public void SetSponsor(String sponsor){\n this.sponsor = sponsor;\n }",
"public void setSponsor(String sponsor) {\n this.sponsor = sponsor;\n }",
"@ApiModelProperty(value = \"Automatically set t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A real test of CurrencyMetaInfo. | @Test
public void testCurrencyMetaInfoRanges() {
CurrencyMetaInfo metainfo = CurrencyMetaInfo.getInstance(true);
assertNotNull("have metainfo", metainfo);
CurrencyFilter filter = CurrencyFilter.onRegion("DE"); // must be capitalized
List<CurrencyInfo> currenciesInGermany = metainfo.... | [
"@Test\n public void TestCurrencyMetaInfo() {\n CurrencyMetaInfo metainfo = CurrencyMetaInfo.getInstance();\n if (metainfo == null) {\n errln(\"Unable to get CurrencyMetaInfo instance.\");\n return;\n }\n\n if (!CurrencyMetaInfo.hasData()) {\n errln(\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Begins parsing the resumed event | private static void resumeParseEventXML() {
nextElement();
interpretElement(currentElement);
if (currentElement != null && !stop) {
Window.getInstance().addInputObsever(new InputObserver() {
@Override
public void inputChanged(InputEvent evt) {
... | [
"public void beforeParsingStarts();",
"private void readToStartFragment() throws XMLStreamException {\r\n\t\twhile (true) {\r\n\t\t\tXMLEvent nextEvent = eventReader.nextEvent();\r\n\t\t\tif (nextEvent.isStartElement()\r\n\t\t\t\t\t&& ((StartElement) nextEvent).getName().getLocalPart().equals(fragmentRootElementN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method initializes yerTavanRadioButton | private JRadioButton getYerTavanRadioButton() {
if (yerTavanRadioButton == null) {
yerTavanRadioButton = new JRadioButton();
yerTavanRadioButton.setSize(132, 21);
yerTavanRadioButton.setLocation(240, 23);
yerTavanRadioButton.setText("Yer/Tavan tipi");
yerTavanRadioButton.addActionListener(new java.awt.... | [
"public MyRadiobutton() {\n initComponents();\n }",
"private void setUpRadioButtons() {\n\n\t\t// Create the radio buttons.\n\t\tfireRadioButton = new JRadioButton(Constants.fireAlarmString);\n\t\tfireRadioButton.setMnemonic(KeyEvent.VK_A);\n\t\tfireRadioButton.setActionCommand(Constants.FIREALARM);\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if the card exist with the same item and same customer | public Card verify(Card card){
for(Card card1: readAll()){
if( card1.getCustomerId().equals(card.getCustomerId())&& card1.getItemId().equals(card.getItemId())){
return card1;
}
}return null;
} | [
"boolean similarCard(Card c);",
"boolean hasCreCard();",
"@Test\n public void testOneCustomerPerCard() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // attach different a card to a customer\n assertTrue(shop.atta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get property getter for given type by property Name | public static Method getPropertyGetter(Class type, String propertyName) {
if (!StringUtility.isNullOrEmpty(propertyName)) {
for (Method method : type.getMethods()) {
if (method.getName().matches("get" + propertyName)) {
return method;
}
... | [
"<T> T getProperty(String name, Class<T> type);",
"public <T> T getProperty(String name, Class<T> type);",
"Property getProperty(String propertyName);",
"String get(String kind, String name, String property);",
"public Object getProperty(String name);",
"public Property getProperty(String property);",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the exam grade id. | public int getExamGradeId() {
return examGradeId;
} | [
"public Long getGradeId() {\n\t\treturn gradeId;\n\t}",
"public Integer getIdGrade() {\n\t\treturn idGrade;\n\t}",
"public java.lang.String getExamId() {\n return examId;\n }",
"public Long getGradeCourseId() {\n return gradeCourseId;\n }",
"public String getExamId() {\r\n\t\treturn exam... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end invokeVarForMultipleRuns This routine determines the Unadjusted SacState time that is needed to kick off 1 or more iterations of VAR runs for a particular basin. | private long determineAppropriateUnadjSacStateTime(String basinId,
long uhgLengthInMillis,
long possibleValidSacSmaStateTime,
long overallAssimilationTarg... | [
"private void invokeVarForMultipleRuns(String basinId, long possibleValidSacSmaStateTime, long overallAssimilationTargetTimeLong )\n {\n RegularTimeSeries dischargeTimeSeries = null;\n RegularTimeSeries precipTimeSeries = null;\n String header = \"VarController.invokeVarForMultipleRuns(); \"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the grt of this temp no tice ship message. | public void setGrt(double grt) {
_tempNoTiceShipMessage.setGrt(grt);
} | [
"@Override\n\tpublic void setGrt(double grt) {\n\t\t_tempNoTiceShipMessage.setGrt(grt);\n\t}",
"@Override\n\tpublic double getGrt() {\n\t\treturn _tempNoTiceShipMessage.getGrt();\n\t}",
"public double getGrt() {\n\t\treturn _tempNoTiceShipMessage.getGrt();\n\t}",
"@Override\n\tpublic void setUnitGRT(java.lang... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XImportDeclaration__Group__2__Impl" $ANTLR start "rule__XImportDeclaration__Group_1_0__0" InternalCsv.g:3486:1: rule__XImportDeclaration__Group_1_0__0 : rule__XImportDeclaration__Group_1_0__0__Impl rule__XImportDeclaration__Group_1_0__1 ; | public final void rule__XImportDeclaration__Group_1_0__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalCsv.g:3490:1: ( rule__XImportDeclaration__Group_1_0__0__Impl rule__XImportDeclaration__Group_1_0__1 )
// InternalCsv.g:3491:2: r... | [
"public final void rule__XImportDeclaration__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:3409:1: ( rule__XImportDeclaration__Group__0__Impl rule__XImportDeclaration__Group__1 )\n // InternalCsv.g:3410:2:... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets preview image in the Register page. | public static void setRegisterImagePreview(BufferedImage image)
{
MImage imagePreview = (MImage) MainFrame.getImportantComponent("Register - Image Preview");
imagePreview.setImage(image);
} | [
"public void setPreviewPicture(EncodedImage image)\n {\n _previewPicture = image;\n }",
"public void setPreviewBitmap(String previewPath)\n {\n if (previewPath != null) {\n // Set the preview image via Glide Library\n Glide.with(ITFImageView.this)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to get the file permission status in the database | public Boolean checkFilePermission(String fileId) {
try (Connection conn = sql2o.open()) {
String sql = "SELECT filePermission from file WHERE fileId = :fileId";
System.out.println(sql);
Boolean permission = conn.createQuery(sql).addParameter("fileId", fileId)
... | [
"public String getFilePermissions() {\n\n String perm = new String(\"\");\n\n perm = getPermissionCodes();\n\n return perm;\n }",
"int getPermissionRead();",
"private static int getFilePermissions(String path)\n throws Exception {\n \n try {\n int[] modeUidAndGid = new in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |