query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Checks to make sure this Toolkit instance is properly configured. If no properties are defined, then the default properties as definied in the $CLASSPATH\portletcommon.properties file is used.
private static void checkProperties() throws IOException { if ( null == common_properties ) { _log.info ( "Read from default properties file" ); common_properties = new Properties(); c = (new Toolkit()).getClass(); cl = c.getClassLoader(...
[ "protected void setConfigProperties() {\r\n\t\tprop = new Properties();\r\n\t\ttry {\r\n\t\t\tprop.load(this.getClass().getClassLoader().getResourceAsStream(propertyPath));\r\n\t\t\tREGISTER_CONTEXT_PATH = prop.getProperty(REG_CTX_PATH);\r\n\t\t\tORION_SERVER_URL = prop.getProperty(ORION_SVR_URL); \r\n\t\t} catch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of postEditForm method, of class ControllerIntarface.
@Test public void testPostEditForm() { User user = createUser(); ModelMap map = createMap(); String form = controllerIntarface.postEditForm(user, map); assertNotNull(form); }
[ "@Test\n public void testPostEditProductForm() {\n Product product = createProduct();\n ModelMap map = createMap();\n String form = controllerIntarface.postEditProductForm(product, map);\n assertNotNull(form);\n }", "@Test\n public void testGetEditForm() {\n User user =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Methode rechercher classe standard par l'id
@Override public ClasseStandard getClasseStandardById(int id) { Session s = sf.getCurrentSession(); ClasseStandard cs_rec=(ClasseStandard) s.get(ClasseStandard.class, id); return cs_rec; }
[ "public void setId(int idNuevo)\n { \n this.id = idNuevo;\n }", "public ObjetoPersistente getObjeto_ID(Long id, String clase) {\n\n EntityManager em = Fachada_Persistencia.getInstance().getEntityManager();\n return (ObjetoPersistente) em.createQuery(\"Select o FROM \" + clase + \" o ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
seri_vhomologated_serial_numb character varying Numero de serie holomologado
public String getSeriVhomologatedSerialNumb() { return seriVhomologatedSerialNumb; }
[ "public void setSeriVhomologatedSerialNumb(String seriVhomologatedSerialNumb) {\n this.seriVhomologatedSerialNumb = seriVhomologatedSerialNumb;\n }", "public void setSERIAL_NO(BigDecimal SERIAL_NO) {\r\n this.SERIAL_NO = SERIAL_NO;\r\n }", "java.lang.String getSerialnumber();", "public BigDecima...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Based on the request message from client, respond in a particular way. Received requests can be: USER details related USERS ADD NAME HOST PORT > request the webserver to add a user (with name NAME) to the DB. USERS REQ > request the webserver a complete list of all users registered FILE details related (for each user...
private byte[] getBytesToSendBack(ServerDataEvent dataEvent) { /* Default response. */ byte[] response = "ACK".getBytes(); /* First try and see if it's a TreeNode sent. */ TreeNode root = null; try { root = (TreeNode)SerializationHelper.deserialize(dataEvent.data); } catch (ClassNotFoundException | IOEx...
[ "Message satisfy(Message request) throws IOException {\n Vector<byte[]> chunks = request.segment();\n User user = socketMap.get(socketChannel);\n\n // caso in cui l'utente non ha ancora effettuato il login e richiede un'altra operazione\n if (request.getOp() != Operation.LOGIN && user ==...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__QObject__Group__0__Impl" $ANTLR start "rule__QObject__Group__1" ../org.iworkz.qon.ui/srcgen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:1184:1: rule__QObject__Group__1 : rule__QObject__Group__1__Impl rule__QObject__Group__2 ;
public final void rule__QObject__Group__1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:1188:1: ( rule__QObject__Group__1__Impl rule__QObject__Group__2 ) ...
[ "public final void rule__QObject__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:1157:1: ( rule__QObject__Group__0__Impl rule__QObject__...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use GameboardUpdate.newBuilder() to construct.
private GameboardUpdate(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "se.mejsla.camp.mazela.network.common.protos.MazelaProtocol.GameboardUpdateOrBuilder getGameboardUpdateOrBuilder();", "se.mejsla.camp.mazela.network.common.protos.MazelaProtocol.GameboardUpdate getGameboardUpdate();", "public se.mejsla.camp.mazela.network.common.protos.MazelaProtocol.GameboardUpdateOrBuilder ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Subarrays Produces a new array containing the elements between the start and end indices. The start index is inclusive, the end index exclusive. Null array input produces null output. The component type of the subarray is always the same as that of the input array. Thus, if the input is an array of type Date, the follo...
public Object[] subarray(Object[] array, int startIndexInclusive, int endIndexExclusive) { if (array == null) { return null; } if (startIndexInclusive < 0) { startIndexInclusive = 0; } if (endIndexExclusive > array.length) { endIndexExclusive =...
[ "public static Object[] slice(final Object[] array, final int start, final int end) {\n if (null == array) {\n return null;\n }\n if (start > end) {\n throw new IndexOutOfBoundsException(\"start should not great than end.\");\n }\n Class<?> type = array.getClass().getComponentType();\n i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unit test for determining whether the copy constructor for HexColor creates a deep copy which is equal in value.
@Test public void testCopyConstructor() { this.colorOne = new RGBColor(COPY_INITIAL[0], COPY_INITIAL[1], COPY_INITIAL[2]); this.colorTwo = new HexColor(colorOne); /* This unit test is a near copy of the one in RGBColorTest. The only difference is to test the fact that any RG...
[ "@Test\n public void testShallowCopy() {\n System.out.println(\"shallowCopy\");\n PhenotypeData instance = phenotypeData;\n PhenotypeData expResult = phenotypeData;\n PhenotypeData result = instance.shallowCopy();\n assertNotSame(expResult.hashCode(), result.hashCode());\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the hosts to use for a new query. The returned plan will always try each known host in the local rack first, and then, if none of the host in local rack are reachable, will try hosts in remote racks of the local datacenter. Finally, it will try up to a configurable number of other host per remote datacenter. Th...
@Override public Iterator<Host> newQueryPlan(String loggedKeyspace, final Statement statement) { CopyOnWriteArrayList<Host> localLiveHosts = perDcLiveHosts.get(localDc); // Clone for thread safety final List<Host> copyLiveHostsLocalRackLocalDC = cloneList(liveHostsLocalRackLocalDC); final List<Host> ...
[ "@Override\n public Iterator<Host> newQueryPlan(Query query) {\n\n CopyOnWriteArrayList<Host> localLiveHosts = perDcLiveHosts.get(localDc);\n final List<Host> hosts = localLiveHosts == null ? Collections.<Host>emptyList() : cloneList(localLiveHosts);\n final int startIdx = index.getAndIncrem...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Serialize the specified ManagerAccount object
public static boolean serialize(ManagerAccount managerAccount){ try(FileOutputStream file = new FileOutputStream(filePath); ObjectOutputStream outputStream = new ObjectOutputStream(file)){ outputStream.writeObject(managerAccount); }catch(FileNotFoundException e){ System.out.print...
[ "private void serializeUserManager() {\n try {\n ObjectOutputStream outputStream = new ObjectOutputStream(\n this.openFileOutput(\"UserManager.ser\", MODE_PRIVATE));\n outputStream.writeObject(UserManager.get_instance());\n outputStream.close();\n } ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert between an Eager and Lazy future stream, can be used to take advantages of each approach during a single Stream
default LazyFutureStream<U> convertToLazyStream(){ return new LazyReact(getTaskExecutor()).withRetrier(getRetrier()).fromStream((Stream)getLastActive().stream()); }
[ "static <T> EagerFutureStream<T> eagerFutureStream(Stream<T> stream) {\n\t\tif (stream instanceof FutureStream)\n\t\t\treturn (EagerFutureStream<T>) stream;\n\t\tEagerReact er = new EagerReact(\n\t\tThreadPools.getCurrentThreadExecutor(), RetryBuilder.getDefaultInstance()\n\t\t.withScheduler(ThreadPools.getSequenti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for documentDate The date associated with the response content. Default is current date. This field can be used to backdate or postdate the response content.
public Date getDocumentDate() { return this.documentDate; }
[ "public java.sql.Date getDocumentDate() {\n\treturn documentDate;\n}", "@Override\n public final Date getDocumentDate() {\n return this.manufacture.getItsDate();\n }", "public void setDocumentDate(Date value) {\n this.documentDate = value;\n }", "public Date getDOC_DATE_RECEIVED() {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the current directory based on what is currently selected. sets the selected path as the current directory
private void setSelectedPath() { class updateSelected extends Thread{ @Override public void run() { String nodeName = ""; while(true) { try { Thread.sleep(300); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } ...
[ "void setCurrentDirectory(Path path);", "public void selectDirectory() {\r\n\r\n\t\t// Add an action listener to the timer\r\n\t\ttimer.addActionListener(this);\r\n\t\ttimer.setInitialDelay(100);\r\n\r\n\t\t// clear results of any previous traversal\r\n\t\tgui.resetGUI();\r\n\r\n\t\t// allow user to select a dire...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the address to the root of the server, starting it if necessary.
@Override public URI getAddress() { if (server == null) { try { server = createImpositions().impose(() -> { RatpackServer server = createServer(); server.start(); return server; }); } catch (Exception e) { throw uncheck(e); } } URI a...
[ "private String getRootUrl() {\n\t\treturn \"http://localhost:\" + port;\n\t}", "String getRootServerBaseUrl();", "void startServerPurePath();", "public static RemoteStore locateServer() throws RemoteException, NotBoundException {\n return locateServer(AkubraRMIServer.DEFAULT_SERVER_NAME, \"localhost\", 0)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the sunk statuc of cell.
public void setSunk(Boolean sunk) { isSunk = sunk; }
[ "public void sunk(){\n color = SUNK;\n status = Status.SUNK;\n }", "public void setSunkBool()\n {\n this.sunk = true;\n }", "void setCell(int y, int x, int state);", "public void setShapeCell(ShapeCell s) {\n this.shapeCell = s;\n }", "protected abstract void setCell(int x,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a background RPC object.
public RPCBackground(TokenRequester target, Callback callback, String methodName, List params, int timeout, Object rock) { super(); mTarget = target; mMethodName = methodName; mParams = params; mTimeout = timeout; mCallback = callback; mRock = ro...
[ "public RPCBackground(TokenRequester target, Callback callback,\n String methodName, List params,\n Object rock) {\n this(target, callback,\n methodName, params, DEFAULT_RPC_TIMEOUT,\n rock);\n }", "Call createCall();", "public abstract RealmBackgroundStuff newRealm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a network and instances, the output of the network is evaluated and a decimal value for error is given
public static double evaluateNetwork(BackPropagationNetwork network, Instance[] data) { double num_incorrect = 0; double error = 0; for (int j = 0; j < data.length; j++) { network.setInputValues(data[j].getData()); network.run(); Vector actual = data[j].get...
[ "private double calculateErrors(Instance instance, Hashtable<NeuralNode, Double> nodeValues) throws Exception {\r\n\t\tdouble ret = 0;\r\n\t\t\r\n\t\t// calculate errors for the network\r\n\t\tfor (InputNode input : inputs) {\r\n\t\t\tinput.getError(instance, nodeValues);\r\n\t\t}\r\n\t\t\r\n\t\tfor (OutputNode out...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method to determine if a table exists in the Amazon Redshift database
public static boolean tableExists(Properties loginProperties, String redshiftURL, String tableName) { Connection conn = null; try { conn = DriverManager.getConnection(redshiftURL, loginProperties); Statement stmt = conn.createStatement(); stmt.executeQuery("SELECT * ...
[ "boolean getTableExists(String table);", "private boolean tableExists(String table) throws SQLException {\n if (HAVE_DB) {\n Connection con = DriverManager.getConnection(dbConnection, dbUser, dbPass);\n Statement stmt = con.createStatement();\n ResultSet rs;\n \n if (dbType.equals(\"my...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
all items left of pivot will be less than pivot and right of pivot will be more than pivot. following function assumes pivotIndex will always be the last index.
private static int partitionAssumingPivotIsLastElement(int arr[], int startIndex, int endIndex) { if (startIndex < 0 || endIndex > arr.length - 1) { return -1; } int pivotIndex = endIndex; int i = -1; //i holds the index whose left is smaller and right side is bigger than arr...
[ "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tprivate static int partition(Object [] list, int left, int right, int pivotIndex)\n\t{\n\t\tObject pivotValue = list[pivotIndex];\n\t\t\n\t\t//swap list[pivotIndex] and list[right] // Move pivot to end\n\t\tObject tmp = list[pivotIndex];\n\t\tlist[pivotIndex]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accessor method gets the table's imported foreign keys.
public List<ForeignKey> getImportedKeys() throws SQLException { if (null == importKeys) return (importKeys = table.getImportedKeys()); return importKeys; }
[ "public List<ForeignKey> getForeignKeysIn();", "public List<ForeignKey> getForeignKeysOut();", "public String[] getForeignKeys() {\r\n return mForeignKeys;\r\n }", "String[] getForeignKeysToDrop();", "public String[][] getAllTableNamesForeignKeys() throws SQLException\n {\n String[][] ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Arguments__Group_0_3__0__Impl" $ANTLR start "rule__Arguments__Group_0_3__1" ../eu.quanticol.caspa.ui/srcgen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5226:1: rule__Arguments__Group_0_3__1 : rule__Arguments__Group_0_3__1__Impl ;
public final void rule__Arguments__Group_0_3__1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5230:1: ( rule__Arguments__Group_0_3__1__Impl ) ...
[ "public final void rule__Arguments__Group_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5070:1: ( rule__Arguments__Group_0__1__Impl rule__...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method which provides the setup necessary for the usage of quotes. Every time this is run, a StringArray in the string.xml file is read to an actual array, and a random quote is a selected and displayed.
private void quoteSetup() { Random rand = new Random(); Resources res = getResources(); String[] quotes = res.getStringArray(R.array.quotes); TextView quoteBox = (TextView) findViewById(R.id.quoteBox); int randomValue = rand.nextInt(quotes.length); quoteBox.setText(quotes[ran...
[ "public RandomQuoteInitialList(Context context) {\n dba = DatabaseAccess.getInstance(context);\n dba.open();\n quotes = dba.getInitialQuotes();\n dba.close();\n }", "private void loadQuotesFromFile(String quoteFilePath) throws IOException {\n\t\tBufferedReader reader = new BufferedR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'field916' field
public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField916() { field916 = null; fieldSetFlags()[916] = false; return this; }
[ "private void clearFields() {\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.setHint(\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getBirdBox() Returns the rectangle corresponding to the bird's HitBox.
public Rectangle getBirdBox() { return birdBox; }
[ "public Rectangle2D getBbox() {\n return bbox;\n }", "Rectangle getBoundingBox();", "public Rect getBoundingBox() {\n return boundingBox;\n }", "public Rectangle getBoundingBox() {\n return targetAnimated.getBoundingBox();\n }", "Rectangle getBoundingRectangle();", "public Re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if the file is an index.html file to an eDoc. LastChange: Performance optimation check URI before reading from input stream
public static boolean isEDocIndex(final String uri) throws ApplicationException { if((uri.contains("edoc.bbaw.de") || uri.endsWith(".html")) && !uri.endsWith(".pdf")) { InputStream in = reader.read(uri); if (in != null) { Scanner scanner = new Scanner(in); scanner.useDelimiter("\n")...
[ "public boolean hasIndexFile() {\r\n\t\t\treturn getIndexFile() != null;\r\n\t\t}", "private boolean readFromIndex(){\n\t\tString file = \"./reverseIndex.txt\";\r\n\t\tFile reverseIndex = new File(file);\r\n\t\tif (reverseIndex.exists()){\r\n\t\t\ttry(\r\n\t\t\t\tBufferedReader reader = new BufferedReader(new Fil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the current thumb position of the given slider. Example: _pos = sliderPosition _control
public native static float sliderPosition(GameControl oper1);
[ "void updateSliderPosition(int currentTick);", "public JSlider getSlider()\n\t{\n\t\treturn this.slider; \n\t}", "public int getValue() {\n return slider.getValue();\n }", "protected abstract void setValueFromPos(float sliderPosition);", "private void setSliderBasedPosition() {\n if(!mediaP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetch message queues from consumer cache according to the topic
Set<MessageQueue> fetchSubscribeMessageQueues(final String topic) throws MQClientException;
[ "Collection<Message> readAll(String queueName) throws BrokerException;", "List<MBQMessage> get(String queueName, List<String> ids);", "Map<K, V> findAll(String queueName);", "List<InboundMessage> browseQueueMessages(String queueName);", "List<InboundMessage> browseTopicMessages(String topicName);", "<W ex...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Breaking up sentence into two parts, before a a conjunction, after a conjunction
public void breaking(String sentence[], ArrayList<String> conjunctions){ List <String> tempClause = new ArrayList<String>(); for (String word: sentence){ for( String c: conjunctions){ if (word.equals(c)){ if(tempClause.size()>0){ ...
[ "private final static void splitSentenceAlongTerminators(Sentence sentence,Vector result)\r\n\t{\r\n\t\t//check\tfor\tthe\tprescence of terminators within\tthe\tsentence\tsentence\r\n\t\tint\tstart = 0;\r\n\t\t\r\n\t\tfor(int i=0;i<sentence.size();i++)\r\n\t\t{\r\n\t\t if( (sentence.getWordType(i) == Word.WT_TER...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructeur de la classe GestionSocket.
public GestionSocket(LinkedBlockingQueue<Socket> socketQueue) { this.socketQueue = socketQueue; }
[ "public Comunicator(){\n\t\ttry{\n\t\tsocket = new Socket(\"10.0.1.11\",1111);\n\t\tin=new DataInputStream(socket.getInputStream());\n\t\tout=new DataOutputStream(socket.getOutputStream());\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void generateSocket() {\n\t\t_socket = new So...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "CATCHALL_DIRECTIVE" $ANTLR start "LINE_DIRECTIVE"
public final void mLINE_DIRECTIVE() throws RecognitionException { try { int _type = LINE_DIRECTIVE; int _channel = DEFAULT_TOKEN_CHANNEL; // org/jf/smali/smaliLexer.g:168:2: ( '.line' ) // org/jf/smali/smaliLexer.g:168:4: '.line' { match("....
[ "public final void catchall_directive() throws RecognitionException {\n Label from = null;\n Label to = null;\n Label using = null;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:544:3: ( ^( I_CATCHALL from= label...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Buchung__Group_7_0_2__0__Impl" $ANTLR start "rule__Buchung__Group_7_0_2__1" ../de.nie.fin.ui/srcgen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:5131:1: rule__Buchung__Group_7_0_2__1 : rule__Buchung__Group_7_0_2__1__Impl ;
public final void rule__Buchung__Group_7_0_2__1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:5135:1: ( rule__Buchung__Group_7_0_2__1__Impl ) // ../...
[ "public final void rule__Buchung__Group_7_1_2__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:5292:1: ( rule__Buchung__Group_7_1_2__1__Impl )\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pass condition: lat=52.3738007, lng=4.8909347 should be encoded and then decoded within 0.00001 of the original value
@Test public void testDecodePreciseLongitudeLatitude() { final String geohash = GeoHashUtils.stringEncode(4.8909347, 52.3738007); final long hash = GeoHashUtils.mortonEncode(geohash); assertEquals(52.3738007, GeoUtils.mortonUnhashLat(hash), 0.00001D); assertEquals(4.8909347, GeoUtils.mortonUnhashLon(...
[ "@Test\n public void testDecodeImpreciseLongitudeLatitude() {\n final String geohash = GeoHashUtils.stringEncode(10.5, 84.6);\n\n final long hash = GeoHashUtils.mortonEncode(geohash);\n\n assertEquals(84.6, GeoUtils.mortonUnhashLat(hash), 0.00001D);\n assertEquals(10.5, GeoUtils.mortonUnhashLon(hash), ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
// getLastPos // //
public int getLastPos () { return (getFirstPos() + getThickness()) - 1; }
[ "Position<Element> last();", "public int getEndPosition();", "public Coordinate getLastCoordinate() {\n\t\treturn position.get(size - 1);\n\t}", "void seekToLast();", "public int lastIndexOf(int element);", "Position getEnd();", "public long getLast() {\r\n\t\tlong byteToStart = 0;\r\n\r\n\t\ttry {// tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for disk related properties
public Disk getDisk() { return disk; }
[ "public String getDiskPath()\n {\n return this.diskPath;\n }", "java.lang.String getDisk();", "DiskConfig getDiskConfig();", "public String getDisk() {\n return disk;\n }", "public int getDisk() {\n return disk;\n }", "public int getDisk()\n {\n return this.di...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setup the customized grid view and get the height and weight of the tiles.
private void setupGridView(final BoardManager boardManager){ // Add View to activity gridView = findViewById(R.id.grid); gridView.setNumColumns(boardManager.getComplexity()); // Observer sets up desired dimensions as well as calls our display function gridView.getViewTreeObserver...
[ "private void setUpGridView() {\n GameState state = gameController.getState();\n rowNum = state.getBoard().getNumRow();\n colNum = state.getBoard().getNumCol();\n createTileViews();\n gridView = findViewById(R.id.GridView);\n String backgroundFile = \"ghost_level\" + state....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parse an element Node containg a single application document status name and return an ApplicationDocumentStatus object for it.
private ApplicationDocumentStatus parseApplicationDocumentStatusHelper(DocumentType documentType, Node node) { String statusName = node.getTextContent(); validateUniqueName(statusName); ApplicationDocumentStatus status = new ApplicationDocumentStatus(); status.setDocumen...
[ "public String getDocStatus() {\n\t\treturn (String) get_Value(\"DocStatus\");\n\t}", "public static IfcDocumentStatusEnum getByName(String name) {\r\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\r\n\t\t\tIfcDocumentStatusEnum result = VALUES_ARRAY[i];\r\n\t\t\tif (result.getName().equals(name)) {\r\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Represents the metadata for a row of the results returned from a query. Metadata for columns can be either retrieved by specifying a column name or the column index. Columns are numbered from 0. Column names do not necessarily reflect the column names how they are in the underlying tables but rather how columns are rep...
public interface RowMetadata { /** * Returns the {@link ColumnMetadata} for one column in this row. * * @param identifier the identifier of the column. Can be either the column index starting at 0 or column name. Column names are case insensitive. When a get method is called with a column * ...
[ "com.scalar.db.rpc.TableMetadata getTableMetadata();", "java.util.Map<java.lang.String, com.factset.protobuf.stach.v2.table.MetadataItemProto.MetadataItem>\n getRowMetadataMap();", "ResultSetMetaData getMetaData() throws SQLException;", "java.util.Map<java.lang.String, com.factset.protobuf.stach.v2.RowOr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Returns this Vector3 summed to a Vector3 v
public Vector3 add(Vector3 v) { return new Vector3(x + v.x, y + v.y, z + v.z); }
[ "public vec3 plus(vec3 arg) {\r\n\t\tvec3 tmp = new vec3();\r\n\t\ttmp.add(this, arg);\r\n\t\treturn tmp;\r\n\t}", "public static final void vector_add(JGL_3DVector v1, JGL_3DVector v2, JGL_3DVector result) {\r\n result.x = v1.x + v2.x;\r\n result.y = v1.y + v2.y;\r\n result.z = v1.z + v2.z;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Calculates and then returns the projection of all vertices from 4D to 3D. The projection of a vertex is calculated in 3 stages: 1. The vector that is the distance from the viewpoint to the vertex is multiplied by the 4D transformation matrix. This converts the vertex from world to eye coordinates. 2. Next, the vertex...
private ArrayList<Vertex> getProjectedVertices4(){ ArrayList<Vertex> projectedVertices = new ArrayList<>(); // To store the projection of each vertex // Transform each vertex from world coordinates to eye coordinates for(Vertex v : vertices){ projectedVertices.add(v.transform4()); } for(Vertex v :...
[ "@Nonnull\n public idx3d_Matrix getVertexProjection() {\n return getVertexProjectionInto(new idx3d_Matrix());\n }", "private void createProjectionMatrix(){\r\n float aspectRatio = (float) Display.getWidth() / (float) Display.getHeight();\r\n float y_scale = (float) ((1f / Math.tan(Math....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Renderers override this method to store the previous value of the associated component.
protected void setPreviousValue(UIComponent component, Object value) { }
[ "@Override public void previousPanel() {\n iterImpl.previousPanel ();\n }", "public java.lang.String getPreviousValue() {\n return previousValue;\n }", "public java.lang.String getPreviousValue() {\n return previousValue;\n }", "private void previous(){\n boolean removed = getRevi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Saves the new job assignment for a person.
public void saveJob(Job newJob, String initiator, JobAssignmentType status, String approvedBy, boolean addNewJobAssignment) { String newJobStr = newJob.getName(person.getGender()); addJob(newJobStr, initiator, status, approvedBy, addNewJobAssignment); }
[ "public void savePendingJob(String newJobStr, String initiator, JobAssignmentType status, String approvedBy, boolean addAssignment) {\n \t// Note: initiator is \"User\", status is \"Pending\", approvedBy is \"null\", addAssignment is true\n\t \tint last = jobAssignmentList.size() - 1;\t\n jobAssignmentL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validates the input parameters. In addition to the standard checks performed by the superclass method, this method checks that "transform" is invertible.
protected boolean validateParameters(ParameterBlock args, StringBuffer message) { if (!super.validateParameters(args, message)) { return false; } // Get the transform AffineTransform transform = (AffineTransform) args.getObjectParameter(0); try { // Try to...
[ "protected void validateTransforms(Transform[] param){\r\n \r\n }", "private void validateInputParameters(){\n\n }", "@Override\n public void checkParameters() {\n }", "public void checkParameters() {\n }", "Future<Void> validateTransformat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Internal method to set list of samples obtained from different pictures using the same camera device (or same camera model). Several samples can be used to calibrate the camera (a pinhole camera can be estimated for each sample). The more samples are used, typically the better the results. This method is for internal u...
private void internalSetSamples(final List<CameraCalibratorSample> samples) { if (samples.size() < mIACEstimator.getMinNumberOfRequiredHomographies()) { throw new IllegalArgumentException(); } mSamples = samples; }
[ "public void setSamples(final List<CameraCalibratorSample> samples) throws LockedException {\n if (isLocked()) {\n throw new LockedException();\n }\n internalSetSamples(samples);\n }", "public void setSamples(final byte[] samples)\r\n\t{\r\n\t\tsynchronized (this.samples)\r\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find all entities of a given class in a given order, matching a filter.
@SuppressWarnings("unchecked") public <T extends BaseEntity> Collection<T> findEntities( Class<T> entityClass, Locale locale, String filter, String params, Object[] values, String ordering) { // construct query PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = pm.newQuery(entit...
[ "protected abstract List<?> findAll(Class<?> entityClass);", "abstract <T> List<WrapperObject<E>> findObjects(String filter, WrapperObject<T> parent, String order);", "@Override\n public List<Order> findOrders() {\n return orderRepository.findAll(Sort.by(Sort.Direction.DESC, \"created\")).stream()\n .f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
============================================================================ INTERFACE FILE ATTACHMENT DAO ============================================================================
public interface IFileAttachmentDAO extends IDomainObjectDAO<FileAttachment> { }
[ "String getFileToAttach();", "Fileattachment selectByPrimaryKey(Long id);", "public interface FileService extends PublicService {\n\n /**\n * Retrieves reference to a file by fileName\n */\n FileReference getFile(String fileName);\n \n /**\n * Creates a reference for a new file.\n * ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Answer a reification of a statement with a given uri. If that uri already reifies a distinct Statement, throw an AlreadyReifiedException.
public ReifiedStatement createReifiedStatement( String uri, Statement s ) { return ReifiedStatementImpl.create( model, uri, s ); }
[ "private void noteIfReified( RDFNode n )\n {\n if (n.canAs( ReifiedStatement.class ))\n {\n ReifiedStatement rs = n.as( ReifiedStatement.class );\n createReifiedStatement( rs.getURI(), rs.getStatement() );\n }\n }", "public void SUPPRESStestReificat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the default transaction isolation state for returned connections. Note: this method currently has no effect once the pool has been initialized. The pool is initialized the first time one of the following methods is invoked: getConnection, setLogwriter, setLoginTimeout, getLoginTimeout, getLogWriter.
void setDefaultTransactionIsolation( int defaultTransactionIsolation);
[ "int getDefaultTransactionIsolation();", "protected void setTransactionIsolation() throws SQLException {\n conn.setTransactionIsolation(properties.getIsolationLevel());\n }", "private void setDefaultOnRawConn(Connection rawConn) {\r\n try {\r\n rawConn.setAutoCommit(poolConfig.isDefa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form clearance_idcard
public clearance_idcard() { initComponents(); }
[ "public void createCard() {\n system.getCardManager().createCard();\n Card createdCard = system.getCardManager().getLastCard();\n CardHolder loggedInUser =(CardHolder)system.getAccountManager().getLoggedInUser();\n loggedInUser.linkCard(createdCard);\n cardNumber.setText(\"Card Nu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
joins two stamps, returning the resulting stamp
public static Stamp join(Stamp s1, Stamp s2) { Id.sum(s1.getId(), s2.getId()); Event.join(s1.getEvent(), s2.getEvent()); return s1; }
[ "public void join(Stamp s2) {\n\t\tId.sum(this.id, s2.getId());\n\t\tEvent.join(this.event,s2.getEvent());\n\t}", "private static Timestamp[] timestampArrayMerge(Timestamp[] senderShifts, Timestamp[] recipientShifts){\n \tTimestamp[] combinedShifts = {senderShifts[0], senderShifts[1], recipientShifts[0], recip...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reset the log collection by removing the log files.
public void resetLogCollection();
[ "public static void clearLogs(){\n logFile.delete();\n }", "public static void clearLog() {\r\n logEntries.clear();\r\n }", "public static void clearLogs() {\n\n\t\ttry {\n\t\t\tFileUtils.cleanDirectory(new File(LOG_DIR));\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"Did no...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a string with the server urls. Includes custom servers.
public String[] getServerUrlList(Context context) { String[] server_list; // Load the custom servers ArrayList<Server> custom_servers = getEnabledServerList(); ArrayList<String> server_names = new ArrayList<>(); for(Server server : custom_servers) { server_names.add(...
[ "public static String getServerListUrl(Context context) {\n\t\treturn String.format(\"%s%s\", context\n\t\t\t\t.getString(R.string.frontend_address), context\n\t\t\t\t.getString(R.string.api_servers));\n\n\t}", "public String[] getServerUrlPrefixList(Context context) {\n String[] server_list;\n // L...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form DetalheLembrete
public DetalharLembrete() { initComponents(); CarregaLembrete(); DesabilitarCampos(); DadosEmpresa(); }
[ "public DetalleFormBean() {\r\n unDetalle = new Detalle();\r\n listadoDetalles= new ArrayList<>();\r\n listadoDetalleCompra = new ArrayList<>();\r\n usuario= new Usuario();\r\n modoPago = new ModoPago();\r\n producto= new Producto();\r\n unaFactura = new Factura();\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pulls in weather alert Atom Feed, transform and send the to Kafka which is then picked up by a Kafka consumer that will then push the data to Elasticsearch.
public AlertProcessingResult processAlertFeed() { LOG.debug("Processing Weather Alert Feed and Pushing to Kafka"); // Ensure Kafka is enabled before continuing kafkaService.ifNotEnabledThrow(new AlertServiceException("Cannot Process Weather Alert Feed when Kafka is NOT enabled")); // Cre...
[ "private void weather() {\n\t\t// System.out.println(\"Sending weather information via Twitter.\");\n\t\t// TwitterComm.sendDirectMessage(Constants.AUTH_USER,\n\t\t// Alfred.getYrParser()\n\t\t// .getWeatherReport().twitterForecastToString());\n\t}", "String getWeatherFeed(String apiEndpoint) throws IOException;"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get menu columns flag.
public boolean getMenuColumnsFlag() { return menuColumns; }
[ "public boolean getMenuColumnsFlag()\t\t{ return menuColumns; }", "public Boolean getShowColumn() {\n return this.showColumn;\n }", "public MenuItem getCopyColumn() {\n return copyColumn;\n }", "public MenuItem getCopyColumnUnique() {\n return copyColumnUnique;\n }", "public in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Register a new insert callback
public boolean registerInsertCallback(final BiConsumer<TupleStoreName, Tuple> callback) { return insertCallbacks.add(callback); }
[ "public void registerCallbacks() {\n getConnection().getParser().get().getCallbackManager().subscribe(this);\n }", "public void onInsert(PreparedStatement insert, Connection cx, SimpleFeatureType featureType) \r\n throws SQLException {\r\n }", "@Override\n\t\t\t\t\t\t\tpublic void onDataSetI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Actions ///////////////////////////////////////////////////////////////// Start play selected station.
public void playStation() { runWithProgress( new EventDispatcherThread(EventIds.EVENT_ID_PLAY_STATION, getPlayerUI()) , locale.getString(Constants.STR_Connecting) , true); }
[ "private void startPlayback() {\n // start player service using intent\n Intent intent = new Intent(mActivity, PlayerService.class);\n intent.setAction(ACTION_PLAY);\n intent.putExtra(EXTRA_STATION, mThisStation);\n mActivity.startService(intent);\n LogHelper.v(LOG_TAG, \"S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Checks for fireball2 collisions with the player. If fireball1 collides with the player, the fireball is removed and the player loses a life.
private void fireball2Collisions() { GObject topLeft = getElementAt(fireball2.getX() - 1, fireball2.getY()); GObject topRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY()); GObject bottomLeft = getElementAt(fireball2.getX() - 1, fireball2.getY() + fireball2.getHeight()); GObj...
[ "private void fireball1Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball1.getX() - 1, fireball1.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball1.getX() - 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tGObject topRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the num sale.
public Long getNumSale() { return numSale; }
[ "public Integer getSale_num() {\n return sale_num;\n }", "public int getSale() {\n\t\treturn sale;\r\n\t}", "public Double getTotalSaleNum() {\r\n return totalSaleNum;\r\n }", "public Integer getSaleNumber() {\n return saleNumber;\n }", "public int retrieveNumberOfSales() {\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the 'mid' field, the 'has' method for this field will now return false
public void clearMid() { genClient.clear(CacheKey.mid); }
[ "public boolean isSetMid() {\n return this.mid != null;\n }", "void removeIsMidNode(Boolean oldIsMidNode);", "public void setMid(Long mid) {\n this.mid = mid;\n }", "public void setMid(Integer mid) {\r\n this.mid = mid;\r\n }", "public boolean isSetMidlist() {\n return this.midlis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use ProductDetailsItem.newBuilder() to construct.
private ProductDetailsItem(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "private ProductDetailsResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private ProductDetailType(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private PublishProductItem(com.google.protobuf.GeneratedMessage.Builde...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Compound Initializer'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseCompoundInitializer(CompoundInitializer object) { return null; }
[ "Compound createCompound();", "public T caseCompoundExpr(CompoundExpr object)\n {\n return null;\n }", "public CompoundType asCompound() { return null; }", "public T caseInitializer(Initializer object) {\n\t\treturn null;\n\t}", "public T caseInitOrDeriveValueCS(InitOrDeriveValueCS object) {\r\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the property value for the given property id.
public void setPropertyValue(Object propertyId, Object value) { properties.put((String) propertyId, value); // tooltipInformation.get(propertyId).setPropertyValue(value); }
[ "public void setPropertyID(int value) {\n this.propertyID = value;\n }", "public void setPropertyId(long value) {\n this.propertyId = value;\n }", "public void setPropertyId(int propertyId) {\n\t\tthis.propertyId = propertyId;\n\t}", "void addProperty(String id, String value);", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to check if the word at a given index is a noun
private boolean isNoun(int i) { if (text.get(i).length() > 1) // Ensures word is more than one character { String prior = text.get(i-1); if (prior.charAt(0) == '\"' || prior.charAt(0) == '-' || prior.charAt(0) == '“') // Checks if " or - is the char next to the word { if (text.get(i-2).charAt(0) == 10...
[ "public boolean isNoun(String word) {\n\treturn strings.contains(word);\n\n}", "public boolean isNoun (String word){\n for(int i = 0; i< SynSets.length; i++){\n if(SynSets[0][1].contains(\" \"+word+\" \")) return true;\n }\n return false;\n }", "public boolean isNoun(String word) {\n return ht.con...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inserta 10 Audi en b.d.
private final void inicialzaAudi(){ for(int i=1; i<=10; i++){ final Car carToSave = new Car("Audi", String.valueOf(i), Long.valueOf("10000"), true); carsServices.addCar(carToSave); } }
[ "public void insertion() {\n int acid = ACIDS[randgen.nextInt(4)];\n \n int index = randgen.nextInt(genom.length+1);\n\n StringBuilder strb = new StringBuilder(new String(genom));\n strb.insert(index, acid);\n genom = strb.toString().toCharArray();\n }", "private static void insertar() {\n\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The ACTION_OPEN_DOCUMENT intent was sent with the request code READ_REQUEST_CODE. If the request code seen here doesn't match, it's the response to some other intent, and the code below shouldn't run at all.
@Override public void onActivityResult(int requestCode, int resultCode, Intent resultData) { if (requestCode == READ_REQUEST_CODE && resultCode == android.app.Activity.RESULT_OK) { // The document selected by the user won't be returned in the intent. ...
[ "private void openFileBrowser() {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"text/xml\");\n startActivityForResult(intent, REQUEST_ID);\n }", "private void openDocument(DocumentInfo doc, Model model) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the functionality of the needInputMethodmethod.
public final void testNeedInputMethod() { assertFalse(new SeekBarPreference(getContext()).needInputMethod()); }
[ "@Test\n public void testFromKeyboard() {\n }", "public final void testNeedInputMethod() {\n assertFalse(new ColorPalettePreference(getContext()).needInputMethod());\n }", "public interface IInputMethodClient extends android.os.IInterface\n{\n/** Local-side IPC implementation stub class. */\npub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load a MultiLayerNetwork for the given checkpoint
public MultiLayerNetwork loadCheckpointMLN(Checkpoint checkpoint){ return loadCheckpointMLN(checkpoint.getCheckpointNum()); }
[ "public MultiLayerNetwork loadCheckpointMLN(int checkpointNum) {\n return loadCheckpointMLN(rootDir, checkpointNum);\n }", "public static MultiLayerNetwork loadCheckpointMLN(File rootDir, Checkpoint checkpoint) {\n return loadCheckpointMLN(rootDir, checkpoint.getCheckpointNum());\n }", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ method that gives the total number of companies for which wages are calculated
public int totalCompanies(){ return companyEmpWageArray.size(); }
[ "public void calEmpWageForCompany()\n\t{\n\t\t//variables\n\t\tint empHrs=0;\n\t\tint totalWorkingHrs=0;\n\t\tint totalWorkingDays=0;\n\t\tint empCheck;\n\n\t\t/*computation of employee wage*/\n\t\twhile(totalWorkingHrs <= maxHrPerMonth && \n\t\t\t totalWorkingDays < numOfWorkingDays)\n\t\t{\n\t\t\ttotalWorkingDay...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructeur de Ile. Initialisation de la taille et du pourcentage de rochers. Initialisation des tableaux concernant le plateau. Instanciation du tableau de "Parcelle".
public Ile(int taille, int pourcentage) { this.taille = taille; pourcentageRochers = pourcentage; ile = new Parcelle[taille][taille]; jeu = new int[taille][taille]; for (int i = 0; i < taille; i++) { for (int j = 0; j < taille; j++) { ile[i][j] = new Parcelle(); } } }
[ "public Plateau(int largeur, int hauteur) {\r\n\t\tplateau = new Cellule[hauteur][largeur];\r\n\t\tint equipe = 1;\r\n\t\tfor (int i=0; i<hauteur; i++) {\r\n\t\t\tfor (int j=0; j<largeur; j++) {\r\n\t\t\t\tif ((i == 0 && j == 0) || (i == hauteur-1 && j == largeur -1))\r\n\t\t\t\t\tplateau[i][j] = new Base(j,i,equip...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compares Object o to this object. If o isn't null and is an instance of BetToken, it proceds with comparing. Otherwise, throws an exception. It compares both uniquesTokenId and creationTime. If both are equal, then returns 0. Else returns 1/1
@Override public int compareTo(Object o) { // throw exceptions when necessary if(o == null){ throw new NullPointerException(); } if(! (o instanceof BetToken)){ throw new ClassCastException(); } // comparing logic...
[ "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n BetToken betToken = (BetToken) o;\n return uniqueTokenID.equals(betToken.uniqueTokenID) &&\n creationTime.equals(betToken.creation...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates a Client document within the datastore.
public Client updateDocument(Client client) throws ConflictException { DocumentRevision rev = client.getDocumentRevision(); rev.setBody(DocumentBodyFactory.create(client.asMap())); try { DocumentRevision updated = this.mDatastore.updateDocumentFromRevision(rev); return Cl...
[ "Client updateClient(Client client) throws ClientNotFoundException;", "public Client updateClient(Client client);", "Client updateClient(Client client) throws BaseException;", "public static void updateDocument(Client client, String index, String type, String id, String field,\r\n String newValue) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the attribute value for the calculated attribute Nomcommune.
public String getNomcommune() { return (String) getAttributeInternal(NOMCOMMUNE); }
[ "public Number getNocritere()\r\n {\r\n return (Number) getAttributeInternal(NOCRITERE);\r\n }", "public String getNomcheflieu() {\n return (String) getAttributeInternal(NOMCHEFLIEU);\n }", "public Number getNoatel()\r\n {\r\n return (Number) getAttributeInternal(NOATEL);\r\n }", "public N...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "alternative" $ANTLR start "exceptionGroup" C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/DefineGrammarItemsWalker.g:372:1: exceptionGroup : ( ( exceptionHandler )+ ( finallyClause )? | finallyClause );
public final void exceptionGroup() throws RecognitionException { try { // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/DefineGrammarItemsWalker.g:373:2: ( ( exceptionHandler )+ ( finallyClause )? | finallyClause ) int alt35=2; int LA35_0 = input.LA(...
[ "public final void exceptionGroup() throws RecognitionException {\r\n try {\r\n // org\\\\antlr\\\\grammar\\\\v3\\\\TreeToNFAConverter.g:321:2: ( ( exceptionHandler )+ ( finallyClause )? | finallyClause )\r\n int alt38=2;\r\n switch ( input.LA(1) ) {\r\n case CATCH...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the phone number by searching for a '(' or a '' in the line It also will ignore any fax numbers that may appear before the telephone number.
public void getPhoneNumber(ArrayList<String> document) { String line = ""; for(int i = 0; i < document.size(); i++) { if(document.get(i).contains("Fax:")) { continue; } if(document.get(i).contains("(") || document.get(i).con...
[ "public static String phoneNumber(String line) {\n\r\n\t\tline=line.replaceAll(\"(TR[0-9][0-9])(\\\\s)([0-9][0-9][0-9])([0-9])(\\\\s)([0-9][0-9][0-9])([0-9])(\\\\s)([0-9][0-9][0-9])([0-9])(\\\\s)([0-9])([0-9][0-9][0-9])(\\\\s)([0-9][0-9][0-9][0-9])(\\\\s)([0-9][0-9])\",\"$6-$3-$12$9\"); //TR00 357 5310 6640 8000 00...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
All objects able to move in GameWorld collection use move method
public void moveGameObject(){ /** for(int i = 0; i < gameObjectCollection.size(); i++){ if(gameObjectCollection.get(i) instanceof MoveableObject){ ((MoveableObject)gameObjectCollection.get(i)).move(); } } */ for(GameObject obj: gameObjectCollection){ if(obj instanceof MoveableObject){ ((Movea...
[ "@Override\n public void move(double currentTimeStep) {\n //generateWorldGrid();\n // loop over all individuals \n for (int i = 0; i < individuals.numObjs; i++) {\n Individual ind = (Individual) individuals.get(i);\n if (!ind.isDead()) {\n ((Floo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the currently attached Enumeration.
public Enumeration getEnumeration() // -end- 358A699B02AC get_head358A69810091 "EnumElement::getEnumeration" { // -beg- preserve=no 358A699B02AC get_body358A69810091 "EnumElement::getEnumeration" if(enumeration==null) {throw new java.lang.IllegalStateE...
[ "public Enumeration getEnumeration()\n throws JMSException\n {\n if (_log.isTraceEnabled())\n {\n _log.trace(\"getEnumeration \" + this + \" browser=\" + Util.asString(_browser));\n }\n\n _session.lock();\n try\n {\n _session.checkState();\n return _brows...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ get the distance units for this account
public int getDistanceUnits() { Integer v = (Integer)this.getOptionalFieldValue(FLD_distanceUnits); return (v != null)? v.intValue() : EnumTools.getDefault(Account.DistanceUnits.class).getIntValue(); }
[ "public static TextUtils.UnitScale getDistanceUnits()\n \t{\n \t\treturn TextUtils.UnitScale.findFromIndex(cacheDistanceUnits.getInt());\n \t}", "public long getUnits() {\n return units_;\n }", "public final int getUnits() {\n return units;\n }", "public long getUnits() {\n return uni...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column SITBAS_XFD_TMK.CW_VOUCHER_FACT_RESULT.ACTUALPAYDATE
public void setActualpaydate(String actualpaydate) { this.actualpaydate = actualpaydate; }
[ "public void setACTUAL_NEXT_RATE_REV_DATE(Date ACTUAL_NEXT_RATE_REV_DATE)\r\n {\r\n\tthis.ACTUAL_NEXT_RATE_REV_DATE = ACTUAL_NEXT_RATE_REV_DATE;\r\n }", "public void setDEAL_VALUE_DATE(Date DEAL_VALUE_DATE) {\r\n this.DEAL_VALUE_DATE = DEAL_VALUE_DATE;\r\n }", "public void setActualRepayDate(Dat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface definition for a callback to be invoked when the top view was swiped to the left / right or when the stack gets empty.
public interface SwipeStackListener { /** * Called when a view has been dismissed to the left. * * @param position The position of the view in the adapter currently in use. * @return boolean indicate if the swiping flow should halt here */ boolean onViewSwipedToLeft(int position); /** * Called ...
[ "public abstract void onSwipeTop();", "public abstract boolean onTopToBottomSwipe();", "public abstract void onSwipeLeft();", "public void onTopUp();", "@Override\r\n public void onSwipeTop() {\r\n //Do Nothing\r\n }", "public abstract void onPullLeft();", "public abstract boolean onSwipeLe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates a value object for a given configuration and into a given destination directory.
public static final File generateValueObject(String configFileName, String genDestPath) { final ImportValueObjectGenerator generator = new ImportValueObjectGenerator(configFileName, genDestPath); return generator.generateImportValueObject(); }
[ "public static final File generateValueObject(CodeGeneratorConfiguration config) {\r\n\t\tfinal ImportValueObjectGenerator generator = new ImportValueObjectGenerator(config);\r\n\t\treturn generator.generateImportValueObject();\r\n\t}", "public PropertyValueDao(Configuration configuration) {\n super(Proper...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the pcmsys__Maximum_Amount__c value for this Pcmsys__Journal_Entries__c.
public void setPcmsys__Maximum_Amount__c(java.lang.Double pcmsys__Maximum_Amount__c) { this.pcmsys__Maximum_Amount__c = pcmsys__Maximum_Amount__c; }
[ "public void setMonthMaxAmount(Double monthMaxAmount) {\n this.monthMaxAmount = monthMaxAmount;\n }", "public java.lang.Double getPcmsys__Maximum_Amount__c() {\n return pcmsys__Maximum_Amount__c;\n }", "public void setMaximumBidAmount(Long maximumBidAmount) {\n\t\tthis.maximumBidAmount = max...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate dni letter Calcula letra dni
public static String calculateLetter(int dniNumber) { String letras = "TRWAGMYFPDXBNJZSQVHLCKEU"; int indice = dniNumber % 23; return letras.substring(indice, indice + 1); }
[ "public String kodiere(String klartext);", "String getLetterSalutation();", "public String lookupCodon( String codon )\n {\n // capitalize and replace U's with T's because the code tables are in terms of T's\n codon = codon.toUpperCase();\n codon = codon.replace('U','T');\n\n\n\n String letter = \"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
RFC261614.10 remove connection headers from older versions
private void removeConnectionHeader(Map<String, String> headers) { if (headers.get(HttpHeader.CONNECTION.getName()) != null) { headers.remove(HttpHeader.CONNECTION.getName()); } }
[ "public void removeHeaders ();", "@Test\n\tpublic void testThatServerIgnoresHeadersListedInConnectionHeaderFieldOfAn_HTTP_1_0_Request()\n\t\t\tthrows Exception {\n\t\tString url = \"/\";\n\t\tHttpClient client = new DefaultHttpClient();\n\t\tHttpContext context = new BasicHttpContext();\n\t\tHttpHost target = get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the bin number.
public int getCurrentBinNum() { return currentBinNum; }
[ "public int getBinNumber() {\r\n return binNumber; // may be -1\r\n }", "int getBin();", "public String getBin() {\n return bin;\n }", "public int getBin(double val) {\n\t\treturn (int)Math.floor( (val-minValue)/(maxValue-minValue)*(double)hist.length );\n\t}", "public static int getBinning() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Take the first n characters from this empty list of nucleotides
public String getFirst(int n) { return ""; }
[ "protected void trim(int n){\n //trim the last n letters\n nucleotideSequence = nucleotideSequence.substring(0, nucleotideSequence.length() - n);\n }", "public static Optional<String> first(final String value,final int n){\n \treturn Optional.ofNullable(value).filter(v->!v.isEmpty()).map(v -> ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ecrit dans le fichier f le parcours p au format xml.
private void writeToXmlFile(Parcours p, File f) { try { DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); Document doc = dBuilder.newDocument(); Element p...
[ "public static void createNewXMLFile(String pFilePath) {\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n Element rootEle...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This adds a property descriptor for the Net Bios Adaptor Number feature.
protected void addNetBiosAdaptorNumberPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MQQueueManager_netBiosAdaptorNumber_feature"), //$NON-NLS...
[ "protected void addNumerPropertyDescriptor(Object object) {\r\n\t\titemPropertyDescriptors.add\r\n\t\t\t(createItemPropertyDescriptor\r\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\r\n\t\t\t\t getResourceLocator(),\r\n\t\t\t\t getString(\"_UI_BankCard_numer_feature\"),\r\n\t\t\t\t ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles an info message. Delegates it to the static handler.
public static void info(String msg) { checkHandler(); _handler.handleInfo(msg); }
[ "public void handleInfo(String msg) {\n\t\tcheckHandler();\n\t\t_handler.handleInfo(msg);\n\t}", "protected abstract void handleInfo(String entryPath);", "public void HandleInfoMessage(String infoMessage) {\r\n\t\tString lMessage = infoMessage;\r\n\t\tif (lMessage.equalsIgnoreCase(\"not enough money\")) {\r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If an exception is a StatusException, convert it to a FirebaseFirestoreException. Otherwise, leave it untouched.
private static Exception convertStatusException(Exception e) { if (e instanceof StatusException) { StatusException statusException = (StatusException) e; return exceptionFromStatus(statusException.getStatus()); } else if (e instanceof StatusRuntimeException) { StatusRuntimeException statusRunt...
[ "static KuduException transformException(Exception e) {\n // The message may be null.\n String message = e.getMessage() == null ? \"\" : e.getMessage();\n if (e instanceof KuduException) {\n // The exception thrown inside the async code has a stack trace\n // that doesn't correspond to where the...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calcula el numero de cuentas creadas de la persona
private int numeroCuentas() { int cuentasCreadas = 0; for (Cuenta cuenta : this.cuentas) { if (cuenta != null) { cuentasCreadas++; } } return cuentasCreadas; }
[ "public int nombreEchecs(){\r\n\t\tint nombreEchecs = 0; \r\n\t\tfor (int i=0; i < tableCotes.length;i++){\r\n\t\t\tif (tableCotes[i] < 10)\r\n\t\t\t\tnombreEchecs++;\r\n\t\t}\r\n\t\treturn nombreEchecs;\r\n\t}", "public static int getVehiculosCreados() {\r\n\t\treturn vehiculosCreados;\r\n\t}", "long getTotalC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reference to the service that manages a specific network.
@Service NetworkService network(String id);
[ "public NetworkService getNetworkService() {\t\t\n \t\treturn this.network;\n \t}", "public String getServiceNetworkId() {\n return this.serviceNetworkId;\n }", "public interface NetworkService {\n\t\n\t/**\n\t * Gets the local server info object. It may take some time to initialize\n\t * this propert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to set names of all graphical components
private void setComponentsNames() { portField.setName("portField"); okButton.setName("okButton"); }
[ "public void setName(){\n name = \"clique graphs of \"+ getBase().toString();\n nameExplicit = false;\n }", "public void setName(String name){\n hubName = name;\n icon.setName(hubName); //changes the icons name to the hubs name\n NetworkReader.form.repaint();\n }", "prot...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Este metodo obtiene la hora actual en formato de 12 horas con horas:minutos:segundos am/pm donde el ultimo digito diferencia am(0) y pm(1) si el parametro bFormat12 = true, si es false retorna la hora en formato de 24 horas.
public String obtenerHoraActual(boolean bFormat12){ Calendar calendario = new GregorianCalendar(); int horas = 0; int minutos = 0; int segundos = 0; String sHora = ""; minutos = calendario.get(Calendar.MINUTE); segundos = calendario.get(Calendar.SECOND); Str...
[ "public String retornaHora(){\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tSimpleDateFormat hora = new SimpleDateFormat(\"HH\");\n\t\tSimpleDateFormat minuto = new SimpleDateFormat(\"mm\");\n\t\tDate date = new Date();\n\t\tcalendar.setTime(date);\n\t\treturn hora.format(calendar.getTime()) + \"h\" + minu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
JUnitDoclet begin javadoc_method getFigure() Method testGetFigure is testing getFigure
public void testGetFigure() throws Exception { // JUnitDoclet begin method getFigure // JUnitDoclet end method getFigure }
[ "public abstract Figure getFigure();", "@Override\n public String getFigure() {\n return figure;\n }", "FigureType getFigure();", "public String getFigure() {\n return figure;\n }", "@Test\r\n\tpublic void getNumFigure() {\r\n\t\tassertEquals(\"NumFigure was intialized to 1\", 1, test...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return High Byte of an int.
public static byte getHighByte(int x) { return (byte) (x >>> 8); }
[ "public final int getHigh() {\n\treturn(this.high);\n }", "public static byte getLowByte(int x)\n {\n return (byte) (x & 0xFF);\n }", "private byte getHighValue(short value) {\n return (byte)((value >> 8) & 0xff);\n }", "public int getHighValue() {\r\n return highValue;\r\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'field1054' field
public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField1054(java.lang.CharSequence value) { validate(fields()[1054], value); this.field1054 = value; fieldSetFlags()[1054] = true; return this; }
[ "public void setField1054(java.lang.CharSequence value) {\n this.field1054 = value;\n }", "public void setField1033(java.lang.CharSequence value) {\n this.field1033 = value;\n }", "public void setField483(java.lang.CharSequence value) {\n this.field483 = value;\n }", "public void setField1034(java...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleAddition0" $ANTLR start "ruleAddition0" ../../intellij/org.eclipse.xtext.core.idea.tests/srcgen/org/eclipse/xtext/serializer/idea/parser/antlr/internal/PsiInternalSyntacticSequencerTestLanguage.g:331:1: ruleAddition0 : ( rulePrim0 ( () otherlv_2= '+' ( (lv_right_3_0= rulePrim0 ) ) ) ) ;
public final void ruleAddition0() throws RecognitionException { Token otherlv_2=null; try { // ../../intellij/org.eclipse.xtext.core.idea.tests/src-gen/org/eclipse/xtext/serializer/idea/parser/antlr/internal/PsiInternalSyntacticSequencerTestLanguage.g:331:14: ( ( rulePrim0 ( () otherlv_2= '...
[ "public final void ruleAddition0() throws RecognitionException {\n Token otherlv_2=null;\n\n try {\n // ../../intellij/org.eclipse.xtext.core.idea.tests/src-gen/org/eclipse/xtext/serializer/idea/parser/antlr/internal/PsiInternalSyntacticSequencerTestLanguage.g:343:14: ( ( rulePrim0 ( () oth...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an instance of ModifySubscriptionChargingMethod
public com.vodafone.global.er.decoupling.binding.request.ModifySubscriptionChargingMethod createModifySubscriptionChargingMethod() throws javax.xml.bind.JAXBException { return new com.vodafone.global.er.decoupling.binding.request.impl.ModifySubscriptionChargingMethodImpl(); }
[ "public com.vodafone.global.er.decoupling.binding.request.ModifySubscriptionChargingMethodType createModifySubscriptionChargingMethodType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.ModifySubscriptionChargingMethodTypeImpl();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the original scan object that was used to create this internal one
public Scan getOriginalScan() { return originalScan; }
[ "public Scanner getScanner(){\r\n return this.scan;\r\n }", "private synchronized ScanSpec getScanSpec() {\n if (scanSpec == null) {\n scanSpec = new ScanSpec(scanSpecArgs, log == null ? null : log.log(\"Parsing scan spec\"));\n }\n return scanSpec;\n }", "KeyValueSc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }