query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Get rid of any accumulated undoable edits. It is useful to call this method after opening a file into the text area. The act of setting its text content upon reading the file will generate an undoable edit. Normally you don't want a freshlyopened file to appear with its Undo action enabled. But it will unless you call ...
@Override public void discardAllUndoableEdits() { discardAllEdits(); }
[ "public void undo() { \n\t\t\taddRedo(text);\n\t\t\tString temp = undoStack.pop();\n\t\t\ttext = temp;\n\t\t\taddText(temp);\n\t\t\tsetChanged();\n\t\t\tnotifyObservers(text);\n\t\t\t\t\t\n\t\t}", "public void Undo(File file){\n\t\tfile.setBuffer(buffer);\n\t}", "public void undo() {\n // Call super.undo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check whether the provided worker has all they need in order to accept this task. This is being written with 'inventory requests' in mind, where this would check the items the fairy has access to.
public boolean canAccept(IFeyWorker worker);
[ "public boolean canAddWorker() {\n\t\treturn numOfWorkers() < workerCapacity();\n\t}", "protected boolean isWorkerAvailable() {\n \tif ( executor != null ) \n return true;\n \n return false;\n }", "public static boolean hasAvaliableWorkers() {\n if (noWorkers == takenWorkers.si...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inizalisiert den User, indem der Name und die Rolle gesetzt wird.
public User(String name, String rolle){ this.name = name; setUserRoll(rolle); }
[ "public void initUser()\n\t{\n\t\tResultSet account=userDAO.edit(username);\n\t\ttry {\n\t\t\tif(!account.next()){\n\t\t\t\tSystem.out.println(\"Bad resultset in login\"); \n\t\t\t}\n\t\t\tcurrent_user=new UserDTO(account.getString(1),account.getString(2),\n\t\t\t\t\t\t\t\t\t account.getString(8),account.getString(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Il metodo istanzia la classe registrazioneView che ha il compito di istanziare la loginPage
public void istanziaLoginAction() { new registrazioneView().istanziaLoginPage(); }
[ "public LoginView() {\n\n defaultApi = new DefaultApi();\n vaadinSession = VaadinSession.getCurrent();\n\n innerLayout = new VerticalLayout();\n innerLayout.addClassName(\"innerlayout\");\n innerLayout.setWidth(\"300px\");\n\n logo = new Image(\"img/logo.png\", \"logo image...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a PresenceStatus instance representing the state this provider is currently in.
public PresenceStatus getPresenceStatus() { return presenceStatus; }
[ "public PresenceStatus getPresenceStatus()\n {\n return currentStatus;\n }", "public PresenceStatus getPresenceStatus()\n {\n return currentStatus;\n }", "PresenceStatus getPresenceStatus();", "public PresenceStatus getStatus() {\n return null;\n }", "public int getPre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CALC FIRST CHAR DISTRIBUTION METHOD This method calculates the character distribution of first letter in each word
private void calcFirstCharDistribution() { // Temporary text String that will be converted to Char array String tempText = new String(); // Takes first letter from each word in array for(String letter : parsedContent) { tempText += letter.toLowerCase().charAt(0); } // Char array char[] chars = t...
[ "private void calcSingleCharDistribution() {\n\t\t//\tTemporary text String that will be converted to Char array\n\t\tString tempText = String.join(\"\", parsedContent).toLowerCase();\n char[] chars = tempText.toCharArray();\n\n //\tAmount of letters\n \tdouble charDistributionLength = chars.leng...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a property value from configuration namespace under given property name. When the given defaultValue argument is null, it means the property is required, otherwise it means the property is optional. If the property is missing but the property is optional, the default value is returned.
private String getPropertyValue(String namespace, String propertyName, String defaultValue) throws CockpitConfigurationException { try { String prop = ConfigManager.getInstance().getString(namespace, propertyName); // Property is missing if (prop == null) { ...
[ "String getProperty(String key, String defaultValue);", "private String getConfigValue(Map<String, String> atlasConfig, String property, String defaultValue) {\n return atlasConfig.containsKey(property) ? atlasConfig.get(property) : defaultValue;\n }", "public String get(String name, String defaultValue);",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a mole to be up at a given position.
public void moleUp(int row, int col) { this.board[row-1][col-1] = Mole.MOLE_UP; }
[ "public void moveUp()\r\n {\r\n this.y -= this.offset;\r\n }", "public void moveUp() {\n locY = locY + 1;\n }", "public void moveUp() {\n\t\tposY += speed;\n\t}", "public void moveUp() {\n\t\tstate.updateFloor(state.getFloor()+1);\n\t}", "public void moveUp() {\n\t\tthis.setLocation(t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
f0 > "LE" | "NE" | "PLUS" | "MINUS" | "TIMES" | "DIV"
public R visit(Operator n, A argu) { R _ret=null; n.f0.accept(this, argu); switch(n.f0.which){ case 0: _ret = (R)("LE "); break; case 1: _ret = (R)("NE "); break; case 2: _ret = (R)("PLUS "); break; case 3: ...
[ "public R visit(Operator n) {\n\t\tR _ret = null;\n\t\tn.f0.accept(this);\n\t\tswitch (n.f0.which) {\n\t\tcase 0:\n\t\t\t_ret = (R) \" LT \";\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\t_ret = (R) \" PLUS \";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t_ret = (R) \" MINUS \";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\t_ret = (R) \" TIMES \";\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a new word offset
public void addWordOffset(int offset) { wordOffsets.add(new Integer(offset)); }
[ "public void addPos(String word, IPosition pos);", "public void setWordOffset(final int wordOffset) {\n\t\tthis.wordOffset = wordOffset;\n\t}", "public void addWord(Word word);", "public void addOffset(Integer offset) {\r\n\t\toffsets.addLast(offset);\r\n\t\tTF++;\r\n\t}", "public void add(Mention mention, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get synchronization object. Object returned by this method checks that only one thread accesses Firebird client library.
protected Object getSynchronizationObject() { return SYNC_OBJECT; }
[ "public static SynchronizedRecordLocker instance() {\n\treturn INSTANCE;\n }", "public ISynchronizeClient getSynchronizeClient() {\r\n\t\treturn mySynchronizeClient;\r\n\t}", "public ch.ivyteam.ivy.admin.tool.process.SynchronizationManager getSynchronizationManager()\n {\n return synchronizationManager;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Crear nuevo CandidatoTransmisionCovid19 en la base de datos
public void crearCandidatoTransmisionCovid19(CandidatoTransmisionCovid19 partcaso) throws Exception { ContentValues cv = CandidatoTransmisionCovid19Helper.crearCandidatoTransmisionCovid19ContentValues(partcaso); mDb.insertOrThrow(Covid19DBConstants.COVID_CANDIDATO_TRANSMISION_TABLE, null, cv); }
[ "public void crearDatosAislamientoVisitaCasoCovid19(DatosAislamientoVisitaCasoCovid19 DatosAislamientoVisitaCasoCovid19) throws Exception {\n\t\tContentValues cv = DatosAislamientoVisitaCasoCovid19Helper.crearDatosAislamientoVisitaCasoCovid19ContentValues(DatosAislamientoVisitaCasoCovid19);\n\t\tmDb.insertOrThrow(C...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DAO for operations for table 'orders' from DB 'logiWeb'
public interface OrderDAO { /** * Getting all orders from DB * @return List */ List<Order> getAllOrders(); /** * Saving order to DB * @param order */ void saveOrder(Order order); /** * Getting order by id from DB * @param id * @return Order */ ...
[ "public interface OrderDAO {\r\n\r\n}", "public interface OrderDAOI{ \r\n\r\n \r\n enum SQL {\r\n\t\tGETALLUSERSORDERSBYID(\"SELECT * FROM TSR_ADMIN.TSR_ORDER WHERE CUSTOMER_ID=?\"),\r\n GETORDERBYDATE(\"SELECT * FROM TSR_ADMIN.TSR_ORDER WHERE ORDER_DATE=?\"),\r\n GETORDERBYID(\"SELECT * FROM ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests encoding of AVC video from Camera input. The output is saved as an MP4 file. step1: prepareCamera step2: prepareEncoder step3: prepareSurfaceTexture
private void encodeCameraToMpeg() { // arbitrary but popular values int encWidth = 1080; int encHeight = 1920; int encBitRate = 6000000; // Mbps Log.e(TAG, MIME_TYPE + " output " + encWidth + "x" + encHeight + " @" + encBitRate); try { // 1.打开并配置摄像头参数 ...
[ "private void doExtractDecodeEncodeMux(MediaExtractor videoExtractor,\n MediaExtractor audioExtractor, MediaCodec videoDecoder,\n MediaCodec videoEncoder, MediaCodec audioDecoder,\n MediaCodec ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method that returns the location of the frame from its disposition
private Rect getLocationFromDisposition(Disposition disposition) { int w = getMeasuredWidth() - (getPaddingLeft() + getPaddingRight()); int h = getMeasuredHeight() - (getPaddingTop() + getPaddingBottom()); int cw = w / mCols; int ch = h / mRows; Rect location = new Rect(); ...
[ "public String getFrameLocation ()\n {\n String ret;\n \n ret = getAttribute (\"SRC\");\n if (null == ret)\n ret = \"\";\n else if (null != getPage ())\n ret = getPage ().getAbsoluteURL (ret);\n \n return (ret);\n }", "protected void loc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Eligibility Screen based on the input AccountTO.
public EligibilityOutput eligibilityScreen(EligibilityInput input) throws RuleEngineDataException;
[ "protected static EligibilityOutput eligibilityScreen(EligibilityInput input) throws Exception {\n \tAccountTO account = input.getAccount();\n \tEligibilityOutput output = new EligibilityOutput();\n \tList<EligibilityResultTO> elgResults = new ArrayList<EligibilityResultTO>();\n \tString liteSignature =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set Contacts Synced Status
public static void setContactSyncStatus(Context context, boolean value) { final SharedPreferences prefs = getMyPreferences(context); Editor editor = prefs.edit(); editor.putBoolean("Is_Contact_Sync", value); editor.commit(); }
[ "public void setSyncStatus(int syncStatus);", "public void setSyncStatus(SyncStatus syncStatus) {\r\n mSyncStatus = syncStatus;\r\n }", "protected void setSync(boolean s) {\r\n\tsetSync(s,coll);\r\n\tinSync = s;\r\n}", "void setSynch(boolean value1)\n // -end- 3611D06602E4 set_head337D8F5A01EA \"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function will modify / verifies Auto Distributed Side Pocket values for respective taxlots.
public static boolean doVerifyAutoDistributedSidePocketsValues(Map<String,String> mapSidePocketSubscriptionDetails){ try { if (mapSidePocketSubscriptionDetails.get("Transaction ID") != null) { List<String> sTxnIDs = Arrays.asList(mapSidePocketSubscriptionDetails.get("Transaction ID").split(",")); List<S...
[ "private static boolean doManuallyDistributeAndVerifySidePocketsValues(Map<String,String> mapSidePocketSubscriptionDetails) {\n\t\ttry {\t\t\t\n\t\t\tif (mapSidePocketSubscriptionDetails.get(\"Transaction ID\") != null) {\n\t\t\t\tList<String> sTxnIDs = Arrays.asList(mapSidePocketSubscriptionDetails.get(\"Transacti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set first. L is a nonnull list. a is a list. The first element of L is changed to a.
public static <C> void SFIRST(LIST<C> L, C a) { if ( ! isNull( L ) ) { L.list.set(0,a); } }
[ "void setFirstElement(ListElement firstElement);", "public void setFirst(A first)\n {\n this.first = first;\n }", "public void addFirst(Comparable o){\n\t\t head=new ListElement(o,head);\n\t }", "public void first(){\n \n if(head==null) return;\n \n curr=head;\n \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GVRCameraRig Test bound of setDefaultCameraSeparationDistance
public void testSetDefaultCameraSeparationDistanceBound() { init(); int size = BoundsValues.getFloatList().size(); for (int i = 0; i < size; i++) { GVRCameraRig.setDefaultCameraSeparationDistance(BoundsValues.getFloatList().get(i)); assertEquals(BoundsValues.getFloatList(...
[ "public void testGetCameraSeparationDistanceBound() {\n init();\n GVRCameraRig gvrCameraRig = TestDefaultGVRViewManager.mGVRContext.getMainScene().getMainCameraRig();\n int size = BoundsValues.getFloatList().size();\n\n for (int i = 0; i < size; i++) {\n gvrCameraRig.setCamera...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a connection to a topic. Connections are used to publish messages.
ConnectionResult connect(String topicName, String accessToken);
[ "TopicConnection getJMSTopicConnection();", "public void crearConexionMQTT() {\n try {\n Log.i(MQTT.TAG, \"Conectando al broker \" + MQTT.broker);\n client = new MqttClient(MQTT.broker, MQTT.clientId,\n new MemoryPersistence());\n MqttConnectOptions connO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implicit conversion true if P is a better match to callSig than Q with args 'args'
public static boolean betterFuncMatch(final FuncInfo P, final FuncInfo Q, final FuncInfo callSig, final Object[] args) { Debug.Assert((args == null) || (args.length == callSig.numArgs())); Debug.Assert(callSig.numArgs() >= P.numRequiredArgs()); Debug.Assert(callSig.numArgs() >= Q.num...
[ "boolean hasHasArgumentFunctionPair();", "private Boolean syntaxCheckArgResults(List<DaaTPtr> ptrs) {\n\n for (int i = 0; i < this.args.size(); i++) {\n\n if (!(this.args.get(i) instanceof QryopIl)) {\n QryEval.fatalError(\"Error: Invalid argument in \" +\n this.toString());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "GREATER" $ANTLR start "GREATER_EQUAL"
public final void mGREATER_EQUAL() throws RecognitionException { try { int _type = GREATER_EQUAL; int _channel = DEFAULT_TOKEN_CHANNEL; // OCL.g:750:15: ( '>=' ) // OCL.g:750:17: '>=' { match(">="); if (state.failed) return ; ...
[ "public final void mGREATER_OR_EQUAL() throws RecognitionException {\n try {\n int _type = GREATER_OR_EQUAL;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:39:18: ( '>=' )\n // /media/DEVELOP/wcl/software...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
tests whether PowerUp EnlargeBulletPowerUp properly affects bullets
@Test public void testEnlargeBullet() { System.out.println("\n-- Enlarge Bullet test --\n"); ItemSystem itemSys = new ItemSystem(); Entity powerUp = new EnlargeBulletPowerUp(); powerUp.setRadius(12); // place powerup on top of player to trigger collision PositionPar...
[ "boolean testBulletExplode(Tester t) {\n return t.checkExpect(\n new Bullet(2, Color.PINK, new MyPosn(50, 50), new MyPosn(0, -8), 1).explode(),\n new ConsLoGamePiece(new Bullet(4, Color.PINK, new MyPosn(50, 50), new MyPosn(8, 0), 2),\n new ConsLoGamePiece(new Bullet(4, Color.PINK, new My...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display a little editor for field bindings.
public void showBindFieldPopup(final FactPattern fp, final SingleFieldConstraint con, final ModelField[] fields, final PopupCreator popupCreator) { final FormStylePopup popup = new FormStylePopup(GuidedRuleE...
[ "private void doBindingEditor(final FormStylePopup popup) {\n if (bindable || !(modeller.getModel().isBoundFactUsed(pattern.getBoundName()))) {\n HorizontalPanel varName = new HorizontalPanel();\n final TextBox varTxt = new BindingTextBox();\n if (pattern.getBoundName() == nu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Sit in a loop reading bases and exponents and printing out the values produced by raising the base to the exponent.
public void run() { while (true) { double base = readDouble("Enter base: "); int exponent = readInt("Enter exponent: "); println(base + " ^ " + exponent + " = " + raiseToPower(base, exponent)); } }
[ "private static void baseout (long number, long base, PrintStream stream) {\n //String for if the number is to be converted to hexadecimal\n String hexNum = \"\";\n //Maximum power of base before it is greater than number\n int maxPow = 1;\n long currNum = base;\n //Used to...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test that AVRCP events such as playback commands can execute while performing browsing.
@Test public void testPlayWhileBrowsing() { setUpConnectedState(true, true); final String rootName = "__ROOT__"; final String playerName = "Player 1"; //Get the root of the device BrowseTree.BrowseNode results = mAvrcpStateMachine.findNode(rootName); Assert.assertEqu...
[ "@Test\n public void testBrowsingCommands() {\n setUpConnectedState(true, true);\n final String rootName = \"__ROOT__\";\n final String playerName = \"Player 1\";\n\n //Get the root of the device\n BrowseTree.BrowseNode results = mAvrcpStateMachine.findNode(rootName);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method determines if the region is at left side. If there are 9 regions in the game space then region no 3,6,9 are right regions All other are left regions i.e region no 1,2,4,5,7,8 are left regions
public boolean isLeftRegion(int regionID){ for(int i=0;i<arrLeftRegions.size();i++){ if(arrLeftRegions.get(i)==regionID) return true; } return false; }
[ "public boolean collidingLeftEdge(){\n\t\treturn (x - (width/2)) <= 0;\n\t}", "public void controlLeftRightRgionEntry(Region r,Player player){\n\t\t\n\t\tint x = player.getPlayerCurXPos();\t\t\n\t\t\n\t\tif(isExtremeLeftRegion(r.getRegionID()) && x<0){\n\t\t\t//logger.info(\"BMK4---RegionController.java--Extreme ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Uncompress the picture bytes
private byte[] uncompressPictureBytes(byte[] pictureBytes) { Inflater inflater = new Inflater(); inflater.setInput(pictureBytes); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(pictureBytes.length); byte[] buffer = new byte[1048576]; try { while (!inflater.finished()) { int count =...
[ "@Override\n public byte[] decompress(byte[] imagen) {\n resetVarD();\n /*\n Declaraciones de variables SI VEO QUE EL ULTIMO BIT ES UN 1 HACER AND OF STRING PASARLO A INT Y MULTIPLICAR POR 1\n */\n char[] imagenaux = new char[imagen.length];\n for (int j = 0; j < imagen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method returns a game state where the current player is given the tickets he chose and the drawn tickets from the top of the tickets deck are discarded.
public GameState withChosenAdditionalTickets(SortedBag<Ticket> drawnTickets, SortedBag<Ticket> chosenTickets) { Preconditions.checkArgument(drawnTickets.contains(chosenTickets)); Deck<Ticket> allTicketsToReturn = allTickets.withoutTopCards(drawnTickets.size()); Map<PlayerId, PlayerState> mapT...
[ "public GameState withInitiallyChosenTickets(PlayerId playerId, SortedBag<Ticket> chosenTickets) {\r\n Preconditions.checkArgument(privatePlayerState.get(playerId).tickets().size() < 1);\r\n Map<PlayerId, PlayerState> mapToReturn = new TreeMap<>(privatePlayerState);\r\n mapToReturn.put(playerId...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Defines the selection criteria to group users into cohorts. Most cohort reports define only a single cohort. If multiple cohorts are specified, each cohort can be recognized in the report by their name. repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
@java.lang.Override public java.util.List<? extends com.google.analytics.data.v1beta.CohortOrBuilder> getCohortsOrBuilderList() { return cohorts_; }
[ "@java.lang.Override\n public java.util.List<com.google.analytics.data.v1beta.Cohort> getCohortsList() {\n return cohorts_;\n }", "@java.lang.Override\n public com.google.analytics.data.v1beta.CohortOrBuilder getCohortsOrBuilder(int index) {\n return cohorts_.get(index);\n }", "public Builder clearCoh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end of inner DoublyLinkedListIterator class Iterable implementation
@Override public Iterator<E> iterator() { return new DoublyLinkedListIterator(); }
[ "public BrickItr() {myItr = children.iterator(); advance();}", "@Override\n public Iterator<E> iterator() {\n return new DoubleLinkedIterator(first);\n }", "@Override\n public Iterator<T> iterator() {\n return new DoubleLinkedListIterator<>(this.front);\n }", "public ListIterator<E> ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an object representing the value in the named ExtensionTypeVector at the currentRow. An IllegalArgumentException is thrown if the column is not present in the Row and a ClassCastException is thrown if it has a different type.
public Object getExtensionType(String columnName) { FieldVector vector = table.getVector(columnName); return vector.getObject(rowNumber); }
[ "public Object getExtensionType(int vectorIndex) {\n FieldVector vector = table.getVector(vectorIndex);\n return vector.getObject(rowNumber);\n }", "public ExtendedValueType getVectorElementType() {\n\t\tif(!isVector()){\n\t\t\tassert false : INVALID_VECTOR_TYPE;\n\t\t\tLOG.error(INVALID_VECTOR_TYPE);\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sync syncs the file system back to the physical disk. The sync method will write the directory information to the disk form in the root directory. And ensure that the superblock is synced.
public void sync() { byte[] tempData = directory.directory2bytes(); //open root with write access FileTableEntry root = open("/", "w"); //write it to root write(root, directory.directory2bytes()); //close root close(root); //sync superblock superblock.sync(); ...
[ "void sync() \n\t{\n\t\tFileTableEntry ftEntry = open(\"/\", \"w\");\t\t//read directory from disk\n\t\tbyte[] buffer = directory.directory2bytes();\n\t\twrite(ftEntry, buffer);\n\t\tclose(ftEntry);\n\t\tsuperblock.sync();\t\t\t\t\t//write superblock back to disk\n\t}", "public static void sync() {\n // write ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SetLastName test 3 with incorrect value (null).
@Test(expected = IllegalArgumentException.class) @SuppressFBWarnings("NP") public void testSetLastName3() { user1.setLastName(null); }
[ "@Test\r\n\tpublic void testSetGetLastNameInvalid() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setLastName(lastnameInvalid);\r\n\t\tassertEquals(lastnameInvalid, doctor.getLastName());\r\n\r\n\t}", "protected void setLastName(String last)\n {\n lastName = last;\n }", "public void setLastN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'field63' field
public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField63() { field63 = null; fieldSetFlags()[63] = false; return this; }
[ "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField963() {\n field963 = null;\n fieldSetFlags()[963] = false;\n return this;\n }", "public com.dj.model.avro.LargeObjectAvro.Builder clearVar63() {\n var63 = null;\n fieldSetFlags()[64] = false;\n return this;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XThrowExpression__Group__0" $ANTLR start "rule__XThrowExpression__Group__0__Impl" ../org.xtext.guicemodules.ui/srcgen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14332:1: rule__XThrowExpression__Group__0__Impl : ( () ) ;
public final void rule__XThrowExpression__Group__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14336:1: ( ( () ) ) ...
[ "public final void rule__XThrowExpression__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14324:1: ( rule__XThrowE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the horizontal scroll bar is needed
private void setHorizontalScrollBar() { for (int i = 0; i < changelog_output.getLineCount(); ++i) { if (changelog_output.getLine(i).length() > lineWidth) { changelog_output.getHorizontalBar().setVisible(true); return; } } changelog_output.getHorizontalBar().setVisible(false); }
[ "public boolean isHorizontalScrollBarEnabled() { throw new RuntimeException(\"Stub!\"); }", "public void verifyThereHorizontalScrolling() {\r\n\t\tboolean scrolling_bar = (boolean) ((JavascriptExecutor) driver).executeScript(\r\n\t\t\t\t\"return Math.max(document.body.scrollWidth, document.body.offsetWidth, docum...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display all bluetooth paired devices
public void list() { pairedDevices.addAll(BA.getBondedDevices()); ArrayList list = new ArrayList(); for (BluetoothDevice bt : pairedDevices) list.add(bt.getName()); Toast.makeText(getApplicationContext(), "Showing Paired Devices", Toast.LENGTH_SHORT).show(); final ArrayAdapter ad...
[ "public void displayPairedDevices() {\n\t\tBluetoothAdapter mBluetoothAdapter = BluetoothAdapter\n\t\t\t\t.getDefaultAdapter();\n\t\tSet<BluetoothDevice> bondedDevices = mBluetoothAdapter\n\t\t\t\t.getBondedDevices();\n\n\t\tList<String> s = new ArrayList<String>();\n\t\tpairedDevices = new ArrayList<BluetoothDevic...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check if particular option is supported by a subdevice \param[in] sensor the RealSense sensor \param[in] option option id to be checked \param[out] error if nonnull, receives any error that occurs during this call, otherwise, errors are ignored \return true if option is supported Original signature : int rs2_supports_o...
int rs2_supports_option(Realsense2Library.rs2_options options, int option, PointerByReference error);
[ "int rs2_supports_device_info(Realsense2Library.rs2_device device, int info, PointerByReference error);", "int rs2_is_option_read_only(Realsense2Library.rs2_options options, int option, PointerByReference error);", "int rs2_is_device_extendable_to(Realsense2Library.rs2_device device, int extension, PointerByRef...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generic entity that can be used to deploy clusters that are managed by Apache Whirr.
@ImplementedBy(WhirrClusterImpl.class) public interface WhirrCluster extends Entity, Startable { @SetFromFlag("recipe") public static final BasicConfigKey<String> RECIPE = new BasicConfigKey<String>( String.class, "whirr.recipe", "Apache Whirr cluster recipe"); public static final BasicAttribu...
[ "@Service\n@Area(\"Virtualization\")\npublic interface ClusterService {\n /**\n * Gets information about the cluster.\n *\n * An example of getting a cluster:\n *\n * [source]\n * ----\n * GET /ovirt-engine/api/clusters/123\n * ----\n *\n * [source,xml]\n * ----\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a sound resource to the TTS as an earcon.
private void addEarcon(String earcon, String packageName, int resId) { mEarcons.put(earcon, new SoundResource(packageName, resId)); }
[ "private void addEarcon(String earcon, String filename) {\n mEarcons.put(earcon, new SoundResource(filename));\n }", "public void add( SoundResource soundResource ) {\n \tmodel.add(soundResource, resolution);\n }", "private void addSpeech(String text, String packageName, int resId) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
devuelve el valor de jugador ganador
public int getJugadorGanador() { return jugadorGanador; }
[ "public Jugador ganador(){\n return partida.ganador();\n }", "public Jugador obtenerJugador();", "public Jugador jugador() {\r\n\treturn jugador;\r\n }", "public static void ganador (){\n int puntuacionMax = 0;\r\n Jugador ganador = null;\r\n\r\n // Puntuacion de cada ronda\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds a collection of schemes sorted according dependencies
public List<LiquibaseSchema> build(final String id, Collection<LiquibaseSchema> schemes) { log.fine(String.format("[id = %s] build(%s)", id, schemes)); log.info(String.format("[id = %s] Sorting schemes according dependencies...", id)); if (schemes.isEmpty()) { return Collections.em...
[ "Set<Scheme> getSchemes();", "public Map<RepositoryObject, Set<RepositoryObject>> getDependencies() {\n final Map<String, RepositoryObject> providedBundleToRepo = reverseProvidedMap(RepositoryObject::getProvidedBundles);\n final Map<String, RepositoryObject> providedFeatureToRepo = reverseProvidedMa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method gets the accessor method name for a column.
public String getAccessorMethodName(ColumnInfo value) { if (value.isBoolean) return PREFIX_ACCESSOR_METHOD_BOOL + value.name; return PREFIX_ACCESSOR_METHOD + value.name; }
[ "public String getcolumnName(int index);", "public String getName() {\n return columnName;\n }", "public String getColumnName(int column);", "public String getName(){\n\t\t\treturn columnName;\n\t\t}", "public String getColumn_name(){\r\n\t\treturn this.column_name ;\r\n\t}", "public String getC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a SessionFactory which connects to the database identified by the host, port, and dbname parameters. The username and password parameters are used for authentication with the database system. The parameters are used in conjuction with the ibpmidware_hib.cfg.xml file in src/main/config.
public HibernateUtil(String host, String port, String dbName, String username, String password) throws ConfigException, HibernateException { try { log.info("Reading Hibernate config file: " + MIDDLEWARE_INTERNAL_HIBERNATE_CFG); URL urlOfCfgFile = ResourceFinder.locateFile(MIDDLEWARE_INTERNAL_HIBERNATE_C...
[ "private static SessionFactory buildSessionFactory() {\n try {\n /*\n * Read the database connection configuration from\n * \"src/main/resources/hibernate.properties\".\n */\n Properties props = new Properties();\n props.load(YelpApp.class....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete state by id
@Override @Transactional public void deleteState(long id) { stateRepository.deleteById(id); }
[ "@DeleteMapping(path=\"/api/private/admin/delete/state\")\n\tpublic void removeState(@RequestParam String stateId){\n\t\t this.commonServices.removeState(stateId);\n\t}", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete CartState : {}\", id);\n cartStateRepository.delete...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Matchmake players in the BattlePlayerList
private void matchMaking(){ if(battlePlayers.size() == 10){ //Control battle index battleind++; //Log MatchMake battlePlayers.forEach( player -> { player.sendMessage(loggingPrefix + ChatColor.GOLD + "You have a game! It's now ...
[ "Map<String, List<PlayerDetails>> playMatch(PlayerDetails[] players);", "public List<Player> playMatch(List<Player> arrayListPlayers) {\n\n //instantiate Lists for winners / losers\n List<Player> winners = new ArrayList<>();\n List<Player> losers = new ArrayList<>();\n\n //Pairing up -...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional float yaw = 6; float principal angles
float getYaw();
[ "@Override\n public Pose rotate(float yaw, float pitch, float roll);", "public void setAngles ( float yaw , float pitch ) {\n float f = this.rotationPitch;\n float f1 = this.rotationYaw;\n this.rotationYaw = ( float ) ( ( double ) this.rotationYaw + ( double ) yaw * 0.15D );\n this....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This executes the full API request using bad customer data
@Test public void testSearchApiCallReturnsResponseWithHighRiskEvaluationForInvalidCustomer() { LexisNexisResponse response = service.search(customer); assertNull(response.getError()); assertTrue(response.getComprehensiveVerificationIndex() < 30 ); assertTrue(response.getRiskIndicator...
[ "public static void callCustomerDetailsAPI(String customerID){\n String url = \"https://dnbapistore.com/hackathon/accounts/1.0/account/customer/\" +customerID;\n// String originalURL = \"https://dnbapistore.com/hackathon/accounts/1.0/account?accountNumber=12083082828&customerID=09077675402&dateFrom=23082016&...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if player has used up sprite's lives
public boolean gameOver(){ return this.lives < 1; }
[ "public int isSafe(){\n int nbEnnemies = 0;\n List<Player> players = state.getPlayers();\n Player currentPlayer = state.getCurrentPlayer();\n for(Player p : players){\n if(!p.equals(currentPlayer)) {\n nbEnnemies += currentPlayerReachable(state.getCurrentPlayer(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Changes the reservations of the reservable.
public void setReservations(Set<ReservationAmount> reservations) { this.reservations = reservations; }
[ "void updateReservation(Reservation reservation);", "Reservation modifyReservation(Reservation reservation) throws IllegalArgumentException;", "public void setList(ArrayList<Reservation> newReservations)\n\t{\n\t\troomReservations = newReservations;\n\t}", "public void setReservations(Set<Reservation> reserva...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method adds and registers the ShanksAgent
public void registerShanksAgent(ShanksAgent agent) throws ShanksException { if (!this.agents.containsKey(agent.getID())) { this.agents.put(agent.getID(), agent); } else { throw new DuplicatedAgentIDException(agent.getID()); } }
[ "public void registerShanksAgents() throws ShanksException {\n logger.info(\"No agents to add...\");\n }", "ISarlAgentBuilder addSarlAgent(String name);", "public void addAgent(Agent agent);", "public void register() \n{\n\tamsclient.register(this.agentid);\n}", "public void registerAgent ( Agen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fills Trees of Foods
private void createFoodTrees(){ while(!foodArray.isEmpty()){ Food element= foodArray.dequeue(); priceTree.add(element); stockTree.add(element); } }
[ "private void createRestaurantTrees() {\r\n while (!restaurantArray.isEmpty()) {\r\n Restaurant element = restaurantArray.dequeue();\r\n ratingTree.add(element);\r\n deliveryTree.add(element);\r\n }\r\n }", "private void createFoods() {\n FoodCollection.cle...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'fragmentName' field has been set
public boolean hasFragmentName() { return fieldSetFlags()[2]; }
[ "@Override\n protected boolean isValidFragment(String fragmentName) {\n return true;\n }", "public boolean hasFragment()\n\t{\n\t\treturn (StringUtil.isEmpty(getFragment())==false); \n\t}", "public void setFragmentName(java.lang.CharSequence value) {\n this.fragmentName = value;\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
custom functionality of discountByUserType
@Override public int discountByUserType(User loggedUser, List<Contract> userContracts) { int contractCount = userContracts.size(); int discount = 0; if(loggedUser.getUserType().equals("NORMAL")){ for(int i = 0; i <= contractCount; i++){ discount +=5; ...
[ "public Integer getDiscountType() {\n return discountType;\n }", "public void setDiscountType(Integer discountType) {\n this.discountType = discountType;\n }", "java.lang.String getDiscount();", "public abstract Double getDiscount();", "Money getDiscountValue();", "public abstract doub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To prevent hooktimer from happening before the script engine is loaded. if(se == null) return;
static void hooktimer() { while (hooktimer != 0) { callfunction(timerfunc); hooktimer--; } }
[ "public static String _process_globals() throws Exception{\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv5 = new anywheresoftware.b4a.objects.Timer();\n //BA.debugLineNum = 10;BA.debugLine=\"Private TimerAnimacionEntrada As Timer\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv6 = new anywheresoftware.b4a.objects.T...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
a test for findPentagonalPyramid with smallest volume.
@Test public void findPentagonalPyramidWithSmallestVolume() { PentagonalPyramid[] pArray = new PentagonalPyramid[100]; PentagonalPyramid p1 = new PentagonalPyramid("PP1", 10, 15); PentagonalPyramid p2 = new PentagonalPyramid("PP1", 6, 3); PentagonalPyramid p3 = new PentagonalPyramid("PP1", 17...
[ "@Test public void findPentagonalPyramidWithLargestVolume()\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramid p1 = new PentagonalPyramid(\"PP1\", 10, 15);\n PentagonalPyramid p2 = new PentagonalPyramid(\"PP1\", 6, 3);\n PentagonalPyramid p3 = new PentagonalPyra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draw the columns header.
protected void drawColumnsHeader(Graphics g, int x, int y, int w, int h) { g.setFont(bodyFont); // //drawing the background. g.setColor(columnsHeaderColor); g.fillRect(x, y, getColumnsWidth(), h); //drawing a top line. // g.setColor(255, 255, 255); //white color. // g.drawLine(x, y, w, y); //dr...
[ "private void renderHeader() {\n int ncol = this.getColumnCount();\n for (int i = 0; i < ncol; i++) {\n TableColumn tc = this.getColumnModel().getColumn(i);\n tc.setHeaderRenderer(new EDFTableHeaderRenderer());\n }\n }", "void displayColumnHeaders() {\n\t\tSystem.out....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete all foods inside current order for the logged user
@Query("DELETE FROM current_order WHERE userId = :userId") void deleteAllFoods(long userId);
[ "public void deleteOrdersForUser(String id){\n List<Order> orders = orderRepository.findByUserId(id);\n for (Order order: orders) {\n orderRepository.delete(order);\n }\n log.info(\"Users orders have been successfully deleted!\");\n }", "public void deleteFood(Food food, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loops read from client: when a message is read, answerReady is set true. If the client is unreachable, server is notified
public void readFromClient() { Thread t = new Thread(() -> { while (connected) { try { socket.setSoTimeout(5000); String fromClient = socketIn.readLine(); if (!fromClient.equals("")) { if (myTurn) { ...
[ "public void readFromClient() {\n Thread t = new Thread(() -> {\n while (connected) {\n try {\n Message fromClient;\n synchronized (C2SMessages){\n if (C2SMessages.size() > 0){\n fromClient = (Me...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a substring of the text being parsed.
public String getTextSubstring(int start, int end) { return text.subSequence(start, end).toString(); }
[ "public String substring(int beg, int end) {\r\n\t\treturn text.substring(beg, end);\r\n\t}", "public My_String substring(int start, int end);", "public String getSubstring(int start, int end) {\n return value.substring(start, end);\n }", "public String extractBegin(String text, int beginTextLenghth...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ To get the PrintStream of this Debug Utility.
static public PrintStream getPrintStream() { return out; }
[ "public PrintStream getPrintStream()\r\n\t{\r\n\t\treturn printStream;\r\n\t}", "PrintStream getPrintStream() {\n return logfile;\n }", "public static synchronized PrintStream getStdOut() {\n return sysOut;\n }", "public static NullPrintStream getNullPrintStream() {\n return new Nul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Changes selected toggleNode, taking into consideration clicking on same button or when there is no selected toggleNode.
private void changeSelectedToggleNode(JFXToggleNode newSelectedNode) { if (toggleNodeSelected == null) { toggleNodeSelected = newSelectedNode; canvas.setCursor(Cursor.DEFAULT); } else if (toggleNodeSelected == newSelectedNode) { toggleNodeSelected = null; ...
[ "public void toggleSelected() { selected = !selected; }", "void selectToggle(char button_to_toggle)\n {\n int i;\n\n if(button_to_toggle=='x')\n {\n x_toggle.setSelected(true);\n o_toggle.setSelected(false);\n erase_toggle.setSelected(false);\n\n\n for(i=0;i<9;++i)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new forgetron builder.
public ForgetronBuilder(Configuration<ForgetronBuilder> config) { super(config); configure(config); }
[ "public ForgetronBuilder() {\n\t\t\tsuper();\n\t\t}", "public static Builder factory(){\n return new Builder();\n }", "public static Builder create(){\n return new Builder(Tribit.ZERO);\n }", "public HiveBuilder() {\n this.beeType = \"harvester\";\n this.food = 100;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return true if this Unit has at least twice as many calories as other
private boolean canTakeBandanaFrom(Unit other) { return getCalories() >= (2 * other.getCalories()); }
[ "public boolean checkMaxUnitsIndividual() {\n int explorerCount = 0;\n int colonistCount = 0;\n int meleeCount = 0;\n int rangedCount = 0;\n\n for (int i = 0; i < this.units.size(); i++) {\n Unit unit = this.units.get(i);\n\n if (unit instanceof Colonist) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is used to direct the output from the processing block to a dedicated queue object \param[in] block Processing block \param[in] queue Queue to place the processed frames to \param[out] error if nonnull, receives any error that occurs during this call, otherwise, errors are ignored Original signature : void ...
void rs2_start_processing_queue(PointerByReference block, PointerByReference queue, PointerByReference error);
[ "void rs2_start_processing(PointerByReference block, PointerByReference on_frame, PointerByReference error);", "void rs2_enqueue_frame(PointerByReference frame, Pointer queue);", "void rs2_start_queue(PointerByReference sensor, PointerByReference queue, PointerByReference error);", "void rs2_start_processing_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Examines log configuration keys for those that represent files to add system install path if not absolute.
private static Properties resolveLogFiles(final Properties logProps) { Properties filteredProps = new Properties(); for(String key : logProps.stringPropertyNames()) { if(key.endsWith(".File")) { String filename = logProps.getProperty(key); if(filename.startsWith("/")) { ...
[ "private static Map<String, LogInfo> readLogKeys(String logPublicKeyFileorDir) {\n Map<String, LogInfo> logInfos = new HashMap<>();\n File file = new File(logPublicKeyFileorDir);\n if (file.isDirectory()) {\n // Read all public keys in the directory into a hashmap\n // then choose the correct one...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the depth image. A reference is saved internally.
public void setDepthImage(T depthImage) { this.depthImage = depthImage; }
[ "void setDepth(float depth);", "public native void setDepth(int depth) throws MagickException;", "void setDepth( double theDepth );", "private final void setDepth(int depth){\n\t\tthis.depth = depth;\n\t}", "public void setDepth(java.lang.Integer value) {\n this.depth = value;\n }", "public void setDe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if the configured UGI has access to the path for the given file system action. Method will return successfully if action is permitted. AccessControlExceptoin will be thrown if user does not have access to perform the action. Other exceptions may be thrown for nonaccess related errors.
public void checkFileAccess(FileSystem fs, FileStatus status, FsAction action) throws IOException, AccessControlException, Exception;
[ "private static void checkPermission(String action) {\r\n\t\t\r\n\t\t//TODO Implement the permission to access the mandator configuration\r\n\t}", "boolean CanAccessFile(String path);", "public void checkWriteExtFileAccPerm() throws AccessDeniedException;", "boolean isAuthorized(String path, String action);",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates or finds a IncidentLabelType from its string representation.
@JsonCreator public static IncidentLabelType fromString(String name) { return fromString(name, IncidentLabelType.class); }
[ "public static Type Type(String str) {\n\t\ttry {\n\t\t\tJavaIdentifierInputStream jin = new JavaIdentifierInputStream(str);\n\t\t\tBinaryInputStream bin = new BinaryInputStream(jin);\n\t\t\tBinaryAutomataReader reader = new BinaryAutomataReader(bin,\n\t\t\t\t\tTypes.SCHEMA);\n\t\t\tAutomaton automaton = reader.rea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets an instance of type MotorBoat with the given name. Does not modify the underlying ontology.
public MotorBoat getMotorBoat(String name) { return delegate.getWrappedIndividual(name, Vocabulary.CLASS_MOTORBOAT, DefaultMotorBoat.class); }
[ "public MotorBoat createMotorBoat(String name) {\n\t\treturn delegate.createWrappedIndividual(name, Vocabulary.CLASS_MOTORBOAT, DefaultMotorBoat.class);\n }", "public Boat getBoat(String name) {\n\t\treturn delegate.getWrappedIndividual(name, Vocabulary.CLASS_BOAT, DefaultBoat.class);\n }", "public Boat c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of filter method, of class Csv.
@Test public void testFilter() throws Exception { System.out.println("filter"); String nome = ""; String propriedade = ""; Csv instance = new Csv(); String expResult = ""; String result = instance.filter(nome, propriedade); assertEquals(expResult, resu...
[ "@Test\n public void testReadCSV() {\n System.out.println(\"ReadCSV\");\n Passengers expResult = null;\n Passengers result = CSVUtilities.ReadCSV();\n assertNotEquals(expResult, result); \n }", "@Test\n public void testGetListByFilter() {\n System.out.println(\"getListB...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the columnSpec at the given index.
public ColumnSpec getColumnSpec(int index) { return this.getColumnSpecs().get(index); }
[ "public Expression getExpressionOfColumnSpec(int index) {\n\t\treturn this.getColumnSpec(index).getExpression();\n\t}", "public String getColumnNameOfColumnSpec(int index) {\n\t\treturn this.getColumnSpec(index).getColumnName();\n\t}", "com.factset.protobuf.stach.v2.table.ColumnDefinitionProto.ColumnDefinition ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test events to enable and disable component's effects.
@Test void testActive() { ServiceLocator.registerPhysicsService(new PhysicsService()); // Construct entities required to trigger events. Entity player = new Entity() .addComponent(new PhysicsComponent()) .addComponent(new ColliderComponent()) ...
[ "@Test\n public void aTestEnableDisableFunction() {\n for (int i = 0; i<numberOfSwitches; i++) {\n onData(anything()).inAdapterView(withId(R.id.list))\n .atPosition(i)\n .check(matches(isEnabled()));\n }\n\n // Disable the main setting now\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getters Returns the value of Nom.
public String getNom() { return Nom; }
[ "java.lang.String getNume();", "public String getNom() {\n\treturn nomVille;\n}", "public java.lang.String getAs_nom() {\r\n return As_nom;\r\n }", "public abstract java.lang.String getNom_camp();", "public java.lang.String getIw_nom() {\r\n return Iw_nom;\r\n }", "public java.lang.Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the receiverLastName value for this ReferenceNumberResponse.
public java.lang.String getReceiverLastName() { return receiverLastName; }
[ "public java.lang.String getReceiverLastName2() {\r\n return receiverLastName2;\r\n }", "public java.lang.String getReceiverFirstName() {\r\n return receiverFirstName;\r\n }", "public java.lang.String getSenderLastName() {\r\n return senderLastName;\r\n }", "public String getCont...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
It create the instance of NotifyContextAvailabilityRequest for the initial notification of a SubscribeContextAvaialbility
private NotifyContextAvailabilityRequest createFirstNotification( String subscriptionId, Multimap<String, ContextRegistrationResponse> regIdAndContReg) { // Create the NotifyContextAvailabilityRequest NotifyContextAvailabilityRequest notifyReq = new NotifyContextAvailabilityRequest(); notifyReq.setErrorCod...
[ "private void sendNotifications(\n\t\t\tMultimap<SubscriptionToNotify, ContextRegistration> contextRegToNotifyAsAvailable,\n\t\t\tMultimap<SubscriptionToNotify, ContextRegistration> contextRegToNotifyAsDeleted,\n\t\t\tString registrationId) {\n\n\t\t/*\n\t\t * First iterate over all the Subscriptions to which now-a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
used to remove used data from a string for the txt file
static String removeOldDataFromString(String oldString) { oldString = oldString.substring(oldString.indexOf('^') + 1); return oldString; }
[ "void removeData(String data) throws IOException;", "private String removeTime(String str)\n\t{\n\t\tString tmp = \"\";\n\n\t\tfor (String s : str.split(\"\\n\"))\n\t\t\tif (!s.startsWith(\"Time\"))\n\t\t\t\ttmp += s + \"\\n\";\n\t\t\n\t\treturn tmp;\n\t}", "void remove(String str);", "public void remove(Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return new KeyValueNode(thing, Children.LEAF);
@Override protected Node createNodeForKey(KeyValue thing) { return new KeyValueNode(thing, Children.create(new ResultFilesChildFactory(thing), true)); }
[ "@Override\n protected Node createNodeForKey(KeyValue thing) {\n final KeyValueContent thingContent = (KeyValueContent) thing;\n final Content content = thingContent.getContent();\n final String query = thingContent.getQuery();\n\n Node kvNode = new KeyValueNode(th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a contribution for a future date
int setFutureDate(int id, LocalDate date);
[ "public void setDueDate(Date nextDate){\n //if input is null, print error message and then exit\n if (nextDate == null){\n System.err.println(\"No date has been entered.\");\n System.exit(-1);\n } else {\n //if the input has a value create new object and store i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the panel to display the totals:
public void buildTotalsPanel() { totalsPanel = new JPanel(); // Add a titled border for the Totals panel: totalsPanel.setBorder(BorderFactory.createTitledBorder("Totals:")); // Create buttons and text field objects to display the results: subTotalLabel = new JLabel("Subtotal:"); subTotalTextField = n...
[ "public\n TotalsPanel()\n {\n setCards(new JPanel(new CardLayout()));\n setExpensePanel(new CategoryTotalPanel());\n setIncomePanel(new CategoryTotalPanel());\n setTransferPanel(new TransferTotalPanel());\n\n // Add panels to cards.\n getCards().add(getExpensePanel(), EXPENSES.toString());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if i is a valid customerID in the customers ArrayList, otherwise false.
public static boolean isCustomer(int i) { // attempt to find the customerID in the customers ArrayList try { findCustomer(i); } catch(CustomerNotFoundException e) { return false; } return true; }
[ "public boolean isValidCustomer(int customerId){\n return customers.containsKey(customerId);\n }", "public boolean isSetCustomerID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(CUSTOMERID$42) != 0;\n }\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a FixedLocaleResolver that exposes the given locale.
public RequestAndSessionLocaleResolver(Locale locale) { setDefaultLocale(locale); }
[ "@Bean\n\tpublic LocaleResolver localeResolver() {\n\t\tFixedLocaleResolver resolver = new FixedLocaleResolver(new Locale(\"es\", \"MX\"));\n\t\treturn resolver;\n\t}", "@Bean\r\n\tpublic CookieLocaleResolver localeResolver(){\r\n\t\tCookieLocaleResolver localeResolver = new CookieLocaleResolver();\r\n\t\tlocaleR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the ContentLog instance.
public ContentLog getContentLog() { return getBrowserContext().getContentLog(); }
[ "protected Log getLog() {\n return log;\n }", "public Log getLog(){\r\n\t\t\treturn log;\r\n\t\t}", "public static AppLogRef getLog()\n {\n return _log;\n }", "public static synchronized Log getInstance() {\n if (singleton == null) {\n singleton = new Log();\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is the framework context. This context wraps the application context and intercepts all access to the application context. Thereby if the application context does not have a requested item, this context will search for any defaults defined here and return it if found. Every component holds a reference to this cont...
public interface Context extends ApplicationContext { /** * @return Returns the {@link ExceptionWrapper} registred in this context. */ ExceptionWrapper getExceptionWrapper(); /** * @return Returns the {@link Utils} registred in this context. */ Utils getUtils(); /** * @ret...
[ "public Context getContext();", "public static Context getDefault() {\n return DEFAULT_CONTEXT;\n }", "Context createContext();", "public abstract ApplicationLoader.Context context();", "public static Context getContext(){\n\n return App.context;\n }", "public ResourceContext getDefaultConte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /vkpictures : get all the vkPictures.
@GetMapping("/vk-pictures") @Timed public List<VkPictureDTO> getAllVkPictures() { log.debug("REST request to get all VkPictures"); return vkPictureService.findAll(); }
[ "List<VkPictureDTO> findAll();", "@GetMapping(\"/_search/vk-pictures\")\n @Timed\n public List<VkPictureDTO> searchVkPictures(@RequestParam String query) {\n log.debug(\"REST request to search VkPictures for query {}\", query);\n return vkPictureService.search(query);\n }", "@GetMapping(\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column ZLNF_FARMMACHINEYUSER.ENTERPRISECREDITCODE
public void setEnterprisecreditcode(String enterprisecreditcode) { this.enterprisecreditcode = enterprisecreditcode == null ? null : enterprisecreditcode.trim(); }
[ "public void setCust_code(int cust_code) {this.cust_code=cust_code;}", "public void setIns_code(int ins_code) {this.ins_code=ins_code;}", "public String getEnterprisecreditcode() {\n return enterprisecreditcode;\n }", "public void setEnterCode(String enterCode) {\n this.enterCode = enterCode;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__JvmWildcardTypeReference__ConstraintsAssignment_2_0" $ANTLR start "rule__JvmWildcardTypeReference__ConstraintsAssignment_2_1" ../org.xtext.guicemodules.ui/srcgen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:18849:1: rule__JvmWildcardTypeReference__ConstraintsAssignment...
public final void rule__JvmWildcardTypeReference__ConstraintsAssignment_2_1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:18853:1: ( ...
[ "public final void rule__JvmWildcardTypeReference__ConstraintsAssignment_2_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleInputSection" $ANTLR start "ruleInputSection" ../org.xtext.hipie/srcgen/org/xtext/hipie/parser/antlr/internal/InternalHIPIE.g:1177:1: ruleInputSection returns [EObject current=null] : ( ( (lv_name_0_0= 'INPUTS' ) ) ( (lv_inputs_1_0= ruleInputValue ) )+ ( ( 'END' )=>otherlv_2= 'END' ) ) ;
public final EObject ruleInputSection() throws RecognitionException { EObject current = null; Token lv_name_0_0=null; Token otherlv_2=null; EObject lv_inputs_1_0 = null; enterRule(); try { // ../org.xtext.hipie/src-gen/org/xtext/hipie/parser/...
[ "public final EObject entryRuleInput() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleInput = null;\n\n\n try {\n // InternalAnn.g:364:46: (iv_ruleInput= ruleInput EOF )\n // InternalAnn.g:365:2: iv_ruleInput= ruleInput EOF\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Get specified headers from a range of articles by group and number. Some implementations have special faster methods for getting headers from articles, e.g. an XOVER command to a remote server or a local overview database. If no such fast method is available, this returns null and the caller should fall back on conve...
public synchronized String[][] getHeaders(String[] names, NewsDbGroup group, int firstArtNum, int lastArtNum) throws NewsDbException { // Do we have an XOVER database? if(overviewFmt == null) return null; // Is the names list the same as overviewFmt? if(names != lastOkNames) { if(!Utils.equalsStrings(name...
[ "com.google.cloud.apigeeconnect.v1.Header getHeaders(int index);", "public JRBand getGroupHeader();", "com.ndk.echart.Echart.EChart_ResultHeader getHdr();", "org.intellimate.server.proto.HttpResponse.Header getHeaders(int index);", "public Headers getHttpHeaders()\n {\n Headers headers = new Heade...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a string that should be placed in the "Pay To:" field on the check to be printed
@Override public String getPayTo() { return getFirstName() + " " + getLastName(); }
[ "public String payString(){\r\n\t\treturn String.format(\"%05d\\t %10.2f\\t %s\", ID, pay, name);\r\n\t}", "@Override\n public String getPayTo() {\n return this.getFirstName() + \" \" + this.getLastName();\n }", "public String toString(){\r\n //your code here\r\n return(\"Withdrawal o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if both jobs have the same identity. This defines a weaker notion of equality between two jobs.
public boolean hasSameName(Object other) { Job otherJob = (Job) other; if (other == this) { return true; } if (other == null) { return false; } return otherJob.getJobName().equals(getJobName()); }
[ "@Override\n public boolean equals(Object another)\n {\n if (another instanceof Job)\n {\n // typecasts another to job object\n Job anotherJob = (Job)(another);\n \n return this.getId() == anotherJob.getId();\n }\n return false;\n }", "@Override\n public boolean equals(Object...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
String className = ConfigHelper.getString(SecurityConstant.SMART_SECURITY); return (SmartSecurity) ReflectionUtil.newInstance(className);
public static SmartSecurity getSmartSecurity(){ String className = ConfigHelper.getString(SecurityConstant.SMART_SECURITY); Class<?> cls = null; try { cls = Class.forName(className); } catch (ClassNotFoundException e) { logger.error("无法从 " + SecurityConstant....
[ "SecurityServiceT createSecurityServiceT();", "private static Class<?> getSpiClass(String type) {\n Class<?> clazz = spiMap.get(type);\n if (clazz != null) {\n return clazz;\n }\n try {\n clazz = Class.forName(\"java.security.\" + type + \"Spi\");\n spi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns segment specified by index. Negative indexes work in reverse direction.
AssignmentPathSegment getSegment(int index);
[ "public Segment getSegment(int index) {\n return null;\n }", "public String getSegment(int index) {\n return segments[index];\n }", "public Segment getSegment(int index) {\n\t\treturn mSegmentList.get(index);\n\t}", "public String get(int index) {\n return segments[index];\n }", "Seg...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
private int _days = 0;
private int get_days() { return _days; }
[ "public Integer getDaynum()\n {\n return daynum; \n }", "public int getNumOfdays() {\r\n\t\treturn numOfdays;\r\n\t}", "public void setDays(int days) {\n this.days = days;\n }", "public Integer getIncDays() {\r\n return incDays;\r\n }", "public int getNumberOfDays()\n\t{\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Erro consultar o manual.
@Test public void erroConsultar() throws Exception { // NOPMD(Testes Unitários) by mario.melo getMockMvc().perform( get(RESOURCE) .param("nome", "dsadsadsadsadsa") .param("page", "1") .param("count", "10") ).andDo( print() ) .andExpect( status().isOk() ) .andExpect( content().contentType(MediaType.A...
[ "public void consult() throws Exception {\n\t// TODO Consult\n\ttry {\n\t String page = \"ume_unidade_medidaConsult.jsp\";// defina aqui a pagina que deve ser chamada\n\t getResponse().sendRedirect(page); \n\t} catch (Exception e){} \n }", "public void consult() throws Exception {\n\t// TODO Consult\n\ttry {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test for equality, used as a helper to shadowstr___eq__, dealing with the possibility that other is another PyShadowString.
private static final PyObject testEqual(PyString string, PyObject other) { if (other instanceof PyShadowString) { return ((PyShadowString) other).shadowstr___eq__(string); } else { return string.__eq__(other); } }
[ "@ExposedMethod(type = MethodType.BINARY)\n\tfinal PyObject shadowstr___eq__(PyObject other) {\n\t\tPyObject result = testEqual(new PyString(getString()), other);\n\t\tif (result != Py.False) {\n\t\t\t// True, or null if str does not know how to compare with other (so we don't\n\t\t\t// either).\n\t\t\treturn resul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate Random Tests that tests Appt Class.
@Test public void radnomtest() throws Throwable { long startTime = Calendar.getInstance().getTimeInMillis(); long elapsed = Calendar.getInstance().getTimeInMillis() - startTime; System.out.println("Start testing..."); for (int iteration = 0; elapsed < TestTimeout; iteration++) { ...
[ "public void generateTestBed() {\n\t\tnew AutomatedTester().testAll();\n\t}", "@Test\n\tpublic void randomTest() throws Throwable {\n\n\t\tlong startTime = Calendar.getInstance().getTimeInMillis();\n\t\tlong elapsed = Calendar.getInstance().getTimeInMillis() - startTime;\n\n\t\tSystem.out.println(\"Start testing ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method will find the hits from the current connection, based on the specified spectrumid.
public static List<Inspecthit> getHitsFromSpectrumID(long aSpectrumID, Connection aConn) throws SQLException { List<Inspecthit> temp = new ArrayList<Inspecthit>(); PreparedStatement ps = aConn.prepareStatement(getBasicSelect() + " where l_spectrumid = ?"); ps.setLong(1, aSpectrumID); Re...
[ "public SpectrumMatch getSpectrumMatch(long id) {\r\n Integer index = id2index.get(id);\r\n return (index != null) ? spectrumMatches.get(id2index.get(id)) : null;\r\n }", "public void setFk_searchspectrumid(long aFk_searchspectrumid) {\n\t\tthis.iFk_searchspectrumid = aFk_searchspectrumid;\n\t\tt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }