query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Creates a new Planet with one type of Resource. | public Planet(Resource resource) {
this.type = resource;
id = nextId;
nextId++;
} | [
"public Planet(String pplanetName) {\n this.planetName = pplanetName;\n Random rand = new Random();\n clockwiseOrbit = rand.nextBoolean();\n size = 10 + rand.nextInt(10);\n \n int randPlanetTech = rand.nextInt(PlanetTechLevel.values().length);\n techLevel = PlanetTec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ShooterOff Turns Shooter Off Used in autonomous and TeleOp | void shooterOff()
{
shooter1.setPower(0);
shooter2.setPower(0);
} | [
"public void stopShooter() {\r\n setShooterSpeed(0); // set the shooter wheel speed to 0\r\n }",
"public void turnOff(int x, int y);",
"public void stop() {\n Shooter.stopMotor();\n Shooter2.stopMotor();\n }",
"public Shooter() {\n Shooter = new WPI_VictorSPX(Constants.kShooterVictor);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle the bundle command. Display details for the specified bundle(s). | public void _bundle(CommandInterpreter ci) throws Exception { // NOPMD
String nextArg = ci.nextArgument();
if (nextArg == null) {
ci.println("No bundle specified");
} else {
Bundle bundle = bundleManager.get(nextArg);
if (bundle == null)
ci.pri... | [
"private static void listBundle() {\r\n\t\tSystem.out.println(\"listBundle\");\r\n\r\n\t\tif (bundles.isEmpty()){\r\n\t\t\tSystem.out.println(\"There are no bundles\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tSet<Integer> bundleIds = bundles.keySet();\r\n\t\tIterator<Integer> itr = bundleIds.iterator();\r\n\r\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the player's private bitcoin field from the Bitcoin parameter | public void setBitcoins(double Bitcoins){
bitcoins = Bitcoins;
} | [
"public static native void UnsignedChannelAnnouncement_set_bitcoin_key_2(long this_ptr, byte[] val);",
"void setBinarySecret(BinarySecret binarySecret);",
"@Test\r\n public void setWalletTest() {\r\n player.setWallet(10);\r\n assertEquals(10, player.getWallet());\r\n }",
"void importPrivKe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Internal use method to instantiate a ResolveHandler of a success value | static <T, E extends Throwable> ResolveHandler<T, E> ofSuccess(final T success) {
return new ResolveHandler<>(Either.ofRight(success));
} | [
"private AuthenticationSuccessHandler successHandler() {\n SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();\n successHandler.setRedirectStrategy(new NoRedirectStrategy());\n\n return successHandler;\n }",
"public abstract v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for the COM property "ChangeList" | @VTID(202)
excel.PivotTableChangeList getChangeList(); | [
"public ArrayList<Change> getChangeArrayList() {\n return this.changeArrayList;\n }",
"public List<OrderedChangeObject> getOrderedChangeObjectList() {\r\n if (orderedChangeObjectList == null) {\r\n orderedChangeObjectList = new ArrayList();\r\n }\r\n \r\n return or... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates fields of the articleAnalyzeComponent. | private void updateAnalyzeComponent() {
int totalCountArticles = 0;
double totalOriginalCostEUR = 0;
double totalPriceUAH = 0;
int viewRows = sorter.getViewRowCount();
List<ArticleJdo> selectedArticles = new ArrayList<ArticleJdo>();
for (int i = 0; i < viewRows; i... | [
"@ServiceMethod(returns = ReturnType.SINGLE)\n VideoAnalyzerInner update(String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters);",
"@ServiceMethod(returns = ReturnType.SINGLE)\n VideoAnalyzerInner update(\n String resourceGroupName, String accountName, VideoAnalyzerUpdate param... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sign an invoice's preimage (note that this is the preimage of the invoice, not the HTLC's preimage). By parameterizing by the preimage instead of the hash, we allow implementors of this trait to parse the invoice and make sure they're signing what they expect, rather than blindly signing the hash. | Result_RecoverableSignatureNoneZ sign_invoice(byte[] invoice_preimage); | [
"public Result_RecoverableSignatureNoneZ sign_invoice(byte[] invoice_preimage) {\n\t\tlong ret = bindings.KeysInterface_sign_invoice(this.ptr, invoice_preimage);\n\t\tif (ret < 1024) { return null; }\n\t\tResult_RecoverableSignatureNoneZ ret_hu_conv = Result_RecoverableSignatureNoneZ.constr_from_ptr(ret);\n\t\tretu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
resolves all types and deals with .class literals and asserts | public void resolveFromJavaFile(soot.SootClass sc, soot.SootResolver resolver) {
sootClass = sc;
// add sourcefile tag to Soot class
addSourceFileTag(sc);
// get types and resolve them in the Scene
TypeListBuilder typeListBuilder = new TypeListBuilder();
... | [
"void resolveTypes() {\n // would need to lookup the base type in the symbol table\n }",
"private void doTypeChecking() {\n TypeCheckerVisitor visitor = new TypeCheckerVisitor(errorHandler, root);\n visitor.visit(program);\n }",
"private ReflectionTypeResolver(List<Class<?>> classes) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional bool rooted = 8; | boolean hasRooted(); | [
"boolean getRooted();",
"public boolean hasRoot() {\n return fieldSetFlags()[7];\n }",
"public boolean isRoot()\n // -end- 327A877801CC get_head4551A5A200BB \"isRoot\"\n {\n // -beg- preserve=no 327A877801CC get_body4551A5A200BB \"isRoot\"\n return isRoot;\n // -end- 327A877801CC get_body455... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates engine injection type using member (subclasses initializes the member) | public String createEngineInjectionType() {
return engineInjectionType;
} | [
"default <T> T instance(Class<T> type) throws UnsatisfiedInjectionException {\r\n return instance(new TypeKey<>(type), null);\r\n }",
"protected abstract Engine createEngine();",
"private Engine() {\n\n }",
"public Engine createEngine(String name) {\n\t\treturn delegate.createWrappedIndividual(na... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column T_IM_MANUFACTURERECBILLENTRY.FMATERIALID | public void setFmaterialid(String fmaterialid) {
this.fmaterialid = fmaterialid;
} | [
"public String getFmaterialid() {\n return fmaterialid;\n }",
"public void setAbacus_mfi_Id(long abacus_mfi_Id);",
"public void setMaterial_id(Integer material_id) {\n this.material_id = material_id;\n }",
"public void setMaterialid(String materialid) {\n this.materialid = materiali... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
listen preview take photo | void onPreviewTakePhoto(); | [
"private void takePicture() {\n\n captureStillPicture();\n }",
"private void captureImage() {\n camera.takePicture(null, null, jpegCallback);\r\n }",
"private void captureImage() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n fileUri = getOutputMediaFileUr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes all the objects of type "object flow state" from the collection of the current object. | void clearObjectFlowStates(); | [
"boolean removeObjectFlowState(ObjectFlowState objectFlowState);",
"public void removeAll()\r\n {\r\n synchronized (myObjectToStateMap)\r\n {\r\n myAllObjects = null;\r\n synchronized (myTaskMap)\r\n {\r\n for (Task task : myTaskMap.values())\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ 2.15 Write an application that asks the user to enter two integers, obtains them from the user and prints their sum, product, difference and quotient. / prompt for input get numbers from user and store in x and y. store x + z in y print z store x y in w print w | public static void main (String[] args){
Scanner in = new Scanner(System.in);
System.out.print("Enter the first number: ");
int n1 = in.nextInt();
System.out.print("Enter the second numer: ");
int n2 = in.nextInt();
int ans = n1 + n2;
System.out.printf("%d + %d = %d\n", n1, n2, ans);
ans = n1 - n2;
Sys... | [
"public static void main(String[] args) {\n\n Scanner input = new Scanner(System.in);\n System.out.print(\"What is the first number? \");\n String num1Str = input.nextLine();\n System.out.print(\"What is the second number? \");\n String num2Str = input.nextLine();\n int num... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
~ Constructors Creates a new StickIntersection object. | public StickIntersection (Point2D loc,
Glyph stick)
{
this.x = loc.getX();
this.y = loc.getY();
this.stick = stick;
} | [
"public Intersection(SimpleFeature intersectionFeature, AttributeGetter getter) {\n this.point = (Point) intersectionFeature.getDefaultGeometry();\n this.attGet = getter;\n this.transectId = (Integer) attGet.getValue(TRANSECT_ID_ATTR, intersectionFeature);\n this.distance = (Double) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Grafica el camino C | private void graficarCaminoC(){
for(int i = 13 ; i!=9 ; i--){
Casilla casilla = new Casilla (image3,this.Colors.getInfo(random(30)));
Tablero.add(casilla.getPane(), 9, i);
this.FaseC.addLast(casilla);
}
for(int i = 10 ; i<14 ; i++){
... | [
"void crearCamino(){\n //Recorre la solución obtenida por el A* para mostrar por pantalla el camino calculado\n //Las celdas que forman parte del camino del A* las resalta con un borde amarillo\n layer_camino = new TiledMapTileLayer(14, 10, 72, 72);\n for (int y = 0; y < 10; y++) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
pop all behind fragmentName, and replace to dest | public void navigateAfterPop(String lastRootFragmentName, Fragment dest) {
//注意,rootFragment 并不在栈中(因为没有添加到回退栈),所以此处的出栈,出的是 root 之上的其他 frgament
//所以 replace 不好用的话,那这里我就用 remove
mFragmentManager.popBackStackImmediate(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
FragmentTransaction t = ... | [
"void loadUpperFragment(Fragment fragment);",
"public void replace(int start, int end, String fragment);",
"private void replaceFragments() {\n Log.d(\"ViewPager\", \"Replacing fragments.\");\n ExhibitResource resource = mPiece.getResources().get(0);\n // Setting the resource in the sharedV... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
suppose firArray occurs before secArray return the max sum of two nonoverlapping subarraies firArray and secArray given their lengths firLen and secLen respectively | private int maxSum(int[] A, int firLen, int secLen) {
int firMax = 0, // the max sum of first array within range(0, i - secLen)
firSum = 0, // the sum of first array from i - secLen - firLen + 1 to i - secLen
secSum = 0, // the sum of secondary array from i - secLen + 1 to i
... | [
"public static ResultObject lengthLongestSubArrayWithMaxSum(int arr[]) throws NullArrayException {\n\t\tint arrSize = arr.length;\n\t\tif(arrSize == 0){\n\t\t\tthrow new NullArrayException(\"Given array is empty\");\n\t\t}\n\t\t\n\t\tint lower_limit = 0;\n\t\tint max_sum = 0;\n\t\tint sum = 0;\n\t\tint maxLengthSub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column LIANGFA_XINXIANG20170222.CASE_TODO.ASSIGN_USER | public String getAssignUser() {
return assignUser;
} | [
"public int getAssignedUser() {\n return assignedUser;\n }",
"public void setAssignUser(String assignUser) {\n this.assignUser = assignUser;\n }",
"public String getAssignee() {\r\n return this.issue.getAssignee() == null ? \"Unassigned\" : this.issue.getAssignee();\r\n }",
"priv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This adds a property descriptor for the Security User Id feature. | protected void addSecurityUserIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(),
getString("_UI_WebsphereServerTask_securityUserId_feature"),
getString("_UI_PropertyDesc... | [
"protected void addUserSidPropertyDescriptor(Object object) {\r\n\t\titemPropertyDescriptors\r\n\t\t\t\t.add(createItemPropertyDescriptor(\r\n\t\t\t\t\t\t((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),\r\n\t\t\t\t\t\tgetResourceLocator(),\r\n\t\t\t\t\t\tgetString(\"_UI_RedhatLinuxLocalUser_use... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize all inputs from view | private void initializeViewForm(){
buttonTokenize = findViewById(R.id.btnTokenize);
outputView = findViewById(R.id.outputView);
uuidDevice = findViewById(R.id.uuidDevice);
numberText = findViewById(R.id.numberText);
nameText = findViewById(R.id.nameText);
monthText = find... | [
"public InputView()\n\t{\n\t\tthis.layoutView();\n\t\tthis.registerButtons();\n\t}",
"private void initializeInputView() {\n\t\tLogHelper.getInstance().getLogger().info(String.format(StorageConstants.LOG_INITIALIZE_VIEW, \"input view\"));\n\t\ttry {\n\t\t\tFXMLLoader loader = buildFxmlLoader(\"view/fxml/InputView... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the latest file from a specific directory | public File getLatestFilefromDir(String dirPath) {
File dir = new File(dirPath);
File[] files = dir.listFiles();
if (files == null || files.length == 0) {
return null;
}
File lastModifiedFile = files[0];
for (int i = 1; i < files.length; i++) {
if (lastModifiedFile.lastModified() < files... | [
"public static long getLastModifiedfromDir(File dir){\n long latest = -1;\n if (dir.isDirectory()) {\n for (File f : dir.listFiles()) {\n if (f.lastModified() > latest) {\n latest = f.lastModified();\n }\n }\n }\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
shows the user a summary list of completed tasks and asks them to enter a task ID. passes the ID to the TaskManager method that will delete the task with that ID. | private void delete()
{
System.out.println(taskManager.getSummaryComplete() + "\n");
if(taskManager.getCount() > 0)
{
int idTaskToDelete = reader.getIntegerInput("Please enter the ID of the task to be deleted: ");
//ensures only valid ids can be entered
... | [
"public void deleteTask(String id);",
"void deleteTask(int id);",
"public void deleteTask(){\n if (this.idProperty().get() != 0 ){\n // delete from repo\n this.repo.delete(this.idProperty().get());\n // set 0, means no task selected in gui\n taskSelected.set(0)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the products before and after the current product in the ordered set where companyId = &63; and userId = &63; and status = &63;. | public Product[] findByC_U_S_PrevAndNext(
long productId, long companyId, long userId, int status,
com.liferay.portal.kernel.util.OrderByComparator<Product>
orderByComparator)
throws NoSuchProductException; | [
"public Product[] filterFindByG_U_S_PrevAndNext(\n\t\t\tlong productId, long groupId, long userId, int status,\n\t\t\tcom.liferay.portal.kernel.util.OrderByComparator<Product>\n\t\t\t\torderByComparator)\n\t\tthrows NoSuchProductException;",
"public Product[] findByU_S_PrevAndNext(\n\t\t\tlong productId, long use... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
DialogFragment.show() will take care of adding the fragment in a transaction. We also want to remove any currently showing dialog, so make our own transaction and take care of that here. | void showDialog() {
FragmentTransaction ft = getFragmentManager().beginTransaction();
Fragment prev = getFragmentManager().findFragmentByTag("dialog");
if (prev != null) {
ft.remove(prev);
}
// ft.addToBackStack(null);
// Create and show the dialog.
mD... | [
"void showDialog()\r\n {\n FragmentTransaction ft = getActivity().getFragmentManager().beginTransaction();\r\n android.app.Fragment prev = getActivity().getFragmentManager().findFragmentByTag(\"dialog\");\r\n if (prev != null) {\r\n ft.remove(prev);\r\n }\r\n ft.addT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine if this is a group conversation. | public boolean isGroupConversation() {
CloseableIterator<Membership> i = null;
try {
i = this.memberships.closeableIterator();
if (i.hasNext()) {
i.moveToNext();
return i.hasNext();
}
return false;
} finally {
... | [
"public boolean isGroupChat() {\n return mIsGroupChat;\n }",
"public boolean isGroup();",
"boolean hasChatGroupId();",
"public boolean isGroup() {\n if (overrideGroupKey != null || isAppGroup()) {\n return true;\n }\n return false;\n }",
"public boolean isGroup()\n\t{\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle host updated. If the host is DHCP server or gateway, update connect mac and vlan. | private void hostUpdated(Host host) {
hostUpdated(host, defaultServerInfoList);
hostUpdated(host, indirectServerInfoList);
} | [
"private void updateHost(CollAHost host) throws NonExistentUser {\n try {\n Server server = Server.getInstance();\n CollAHost temp = server.getUser(host.getNameUser()).getHost(host.getName());\n host.setRoundTripTime(temp.getRoundTripTime());\n temp = null;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
toString method method returns a value of type String. The purpose of this method is to write out the reservation by printing out the name of the customer and the time of the reservation, along with the id. | public String toString()
{
return "Reservation name: " + name + " time: "
+ time + " id: " + Id;
} | [
"public String printByReserve(){\n return \"ReserveAmount: \"+this.reserveAmount+\" ID: \"+this.itemID+\" Description: \"+this.description;\n }",
"@Override\n public String toString()\n {\n String customer = \"\\n\\tCustomer \";\n customer += getKey() + \" party of \";\n customer += ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getGamesPlayed method, of class User. | @Test
public void testGetGamesPlayed() {
System.out.println("getGamesPlayed");
User instance = testUser;
int expResult = 0;
int result = instance.getGamesPlayed();
assertEquals(expResult, result);
} | [
"@Test\r\n public void testGetGamesLost() {\r\n System.out.println(\"getGamesLost\");\r\n User instance = testUser;\r\n int expResult = 0;\r\n int result = instance.getGamesLost();\r\n assertEquals(expResult, result);\r\n }",
"@Test\r\n public void testGetGamesWon() {\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
======================================================================= Core methods Constructor. Create a new backward inference graph to process the given data. The parent reasoner supplies the ruleset and any additional schema graph. | public LPBackwardRuleInfGraph(Reasoner reasoner, LPRuleStore ruleStore, Graph data, Graph schema) {
super(data, reasoner);
if (schema != null) {
fschema = new FGraph(schema);
}
engine = new LPBRuleEngine(this, ruleStore);
tempNodecache = new TempNodeCache(this);
} | [
"@Override\n public InfGraph bind( Graph data ) throws ReasonerException {\n RETERuleInfGraph graph = new RETERuleInfGraph(this, rules, schemaGraph, data);\n return graph;\n }",
"public Builder() {\n this(Graphs.<N, E>createUndirected());\n }",
"@Override\n public synchronized voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove a include path from the LLVM preference store. | public static void removeIncludePath(String path) {
removeValue(PreferenceConstants.P_LLVM_INCLUDE_PATH, path);
} | [
"public static void removeLibraryPath(String path) {\n\t\tremoveValue(PreferenceConstants.P_LLVM_LIBRARY_PATH, path);\n\t}",
"void removeBottomInclude(String include);",
"public RemoteLibrary removeLibrary(String path);",
"void removeTopInclude(String include);",
"public static void setIncludePath(String pa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Searches a file for a keyword and prints all matching lines | private void searchKeyword(File file) throws IOException {
//带资源的try语句 无论是否抛出例外,流都将被关闭
try(Scanner in = new Scanner(file)) {
int lineNum = 0;
while (in.hasNext()) {
lineNum++;
String line = in.nextLine();
if (line.contains(keyword... | [
"public void search(File file) throws IOException {\n Scanner in = new Scanner(new FileInputStream(file));\n int lineNumber = 0;\n while(in.hasNextLine()){\n lineNumber++;\n String line = in.nextLine();\n if(line.contains(keyword)){\n System.out.p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
judge whether the car's fuel tank is full or not | public boolean fuelFull() {
boolean fuelFull = false;
if(this.fuel==this.tankCapacity){
fuelFull=true;
}
return fuelFull;
} | [
"boolean IsFullFuelTank();",
"public boolean isGasTankEmpty() {\r\n\t\tif(fuelLevel < 0.05)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"public boolean getFullFuelTank() {\n return interactor.getFullFuelTank(); }",
"public Boolean isFull() {\n\t\tif (this.mVehicles.size() == this.mCapacity)\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Choose a Euro Beat backdrop gif. | private int chooseEuroBeatBackdrop() {
Random random = new Random();
int bound = 63;
int number = random.nextInt(bound);
// if backdrop was same as the last, try to pick another
if (number == lastEuroBeatBackdrop) {
number = random.nextInt(bound);
}
... | [
"private void chooseRandomBackdrop() {\n GifDrawable gifDrawable;\n GifImageView imageView = findViewById(R.id.backdrop);\n try {\n if (euroBeatPlaying) {\n gifDrawable = new GifDrawable( getResources(), chooseEuroBeatBackdrop() );\n gifDrawable.setLoopC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Keystorepwdloc' attribute. If the meaning of the 'Keystorepwdloc' attribute isn't clear, there really should be more of a description here... | String getKeystorepwdloc(); | [
"String getKeystoreloc();",
"String getPrivateKeyLocation();",
"public String getKeystorePassword() {\n return getHelpedParameters().getFirstValue(\"keystorePassword\", \"\");\n }",
"public String getKeyStorePassword() { return this.getOrCreateGlobalProperty(PROP_NAME_JKSKEY_PASS, \"\"); }",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a new command container | public TexCommandContainer() {
commandHash = new HashMap(4);
sortedCommands = builtIn;
size = 0;
} | [
"Commands createCommands();",
"Command createCommand();",
"public @NonNull Command<C> build() {\n final List<CommandComponent<C>> commandComponents = new ArrayList<>(this.commandComponents);\n /* Construct flag node */\n if (!this.flags.isEmpty()) {\n final FlagAr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
////////////////// Helper Methods // ////////////////// Used as shorthand for System.out.println. | private static void println( String s ) { System.out.println( s ); } | [
"private static void print( String s ) { System.out.print( s ); }",
"private static void print(String s) { System.out.print(s); }",
"private static void println(String msg)\r\n\t{\r\n\t\tif (verbose) System.out.println(msg);\r\n\t}",
"private static void print(String msg)\r\n\t{\r\n\t\tif (verbose) System.out... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set single connection for work with temporary table | public void setTemporaryConnection(SingleConnectionDataSource singleConnection); | [
"public SingleConnectionDataSource getTemporaryConnection();",
"public void setConnectionContext(Object tmp) {\n this.connectionContext = tmp;\n }",
"public void setConnectionPool(ConnectionPool tmp) {\n this.connectionPool = tmp;\n }",
"private static Statement setConnection() {\n try {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the data for the currently selected LineChart. | private void updateLineChart() {
Diagram dia = chartSelectorPad.getSelected();
setLineChartData(dia, this.paused);
} | [
"public void updateLineChart()\r\n {\r\n hoursLoggedSeries = new XYChart.Series<>();\r\n hoursLoggedSeries.setName(Integer.toString(LocalDate.now().getYear()));\r\n lineChart.getData().clear();\r\n \r\n try{\r\n populateSeriesFromDB();\r\n }\r\n catch(S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the "transitionType" attribute | org.landxml.schema.landXML11.SpiralType.Enum getTransitionType(); | [
"public String getTransitionType()\n\t{\n\t\treturn m_sType;\n\t}",
"public abstract TransitionType getTransitionType();",
"TransitionType createTransitionType();",
"org.landxml.schema.landXML11.SpiralType xgetTransitionType();",
"Transition getTransition();",
"protected Class<? extends edu.duke.cs.jflap.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines whether the value is allowed by this constraint. | public boolean allow(T value) {
return (value == null && nullAllowed) || !(value == null || ((max != null &&
value.compareTo(max) > 0) || (min != null && value.compareTo(min) < 0)));
} | [
"public boolean hasValueConstraints() {\n return constraints.isEmpty();\n }",
"public boolean isValueValid() {\n\n boolean result = false;\n\n if(getSeverity() < ArchiveSeverity.INVALID.getSeverityValue()\n || getSeverity() == ArchiveSeverity.REPEAT.getSeverityValue(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
BaseFont bfChinese = BaseFont.createFont( "STSongStdLight" ,"UniGBUCS2H",BaseFont.NOT_EMBEDDED); | public static Font getZhFont(int size,int style) throws IOException, DocumentException {
BaseFont bfChinese = BaseFont.createFont("D:\\eclipse-workspace\\STXIHEI.TTF", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);//黑体
Font font = new Font(bfChinese, size,style);
return font;
} | [
"public static Font getZhFont() throws IOException, DocumentException {\n BaseFont bfChinese = BaseFont.createFont(\"D:\\\\eclipse-workspace\\\\STXIHEI.TTF\", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);//黑体\n Font font = new Font(bfChinese, 12,Font.NORMAL);\n return font;\n }",
"public st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Is a given voxel inside the contour | public abstract boolean isInside(int x, int y); | [
"public boolean isInside(Vector vect);",
"public abstract boolean isInside(double x, double y);",
"public boolean inBounds(ImageCoordinate c);",
"public boolean isInside(Dimension dim, Position p);",
"protected final boolean touchesBorder( List<Point2D_I32> contour ) {\n\t\tint endX = imageWidth-1;\n\t\tint... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Accessor for the property "_StorageRef" Getter for property _StorageRef. The Storage object associated with this model, wrapped in a WeakReference to avoid resource leakage. | protected java.lang.ref.WeakReference get_StorageRef()
{
return __m__StorageRef;
} | [
"public Storage getStorage()\n {\n return __m_Storage;\n }",
"public Storage storage() {\n return this.innerProperties() == null ? null : this.innerProperties().storage();\n }",
"protected void set_StorageRef(java.lang.ref.WeakReference refStorage)\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use DebugLinkLog.newBuilder() to construct. | private DebugLinkLog(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"private DebugLinkState(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n\t\t\tsuper(builder);\n\t\t}",
"private DebugLinkDecision(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n\t\t\tsuper(builder);\n\t\t}",
"public String build(LogTrace logTrace) throws IllegalAccessException;",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct the dilate operator with the given structuring element | public Dilate(StructuringElement se) {
this.element = se;
final int[] sz = se.size();
sw = sz[0];
sh = sz[1];
cx = sw / 2;
cy = sh / 2;
} | [
"public Dilate() {\n\t\tthis(StructuringElement.BOX);\n\t}",
"public static void dilate(ImageProcessor input, ImageProcessor output, StructureElement structureElement) {\r\n\t\tapplyOperation(input, output, structureElement, Type.DILATE);\r\n\t}",
"DerivativeOperator createDerivativeOperator();",
"public Bina... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the global MHC restrictor with the prediction method and binding threshold specified by system properties. | public static MHCRestrictor global() {
if (global == null)
global = new MHCRestrictor(AffinityMethod.global(), AffinityThreshold.global());
return global;
} | [
"public static MHCRestrictor instance(AffinityMethod method, AffinityThreshold threshold) {\n return new MHCRestrictor(method, threshold);\n }",
"interface RestrictionProvider {\n /**\n * Device will use this function to get current.\n * restriction and post it to settings in prev... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Import__CodeAssignment_2" $ANTLR start "rule__Export__CodeAssignment_2" InternalAst.g:4536:1: rule__Export__CodeAssignment_2 : ( ruleCodeBlock ) ; | public final void rule__Export__CodeAssignment_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalAst.g:4540:1: ( ( ruleCodeBlock ) )
// InternalAst.g:4541:2: ( ruleCodeBlock )
{
// InternalAst.g:4541:2: ( rule... | [
"public final void rule__Import__CodeAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAst.g:4525:1: ( ( ruleCodeBlock ) )\n // InternalAst.g:4526:2: ( ruleCodeBlock )\n {\n // InternalAst.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the 'Operator Kind' literal with the specified name. | public static InteractionOperatorKind getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
InteractionOperatorKind result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
} | [
"public Operator getOperator(String name) {\n\t\treturn operators_.get(name);\n\t}",
"public abstract OperatorKind getOperatorKind();",
"SpatialOperator getOperator( String name );",
"public String getOperatorName() {\n return operatorName;\n }",
"public String operatorName() {\n\t\treturn operato... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
public DistributedCacheChildDispatcher(int threadPoolSize, long threadKeepAliveTime, int schedulerPoolSize, long schedulerKeepAliveTime) public DistributedCacheChildDispatcher(int schedulerPoolSize, long schedulerKeepAliveTime, ChildMapRegistry registry) | public DistributedCacheChildDispatcher(int threadPoolSize, long threadKeepAliveTime, int schedulerPoolSize, long schedulerKeepAliveTime, ChildMapRegistry<Key, Value, Factory, DB> registry)
{
super(threadPoolSize, threadKeepAliveTime, schedulerPoolSize, schedulerKeepAliveTime);
// super(schedulerPoolSize, schedulerK... | [
"public MemoryServerDispatcher(int threadPoolSize, long threadKeepAliveTime, int schedulerPoolSize, long schedulerKeepAliveTime)\n\t{\n\t\tsuper(threadPoolSize, threadKeepAliveTime, schedulerPoolSize, schedulerKeepAliveTime);\n\n\t\t// Initialize the memory server registration dispatcher. 11/28/2014, Bing Li\n//\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of SetPlayerPos method, of class Player. | @Test
public void testSetPlayerPos() {
int newPos = 0;
Player instance = new Human("Bax", 1);
} | [
"@Test\r\n public void setPositionTest() {\r\n player.setPosition(39);\r\n assertEquals(39, player.getPosition());\r\n }",
"@Test\r\n\tvoid testGetSetBoardPosition() {\r\n\t\tplayer = new Player();\r\n\t\tplayer.setBoardPosition(position);\r\n\t\tassertEquals(position, player.getBoardPosition(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/! It sets the number of EEG configuration registers that are present in the enzo3G/StarStim beacon frame. \param numRegs The number of EEG configuration registers. | public void eegNumRegs(int value){
_eegNumRegs = value;
} | [
"public void setEggsCount(int eggsCount) {\n\t\tthis.eggsCount = eggsCount;\n\t}",
"public void setNumberofRegisters(java.lang.String numberofRegisters) {\n this.numberofRegisters = numberofRegisters;\n }",
"public void eegReg(int index, char value){\n if (index >= NumEEGConfigReg) index = NumE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
From This enables all WebViews to be inspected by chrome on debuggable builds. | private void enableWebDebugging() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
if (0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE)) {
WebView.setWebContentsDebuggingEnabled(true);
}
}
} | [
"public static boolean hasDebuggingView() {\n return true;\n }",
"public CefBrowser getDevTools(Point inspectAt);",
"public CefBrowser getDevTools();",
"public ChromeDebugElement(IDebugTarget target) {\n super(target);\n }",
"public void viewDebugInformation() {\r\n debugArea.setVisible(true)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
vReturns the ChiSquare test results | public double[] getChiResults(){
return chiResult;
} | [
"private double performChiTest(){\r\n\t\tdouble[] expected = getExpected();\r\n\t\tlong[] pov = getPov();\r\n\t\tdouble chiTestResult = new ChiSquareTest().chiSquareTest(expected, pov);\r\n\t\treturn chiTestResult;\r\n\t}",
"public double getChiSquare()\n {\n double expecti = (double)totalc/byteCount.length;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the configuration for the transport layer. NOTE: the returned interface uses reflection to retrieve configuration and so values should be cached once retrieved | TransportLayerAttributes getConfig(); | [
"protected TransportConfigCallback buildTransportConfigCallback() {\n return transport -> {\n if (transport instanceof final SshTransport sshTransport) {\n val sshSessionFactory = new JschConfigSessionFactory() {\n @Override\n protected void con... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value(s) for profile (ElementDefinition.type.profile) Definition: Identifies a profile structure that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference to another structure in this profile, or a reference to a structure in another profile | public Type setProfile(UriDt theValue) {
myProfile = theValue;
return this;
} | [
"public void setProfile(Profile profile) {\n _profile = profile;\n }",
"public synchronized void setProfile(Profile profile) {\n \t\tthis.profile = new Profile(profile);\n \t\tmodificationCounter++;\n \t}",
"public void setProfile(Profile profile) {\n\t\tthis.profile = profile;\n\t}",
"public void s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a list of the n Groups that the member is most active in, sorted on title. Measure most active by the total questions posted and answers provided, in total. If there are not n groups, then return the groups that exist. | public List<Group> getGroups(int n) {
List<Group> groups = new ArrayList<Group>();
ArrayList<Membership> memberships = (ArrayList<Membership>) this.getMemberships();
int nChecked = n >= memberships.size() ? memberships.size() : n;
// Sort "Group Activeness" by sorting the membership tied... | [
"public int getNumberOfGroups();",
"int getAppearsOnGroupCount();",
"public int getNumberOfGroups() {\n return getInteger(5);\n }",
"public final native int nGroups() /*-{\n\t\tvar names = Object.keys(this.groups);\n\t\treturn names.length;\n }-*/;",
"public List<Question> getQuestions(Group group, int... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column TMP_PASTDUE.PRODUCT_CLASS_NAME | public String getPRODUCT_CLASS_NAME() {
return PRODUCT_CLASS_NAME;
} | [
"public String getProductClass() {\n return (String)getAttributeInternal(PRODUCTCLASS);\n }",
"public void setPRODUCT_CLASS_NAME(String PRODUCT_CLASS_NAME) {\r\n this.PRODUCT_CLASS_NAME = PRODUCT_CLASS_NAME == null ? null : PRODUCT_CLASS_NAME.trim();\r\n }",
"public BigDecimal getPRODUCT_CLA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field277' field. doc for field277 | public java.lang.CharSequence getField277() {
return field277;
} | [
"public java.lang.CharSequence getField277() {\n return field277;\n }",
"java.lang.String getField1571();",
"java.lang.String getField1671();",
"java.lang.String getField1371();",
"java.lang.String getField1171();",
"java.lang.String getField1338();",
"java.lang.String getField1164();",
"java.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write one line of sensor reading from file to database | public boolean writeOneReading(String line, DBSensorGroup group, List<DBSensor> userSen) throws Exception {
boolean isWrited = false;
WeatherLink mg = (WeatherLink) group.getGroupClass();
List<String> lineColumn = getLineColumns(line);
String fDate = lineColumn.get(0);
... | [
"public abstract void setInDataStorage(int index, String line);",
"public void writeLineToSdcard(String filename, String line) {\n final String outputFile = Environment.getExternalStorageDirectory().toString() + \"/\"\n + filename;\n try {\n FileWriter fstream = null;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column cczhang_order_email.send_email_time | public Date getSendEmailTime() {
return sendEmailTime;
} | [
"java.lang.String getSendTime();",
"public Date getSendTime() {\n return sendTime;\n }",
"@Generated(value = \"org.mybatis.generator.api.MyBatisGenerator\", date = \"2020-04-12T12:59:05.835+09:00\", comments = \"Source field: USER.updatedTime\")\r\n public String getUpdatedtime() {\r\n retur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method populates the child menu list for parent menu 'Settings' for the service context. | private List<MenuItem> getSettingsChildMenuForService() {
// Populate the settingsChildMenuList
for (ServiceActionEnum.Settings settingsEnum : ServiceActionEnum.Settings
.values()) {
MenuItem menuItem = new MenuItem();
// menuItem
// .setActionListener(createActionListenerMethodBinding(Constant.
... | [
"private void populateParentMenuForService() {\r\n\r\n\t\ttry {\r\n\t\t\t// Fetch all the dynamic properties for this service.\r\n\t\t\tgetServicesDynamicProperties();\r\n\t\t} catch (GWPortalGenericException ex) {\r\n\t\t\tif (this.rendered)\r\n\t\t\thandleError(\r\n\t\t\t\t\t\"com_groundwork_portal_statusviewer_a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Define o atributo bolBloqueioPagamento | public void setBolBloqueioPagamento(Boolean bolBloqueioPagamento) {
this.bolBloqueioPagamento = bolBloqueioPagamento;
} | [
"public void setBolPagamentoParcial(Boolean bolPagamentoParcial) {\n this.bolPagamentoParcial = bolPagamentoParcial;\n }",
"public DElementPagosPago() {\n super(\"pago10:Pago\");\n\n moAttFechaPago = new DAttributeDatetime(\"FechaPago\", true);\n moAttFormaDePagoP = new DAttributeSt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
itt definialjuk, hogy milyen hivasokat tud kezelni a Task service | public interface TaskService {
// lekerjuk az osszes taskot (REST konvencio)
@GET("/tasks")
Call<List<Task>> list();
// lekerunk egyetlen taskot id - szerint
@GET("/tasks/{id}")
Call<Task> getById(final @Path("id") Long id);
// letrehozunk egy taskot
@POST("/tasks")
Call<Task> crea... | [
"public interface TaskService {\r\n\r\n\r\n TaskResponse createTask(TaskRequest taskRequest);\r\n\r\n /**\r\n * @param username\r\n * @return\r\n */\r\n\r\n List<TaskResponse> getTaskNames(String username);\r\n\r\n\r\n /**\r\n * Updates the existing task\r\n *\r\n * @param taskRe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CONSTRUCTOR Initializes an empty jumble. | public Jumble() {
jumble = new HashMap<>();
total = 0;
} | [
"public Jumble(Jumble j) {\n Set<Character> letters = j.distincts();\n for (char ch : letters) {\n //this.jumble.put(ch, j.jumble.get(ch));\n this.putBatch(ch, j.count(ch));\n }\n //this.total = j.total;\n }",
"public Fumble() {\n\t\tthis(\"fumble\", null);\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function Name:raiseRequisition() Input Parameters:reqBean Return Type:String Throws : OIRSException Author :Kamatchi, Anusha Creation Date:07/07/2018 Description:Raising requisition | @Override
public String raiseRequisition(RequisitionBean reqBean)
throws OIRSException {
// TODO Auto-generated method stub
connection = DBConnection.getConnection();
String result =null;
String reqId = null;
PreparedStatement preparedStatement=null;
ResultSet resultSet = null;
Statement stmt... | [
"public void dialysisPPSRateDRGUSerIRFCMGPricerTerms()\n\t{\n\t\t//To check the status of \"Continued_Execution\" parameter, if it is set to NO it will skip this method, if not it will resume the execution \n\t\tif(oParameters.GetParameters(\"Continued_Execution\").equalsIgnoreCase(\"No\"))\n\t\t{\t\t\t\n\t\t\t//Ad... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bool durableWrites = 2; | public Builder setDurableWrites(boolean value) {
durableWrites_ = value;
onChanged();
return this;
} | [
"boolean getDurableWrites();",
"@Override\n public boolean getDurableWrites() {\n return durableWrites_;\n }",
"@Override\n public boolean getDurableWrites() {\n return durableWrites_;\n }",
"public boolean isDurable()\n {\n return isDurable;\n }",
"public void setDu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Standard Constructor for DCJavaHook | public DCJavaHook(String process_name, String trd_name, LogUtilities logs) {
super(process_name, trd_name, logs);
} | [
"public DCJavaHook (String process_name, String trd_name, LogUtilities logs,\n TestRecordHelper trd_data, \n DDGUIUtilities gui_utils, \n ProcessRequest aprocessor){\n \n super(process_name, trd_name, logs, trd_data, gui_utils, aprocessor);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If the agent still has a temporary message queue, create the real one and copy messages if any | void initMessageQueue() {
if (temporaryMessageQueue) {
temporaryMessageQueue = false;
MessageQueue queue = createMessageQueue();
if (queue != null) {
queue.setMaxSize(msgQueueMaxSize);
// Copy messages (if any) from the old message queue to the... | [
"MessageQueue createInbox();",
"MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException;",
"abstract protected Inbox createInbox(int _initialLocalQueueSize);",
"@Override\n public abstract IMessageQueue createQueue(String name) throws ReferenceException;",
"protected MessageQue... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setIdInforme method, of class Coste. | @Test
public void testSetIdInforme() {
System.out.println("setIdInforme");
long idInforme = 0L;
Coste instance = new Coste();
instance.setIdInforme(idInforme);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a ... | [
"@Test\r\n public void testSetId() {\r\n System.out.println(\"setId\");\r\n long id = 0L;\r\n Coste instance = new Coste();\r\n instance.setId(id);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\")... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Takes an input string and converts it to a Cube object | public static Cube convertInputArrayToCube(final String[] inputArr) {
final Color[] faces = new Color[Cube.NUM_OF_FACES];
for (int i = 0; i < Cube.NUM_OF_FACES; i++) {
switch (inputArr[i].toLowerCase()) {
case "red":
case "r":
faces[i] = C... | [
"public RubiksCube(){\n\t\tString[] c = {\n\t\t\t\t\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\n\t\t\t\t\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\n\t\t\t\t\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\n\t\t\t\t\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\n\t\t\t\t\"O\",\"O... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Listener method for the ajax event | protected abstract void onEvent(final AjaxRequestTarget target); | [
"abstract protected void pushCallback(AjaxRequestTarget target);",
"void onDataUploaded();",
"public interface AjaxEvent extends Serializable {\n \n /**\n * Get the event id.\n * @return The event id.\n */\n public String getEventId();\n \n /**\n * Get the http request object.\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Method inserts the node item appropriate to the item's key value. Returns: Node item inserted successfully. | public boolean insertItem(BPTreeNodeItem item){
// Quick implementation: assumes all keys are inserted in rank order
// todo: verify if need to compare key and insert at rank location
childItems.add((BPTreeChildNodeItem)item );
BPTreeNode childNode = ((BPTreeChildNodeItem)item).getChil... | [
"protected TreeNode insertItem(TreeNode tNode, KeyedItem item) throws TreeException\n {\n if (tNode == null) \n {\n // position of insertion found; insert after leaf\n // create a new node\n tNode = new TreeNode(item);\n return tNode;\n } \n\n TreeNode subtree;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
answer whether the signatures are equal, or whether one has an error | static boolean equal (String s1, String s2) {
if (s1==errorSignature) return true;
if (s2==errorSignature) return true;
if (s1==null || s1.length()==0)
return s2==null || s2.length()==0;
return s1.equals (s2);
} | [
"@Override\n public boolean verifySignature(byte[] signature) {\n try {\n Element[] sig = derDecode(signature);\n CL04SignPublicPairingKeySerParameter pk = (CL04SignPublicPairingKeySerParameter) pairingKeySerParameter;\n Pairing pairing = PairingFactory.getPairing(pairingKeySerParameter.getParame... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method setChlorophyllMin Set the 'chlorophyllMin' class variable | public int setChlorophyllMin(Float chlorophyllMin) {
try {
setChlorophyllMin(chlorophyllMin.floatValue());
} catch (Exception e) {
setChlorophyllMinError(FLOATNULL, e, ERROR_SYSTEM);
} // try
return chlorophyllMinError;
} | [
"public int setChlorophyllMin(Integer chlorophyllMin) {\n try {\n setChlorophyllMin(chlorophyllMin.floatValue());\n } catch (Exception e) {\n setChlorophyllMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return chlorophyllMinError;\n }",
"public float getChl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Network configuration options. These are required when a private Data Fusion instance is to be created. .google.cloud.datafusion.v1beta1.NetworkConfig network_config = 7; | public Builder setNetworkConfig(com.google.cloud.datafusion.v1beta1.NetworkConfig value) {
if (networkConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
networkConfig_ = value;
} else {
networkConfigBuilder_.setMessage(value);
}... | [
"@java.lang.Override\n public com.google.cloud.datafusion.v1beta1.NetworkConfigOrBuilder getNetworkConfigOrBuilder() {\n return networkConfig_ == null\n ? com.google.cloud.datafusion.v1beta1.NetworkConfig.getDefaultInstance()\n : networkConfig_;\n }",
"@java.lang.Override\n public com.google.c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The ID of the workbook where the rows are being updated. If a workbook with the specified id could not be found, this API throws ResourceNotFoundException. | public String getWorkbookId() {
return this.workbookId;
} | [
"public void setWorkbookId(String workbookId) {\n this.workbookId = workbookId;\n }",
"@GET\n\t\t\t@Path(\"/{id}/update\")\n\t\t\t@Produces({\"application/xml\"})\n\t\t\tpublic Rows getBookcourseUpdate() {\n\t\t\t\tRows rows = null;\n\t\t\t\ttry {\n\t\t\t\t\trows=new BookcourseDao(uriInfo,header).getBoo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
In the case when the fault node has multiple arguments, these must be added to the locals list for this commNode, added to the list of locals for main node information, and all safetyEqAsserts corresponding to them added to equations as well. This method performs those actions. Size of fault.faultInputMap was checked b... | private List<AgreeVar> addInputListAndEqAsserts(NodeBuilder node, Fault fault) {
List<AgreeVar> localsForCommNode = new ArrayList<AgreeVar>();
nodeArgs.clear();
// Double check size of faultInputList, must be more than 1.
if (fault.faultInputMap.size() <= 0) {
return localsForCommNode;
} else {
... | [
"private NodeBuilder createInputForCommNode(NodeBuilder node, Fault fault, Type type, String nodeName) {\r\n\t\t// This list is used to map the fault to the top node locals that\r\n\t\t// will reference this node name with its corresponding inputs and outputs.\r\n\t\t// Hence the AgreeVars that are created are spec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get message reason code from its unique ID | ReasonCode getMessageReasonCode(String msgId); | [
"java.lang.String getMessageId();",
"Bytes getMessageId();",
"long getMessageId();",
"long getMessageID();",
"int getReasonid();",
"int getMessageCode();",
"java.lang.String getMsgID();",
"java.lang.String getMessageInfoID();",
"int getIdMessage();",
"long getMsgid();",
"public static String get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to update the awarding qty in proposal lines | public void updateAwardQtyinProposal(HashMap<String, BigDecimal> qtyLineMap,
HashMap<String, BigDecimal> qtyMap); | [
"public void updateStatusInProposal(HashMap<String, BigDecimal> qtyMap, boolean awardFullqty);",
"public static void updateManualEncumAppAmt(EscmProposalMgmt proposalmgmt, Boolean iscancel) {\n\n try {\n EscmProposalMgmt baseProposalObj = proposalmgmt.getEscmBaseproposal();\n OBContext.setAdminMode()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of the wave the player currently is facing. | public int getWaveNr() {
return mWaveIndex+1;
} | [
"public int waveNum() {\n return wave_number;\n }",
"int getWave();",
"public int getWaveOrdersTaken() {\n return waveOrdersTaken;\n }",
"public Integer getShoutSound(){\n\t\tif (recorder != null)\n\t\t\tamp=recorder.getMaxAmplitude();\n\t\treturn amp;\n\t}",
"public int getWaveHeight() ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get Field Values for Creating Tasks | public ArrayList<FieldValue> getFieldValuesForCreatingTask(String title){
FieldValue field1 = new FieldValue("Title", title);
//Set Due Date to next day of the current Date
FieldValue field2 = new FieldValue("DueDate", utils.addDaysInCurrentDate(1));
//AssignedTo is not being considered so commenting it as of n... | [
"public void taskData()\n {\n TaskRequestPojo taskRequestPojo1=new TaskRequestPojo();\n taskRequestPojo1.setGroups(\"OpsManagers\");\n ArrayList groupName = taskRequestPojo1.getGroups();\n taskRequestPojo1.setAssignee(\"opsAssignee Bharath Narasimha\");... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The Persistence Layer service for UDR (User Defined Rule). Since an UDR can have complex ANDOR logic in it, it can give rise to multiple rules for the Rule Engine. The latter are called engine rules. | public interface RulePersistenceService {
/**
* Creates UDR rule.
*
* @param rule
* the UDR rule object to persist in the DB.
* @param user
* the user persisting the rule (usually also the rule author.)
* @return the persisted rule.
*/
public UdrRule create(UdrRule rule, String ... | [
"public interface RulesEngine {\n\n String MIN_REPORTING_INTERVAL_DATA = \"hawkular-alerts.min-reporting-interval-data\";\n String MIN_REPORTING_INTERVAL_DATA_ENV = \"HAWKULAR_MIN_REPORTING_INTERVAL_DATA\";\n String MIN_REPORTING_INTERVAL_DATA_DEFAULT = \"1000\";\n\n String MIN_REPORTING_INTERVAL_EVENTS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Select a single Triplet's instance by id | public Triplet selectSingle(int id) throws DAOException; | [
"TempletLink selectByPrimaryKey(String id);",
"TravelTourist selectByPrimaryKey(String id);",
"private AbstractTriplet getTriplet(byte tripletId) {\n for (AbstractTriplet trip : triplets) {\n if (trip.getId() == tripletId) {\n return trip;\n }\n }\n retu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ASSIGEMENT" $ANTLR start "BEGIN" | public final void mBEGIN() throws RecognitionException {
try {
int _type = BEGIN;
int _channel = DEFAULT_TOKEN_CHANNEL;
// C:\\Users\\lataw\\Downloads\\Oberti2u-master\\Oberti2u-master\\Algol.g:10:7: ( 'BEGIN' )
// C:\\Users\\lataw\\Downloads\\Oberti2u-master\\Obe... | [
"public final void mBEGIN() throws RecognitionException {\r\n try {\r\n int _type = BEGIN;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\Data\\\\software_construction\\\\grammar\\\\Oberon0.g:29:7: ( 'BEGIN' )\r\n // C:\\\\Data\\\\software_construction\\\\g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests changeReservationEnd it extending end works. | @Test
public void testChangeReservationEndExtendEnd() throws Exception {
Calendar cal = Calendar.getInstance();
Date start = cal.getTime();
cal.add(Calendar.HOUR, 1);
Date end = cal.getTime();
cal.add(Calendar.HOUR, +1);
Date newEnd = cal.getTime();
Reservation res1 = dataHelper.createPersistedReservat... | [
"@Test\n\tpublic void testChangeReservationEndReduceEnd() throws Exception {\n\n\t\tCalendar cal = Calendar.getInstance();\n\t\tDate start = cal.getTime();\n\t\tcal.add(Calendar.HOUR, 4);\n\t\tDate end = cal.getTime();\n\t\tcal.add(Calendar.HOUR, -1);\n\t\tDate newEnd = cal.getTime();\n\n\t\tReservation res1 = data... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Perform the move C0R0C1R1, or pass if C0 is ''. For moves other than pass, assumes that legalMove(C0, R0, C1, R1). | void makeMove(char c0, char r0, char c1, char r1) {
makeMove(Move.move(c0, r0, c1, r1, null));
} | [
"void makeMove(char c0, char r0, char c1, char r1, Move next) {\n makeMove(Move.move(c0, r0, c1, r1, next));\n }",
"boolean legalMove(Move mov) {\n if (mov == null || !validSquare(mov.toIndex())\n || !validSquare(mov.fromIndex())) {\n throw new IllegalArgumentException(\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the information of a IncidenceEmployee. | IncidenceEmployee update(IncidenceEmployee incidenceEmployee) throws EntityNotFoundException; | [
"public void updateEmployee(Employee employee);",
"public Employee updateEmployee(Employee employee);",
"public void updateEmployeeDetails(EmployeeDetails employeeDetails);",
"public void update (Employee employee);",
"public void updateEmployee(Employee employee) throws SQLException;",
"int updateEmploye... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Change locations of two elements of array of different columns and one row | public static void swap(int[][] array, int col1, int col2, int row) {
int temp = array[row][col1];
array[row][col1] = array[row][col2];
array[row][col2] = temp;
} | [
"private void cellSwap(int[][] array, int srcRow, int srcCol, int desRow, int desCol) {\n int temp = array[srcRow][srcCol];\n array[srcRow][srcCol] = array[desRow][desCol];\n array[desRow][desCol] = temp;\n }",
"public void replaceRow(int row1, int row2) {\n\n if (ro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method return htmlcode of Drop Down List that consist obtained MonitoredEntity instances | public String getHtmlDropDownList(String dropDownListId,
List<AbstractMonitoredEntity> monitoredEntityList,
int selectedEntityId){
if (monitoredEntityList==null) return "";
List<Integer> optValueList = new ArrayList<>();
... | [
"public List<String> recordList(){\n BrowserUtils.waitFor(2);\n\n Select showRecordsDropdown = new Select(recordsDropdown);\n\n List<WebElement> options = showRecordsDropdown.getOptions();\n\n List<String> actualList = BrowserUtils.getElementsText(options);\n\n return actualList;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Start editing properties of the given itemElementView | void onEditItem(E itemElementView); | [
"void updateItem(E itemElementView);",
"@Override\n public void editItem() {\n getView().displayEditItemView();\n }",
"public void setEditedItem(Object item) {editedItem = item;}",
"public void edit(int itemIndex) {\n\n this.getWrappedControl().edit(itemIndex);\n }",
"protected abstra... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a priority queue with the specified initial capacity that orders its elements according to their natural ordering. | public static <T extends Comparable<? super T>> PriorityQueue<T> of(int initialCapacity) {
return new PriorityQueue<>(Comparator.naturalOrder(), initialCapacity);
} | [
"public MyPriorityQueue(int initialCapacity) {\n\t\tif(initialCapacity<1){\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tfunction = null;\n\t\tpq = new Object[initialCapacity+1];\n\t\tcapacity = initialCapacity;\n\t\tsize = 0;\n\t\tfor(int i = 0;i<capacity;i++){\n\t\t\tpq[i] = null;\n\t\t}\n\t}",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the value of locations | public abstract void setLocations(java.util.Set locations); | [
"public void setLocations(entity.GL7Location[] value);",
"void setLocation1(double location1);",
"void setLocation(float lat, float lng);",
"public void setLocation(Location loc){\n locationSelected = loc;\n }",
"public void updateArrayLocation(ArrayList<Location> locations){\r\n this.locat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find the shortest Hamilton cycle in the given graph that extends the given prefix. Parameter graph is a Graph object, parameter prefix is a list of nodes that form a path in the graph, and prefixDistance is the length of that path. Return value is a 2tuple consisting of the Hamilton cycle found together with its total ... | private PathAndLen shortestCycleWithPrefix(Graph graph, Path prefix, int prefixDistance) throws WcbcException {
if (prefix.getLength() < graph.getNumNodes()) {
// At least one more node must be added to the path. For each
// node N that can be reached from the final node of prefix, if N
// is not already in ... | [
"static PathAndLen completeCycle(Graph graph, Path prefix, int prefixDistance) throws WcbcException {\n\t\tString firstNode = prefix.start();\n\t\tString lastNode = prefix.end();\n\t\tEdge edgeCompletingCycle = new Edge(lastNode, firstNode);\n\t\tif (!graph.containsEdge(edgeCompletingCycle)) {\n\t\t\treturn null;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function to open the activity editordeletemeal | private void openEditOrDeleteMealActivity(String date, int category, int position){
Intent myIntent = new Intent(Calendar.this, EditOrDeleteMeal.class);
myIntent.putExtra("date", date);
myIntent.putExtra("category", category);
myIntent.putExtra("position", position);
myIntent.put... | [
"public void open_dispute_activity(View v) {\n mJobs job = app.db.mJobsDao().get_job(_job_id);\n Intent dis = new Intent(ViewJobActivity.this, DisputeActivity.class);\n dis.putExtra(\"_job_id\", _job_id);\n dis.putExtra(\"artisan_app_id\", job.artisan_app_id);\n startActivity(dis)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets ith "controlPersonsExt" element | void setControlPersonsExtArray(int i, ch.crif_online.www.webservices.crifsoapservice.v1_00.ControlPerson controlPersonsExt); | [
"void setControlPersonsExtArray(ch.crif_online.www.webservices.crifsoapservice.v1_00.ControlPerson[] controlPersonsExtArray);",
"public void setControlPersonsExtArray(int i, ch.crif_online.www.webservices.crifsoapservice.v1_00.ControlPerson controlPersonsExt)\n {\n synchronized (monitor())\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Performs setup on a registry entry | public static <T extends IForgeRegistryEntry<T>> T setup(@Nonnull final T entry, @Nonnull final ResourceLocation registryName) {
Preconditions.checkNotNull(entry, "Entry cannot be null!");
Preconditions.checkNotNull(registryName, "Registry name to assign to entry cannot be null!");
entry.setRegi... | [
"@Nonnull\n public static <T extends IForgeRegistryEntry<T>> T setup(@Nonnull final T entry, @Nonnull final String name) {\n Preconditions.checkNotNull(name, \"Name to assign to entry cannot be null!\");\n return setup(entry, new ResourceLocation(Rustic.MODID, name));\n }",
"public void setReg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetches the total amount of time a specific shift has | public int totalShiftHours() {
int totalStartTimeMinutes = (getStartingTime().getHour()*60) + getStartingTime().getMinute();
int totalStopTimeMinutes = (getStoppingTime().getHour()*60) + getStoppingTime().getMinute();
return (totalStopTimeMinutes - totalStartTimeMinutes);
... | [
"int getTotalRepeatTime();",
"public int calcTotalTime() {\n return transportationTime * nrOfRides;\n }",
"long getTotalUnscheduledTime();",
"int getTimeSpend();",
"public int getTotalTime() {\n if (active == TYPE_TIMER) {\n return timer.getSeconds() + (timer.getMinutes() * 60); ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the AccessibleAction associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleAction interface on behalf of itself. | public AccessibleAction getAccessibleAction() {
return this;
} | [
"public javax.accessibility.AccessibleAction getAccessibleAction() {\n try {\n XAccessibleAction unoAccessibleAction = (XAccessibleAction)\n UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleContext);\n return (unoAccessibleAc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |