query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
This method was generated by MyBatis Generator. This method sets the value of the database column jk_loan_repay_record.repay_plan_id
public void setRepayPlanId(String repayPlanId) { this.repayPlanId = repayPlanId; }
[ "public String getRepayPlanId() {\n return repayPlanId;\n }", "public void setPlanId(long planId);", "public void setJP_PP_PlanLine_ID (int JP_PP_PlanLine_ID);", "public void setPlanId(Integer planId) {\n this.planId = planId;\n }", "public void setRepayId(Long repayId) {\n this.r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests that if the data object return all the data for an IP city the listener properly populates the tags.
@Test public void testThatIfAllDataIsProvidedAllGeoIpTagsAreSet() { final SettingValue settings = context.mock(SettingValue.class); context.checking(new Expectations() { { allowing(settings).getBooleanValue(); will(returnValue(Boolean.TRUE)); } }); SettingsReader settingsReader = new CachedS...
[ "@Test\n\tpublic void testThatIfDataIsNullGeoIpTaggerIsNullSafe() {\n\n\t\tfinal SettingValue settings = context.mock(SettingValue.class);\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(settings).getBooleanValue();\n\t\t\t\twill(returnValue(Boolean.TRUE));\n\n\t\t\t}\n\t\t});\n\t\t\n\t\tSetti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Apply a bilateral filter (Lab) > (Lab)
public static int[] bilateralFilter(int[] data, int w, int h) { int[] newData = new int[w * h]; // apply filter int kernel = 3; // kernel size double s1 = 100, s2 = 10; // sigma values double i2ss1 = 0.5 / s1 / s1, i2ss2 = 0.5 / s2 / s2; for (int x = 0; x ...
[ "private static native void bilateralTextureFilter_0(long src_nativeObj, long dst_nativeObj, int fr, int numIter, double sigmaAlpha, double sigmaAvg);", "public void bild_linearerfilter(Bild eingangsbild, double[][] filter)\n {\n double min = 0;\n double max = 0;\n for(double[] i : filter)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method enters edit mode, an interactive state where an employee user can change their availability. It applys css and enables the user to simply click on a tile to toggle between available and unavailable Tiles are painted green and red for available and unavailable respectively
public void editAvailability(ActionEvent event) { // Once edit mode is entered, create a listener that clear the css upon exiting currentView.selectedToggleProperty().addListener(new ChangeListener<Toggle>() { @Override public void changed(ObservableValue<? extends Toggle> observable, Toggle oldValue, Toggle ...
[ "public void paintAvailability() {\n\t\tfor (int row = 0; row < 2; row++) {\n\t\t\tfor (int col = 0; col < 7; col++) {\n\t\t\t\tTextArea currentArea = tiles[row][col];\n\t\t\t\tShiftTime shiftTime = new ShiftTime(row, col);\n\t\t\t\tif (employee.getIsAvailable(shiftTime)) {\n\t\t\t\t\tcurrentArea.setStyle(STYLE_AVA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes a humanreadable text that shows the expected remaining time until the build completes.
public String getEstimatedRemainingTime() { long d = executable.getParent().getEstimatedDuration(); if(d<0) return "N/A"; long eta = d-(System.currentTimeMillis()-startTime); if(eta<=0) return "N/A"; return Util.getTimeSpanString(eta); }
[ "private long remainingTime() {\n final long remainingTime = this.designatedEnd - System.currentTimeMillis();\n return remainingTime >= 0 ? remainingTime : 0L;\n }", "public void printTimeRemaining() {\n long timeInSeconds = getTimeRemaining();\n long seconds = timeInSeconds % 60;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo para poder cambiar la edad
public void cambiarEdad(int edad){ this.edad = edad; }
[ "@Override\n public void onCambiarModoSaludo(boolean educado) {\n mVista.cambiarTextoModo(educado);\n }", "private void editPaper() {\r\n\t\t\r\n\t}", "public void editarEscenario() {\n EditEscenario edEsc = EditEscenario.getInstance();\n edEsc.display(escenario_label.getText(), planE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start : Added for SNMPTable
public MSSnmpTable getSnmpTable() { return snmpTable; }
[ "public static String snmpWalk(String oid, String ip, String readCommunity) {\n SNMPv1CommunicationInterface communicationInterface;\n InetAddress ipAddress;\n StringBuffer table = new StringBuffer();\n try {\n ipAddress = InetAddress.getByName(ip);// Recupera o inetAddress\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ask the user, which project do they wish to update.
public static void updateFinal(){ projectChosen = getQuestionInput(); try { Connection myConn = DriverManager.getConnection(url, user, password); String sqlInsert = "UPDATE projects" + " SET completed = ?" + "WHERE project_num = " + ...
[ "public void printPromptForProject() {\n System.out.println(\"Enter the project that this task belong to (optional):\");\n printInputCue();\n }", "private static void update_project_status() {\r\n\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for property weight_empty.
public int getWeight_empty() { return this.weight_empty; }
[ "public void setWeight_empty(int weight_empty) {\n\t\tthis.weight_empty = weight_empty;\n\t}", "public int getWeight_full() {\n\t\treturn this.weight_full;\n\t}", "@Override\n\tpublic double getWeight() {\n\t\treturn Math.max(weight, getDimensionalWeight());\n\t}", "public boolean isSetWeight() {\n\t\treturn ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
createExisting( RDBRow ) Factory method creates a CompanyDO object by searching for it in the database using the CompanyDO.PrimaryKey value in the passed RDBRow.
protected static CompanyDO createExisting( RDBRow row ) throws SQLException, ObjectIdException, DataObjectException , DatabaseManagerException { if ( null == row ) return null; RDBColumnValue pk = null; try { pk = row.get( CompanyDO.PrimaryKey ); return createExisting( pk ); ...
[ "protected static CompanyDO createExisting( ResultSet rs )\n throws SQLException, ObjectIdException, DataObjectException\n\t\t, DatabaseManagerException\n {\n\tif ( null == rs )\n\t return null;\n\tCompanyDO ret = null;\n\tif ( isView ) {\n\t ret = new CompanyDO ();\n\t ret.initFromResultSet( rs );\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/You are playing the following Flip Game with your friend: Given a string that contains only these two characters: + and , you and your friend take turns to flip twoconsecutive "++" into "". The game ends when a person can no longer make a move and therefore the other person will be the winner. Write a function to dete...
public boolean canWin(String s) { int n = s.length(); for(int i=1;i<n;i++){ if(s.charAt(i-1)=='+'&&s.charAt(i)=='+'&&!canWin(s.substring(0,i-1)+"--"+s.substring(i+1)))return true; } return false; }
[ "private boolean isStrobogrammaticByTwoPointers(String numStr){\n if(numStr == null || numStr.length() == 0){\n return false;\n }\n\n int len = numStr.length();\n int start = 0;\n int end = len - 1;\n while(start < end){\n if(!isSymmetric(numStr.charAt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an empty database on the system and rewrites it with your own database.
public void createDatabase() throws IOException { boolean dbExists = checkDatabase(); if (dbExists) { // Do nothing - database already exists } else { // By calling this method an empty database will be created into the // default system path of our applicati...
[ "public void createDataBase() throws IOException {\n\n\t\tboolean dbExists = checkDataBase();\n\t\tLog.d(\"DATABSE STUFF\",\"DatabaseExistst?\"+dbExists);\n\t\tif(dbExists) {\n\t\t\t//do nothing - database already exists\n\t\t\tif(!updated){\n\t\t\t\tthis.getWritableDatabase();\n\n\t\t\t\ttry {\n\t\t\t\t\tcopyDataB...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes a set of a variable
public static void writeVariableSet(PrintWriter writer, String targetName, String value) { writer.format("set %s, %s", targetName, value).println(); }
[ "public Set<Var> variables();", "public abstract Set<XVar> collectVars(Set<XVar> set);", "Variable getSets();", "private void genSaveSetCode(String name, String keyClassSimpleName) {\n\n int tabLevel = 1;\n String tabs = tabs(tabLevel);\n\n String itVarName = \"i\" + \"_\" + name;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ajoute un dessin au modele
private void ajouterDessin() throws Exception { Forme f; switch (forme) { case PIX: f = new Pixel(points[avancement], bg, fg, epaisseur); break; case DRT: f = new Droite(points, bg, fg, epaisseur); break;...
[ "private Enregistreur(){}", "public void addDesenhavel(Desenhavel novoElemento);", "@Override\n public boolean ajouter(Enseignement obj) {\n \n //Création d'un objet ResultSet\n ResultSet rset;\n \n try {\n //Récupération de l'ordre de la requete\n rse...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets (as xml) the "rocketX" element
public void xsetRocketX(org.apache.xmlbeans.XmlDouble rocketX) { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.XmlDouble target = null; target = (org.apache.xmlbeans.XmlDouble)get_store().find_element_user(ROCKETX$20, 0); if (target ...
[ "public void setRocketX(double rocketX)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ROCKETX$20, 0);\n if (target == null)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
(deep) copy the src matrix into this matrix. If src is null, reset this matrix to the identity matrix.
public void set(Matrix src) { if (src == null) { reset(); } else { nSet(native_instance, src.native_instance); } }
[ "public Matrix<X> copy();", "default Matrix copy() {\n return copy(0, 0, nRows(), nCols());\n }", "public Matrix copy() {\n return new Matrix(this.matrix);\n }", "Matrix copy() {\n Matrix newMatrix = new Matrix(matrixSize);\n for (int i = 0; i < matrixSize; i++) {\n if (!rows[i]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor with one parameter: codeFormation
public Formation(String codeFormation) { this.codeFormation = codeFormation; }
[ "public Code()\r\n {\r\n startTag=\"CODE\";\r\n endTag=\"/CODE\";\r\n }", "public CodeBlock() {}", "Code createCode();", "public ConvertCode(){\r\n\t\t\r\n\t}", "public CodeRecord() {\n super(Code.CODE);\n }", "public NoCodePart() {}", "CodeLine(String content) { supe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes the given code to the given output file location.
private static void writeToFile(String _file, String _code) throws IOException { File file = new File(_file); if(!file.exists()) { file.createNewFile(); } FileWriter fw = new FileWriter(file.getAbsoluteFile()); BufferedWriter bw = new BufferedWriter(fw); bw.write(_code); bw.close(); }
[ "private void writeCode(String code) {\r\n try {\r\n asmFile.write(code);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n System.exit(1);\r\n }\r\n }", "protected String _writeCode(StringBuffer code)\n\t\t\tthrows IllegalActionException {\n\t\t//...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return tile in currentplacement back to player hand
public static void restoreTileToPlayer() { Iterator<Square> iterator = currentPlacement.iterator(); Player player = Game.getCurrentPlayer(); while(iterator.hasNext()) { player.addTile(iterator.next().getTileOnSquare()); } clearCurrenPlacement(); ...
[ "TileItem getCurrentTile();", "public Tile getTileAt(Position p);", "com.whiuk.philip.mmorpg.shared.Messages.ServerMessage.GameData.ZoneInformation.TileData.TileRow.Tile getTile(int index);", "public Tile getTile() { return tile; }", "public Bitmap getTile() {\n return tile;\n }", "public String...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__S_Var__Group__3" $ANTLR start "rule__S_Var__Group__3__Impl" InternalGaml.g:8198:1: rule__S_Var__Group__3__Impl : ( ( rule__S_Var__NameAssignment_3 ) ) ;
public final void rule__S_Var__Group__3__Impl() throws RecognitionException { int rule__S_Var__Group__3__Impl_StartIndex = input.index(); int stackSize = keepStackSize(); try { if ( state.backtracking>0 && alreadyParsedRule(input, 455) ) { return ; } // In...
[ "public final void rule__VarDefinition__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:21213:1: ( ( ( rule__VarDefinition__NameAssignment_1 ) ) )\n // InternalDsl.g:21214:1: ( ( rule__VarDefinition__N...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new CompoundCommand.
public CompoundCommand() { aCommands = new Stack<Command>(); }
[ "Compound createCompound();", "Command createCommand();", "public static NbtCompound fromCompound(Object nmsCompound) {\n return get().new NbtCompound(nmsCompound);\n }", "public FixedOrderCompoundCommand(String label, String description, List<Command> commandList) {\r\n\t\tsuper(label, description)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the group which will contain the buttons.
private void createButtonGroup(Composite top) { Composite buttonGroup = new Composite(top, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = 0; layout.marginWidth = 0; buttonGroup.setLayout(layout); buttonGroup.setLayoutData(new GridData(GridData.FILL_VERTICAL)); buttonGroup.setFont(t...
[ "private void createControlsGroup() {\r\n PaletteContainer group = new PaletteToolbar(Messages.ArchimateDiagramEditorPalette_0);\r\n \r\n // The selection tool\r\n ToolEntry tool = new PanningSelectionToolEntry();\r\n tool.setToolClass(PanningSelectionExtendedTool.class);\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the chart viewport obeying such rule the top showing value = the top real value 1.2
private void setChartViewport(AbstractChartView view, Object data) { final Viewport v = calChartViewport(view, data); v.top = v.top * 1.2f; v.bottom = 0; view.setMaximumViewport(v); view.setCurrentViewport(v); view.setViewportCalculationEnabled(false); }
[ "private void previewXY() {\n Viewport tempViewport = new Viewport(chart.getMaximumViewport());\n // Make temp viewport smaller.\n float dx = tempViewport.width() / 4;\n float dy = tempViewport.height() / 4;\n tempViewport.inset(dx, dy);\n previewCha...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The placement strategy objects to use for tasks in your service. You can specify a maximum of 5 strategy rules for each service.
public CreateServiceRequest withPlacementStrategy(java.util.Collection<PlacementStrategy> placementStrategy) { setPlacementStrategy(placementStrategy); return this; }
[ "public java.util.List<PlacementStrategy> getPlacementStrategy() {\n if (placementStrategy == null) {\n placementStrategy = new com.amazonaws.internal.SdkInternalList<PlacementStrategy>();\n }\n return placementStrategy;\n }", "public void setPlacementStrategy(java.util.Collecti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a OneofTwo Threshold Condition using the tow different subconditions. This means that in order to fulfill this condition, a ThresholdFulfillment containing one or both of the subfulfillments must be published.
@Test public void testOneOfTwoThreshold() { final ThresholdSha256Condition oneOfTwoCondition = ThresholdSha256Condition.from( 1, Lists.newArrayList(subcondition1, subcondition2) ); // In order to fulfill a threshold condition, the count of the sub-fulfillments MUST be equal to // the threshol...
[ "@Test\n public void testTwoOfTwoThreshold() {\n final ThresholdSha256Condition twoOfTwoCondition = ThresholdSha256Condition.from(\n 2, Lists.newArrayList(subcondition1, subcondition2)\n );\n\n // In order to fulfill a threshold condition, the count of the sub-fulfillments MUST be equal to\n // ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
when you clicked everywhere with your mouse the progress bar refreshed
@Override public void mouseClicked(MouseEvent e) { JProgressBar progressBar = new JProgressBar(); progressBar.setBounds(12, 367, 185, 19); TypeTrain.contentPane.add(progressBar); progressBar.setValue((Model.correct*100)/Model.turns); progressBar.setStringPainted(true); }
[ "public void updateProgressBar(double value);", "private void updateProgressBar() {\n\t\tdouble current = model.scannedCounter;\n\t\tdouble total = model.fileCounter;\n\t\tdouble percentage = (double)(current/total);\n\t\t\n\t\t//Update Progress indicators\n\t\ttxtNumCompleted.setText((int) current + \" of \" + (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the given response packet to the listing of response packets. This method is a noop if the given packet is null
private void addResponsePacket(Response response) { if (response == null) { return; } synchronized (this.responsePackets) { if (!this.timedOutPackets.isEmpty()) { Integer requestSeq = new Integer(response.getRequestSequence()); if (this.timedOutPackets.remove(requestSeq)) return; // already tim...
[ "public void addResponse(String response) {\n assert response.length() != 0 : \"empty response added\";\n this.responses.add(response);\n }", "private void addCommandPacket(Packet packet) {\n\t\tif (packet == null) {\n\t\t\treturn;\n\t\t}\n\t\tsynchronized (this.commandPackets) {\n\t\t\tthis.comm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Encodes bytes to the binary form expected by other nodes on the network
public interface BinaryEncoder { /** * Converts a byte array to its binary form, which takes the following: * 8 bytes to describe the number of bytes long the data is * the bytes of the data * * @param data the input array to encode * @return the encoded byte array */ default...
[ "public abstract void encode(ByteBuffer byteBuffer);", "byte[] serialize();", "public byte[] encode(byte[] data);", "private String toBinary( byte[] bytes )\n {\n StringBuilder sb = new StringBuilder( 32 );\n\n for ( int i = 0; i < 32; i++ )\n {\n sb.append( (bytes[i / 8] <<...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Attempt to release lock on identifiable, failing silently.
boolean releaseAnyLockOn( Long id );
[ "boolean releaseAnyLockOn( Identifiable identifiable );", "void release(String lockId);", "void forceReleaseLock();", "private void releaseLock()\r\n {\r\n Pair<Long, String> lockPair = lockThreadLocal.get();\r\n if (lockPair != null)\r\n {\r\n // We can't release without a ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column TBL_EMPLOYMENT.IS_SOCIAL_INSURANCE
public void setIsSocialInsurance(String isSocialInsurance) { this.isSocialInsurance = isSocialInsurance == null ? null : isSocialInsurance.trim(); }
[ "public void setRAZON_SOCIAL(String RAZON_SOCIAL) {\n this.RAZON_SOCIAL = RAZON_SOCIAL;\n }", "public String getIsSocialInsurance() {\n return isSocialInsurance;\n }", "public void setIncome(boolean income) {\n\t\t\n\t\tisIncome = income;\n\t}", "public void setHasInsurance(boolean value) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Placeholder. Revision history of this document. repeated .google.cloud.documentai.v1beta3.Document.Revision revisions = 13;
java.util.List<com.google.cloud.documentai.v1beta3.Document.Revision> getRevisionsList();
[ "com.google.cloud.documentai.v1beta3.Document.RevisionOrBuilder getRevisionsOrBuilder(int index);", "java.util.List<? extends com.google.cloud.documentai.v1beta3.Document.RevisionOrBuilder>\n getRevisionsOrBuilderList();", "public void setNumberOfRevisions(int value) {\r\n this.numberOfRevisions = v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Notification function called when we are closed by the framing dlg (which should be a WslDialog) when it disposes due to a closePanel or the close window (X) button. Subclasses which have child WslPanels should propogate this message to the children.
public void onClosePanel() { _isClosing = true; }
[ "protected abstract boolean OnWindowCloseSignal();", "public final void closePanel()\n {\n // dispose the parent window\n if(_frameParent != null)\n {\n // if the parent is not a WslDialog the call onClosePanel as well\n if (! (_frameParent instanceof WslDialog))\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes the similarities between the children individuals of o1 and o2.
protected List<RelationEvaluation> compareCompoundAttributes(Individual o1, Individual o2) { LinkedList<RelationEvaluation> relationEvalList = new LinkedList<RelationEvaluation>(); // ##Implemented by rasflp@gmail.com on Sep 7, 2016 weightSummary = 0; for (Iterator it = o1.getRelations().iterator(); it.h...
[ "public abstract double similarity(Instance instance1, Instance instance2) throws Exception;", "public static double getEQSimilarityNoWeighting(EQStatement eq1, EQStatement eq2, HashMap<Ontology,Onto> ontoObjects) throws Exception{\n \n // Check if these EQ statements have the same components.\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the list contains an equivalent pet as the given argument.
public boolean contains(Pet toCheck) { requireNonNull(toCheck); return internalList.stream().anyMatch(toCheck::isSamePet); }
[ "private boolean isInList(ArrayList<Player> list, Player p) {\n boolean retVal = false;\n for(Player player : list) {\n if(player.getFirstName().equals(p.getFirstName()) && player.getLastName().equals(p.getLastName())) {\n retVal = true;\n break;\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Manually set the top state connected block
public void setTop(Integer top) { this.topBlock = top; }
[ "public void setTopSocket(ModelBlock block){}", "void switchBlock() {\n if (!switched) {\n Tetromino tempBlock = block;\n nextBlock = nextBlock.setCs(block.getRX(), block.getRY());\n block = nextBlock;\n nextBlock = tempBlock;\n nextBlock = nextBlock.s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the parent folder.
public Folder getParentFolder();
[ "public com.vmware.converter.ManagedObjectReference getParentFolder() {\r\n return parentFolder;\r\n }", "public Folder getParentFolder() {\n\t\treturn parentFolder;\n\t}", "public String getParentFolderId() {\n return parentFolderId;\n }", "public String getParentPath() {\n\t\tIOLocation ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
18. All the capital cities in a CONTINENT organised by largest population to smallest. (Continent = 'Asia')
public ArrayList<City> getAllCapitalContinent() { try { // Create an SQL statement Statement stmt = con.createStatement(); // Create string for SQL statement // ALl the capital cities in the WORLD organised by largest population to smallest ...
[ "private void assignCapitals() {\n City bestCity = null;\n int mostLandTilesSurrounding = 0;\n int landTilesSurrounding = 0;\n int minRow = 0;\n int maxRow = 0;\n int minColumn = 0;\n int maxColumn = 0;\n if (numPlayers == 2) {\n for (int i = 0; i <...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a value to property ShortDescription as an RDF2Go node
public void addbiboShortDescription( org.ontoware.rdf2go.model.node.Node value) { Base.add(this.model, this.getResource(), SHORTDESCRIPTION, value); }
[ "public void setbiboShortDescription( org.ontoware.rdf2go.model.node.Node value) {\n\t\tBase.set(this.model, this.getResource(), SHORTDESCRIPTION, value);\n\t}", "public void addbiboShorttitle( org.ontoware.rdf2go.model.node.Node value) {\n\t\tBase.add(this.model, this.getResource(), SHORTTITLE, value);\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to get the id of a node's ancestor
public int getAncestorId() { if (edgeToAncestor != null) return this.getAncestor().id; else return -1; }
[ "int getParentid();", "long getParentId();", "public Long getAncestor() {\n return ancestor;\n }", "int getParentID();", "int getPendantId();", "String getOuter_id();", "public String getId( Object inNode );", "public int getAncestorId(String rank) {\n Node current = this;\n wh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check the String is a list or not, example :[1,2,3]
public static boolean isList(String s) { s = s.trim(); if (s.startsWith("[") && s.endsWith("]")) { return true; } else { return false; } }
[ "public boolean isList(String input) {\n return input.equals(\"list\");\n }", "protected boolean isStringOrIDOrList(GraphQLInputType inputType) {\n return isStringOrID(inputType) ||\n isList(inputType);\n }", "public boolean isListJSONValid(String test) {\n try {\n new...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make sure auction under max capacity of Items
public boolean isAuctionAtMaxCapacity() { return getInventoryCount() == maxItemsSold; }
[ "public boolean checkCapacity(Item item) {\n\t\treturn this.currentCapacity() + item.getCapacity() <= this.maxCapacity;\n\t}", "@Test\n void maxQuality() {\n Item[] items = new Item[]{\n new Item(\"Aged Brie\", 10, 50),\n new Item(\"Backstage passes to a TAFKAL80ETC concert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to clear all fields during adding credit card
private void clearFields() { mCardNoValue1.setText(""); mCardNoValue1.setHint("-"); mCardNoValue2.setText(""); mCardNoValue2.setHint("-"); mCardNoValue3.setText(""); mCardNoValue3.setHint("-"); mCardNoValue4.setText(""); mCardNoValue4.setHint("-"); mZipCodeValue.setText(""); mZipCodeValue....
[ "private void clearCreditCardFields() {\r\n\t\tmCardNoValue1.setText(\"\");\r\n\t\tmCardNoValue1.setHint(\"-\");\r\n\t\tmCardNoValue2.setText(\"\");\r\n\t\tmCardNoValue2.setHint(\"-\");\r\n\t\tmCardNoValue3.setText(\"\");\r\n\t\tmCardNoValue3.setHint(\"-\");\r\n\t\tmCardNoValue4.setText(\"\");\r\n\t\tmCardNoValue4....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Appends and returns a new empty "amountOpen" element
public ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount addNewAmountOpen() { synchronized (monitor()) { check_orphaned(); ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount target = null; target = (ch.crif_online.www.webservices.crifsoapservice...
[ "public void unsetAmountOpen()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(AMOUNTOPEN$8, 0);\n }\n }", "public ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount getAmountOpen()\n {\n synchronized (monitor(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to calculate and return the total number of hours worked in a given day of the week
public double getTotalHoursOnDay(int dayOfWeek) { double total = 0; for (TimesheetRow ts : timesheetRowList) { switch (dayOfWeek) { case 1: total += ts.getMon(); break; case 2: total += ts.getTues(); break; case 3: total += ts.getWed(); break; case 4: total += ...
[ "public void calculateTotalHoursforWeek() {\n\t}", "public BigDecimal getTotalHoursByWeekday(int dayOfWeek) {\r\n BigDecimal total = new BigDecimal(0);\r\n for (TimesheetRow entry : entries) {\r\n total = total.add(entry.getDayOfWeek(dayOfWeek).getHoursWorked());\r\n }\r\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns this prefix as a start bound. If this prefix is a bound, just returns it asserting that it is a start bound. If this prefix is a clustering, returns an included start bound. If this prefix is a boundary, returns an open bound of it
ClusteringBound<V> asStartBound();
[ "public AxisBound getMinBound() { return _minBound; }", "public Point getBBoxStartPoint() {\n\n\t\treturn this.bboxStartPoint;\n\t}", "public double getLowerBound() {\r\n return getValue(LOWER_BOUND);\r\n }", "public int getStartRange() {\r\n\t\treturn lookupValue(Params.START_RANGE);\r\n\t}", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle the OnClick of the take Attendance button Check if all fields are filled Checks if the ID is 9 digits (AUB students' IDs are usually 9digits) Toast messages previews the result of the route taken Put the name and id of the student in an extra string and pass them to the Take_Attendace Activity
public void takeAttendance(View view){ if(_id.getText().toString().isEmpty() || _name.getText().toString().isEmpty()){ //Check if all fields are filled Toast.makeText(this, "Enter all Fields", Toast.LENGTH_LONG).show(); return; } if(_id.getText().toString().length() != 9...
[ "public void studentidDialog() {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Enter Student ID\");\n // Get the layout inflater\n builder.setCancelable(false);\n LayoutInflater inflater = this.getLayoutInflater();\n final View dialog...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the itNew variable.
public void setItNew(boolean itNew) { this.itNew = itNew; }
[ "public void setItNew(boolean itNew) {\n this.itNew = itNew;\n }", "public void setNew();", "public void setEachNew(Integer eachNew) {\n this.eachNew = eachNew;\n }", "public void setItIsNewUsed(int value) {\n this.itIsNewUsed = value;\n }", "public boolean isItNew() {\n\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Process the fracture based on particles using the separation tensors. The largest eigenvector that exceeds the toughness determines the line of separation.
void processFracture() { // compute the separation tensors at each node for ( Particle p : particles ) { if ( p.tris.size() == 0 ) continue; p.computeSeparationTensor(); } double t = toughness.getValue(); Particle theP = null; Vector2d ...
[ "private void computeForces() {\r\n \t// gravity\r\n for ( Particle p : particles ) {\r\n p.f.set( 0, useg.getValue() ? g.getValue() * p.mass : 0 ); \r\n }\r\n \r\n for (Collision c : collisionList) {\r\n \tc.applyForce( stepSize, implicit.getVal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the placeholder text to display in the field when its empty, but enabled and editable.
public void setPlaceholderText(String text) { this.placeholderText = text; }
[ "public void setPlaceholderText(String text) {\n\t\tplaceholderText = text;\n\t\t\n\t\tif (isEmpty()) {\n\t\t\tlabel.setText(placeholderText);\n\t\t}\n\t}", "public String getPlaceholderText()\n {\n return placeholderText;\n }", "public void setPlaceholder(String _placeholder) {\n\t\tgetStateHelper().p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a hashcode for this AlgorithmId.
public int hashCode() { StringBuilder sbuf = new StringBuilder(); sbuf.append(algid.toString()); sbuf.append(paramsToString()); return sbuf.toString().hashCode(); }
[ "public String getHashAlgorithm()\n {\n return this.hash_algorithm;\n }", "public int hashcode();", "String getHashAlgorithm();", "public String getHashAlgorithm() {\n return hashAlgorithm;\n }", "public int hashCode()\n {\n int code = 0;\n int i;\n int shift = 0;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test showing when Drillbit is not configured for authentication whereas client explicitly requested for PLAIN authentication then connection succeeds without authentication.
@Test public void testDisableDrillbitAuth_EnableClientAuthPlain() throws Exception { final DrillConfig newConfig = new DrillConfig(DrillConfig.create(cloneDefaultTestConfigProperties()) .withValue(ExecConstants.USER_AUTHENTICATION_ENABLED, ConfigValueFactory.fromAnyRef(false))); final Pr...
[ "@Test\n public void testDisableDrillbitAuth_EnableClientAuthKerberos() throws Exception {\n\n final DrillConfig newConfig = new DrillConfig(DrillConfig.create(cloneDefaultTestConfigProperties())\n .withValue(ExecConstants.USER_AUTHENTICATION_ENABLED,\n ConfigValueFactory.fromAnyRef(false)));\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the RulesClient object to access its operations.
public RulesClient getRules() { return this.rules; }
[ "RulesClient getRules();", "public static Client getClient() {\n return getRealm().getClient();\n }", "public static MozuClient<com.mozu.api.contracts.shippingadmin.TargetRuleCollection> getTargetRulesClient() throws Exception\n\t{\n\t\treturn getTargetRulesClient( null, null, null, null, null);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is an abstract method that returns an integer representing the employee's bonus.
public abstract int getBonus();
[ "int getBonusExp();", "public int getBonus() {\r\n return bonus;\r\n }", "public int getScore() {\n return getBaseScore() + bonus;\n }", "int getBonusMoney();", "public abstract double bonus();", "public int giveRaise(int bonus) {\n if (bonus >= 0) {\n this.salary += ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method should be clearing the background, and then looping through the the indexes of your particles array, and calling updateParticle() for each index that does not contain a null reference. No return type
public static void update() { // Fill the background for every call Utility.background(Utility.color(235, 213, 186)); // Create 10 new random particles createNewParticles(10); // Track every particle in the array then update their feature for (int i = 0; i < particles.length; i++) { if (particle...
[ "public void resetParticles() {\r\n \tcollisionList.clear();\r\n for ( Particle p : particles ) {\r\n p.reset();\r\n }\r\n for ( FEMTriangle tri : femSprings ) {\r\n \ttri.reset(); // try to get rid of NaNs\r\n }\r\n time = 0;\r\n }", "public void start()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Caches the application usage in the entity cache if it is enabled.
public static void cacheResult(ApplicationUsage applicationUsage) { getPersistence().cacheResult(applicationUsage); }
[ "public void startUsingCache()\n {\n this.useCache = true;\n }", "@Override\n public boolean isCaching() {\n return false;\n }", "@Override\n\tpublic void cacheResult(ApplicationAccount applicationAccount) {\n\t\tentityCache.putResult(ApplicationAccountModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\tApplicatio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use HttpClient to get HTML from uri and write the content to file whose path is filePath
public boolean saveHTMLInFile(String filePath) { boolean result = false; File file = new File(filePath); if(!file.exists()) try { file.createNewFile(); } catch (IOException e) { e.printStackTrace(); return result; ...
[ "public String downloadHtml(String url) {\n\t\t\n\t\tString filePath = null;\n\t\t\n\t\tHttpRequestRetryHandler hanlder = new HttpRequestRetryHandler() {\n\n\t\t\t@Override\n\t\t\tpublic boolean retryRequest(IOException arg0, int tryTimes,\n\t\t\t\t\tHttpContext arg2) {\n\t\t\t\t//Try 5 times, or we define it fails...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fills "Polls" table and "PollOption" table if empty.
private void fillPollsIfEmpty(ComboPooledDataSource cpds) throws SQLException { Connection con = cpds.getConnection(); PreparedStatement pst = null; try { pst = con.prepareStatement("SELECT * FROM POLLS"); ResultSet resultSet = pst.executeQuery(); if (!resultSet.next()) { fill(con, pst, Polls.getBand...
[ "private void createPollTables(DataSource ds) {\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tcon = ds.getConnection();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tPreparedStatement pst = null;\n\t\ttry {\n\t\t\tpst = con.prepareStatement(\n\t\t\t\t\t\"CREATE TABLE Polls\\r\\n\" + \"(i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end PrimoQueryByISBN() Making multiple queries until reaches a match result.
protected boolean query() { queryStr = new String(processQueryTitle(queryBk.getTitle()) + processQueryAuthor(queryBk.getCreator()) + processQueryPublisher(queryBk.getPublisher())); System.out.println(queryStr); // if edition is 'lastest' (coded '0'), no query is performed; and // return false. if (q...
[ "void allBooksQuery();", "String findPublicationAfterISBN(String isbn) {\n\n List<Publication> publications = Stream.concat(mBooks.stream(), mMagazines.stream()).collect(Collectors.toList());\n\n final String finalISBN = isbn;\n Publication found = publications.stream()\n .filt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copies the contents of one JAR into another already open JAR.
public static void copyInContentsOfJar(JarFile jar, JarOutputStream jarOutputStream, String name) throws IOException { // Copy contents of Go Bible JAR into new JAR for (Enumeration e = jar.entries(); e.hasMoreElements(); ) { JarEntry jarEntry = (JarEntry) e.nextElement(); //System.out.println("Reading...
[ "public Path mergeJars(String jar1, String jar2) throws IOException{\r\n\t\tPath srcJar = FileSystems.getDefault().getPath(jar1);\r\n\t\tPath dstJar = FileSystems.getDefault().getPath(jar2);\r\n\t\tPath binBackup = FileSystems.getDefault().getPath(mcFolder+directorySeparator+\"backup\"+directorySeparator+\"bin\");\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
simple initialize method. Transits the state to UNLOADED.
public synchronized void initialize() throws StateModelException { transitState("initialize()", UNINITIALIZED, UNLOADED); }
[ "public void initialize() {\n this.loadTransactionList();\n }", "public void initialize() {\n this.loadBidDetails();\n }", "public void initialize() {\n this.loadDownloadList();\n }", "private void initialize() {\n updateCache();\n }", "protected void init() {}", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add e join section if it hasn't already been added. The check is made on the literal string so be careful of spaces (case is insensitive though).
public void addJoinIfNotPresent(String joinPart) { if (this.joins.toLowerCase().indexOf(joinPart.toLowerCase())==-1) { addJoinOn(joinPart); } }
[ "@Override\n\t\tpublic void joinExpression() {\n\t\t\tsuper.joinExpression();\n\t\t\tif (_alreadyJoined.count() > 0) {\n\t\t\t\t_joinClauseString = joinClauseString();\n\t\t\t} else {\n\t\t\t\t_joinClauseString = null;\n\t\t\t}\n\t\t}", "private static void writeJoinSection(Document doc, Node node,\r\n \t\t\tComm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If canCancelEvents is false, then we want to prevent the scroll view from canceling the touch events of the child view
@Override public boolean dispatchTouchEvent(MotionEvent ev) { if (!canCancelEvents) { requestDisallowInterceptTouchEvent(true); } return super.dispatchTouchEvent(ev); }
[ "@Override\n public boolean onTouch(View v, MotionEvent event) {\n nestedScrollView.requestDisallowInterceptTouchEvent(true);\n int action = event.getActionMasked();\n switch (action) {\n case MotionEvent.ACTION_UP:\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the postion registration to the database. Also notifies the appropriate model listeners.
@Override public com.crowd.funding.database.model.PostionRegistration addPostionRegistration( com.crowd.funding.database.model.PostionRegistration postionRegistration) { return _postionRegistrationLocalService.addPostionRegistration(postionRegistration); }
[ "@Override\n\tpublic com.crowd.funding.database.model.PostionRegistration createPostionRegistration(\n\t\tlong POSITION_ID) {\n\t\treturn _postionRegistrationLocalService.createPostionRegistration(POSITION_ID);\n\t}", "private void register() {\n\t\tsimonModel.userRegistered(ID, this);\n\t}", "public void regis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the live reference to all the event data streams stored in this set
public HashSet<EventDataStream> getDatastreams() { return eventDataStreams; }
[ "public List<Stream> getStreams() {\n return streams;\n }", "public List<Stream> getStreams() {\r\n return Collections.unmodifiableList(this.streams);\r\n }", "public List<String> streams() {\n return this.streams;\n }", "public synchronized int activeStreams() {\n return stream...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
private List mAllHousesByUser; private int id; a constructor that gets a reference to the repository and gets the list of houses from the repository.
public HouseViewModel(@NonNull Application application) { super(application); mRepository = new ArchCompRepository(application); mAllHouses = mRepository.getAllHouses(); // mAllHousesByUser = ArchCompRoomDatabase.getDatabase(application).houseDao().findHouseCreatedById(id); }
[ "public List<House> findAll() {\n return jdbcTemplate.query(\"SELECT House.id, address, price, description, SIZE_OF_REAL_ESTATE, REAL_ESTATE_TYPE, house_type, build_Material, parking_space, yard_size, seller_id, employee_id FROM House INNER JOIN Property ON House.ID=Property.ID ORDER BY PRICE DESC\", new Hou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets devel cards of player visualizer.
public DevelCardsOfPlayerVisualizer getDevelCardsOfPlayerVisualizer() { return develCardsOfPlayerVisualizer; }
[ "public ArrayList<PaintImages> getPlayerCards(){\n if(!player.getHand().getCards().isEmpty() && !dealer.getHand().getCards().isEmpty())\n makeLists();\n return this.pi;\n }", "public List<Card> dealersTurn () {\n return dealer.drawUntilSatisfied();\n }", "@JsonIgnore\n\tpublic L...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a normalized distribution for which the frequencies sum to 1.
public Distribution normalize() { final double sum = sum(); final Distribution dd = new Distribution(); for (Map.Entry<Double, Double> e : dist.entrySet()) { dd.put(e.getKey(), e.getValue() / sum); } assert Math.abs(dd.sum() - 1.0) < 1e-4; return dd; }
[ "public void normalize()\n {\n double f = 1;\n for(int i = 0; i < nDim; i++) f *= wBin[i];\n scale( realcount / f / totalCount() );\n }", "public double getL1Norm() {\r\n\r\n\t\tdouble sum = 0d;\r\n\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\tsum += Math.abs(values[i]);\r\n\t\t}\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates the correct edit event end duration command based on the new description string given
public String generateEditEventEndDurationCommand(Event p, int index) { StringBuffer cmd = new StringBuffer(); cmd.append("edit /e " + index); cmd.append(" /to ").append(p.getDuration().getEndTimeAsText()); return cmd.toString(); }
[ "public String generateEditEventDurationCommand(Event p, int index) {\n StringBuffer cmd = new StringBuffer();\n\n cmd.append(\"edit /e \" + index);\n cmd.append(\" /from \").append(p.getDuration().getStartTimeAsText());\n cmd.append(\" /to \").append(p.getDuration().getEndTimeAsText());...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines to which additional data centers a persistenceId should be replicated after a certain event is emitted.
public interface EventClassifier<E> { /** * Returns the names of any additional data centers that should get access to the * persistence ID of the given event, after the event has been applied, or Seq.empty() * if the data centers should remain unchanged. * * In order to have an aggregate ...
[ "private boolean finalDestination(OverlayNodeSendsData event) {\n\t\tif (event.getDestID() == myAssignedID)\n\t\t\treturn true;\n\t\treturn false;\n\n\t}", "public void entryAdded(EntryEvent<Identifier, SystemMetadata> event) {\n\n if (ComponentActivationUtility.replicationIsActive()) {\n log.in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
string message_format = 2;
java.lang.String getMessageFormat();
[ "String getMessageFormat();", "String getFormattedMessage();", "String formatMessage(LogMessage ioM);", "public String getFormattedMessage();", "int getMessage();", "public String testFormatMes(String message) {\n int format = format_Mes(message);\n String res = \"\";\n String tmp = \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Whether to cache the compiled script and reuse Notice reusing the script can cause side effects from processing one Camel org.apache.camel.Exchange to the next org.apache.camel.Exchange. The option will be converted to a boolean type. Default: false Group: producer
default LanguageEndpointBuilder cacheScript(String cacheScript) { doSetProperty("cacheScript", cacheScript); return this; }
[ "default LanguageEndpointBuilder cacheScript(boolean cacheScript) {\n doSetProperty(\"cacheScript\", cacheScript);\n return this;\n }", "default LanguageEndpointBuilder contentCache(boolean contentCache) {\n doSetProperty(\"contentCache\", contentCache);\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to get the name of a node's ancestor
public String getAncestorName() { if (edgeToAncestor != null) return this.getAncestor().getScientificName(); else return null; }
[ "String getParentElementName();", "java.lang.String getParentAeName();", "public String getAncestorPath();", "public Object getAncestorName(String rank) {\n Node current = this;\n while (current != null && current.getAncestor() != null && !current.getRank().equals(rank)) {\n current =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
agent0(args, inst); agent1(args, inst);
public static void premain(String args, Instrumentation inst) { agent2(args, inst); }
[ "Agent createAgent();", "public static void main(String[] args) {\n startAgent();\n }", "public static void main(String[] args) throws StaleProxyException\n {\n AgentController Data=main1.createNewAgent(\"Data\",\"test.Data\",null);\n Data.start();\n }", "public native static voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column t_visit_log.visit_goal
public String getVisitGoal() { return visitGoal; }
[ "public void setVisitGoal(String visitGoal) {\n this.visitGoal = visitGoal;\n }", "private int getGoalValue(Proposition goalProposition) {\r\n \tGdlRelation relation = (GdlRelation) goalProposition.getName();\r\n GdlConstant constant = (GdlConstant) relation.get(1);\r\n return Integer.p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Close the android keyboard.
public void closeKeyboard() { View view = this.getCurrentFocus(); if (view != null) { InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } }
[ "private void closeSoftKeyboard() {\n try {\n InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);\n View view = getCurrentFocus();\n if (view == null) {\n view = new View(this);\n }\n inputM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the initial gridView is displayed
@Test public void testGridViewIsDisplayed() { onView(ViewMatchers.withId(R.id.gridView)).check(matches(isDisplayed())); }
[ "boolean isGridVisible();", "@When(\"^I see Giphy grid preview$\")\n public void ISeeGiphyGridPreview() throws Exception {\n Assert.assertTrue(\"Giphy grid is not shown\", getGiphyPreviewPage().isGridVisible());\n }", "public boolean isShowGrid()\n {\n return showGrid;\n }", "private...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The main network loop. Multicast DNS packets are received, processed, and sent to the UI. This loop may be interrupted by closing the multicastSocket, at which time any commands in the commandQueue will be processed.
@Override public void run() { Set<InetAddress> localAddresses = NetUtil.getLocalAddresses(); MulticastLock multicastLock = null; // initialize the network try { networkInterface = netUtil.getFirstWifiOrEthernetInterface(); if (networkInterface =...
[ "@Override\n public void run() {\n LOGGER_RECEIVER.info(\"Start the datagramm receiver.\");\n\n byte[] receiveBuffer = new byte[512];\n\n while (!exit) {\n try {\n DatagramPacket packet = new DatagramPacket(receiveBuffer, receiveBuffer.length);\n LOGG...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to validate the login form.
final void onValidateFromLoginForm() { if (!loginForm.isValid()) { return; } try { userProfile = userService.login(loginName, password, false); } catch (InstanceNotFoundException e) { loginForm.recordError(messages.get("error-authenticationFailed")); } catch (IncorrectP...
[ "private boolean validateFormLogin() {\n\n if(username.getText().length() == 0) {\n username.setError(\"Username vuoto!\");\n return false;\n }else{\n username.setError(null);\n }\n\n if(password.getText().length() == 0) {\n password.setError(\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the hints and repaints.
public void setRenderingHints(RenderingHints h) { hints = h; repaint(); }
[ "public void addRenderingHints(Map hints){\n this._hints.putAll(hints);\n }", "public void setRendererHints(Map<Object,Object> hints);", "public void resetHints() {//use this whenever there's a new graph, or whenever a new game is started!\r\n CalculateScore.hintOneUsed = false;\r\n Calc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
make a HopscotchCollection from a collection
public HopscotchCollection( final Collection<? extends T> collection ) { this(collection.size()); addAll(collection); }
[ "protected abstract Collection createCollection();", "public BCollection createCollection();", "Collect getColl();", "Collection newCollection() throws RepositoryException;", "public HopscotchCollection() { this(12000); }", "public BCollection createCopy(Collection that);", "RepoCollectionList createCol...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use the REST API to comment on an object
public void comment(String objectId, String comment) throws IOException { GenericUrl commentUrl = new GenericUrl(getAlfrescoAPIUrl() + getHomeNetwork() + NODES_URL + objectId + "/comments"); ...
[ "public interface Commentary {\n\n /*\n * Set the description of the commentary\n *\n * */\n void setDesc(String desc);\n\n}", "public String getComment();", "public void setComment(String comment);", "public interface Commentable\n{\n\n /**\n * Sets the comment attribute of the Commentable ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the view accessor RowSet EtatDaysView1.
public RowSet getEtatDaysView1() { return (RowSet) getAttributeInternal(ETATDAYSVIEW1); }
[ "public RowSet getDepartementEtRegionView1() {\n return (RowSet) getAttributeInternal(DEPARTEMENTETREGIONVIEW1);\n }", "public RowSet getDepartementView1() {\n return (RowSet) getAttributeInternal(DEPARTEMENTVIEW1);\n }", "public RowSet getTypeacteurView1() {\n return (RowSet) getAttr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Cross Section Area' attribute. If the meaning of the 'Cross Section Area' attribute isn't clear, there really should be more of a description here...
double getCrossSectionArea();
[ "String getCrossSectionAreaAsString();", "Double getCrossSectionArea();", "String getArea();", "public String getArea() {\n return area;\n }", "public double get_Area() {\n return this.Area;\n }", "Double getAreaValue();", "public String getAreaNo()\n\t{\n\t\treturn wAreaNo;\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
final AllocatorOwner allocatorOwner = new NamedOwner("sliceRanges");
@Test public void testAllocator_sliceRanges() throws Exception { try (final RootAllocator rootAllocator = new RootAllocator(MAX_ALLOCATION)) { // Populate a buffer with byte values corresponding to their indices. final ArrowBuf arrowBuf = rootAllocator.buffer(256); assertEquals(256,...
[ "java.lang.String getAllocatorName();", "CollectionRange createCollectionRange();", "public AddressRanges() {}", "public interface Allocator<A extends CommonAllocator<A>> extends Allocatable<A> {\n\n /**\n * release the underlying memory pool and close it.\n * \n */\n public void close();\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs a snapshot of all the ratios of all the timelines in the system. This snapshot is used by the manualcontrol of the system to correctly compute the percentages of the ratios.
public synchronized void makeRatioSnapshot() { Iterator<SycamoreRobot<P>> iterator = this.robots.iterator(); while (iterator.hasNext()) { SycamoreRobot<P> robot = iterator.next(); this.ratioSnapshot.put(robot, robot.getCurrentRatio()); } }
[ "private void calculateRefStats() {\n\t\tHashMap<Interval, List<Double>> ratios = new HashMap<Interval, List<Double>>();\n\n\t\t// iterate through all groups\n\t\tfor (List<Double> values : refData.values()) {\n\t\t\tdouble n = values.size();\n\n\t\t\t// sort data acsending\n\t\t\tCollections.sort(values);\n\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start the next track, stopping the current one if it is playing.
public void nextTrack() { // Start the next track, regardless of if something is already playing or not. In case queue was empty, we are // giving null to startTrack, which is a valid argument and will simply stop the player. player.startTrack(queue.poll(), false); }
[ "private void playNext(){\n musicSrv.playNext();\n updateTrackInfo();\n if(playbackPaused){ //if music is paused and user hits next button, next song is played\n playbackPaused = false;\n }\n }", "public static void next(){\n \n mediaPlayer.stop();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method deletes an existing Apache Solr index as a whole
public void deleteIndex() { try { server.deleteByQuery( "*:*" ); } catch (Exception e) { e.printStackTrace(); } finally {} }
[ "void deleteIndex() throws IOException;", "public static void clearSolr() {\n try {\n SolrServer server = Helpers.getSolrServer();\n server.deleteByQuery(\"id:*\"); \n server.commit();\n Application.renderText(\"Solr-data cleared: \" + server);\n } catch (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Camera device manager to provide the guaranteed supported stream capabilities related info for all camera devices
@RequiresApi(21) // TODO(b/200306659): Remove and replace with annotation on package-info.java public interface CameraDeviceSurfaceManager { /** * Interface for deferring creation of a CameraDeviceSurfaceManager. */ interface Provider { /** * Creates a new, initialized instance of a ...
[ "@Override\n public void onRequestCameraCapabilities() {\n log(\"Requested camera capabilities\");\n changeCameraCapabilities(mCameraCapabilities);\n }", "private void callSupportedAPI() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n cameraManager = (Camer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Considering where the player is, gets the number of the next dressor to fight in the arena of the zone, or 0.
public int getNextDressorToFight() { String arena = Game.getGame().getCurrentZone().getName(); return wonFightsInArena.containsKey(arena) ? wonFightsInArena.get(arena) : 0; }
[ "int getCombatRank();", "int getRent(Player owner, int tenantDiceRoll);", "private int getNextPlayer() {\n int nextTurn = turn + increment;\n if (nextTurn > playerCount - 1)\n nextTurn = 0;\n\n if (nextTurn < 0)\n nextTurn = playerCount - 1;\n return nextTurn;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ e.g. var xx = vrand(900) scalaSci.math.plot.JavaFX.javaFXPlotLine.plot(xx)
public static void lineplotfx(double[] values) { int L = values.length; pointsX = new double[L]; pointsY = values; for (int l = 0; l < L; l++) pointsX[l] = l; SwingUtilities.invokeLater(new Runnable() { @Override public void run() { ...
[ "public static void plotLines(double[] a){\n\t\tint N = a.length;\n\t\tStdDraw.setXscale(0, N - 1);\n\t\tStdDraw.setPenRadius();\n\t\tfor(int i = 0; i < N; i ++){\n\t\t\tStdDraw.line(i - 1, a[i - 1], i, a[i]);\n\t\t}\n\t}", "public static void plotLines(double[] a) {\n validateNotNull(a);\n int n = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an aliased public.row table reference
public Row(String alias) { this(DSL.name(alias), ROW); }
[ "private static TableRef createAliasedTableRef( final TableMeta table,\n final String alias ) {\n return new TableRef() {\n public String getColumnName( String rawName ) {\n return alias + \".\" + rawName;\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the player's specified trait. Traits may alter the player's appearance, speed, or other qualities. Refer to PlayerTraits for the list of available traits.
public void setTrait(PlayerTraits trait) { // only one trait at a time, so unset all setMoveDistance(DEFAULT_SPEED); setSmall(false); for (String s : traits.keySet()) { traits.put(s, false); } switch (trait) { case AGILE: traits.put(trait.toStrin...
[ "protected void setActorTraitValue(String name, String value){\n\t\tif (actor == null) return;\n\t\tactorLoading++;\n\t\tactor.setTrait(name, value);\n\t\tactorLoading--;\n\t\trefreshActorSecondaryValues(); // only secondary values for now\n\t}", "public void setTrait1(String trait1) {\n \t\tthis.trait1 = trait1;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
parse a string of date to a new symbolDate
public static String parseDateString(String date, String symbolDate) { if(date==null){ return ""; } String dateString; if(date.contains("T")) { date = date.trim().replace("T", " "); try { SimpleDateFormat format = new SimpleDateFormat("...
[ "private Date parse(String s) throws ParseException\r\n\t{\r\n\t\tDate date = null;\r\n\t\ttry {\r\n\t\t\tdate = format.parse(s);\r\n\t\t} catch (ParseException e) {\r\n\t\t\tthrow new ParseException(\"Could not parse date from string \" + s + \".\", e.getErrorOffset());\r\n\t\t}\r\n\t\t// Create a Calendar object ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get whether this service is properly configured and able to connect to the service
boolean isConfiguredProperly();
[ "private boolean serviceAvailable() {\n if (service == null) {\n return false;\n }\n return service.isActive();\n }", "public boolean isServiceConnected() {\r\n return serviceConnected;\r\n }", "public boolean checkConnection() {\n try {\n // we kno...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Vandermonde Matrix. Check if the Vandermonde matrix is created, if not it creates then it return the matrix.
public int[][] getVandermondeMatrix() { if (this.vandermondeMatrix == null) { return this.generateVandermonde(); } else return this.vandermondeMatrix; }
[ "Matrix createMatrix();", "public Matrix4 createMatrix() {\n\t\t\n\t\t// TODO Auto-generated method stub\n\t\treturn new Matrix4(position,rotation.nor(),scale);\n\t}", "private Matrix4f createMatrices() {\n\n\t\tMatrix4f staticMatrix = new Matrix4f(mRenderer.getViewportMatrix());\n\t\tMatrix4f projMatrix = mRe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets account queue size for particular Globus system account.
public void setGlobusAccountQueueSize(String systemAccountId, int queueSize) { logger.info( String.format( "setGlobusAccountQueueSize: Entered with systemAccountId = %s, queueSize = %s", systemAccountId, Integer.toString(queueSize))); boolean scoreUpdated = false; final Map<S...
[ "public void setMailBoxQuota(String domain, String user, long size)\n throws EmailException {\n try {\n ServerConfig.getInstance().getEmailbox().setMailboxQuota(\n domain,user,size);\n } catch (Exception ex) {\n log.error(\"Failed to set the emailbox quota :...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
do something that is relevant to someImportantObject having been collected.
@Override public void objectCollected() { System.out.println("object gc happened"); }
[ "void markAsCollected ();", "private CSCollectedGarbage() {}", "public void objectPurged() {\n\t\t// System.out.println(\"object \" + lsid.toString() + \" purged\");\n\t}", "@Nullable\n public abstract Object finalizeComputation(@Nullable Object object);", "protected void finalize() throws Throwable {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ The predecessor uses this operation to install all bindings into its internal hash table, as part of its own initialization.
public void installBindings(TableRep bindings) throws RemoteException, Error;
[ "private void createBindings() {\n try {\n mutex.readLock().acquire();\n } catch (InterruptedException e) {\n }\n\n Set bindingsSet = modelChain.getBindings();\n\n mutex.readLock().release();\n\n if (bindingsSet != null) {\n Iterator it = bindingsSet.i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the CountBomb method works correctly
@Test public void testCountBomb() { assertEquals(3,testCanPlaceBombBehavior.countBomb()); }
[ "public int useBomb(){\n //do harm while the animation start\n //cause harm to the boss\n println(\"BEFORE Main.boss.health: \"+Main.boss.health);\n int count = 0;\n if ((Main.boss.alive) && (Main.boss.posY != -1)){\n Main.boss.decreaseHealth(10);\n if(Main.b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column FMSINDICATOR.LONG_NAME_ARAB
public String getLONG_NAME_ARAB() { return LONG_NAME_ARAB; }
[ "public String getLONG_NAME_ARAB() {\r\n return LONG_NAME_ARAB;\r\n }", "public void setLONG_NAME_ARAB(String LONG_NAME_ARAB)\r\n {\r\n\tthis.LONG_NAME_ARAB = LONG_NAME_ARAB == null ? null : LONG_NAME_ARAB.trim();\r\n }", "public void setLONG_NAME_ARAB(String LONG_NAME_ARAB) {\r\n this.LO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }