query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Requests to withdraw the intents passed as argument to the Intent Service.
protected void withdrawIntents(Collection<Intent> intents) { log.debug(WITHDRAW); intents.forEach(intentSynchronizer::withdraw); }
[ "private void executeWithdraw(final Intent intent) {\n executor.execute(() -> {\n try {\n List<Intent> installable = getInstallable(intent.key());\n executeWithdrawingPhase(intent, installable);\n } catch (IntentException e) {\n exceptions.ad...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column room_data_module.MODULE_NAME
public String getModuleName() { return moduleName; }
[ "public String getModuleName() {\n return getString(KEY_MODULE_NAME);\n }", "@Override\n public String getModuleName() {\n return moduleNameFromModuleDescriptor == null || moduleNameFromModuleDescriptor.isEmpty() ? null\n : moduleNameFromModuleDescriptor;\n }", "public Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
There is currently a window with 2 buttons for premade levels. Ideally, this would be dynamic creating as many buttons as there are level files, or a menu or something. For now, however, this window allos for 2 level files to be loaded, demonstrating how the game can be dynamically loaded from level files
private JFrame makeSetLevelWindow() { //create the window and set the attributes JFrame levelSelectorWindow = new JFrame( "Level Selector" ); levelSelectorWindow.setSize( 300, 100 ); levelSelectorWindow.setResizable( false ); //grab the content pane and set th...
[ "public NextLevelMenu() {\n\n // addGameObject(new TitleObject(380, 100));\n addGameObject(new PlayButtonObject(450, 450));\n addGameObject(new ExitToMainButtonObject(450, 550));\n\n\n\n }", "private void winButtonActionPerformed(java.awt.event.ActionEvent evt) {\n jLabel1.setText(\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
reprezinta handlerul pentru actiunea alegerii orasului
public void setDatas(ActionEvent actionEvent) { if(!Cities.getSelectionModel().isEmpty()){ String oras=Cities.getValue().toString(); for(int i=0;i<this.WM.getF().getCountry().size();i++){ for(int j=0;j<this.WM.getF().getCountry(). get(i).getOrase()...
[ "public void aggiungiOrario(Orario orario){\n aggiungiSecondi(orario.getSecondi());\n aggiungiMinuti(orario.getMinuti());\n aggiungiOre(orario.getOre());\n }", "@Override\n\t\tpublic void accionAceptar() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void exe() {\n\t\tif (request.getParameter...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof PaeParentesco)) { return false; } PaeParentesco other = (PaeParentesco) object; if ((this.paeId == null && other.paeId != null) || (this.paeId != null && !this.paeId.equals(other.paeId))) { ...
[ "public int getId () { return id; }", "public int getId(){ return this.id;}", "public int id() {return this.id;}", "@Override\n public int getId() { return id; }", "public void setId(long id){ \r\n this.id = id; \r\n }", "public void setId( int id ) { this.id = id; }", "public void setId( l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if (number < movies.length)
public Movie[] showLastMovies(int number) { number = Math.min(number, movies.length); Movie[] resultMovies = new Movie[number]; for (int i = 0; i < number; i++) { int index = movies.length - i - 1; resultMovies[i] = movies[index]; } // переворачиваем массив ...
[ "public int getCount() {\n return movies.size();\n }", "@Override\n public boolean hasNext() {\n return count < MAX_MOVES;\n }", "public ArrayList<String> numberOfMoviesLengthGreaterThanGivenNumber(int numberOfCharacter) {\r\n\r\n\t\tArrayList<String> listOfMovies = new ArrayList<String>();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/This is to print the JSON data as a sting that can be manipulated as needed. This case is to print the data as string only. History Change history of any object can be accessed by passing ?m=history query parameter to the resource url.
public void Test_04() { Response resp= given(). when(). get ("http://openlibrary.org/books/OL1M.json?m=history"); System.out.println(resp.asString()); System.out.println(resp.getStatusCode()); Assert.assertEquals(resp.getStatu...
[ "public String toString() {\n return this.getJSONData();\n }", "public String getHistoryAsJSON(boolean pretty) throws IOException { \r\n if (history==null) initialize(null);\r\n try {\r\n JsonFactory factory=new JsonFactory();\r\n ObjectMapper mapper = new ObjectMa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "GTEQ" $ANTLR start "BOOL_LIT"
public final void mBOOL_LIT() throws RecognitionException { try { int _type = BOOL_LIT; int _channel = DEFAULT_TOKEN_CHANNEL; // CmisBaseLexer.g:113:10: ( 'TRUE' | 'true' | 'FALSE' | 'false' ) int alt2=4; switch ( input.LA(1) ) { case 'T': { alt2=1; } break; case 't': { al...
[ "@Override\r\n\tpublic void visit(BoolAstType t) {\n\r\n\t}", "@Override\r\n\tpublic void visit(LiteralBoolean node) {\n\t\t\r\n\t}", "@Override\n\tpublic String visitBool_literal(DECAFParser.Bool_literalContext ctx) {\n\t\treturn \"boolean\";\n\t}", "LiteralBooleanValue createLiteralBooleanValue();", "@Ove...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This gives a look and feel to balls
public static LinearGradient getBallGradient(Color color){ if(color.equals(Color.RED)) return BALL_GRADIENT; else return new LinearGradient(0.0, 0.0, 1.0, 0.0, true, CycleMethod.NO_CYCLE, new Stop[] { new Stop(0, Color.WHITE), new Stop(1, color)}); }
[ "private void createBall() {\n\t\tball = new GOval((WIDTH - BALL_RADIUS) /2, (HEIGHT - BALL_RADIUS)/ 2, BALL_RADIUS * 2, BALL_RADIUS * 2);\n\t\tball.setFilled(true);\n\t\tball.setColor(Color.white);\n\t\tadd(ball);\n\t}", "@Override\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new FSMGraph from existing arraylist params
public FSMGraph(String name, List<StateRender> stateRenders, List<Arrow> Arrows) { myName = name; myStateRenders = stateRenders; myArrows = Arrows; myGroup.setOnMouseDragged(e -> dragHandle(e)); myGroup.setOnMouseReleased(e -> dragExit(e)); }
[ "public static BreathsHistoryFragment newInstance(BreathState param1, List<TblState> listState ) {\n BreathsHistoryFragment fragment = new BreathsHistoryFragment();\n Bundle args = new Bundle();\n args.putSerializable(ARG_PARAM1,(param1));\n //args.putSerializable(ARG_PARAM4,(typeStep));...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the entropy of a set of instances in a node.
private static double getEntropy(ArrayList<Instance> instances) { // Get the counts of each class HashMap<Double, Integer> classCounts = new HashMap<Double, Integer>(); for(int i = 0; i < instances.size(); i++) { Double currClass = instances.get(i).getInstanceClass(); if(classCounts.containsKey(currClass))...
[ "public double entropy() {\n\t\treturn entropy;\n\t}", "public double entropy() {\r\n logger.fine(\"entropy()\");\r\n \r\n int c = count();\r\n if (c == 0) return 0;\r\n\r\n double e = 0;\r\n Iterator<Entry<T,MutableInt>> iMap = entrySet().iterator();\r\n double p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PPA assignment 13 Computer Science Year 1 This interface defines characteristics of predators
public interface Predator { /** * This method returns true if the predator eats the piece passed to it as parameter, returns false if it doesnt eat the piece. * @param Piece * @return boolean whether predator eats the piece */ public abstract boolean eats(Piece piece); }
[ "Predicat getPredicats();", "public interface PropertyPredictor {\r\n\r\n\t/**\r\n\t * train a Predictor on the RDF dataset dataset for the given instances and labels.\r\n\t * \r\n\t * @param dataset, RDF dataset\r\n\t * @param instances, List of instances to train on, these instances should exist in the given RD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
string inboundOrderNo = 2;
public Builder clearInboundOrderNo() { inboundOrderNo_ = getDefaultInstance().getInboundOrderNo(); onChanged(); return this; }
[ "String getOrderNumber(){\r\n \r\n return orderNumber;\r\n \r\n }", "int getNextOrderNo();", "public String WarehouseOrderNo();", "public Integer getOrderNo () {\r\n return orderNo;\r\n }", "public void setOrderNo (Integer orderNo) {\r\n this.orderNo = orderNo;\r\n }", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
required .Certification certification = 4;
public Builder setCertification(org.medibloc.phr.CertificateDataV1.Certification value) { if (certificationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } certification_ = value; onChanged(); } else { certificatio...
[ "int accountCertRequested(MixCascade a_connectedCascade);", "public String getCertification() {\r\n return certification;\r\n }", "private InstallCertificateRequest() {\n }", "IntegrationAccountCertificate.DefinitionStages.Blank define(String name);", "@Nonnull public static UBL22ValidatorBuilder...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Exercise 2 Celsius Temperature Table The formula for converting a temperature from Fahrenheit to Celsius is C = (5.0/9.0) (F 32) Where F is the Fahrenheit temperature and C is the Celsius temperature. Write a method named celsius that accepts a Fahrenheit temperature as an argument. The method should return the tempera...
public static void doExercise2() { // TODO: Complete the rest of Exercise #2 here to test celsius }
[ "public static void convertFtoCTemp() {\n // Variable declarations\n float userTempF = 0; // user variable to store F temperature\n float convertedTempC = 0; // temperature in C that has been converted\n\n // Description of method\n System.out.println(\"Write a Java progr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to set a room's building
public void setBuilding(String building) { this.building = building; }
[ "public void setRoom(Room r){\r\n\tthis.room = r;\r\n}", "private void setroom(String roomid) {\n\t\t\n\t}", "public void setRoom(Room kamar){\n this.kamar = kamar;\n }", "public void setRoom(Room room) {\n\n\t\tthis.room = room;\n\t}", "public void setCurrentLocation(Room room){\n this.cur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Figures out which collection to query FIXME needs to do actual figuring out
private String getCollectionName(String elementName) { return elementName; }
[ "protected String getCollectionName(){\n\t\treturn mongoTemplate.getCollectionName(entityType);\n\n\t}", "MongooseSchemaCollection getCollection(){\n\t\tif(collection==null&&parentSchema!=null)return parentSchema.getCollection(); // MDH@17NOV2018: subschema's do not need to have a collection themselves...\n\t\tre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Flushes the contents of the buffer to the print stream immediately.
public boolean flushBufferToLogFile() { if (requestQueue.isEmpty()) return false; StringBuilder builder = new StringBuilder(); while (!requestQueue.isEmpty()) { LogRequest request = requestQueue.poll(); double time = request.getTime(); long count = request.getCount(); if (c...
[ "void flush()\n\t{\n\t\tif (fBuffer.length() > 0)\n\t\t\tprintln(\"\"); // forces print of the current buffer\n\t}", "public static void flush()\n {\n writeBufferOut();\n }", "public void flush() {\r\n print(frames.get(0).activeBuffer);\r\n }", "public void flush() { // TODO cannot clea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get method for photographer
public String getPhotographer(){ return this.photographer; }
[ "Complex getIMotor();", "public Photo getPhoto()\r\n\t{\r\n\t\treturn photo;\r\n\t}", "public interface IGetPhoto {\n\n /**\n * 设置图片裁剪属性\n * @param aspectX\n * @param aspectY\n * @param outputX\n * @param outputY\n */\n void setCropConfig(int aspectX, int aspectY, int outputX, int ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
test if buffer is empty
@Test public void testClear() { two.enqueue(1); two.enqueue(2); two.clear(); assertArrayEquals(new Integer[2], two.getAll()); }
[ "public static boolean isEmpty(){\n\t\tif(buffer.size()==0) return true;//buffer empty\r\n\t\telse return false;//buffer not empty\r\n\t}", "public boolean isEmpty()\n {\n \treturn buffer.isEmpty();\n }", "boolean isBufferFull();", "public boolean isEmpty() {\n\t\treturn buffer.position() == 0;\n\t}"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
jhipsterneedleentityaddgetterssetters JHipster will add getters and setters here, do not remove
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } InchargeMaster inchargeMaster = (InchargeMaster) o; if (inchargeMaster.getId() == null || getId() == null...
[ "void addSettersAndGetters(String path, String field);", "public interface ToolRequestUpdate extends HasId {\n\n @Override\n @PropertyName(\"uuid\")\n String getId();\n\n @PropertyName(\"uuid\")\n void setId(String id);\n\n String getStatus();\n\n void setStatus(String status);\n\n @Proper...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for the description
public String getDescr() { return descr; }
[ "protected String getDescription() {\n return description;\n }", "protected String getDescription() {\n return description;\n }", "public String getDescription() {\n \t\treturn this.description;\n \t}", "public String getDescription() {\n \treturn this.description;\n }", "public sy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set an ARCommand to hold the command PilotingStateAlertStateChanged in feature ARDrone3 Feature ARDrone3 description: All ARDrone3only commands Class PilotingState description: State from drone Command AlertStateChanged description: Drone alert state changed This function reuses the current ARCommand, replacing its con...
public ARCOMMANDS_GENERATOR_ERROR_ENUM setARDrone3PilotingStateAlertStateChanged (ARCOMMANDS_ARDRONE3_PILOTINGSTATE_ALERTSTATECHANGED_STATE_ENUM _state) { ARCOMMANDS_GENERATOR_ERROR_ENUM err = ARCOMMANDS_GENERATOR_ERROR_ENUM.ARCOMMANDS_GENERATOR_ERROR; if (!valid) { return err; } ...
[ "public void setCommand(String par1Str) {\n\t\tthis.command = par1Str;\n\t\tthis.onInventoryChanged();\n\t}", "public LightOnCommand(Light L) {\n myLight = L;\n }", "public abstract void setCommand(ICommand command);", "void setCommand(ISOCommand cmd);", "public void activate(){ \n //...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
find count of contacts given partial name
private static int findContact(String partial) { // error checking if (partial == null || partial.isEmpty()) { return -1; } // init variables int count = 0; TrieNode curNode = contactTrie; char curChar; Map<Character, TrieNode> children = null...
[ "int countWithNameCompany(String nameCompany);", "int getCustomerByNameCount(String name) throws MalformedURLException;", "public int countByNombre(java.lang.String nombre);", "public int countByAuthorName(String authorName);", "@Override\n\tpublic int countByFullName(String fullName) {\n\t\tFinderPath find...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a list of instances from this entity that matches a Document Index search
@Override public List<T> getUsingIndex(String indexName, String q, ViewLocation viewLocation, List<Integer> status, Range range, Map<String, String> additionalFields, String order, String lang) throws ASException { PersistenceManager pm = DAOJDOPersistentManagerFactory.get().getPersistenceManager(); List<T> ret...
[ "@Override\n public List<Document> search(String query) {\n\n String[] qarr = query.split(\" \"); // split the query on space and put it into a string array\n\n HashSet<Document> documentHashSet = new HashSet<>(); // hashset to put the received documents into temporarily\n ArrayList<Document...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes an OpenSearch Ingestion pipeline. For more information, see .
java.util.concurrent.Future<DeletePipelineResult> deletePipelineAsync(DeletePipelineRequest deletePipelineRequest, com.amazonaws.handlers.AsyncHandler<DeletePipelineRequest, DeletePipelineResult> asyncHandler);
[ "public DeletePipelineResult deletePipeline(DeletePipelineRequest deletePipelineRequest) \n throws AmazonServiceException, AmazonClientException;", "void deleteByDataflowId(Long dataflowId);", "public void delete(DocumentStream stream) throws MultiOpException;", "@Override\n\tpublic boolean deleteP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Receives message from peer
@Override public void receiveFromPeer(String args[]) { this.setChanged(); this.notifyObservers(args); }
[ "public void recv(Message msg);", "Message receiveMessage();", "private void recieve() {\r\n\t\tList<Integer> msg;\r\n\t\ttry {\r\n\t\t\tmsg = trans.rcvMsg();\r\n\t\t\tif(msg.size() > 0){\r\n\t\t\t\treport(\"Recieved msg: \" + TestClient.fmtOut(msg));\r\n\t\t\t}\r\n\t\t\tcore.submit(msg);\r\n\t\t} catch (IOExce...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public double calcSalary() { return Hour*HourSalary; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
affiche un texte dans la chatbox
public void print(String text) { openChat(); chatBox.append(text); chatBox.setCaretPosition(chatBox.getDocument().getLength()); }
[ "private void showMessage(final String text) {\n \t//setting aside a thread to update a gui, so we dont have to create an entire new gui when we just want to update part\n SwingUtilities.invokeLater(\n new Runnable() {\n public void run() {\n notifications.append(text); //add...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
prev_kv holds the keyvalue pair before the event happens. .mvccpb.KeyValue prev_kv = 3;
public boolean hasPrevKv() { return prevKv_ != null; }
[ "public void setChangeKey(String value) { \r\n this.ChangeKey = value; \r\n }", "public String getChangeKey() {\r\n return this.ChangeKey; \r\n }", "public String getKeyValue() {\n return this.keyValue;\n }", "@Override\r\n\tpublic void setPrevious(Event event) {\r\n\t}", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public int getCount() { return this.scenelist.size(); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
enabled = ( (Container) getContainer()).isEnabled();
public void run() { getSwingContainer().setEnabled(false); }
[ "boolean isContainerDisabled() throws UnifyException;", "boolean getContainerOrchestratorEnabled();", "public boolean isEnabled() {\n/* 120 */ return this.enabled;\n/* */ }", "public boolean isEnabled() { return true; }", "public boolean getIsEnabled(){ \n\t\treturn isEnabled; \n\t}", "public bo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the SYSTEM repository.
@Deprecated public Repository getSystemRepository() { if (!isInitialized()) { throw new IllegalStateException("Repository Manager is not initialized"); } synchronized (initializedRepositories) { Repository systemRepository = initializedRepositories.get(SystemRepository.ID); if (systemRepository != null ...
[ "public synchronized Repository getRepository() throws ApplicationException\n {\n if (this.repo == null)\n {\n RepositoryService service = Application.getBootLoader().getBootable(RepositoryService.class);\n this.repo = service.open((URL) getCurrentObject());\n }\n return this.repo;\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end of testListMinute Test sorting with hour comparator.
public void testListHour() { String[] dtStrs = { "1999-02-01T10:00:00", "1999-02-01T23:00:00", "1999-02-01T01:00:00", "1999-02-01T15:00:00", "1999-02-01T05:00:00", "1999-02-01T20:00:00", "1999-02-01T17:00:00" }; ...
[ "@Override\n\tpublic int compareTo(Hour h)\n\t{\n\t\tif (this.hour < h.getHour())\n\t\t\treturn -1;\n\t\telse if (this.hour == h.getHour())\n\t\t{\n\t\t\tif (this.minute < h.getMinute())\n\t\t\t\treturn -1;\n\t\t\telse if (this.minute == h.getMinute())\n\t\t\t\treturn 0;\n\t\t\telse\n\t\t\t\treturn 1;\n\t\t}\n\t\tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
End of variables declaration//GENEND:variables
@Override public void mensagemCodHistorico(String msg) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. }
[ "private static void EX5() {\n\t\t\r\n\t}", "@Override\n\tprotected void initVariable() {\n\t\n\t}", "public void mo17751g() {\n }", "public void mo1857d() {\n }", "public static void Q22()\r\n\t{\r\n\t}", "public void mo28221a() {\n }", "public void mo3914b() {\n }", "protecte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the character is in the ASCII character set. This includes characters with integer values between 32 and 126 (inclusive).
public static boolean isAscii(char c) { int i = c; if ((i >= 32) && (i <= 126)) { return true; } else { return false; } }
[ "public static boolean isAscii(final char ch) {\n return ch < 128;\n }", "public static boolean isAsciiControl(final char ch) {\n return ch < 32 || ch == 127;\n }", "private static boolean isAllASCII(String input) {\n boolean isASCII = true;\n for (int i = 0; i < input.length()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Don't play the default window open sound
@Override public void onShow() { playSoundOnOpen = false; super.onShow(); InputListener listener = new com.badlogic.gdx.scenes.scene2d.InputListener() { @Override public boolean keyDown(InputEvent event, int keycode) { return false; } @Override public boolean touchDown(InputEvent event...
[ "private void playAudio() {\n playAudio(false);\n }", "public void winMusic() {\r\n\t try {\r\n\t AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File(\"src/music/win.wav\").getAbsoluteFile());\r\n\t Clip clip = AudioSystem.getClip();\r\n\t clip.open(audioInputS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
WebService World Request Invoca un servicio generico anonimamente
@RequestMapping(value = "/webserviceworld", method = RequestMethod.POST) public @ResponseBody Map<String, ? extends Object> /*String*/ webServiceWorldRequest(Model model, HttpServletRequest request) { Map<String, Object> body = new HashMap<String, Object>(); try { Map<S...
[ "@WebService(targetNamespace = \"http://www.hotel.com/ws/prenotazione/\", name = \"prenotazione\")\n@XmlSeeAlso({com.hotel.prenotazione.ObjectFactory.class, com.hotel.ObjectFactory.class})\npublic interface Prenotazione {\n\n @ResponseWrapper(localName = \"prenotazioneResponse\", targetNamespace = \"http://www.h...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_compte, container, false); TextView title = (TextView) getActivity().findViewById(R.id.title); title....
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.movie_statistic_layout, parent, false);\n }", "@Override\n\tprotected View initView(LayoutInflater inflate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Extracts a URL from a XML element.
public static URL getURL(Element elem, String path) { try { return new URL(elem.valueOf(path)); } catch (MalformedURLException e) { return null; } }
[ "public MetadataURL getMetadataURL( Element element )\n throws XMLParsingException {\n\n String type = XMLTools.getRequiredNodeAsString( element, \"@type\", nsContext, VALID_TYPES );\n String format = XMLTools.getRequiredNodeAsString( element, \"@format\", nsContext, VALID_F...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the primary key of this mot cua dien bien ho so.
@Override public void setPrimaryKey(long primaryKey) { _motCuaDienBienHoSo.setPrimaryKey(primaryKey); }
[ "public void setPrimaryKey(long primaryKey) {\n\t\t_thuTucHanhChinh.setPrimaryKey(primaryKey);\n\t}", "public void setPrimaryKey(long primaryKey) {\n\t\t_donViHanhChinh.setPrimaryKey(primaryKey);\n\t}", "@Override\n\tpublic void setPrimaryKey(java.lang.String primaryKey) {\n\t\t_phongkham.setPrimaryKey(primaryK...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles the next received data package from the remote node on the socket connection for this OneLinkThread.
protected void performNextLineOperation(String nextLine) throws RemoteBlockIntegrationException, UnknownHostException { performNextLineOperation(nextLine, false); }
[ "public synchronized void recvSensorPacket(Object data_)\r\n {\r\n if ( data_ instanceof SensorPacket ) {\r\n SensorPacket spkt = (SensorPacket)data_ ;\r\n\r\n //*****Cluster-Head Advertisement was Received *********************/\r\n if ((spkt.getPktType() == LEACH_ADV_CH)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated for supporting the association named Contract2Worker. It will be deleted/edited when the association is deleted/edited. / WARNING: THIS METHOD WILL BE REGENERATED.
public void secondaryRemoveWorkedContract(com.hps.july.persistence.Contract aWorkedContract) { this.getWorkedContractLink().secondaryRemoveElement(aWorkedContract); }
[ "WorkerPoolResourceInner innerModel();", "public interface Company extends com.ibm.ivj.ejb.runtime.CopyHelper, javax.ejb.EJBObject {\n/**\n * This method was generated for supporting the association named division2company. \n * \tIt will be deleted/edited when the association is deleted/edited.\n */\n/* WARNING:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 0 /Coverage entropy=2.0794415416798357
@Test(timeout = 4000) public void test00() throws Throwable { JSTerm jSTerm0 = new JSTerm(); JSTerm jSTerm1 = new JSTerm(); jSTerm0.matches(jSTerm1); // Undeclared exception! try { jSTerm0.standardizerTerm(); fail("Expecting exception: ArrayIndexOutOfBoundsException");...
[ "@Test(timeout = 4000)\n public void test153() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFEntr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets ith "duotone" element
org.openxmlformats.schemas.drawingml.x2006.main.CTDuotoneEffect getDuotoneArray(int i);
[ "public Nodo getNodo(Object element) throws ListaException;", "private Element<E> getElement(E e) {\n for (Element<E> element = first; element != null; element = element.next) {\n if (e == element.value)\n return element;\n }\n return null;\n }", "@Override\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create circular boundary directly from circle values.
public CircularBoundary(int x, int y, int r){ this.x = x; this.y = y; this.r = r; }
[ "public Circle getBound()\n\t{\n\t\treturn new Circle(getPositionCenter().x, getPositionCenter().y, getHeight()/2);\n\t}", "private ImagePlus makeCircle(int radius) {\r\n\t\tByteProcessor bp = new ByteProcessor(2*radius+1, 2*radius+1);\r\n\t\tint width = 2*radius+1;\r\n\t\tfor (int x=-radius; x<=radius; x++) {\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fill user details to all textViews
private void setUserDetails() throws ParseException { profileUsername.setText(userObject.getUsername()); profilePhone.setText(userObject.getPhone()); profileBirthdate.setText(DateStringParser.parseFromDateObjectDDMMYYYY(userObject.getBirthDate())); profileGender.setText(userObject.getGen...
[ "void populateUserInfo(User user) {\n\n binding.tvName.setText(user.getName());\n\n binding.tvProfileScreenName.setText(\"@\"+ user.getScreenName());\n if(user.getDescription()==null || user.getDescription()==\"\" ) {\n binding.tvTagline.setVisibility(View.GONE);\n } else {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tries to convert a `document` to an object of type `T`.
<T> T asObject(Document document, Class<T> type);
[ "<T extends Document> T retrieveDocument(@NonNull Class<T> clazz, @NonNull String documentId) throws DataStorageException;", "private POIDTO parse(POIDocument doc) throws POIException {\n\t\ttry {\n\t\t\tObjectDTOFactory factory = AbstractDataFactory.getFactory(doc);\n\t\t\treturn (POIDTO) factory.create(doc);\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Barker approx. if (ee) return getPotential(r, false) (1 exp(8.35E4 r pow(T, 0.625))); if (ii)
@Override /** * used to introduce not symmetric i-i & e-e potentials * */ protected double getPotentialAsym(double r, boolean ee, boolean ii) { if (ee || ii) return getPotential(r, false); else return getPotential(r, true); }
[ "public double getEngineBraking(){\n if( rpm > MAX_RPM )\n return (1000-rpm)/(MAX_RPM-1000) * 150 + (MAX_RPM-rpm) * 0.75;\n else\n return (1000-rpm)/(MAX_RPM-1000) * 150;\n }", "public void find_thermal() {\r\n\t\tdouble eta;\r\n\t\tdouble T_star;\r\n\t\tdouble sigma;\r\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
to close the onItemSelected
public void onNothingSelected(AdapterView<?> parent) { }
[ "public static void closeSpinner() {\n try {\n onData(is(instanceOf(String.class)))\n .atPosition(0)\n .perform(click());\n } catch (Exception e) {\n //was closed\n }\n }", "private void cancelSelected(){\n \tfinish();\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Releases the resources associated with the camera source, the associated detectors, and the rest of the processing pipeline.
@Override protected void onDestroy() { super.onDestroy(); if (mPreview != null) { mPreview.release(); } }
[ "public void release() {\r\n copyBuffer = null;\r\n if (yuvTextures != null) {\r\n GLES20.glDeleteTextures(3, yuvTextures, 0);\r\n yuvTextures = null;\r\n }\r\n }", "private void cleanupCapture() {\n\t\ttry {\n\n\t\t\tfor (int i=0;i<device.length;i++) {\n\t\t\t\tframe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public Demande getDemandebyId(DemandeId idDemande) { return dao.getDemandebyId(idDemande); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
id, where, in, order by desc limit
public List<Integer> executeSQL05() { List<Integer> result = records.stream() .filter(r -> r.getCustomerTownId() >= 10 && r.getCustomerTownId() <= 15 && "AB".contains(Character.toString(r.getCustomerRegion())...
[ "List<Sighting> findFirst10ByOrderByIdDesc ();", "public List<AnnounceModel> findTop10ByOrderByIdDesc();", "public List<Item> getMostInterestedItems(int limit) {\n \n \n String sql = \"SELECT items.* ,COUNT(interested.id) as cnt FROM `items`, interested \" + \n \t\t\"WHERE items.item_id = interested...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string description = 2;
public java.lang.String getDescription() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toString...
[ "public void setDescription(String description){ this.description = description; }", "public void setDescription(String i) \n { \n itsDescription = i; \n }", "public void setDescription(String description) {\r\n\tthis.description = description;\r\n}", "public void setDescription (String descripti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resets the array to its original configuration and return it.
public int[] reset() { return nums; }
[ "public int[] reset() {\r\n return original;\r\n }", "public Module resetArrayPosition() {\n internalPositionInArray = 0;\n return this;\n }", "public int[] reset() {\n return Arrays.copyOf(origin,origin.length);\n }", "public int[] reset() {\n return temp;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "T__63" $ANTLR start "T__64"
public final void mT__64() throws RecognitionException { try { int _type = T__64; int _channel = DEFAULT_TOKEN_CHANNEL; // InternalAbs.g:47:7: ( '=>' ) // InternalAbs.g:47:9: '=>' { match("=>"); } state.type = _t...
[ "public final void mT__64() throws RecognitionException {\n try {\n int _type = T__64;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Users\\\\timothee\\\\Desktop\\\\Cours\\\\Année 2019-2020\\\\Semestre 7\\\\CIN\\\\TP2_DURGEAUD_TIMOTHEE\\\\TP Projet\\\\language\\\\GraphSc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column YZ.TEL
public void setTel(String tel) { this.tel = tel == null ? null : tel.trim(); }
[ "public void setTEL(java.lang.String TEL) {\n this.TEL = TEL;\n }", "public void setTel(String tel) {\n if (tel == null) {\n\t\t tel = \"\"; \n\t }\n this.tel = tel;\n }", "public void setTel(int tel) {\r\n this.tel = tel;\r\n }", "public void setNumber(String te...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
cmd_check_collections Check for existence of our MongoDB collections.
public static void cmd_check_collections(String[] args) { // No additional arguments if (args.length != 1) { System.err.println ("ServerCmd : Invalid 'check_collections' subcommand"); return; } // Turn off excessive log messages MongoDBLogControl.disable_excessive(); // Connect to MongoDB try ...
[ "private boolean metadataCollectionExists() {\n return MongoDatabaseUtil.hasCollection(client, mongoDatabase.getName(), collectionName);\n\t}", "public void collectionExistanceCheck(String collectionName){\n\t\t// To directly connect to a single MongoDB server (note that this will not auto-discover the pri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of isStateValidoParaLicitar method, of class Evento.
@Test public void testIsStateValidoParaLicitarComLicitacao() { System.out.println("isStateValidoParaLicitarValido"); this.sessaoTematica.setEstado(new SessaoTematicaEmLicitacaoState(sessaoTematica)); this.sessaoTematica.setCP(new CP()); this.sessaoTematica.getCP().novoRevisor(this.ut...
[ "public boolean validar() throws InterruptedException {\r\n\t\tboolean valido = false;\r\n\t\tint tareas = 0;\r\n\r\n\t\tif (txtDescripcion.getValue().isEmpty()) {\r\n\t\t\tthrow new WrongValueException(txtDescripcion, \"Escribe el nombre de la actividad complementaria\");\r\n\t\t} else {\r\n\t\t\tif (cmbTipo.getVa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use the model to do the search and put the results into the request object sent to the Java Server Page used to display the results.
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Model model = ModelFactory.getModel(); List<String> keywords = getKeywords(request, model); TreeMap<Character, List<Patient>> searchResult = model.searchFor(keywords); ...
[ "@RequestMapping(value = \"results\", method = RequestMethod.GET)\n public String results(Model model, @RequestParam String searchType, @RequestParam String searchTerm) {\n if (searchType.equals(\"all\")) {\n ArrayList<HashMap<String, String>> jobs = JobData.findByValue(searchTerm);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a collection of Factory objects. Returns a collection of Factory objects.
@Test public void factoriesTest() throws ApiException { Integer page = null; Integer perPage = null; Boolean withStorageProvider = null; PaginatedFactoryCollection response = api.factories(page, perPage, withStorageProvider); // TODO: test validations }
[ "@Override\r\n\tpublic List<FactoryEn> findAll() {\n\t\treturn factoryDao.findAll();\r\n\t}", "public ArrayList<ModelFactory> getListFactory() {\n\t\treturn listFactory;\n\t}", "private void generateFactory() {\n\n\t\t//\n\t\t// obtain company name\n\t\t//\n\t\tString companyName = config.getProperty(\"company\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Criado para editar os atributos de algum fornecedor.
public void editaFornecedor(String nome, String atributo, String novoValor) { final String[] atributosValidos = {"email", "telefone"}; final List<String> atributosValidosList = Arrays.asList(atributosValidos); if (atributo.equals("nome")) { throw new IllegalArgumentException("Erro n...
[ "@Override\r\n\tpublic void edit(Etudiant t) {\n\t\r\n\t\t\r\n\t}", "public void editButtonPressed()\r\n {\r\n firstNameTF.setEditable(true);\r\n firstNameTF.setDisable(false);\r\n lastNameTF.setEditable(true);\r\n lastNameTF.setDisable(false);\r\n phoneTF.setEditable(true);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A method that checks if all the face down cards on the tableau have been uncovered.
public boolean faceDownUncovered() { boolean faceDownUncovered = true; for (int i = 0; i < 10; i++) { if (countFaceDown(i) >= 1) { faceDownUncovered = false; } } return faceDownUncovered; }
[ "boolean hasTargetHandCards();", "@Test\n\tpublic void testDealtCards(){\n\t\tint totalCardsDealt = 0; // Test all cards are dealt\n\t\tPlayer[] playerList = board.getPlayerList();\n\t\tfor(int i = 0; i < 6; i++){\n\t\t\tint size = playerList[i].getMyCards().size();\n\t\t\tassertEquals(3, size); // Tests if playe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
End of variables declaration//GENEND:variables
public void valueChanged(ListSelectionEvent e) { if (e.getValueIsAdjusting()){ return; } LogEvent event = easylog.getLogEvent(e.getFirstIndex()); StringBuffer presentation =new StringBuffer(); presentation.append("Date: " + event.getDateOccured() +"\n"); p...
[ "private static void EX5() {\n\t\t\r\n\t}", "@Override\n\tprotected void initVariable() {\n\t\n\t}", "public void mo17751g() {\n }", "public void mo1857d() {\n }", "public static void Q22()\r\n\t{\r\n\t}", "public void mo28221a() {\n }", "public void mo3914b() {\n }", "protecte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a string of the prefixes, each on its own line and make that the results.
private void putPrefixesIntoResults() { List<SegmentedString> prefixes = application.getPrefixes(); StringBuilder stringBuilder = new StringBuilder(); for (SegmentedString prefix : prefixes) { stringBuilder.append(prefix); stringBuilder.append('\n'); } set...
[ "public static String prefixLines(CharSequence prefix, CharSequence s) {\n\t\tif (prefix.length() == 0) return s.toString();\n\t\treturn prefix + NEWLINE_REGEX.matcher(s) //\n\t\t\t.replaceAll(\"$1\" + Matcher.quoteReplacement(prefix.toString()));\n\t}", "Prefix prefix();", "@NotNull private String prefix()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Case 4 List users
public User[] listUsers() { return callAPI.getForObject(BASE_URL, User[].class); }
[ "public String doListUsers(){\n\t\tlstUsers=userService.findAllUsers();\n\t\treturn \"userList\";\n\t}", "public void userList() {\n System.out.println(\"\\nList of all users in the shop\");\n System.out.println(\"----------------------------------------------------\");\n int count = 0;\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ JADX WARNING: inconsistent code. / Code decompiled incorrectly, please refer to instructions dump.
private void s() { /* r13 = this; r12 = 0; r0 = r13.B; if (r0 == 0) goto L_0x0057; L_0x0005: r1 = r13.q; monitor-enter(r1); r2 = r13.x; Catch:{ all -> 0x0058 } r4 = r13.w; Catch:{ all -> 0x0058 } monitor-exit(r1); Catch:{ all -> 0x00...
[ "public String method_8412() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_571() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_6601() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_5455() {\r\n // $FF: Couldn't be decompiled\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method: add(int index, E element)
@Test public void testAddForIndexElement() throws Exception { //TODO: Test goes here... }
[ "@Override\n\tpublic void add(int index, E element) {\n\t\t\n\t}", "public void add(int index, E item);", "@Override\n\tpublic void add(int index, E element) {\n\t\tl.add(index, element);\t\n\t}", "void addIndex(int index, E item);", "@Override\n\tpublic void add(int index, E element) {\n\t\tint endLength =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove all stored configuration for the current user.
public void clearStoredConfiguration();
[ "public static void clear() {\n\t\tconfig.clear();\n\t}", "public void purgeStoredConfiguration();", "private void clearUserSettings() {\n this.userSettings_ = emptyProtobufList();\n }", "public static void FNTConfigRemoveCache( ) {\n configurations.clear();\n }", "public void resetConfi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for name. The new value is set only if compareTo() says it is different, or if one of either the new value or the current value is null. In case the new value is different, it is set and the field is marked as 'modified'.
public void setName(String newVal) { if ((newVal != null && this.name != null && (newVal.compareTo(this.name) == 0)) || (newVal == null && this.name == null && name_is_initialized)) { return; } this.name = newVal; name_is_modified = true; name_...
[ "public void setName(String name) {\n\t\tif (this.name == name) return;\n\t\t\n\t\tif (name == null || this.name == null || (this.name != null && name.compareTo(this.name) != 0)) {\n\t\t\tthis.dirty = true;\n\t\t\tthis.name = name;\n\t\t\tthis.setPlainName(); /* update the plain name */\n\t\t}\n\t}", "public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
write your code here
public String getSize() { }
[ "void stuffForYouToDo() {\n\t\t// Write your code here...\n\t\t\n\t\t\n\t\t\n\t}", "@Override\r\n\t\t\t\tvoid eval() {\r\n\r\n\t\t\t\t\t// YOUR CODE IN THIS SPACE\r\n\t\t\t\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\n\tpublic void dosomethiing3() {\n\n\t}", "@Override\n }", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The call to isReadyToPay is asynchronous and returns a Task. We need to provide an OnCompleteListener to be triggered when the result of the call is known.
private void checkIsReadyToPay() { PaymentsUtil.isReadyToPay(mPaymentsClient).addOnCompleteListener( new OnCompleteListener<Boolean>() { public void onComplete(Task<Boolean> task) { try { boolean result = task.getResult(ApiE...
[ "boolean hasResponsePending();", "@Override\n\t \tpublic boolean hasReceivedPaycheck() {\n\t \t\treturn paycheckhere;\n\t \t}", "public void getReady();", "public boolean isTaskCompleted();", "public void testVerifyEndpointResponse() {\n final CountDownLatch signal = new CountDownLatch(1);//...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the date time of a day before given current date
public static Date getPreviousDay(Date currentDate) { GregorianCalendar calendar; int day; calendar = new GregorianCalendar(); calendar.setTime(currentDate); day = calendar.get(Calendar.DAY_OF_MONTH); calendar.set(Calendar.DAY_OF_MONTH, day - 1); return calenda...
[ "public static boolean isBeforeCurrentDateTime(Date date)\n {\n Date dateNow = new Date(); /* Current date time */\n if (date != null && date.before(dateNow))\n return true;\n else\n return false;\n }", "public static Date getCurrentYesterdayStartTime() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
MAX LEGRAND routes to adminedit jsp
@RequestMapping("/adminedit") public ModelAndView adminedit(@RequestParam(name="selectedid") String selectedid, HttpSession session, HttpServletRequest request, HttpServletResponse response) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException, UnknownHostException, SocketExcepti...
[ "@RequestMapping(value = \"/admin\")\n public String adminPage(Model model) {\n\t\t\n\t\t// call the function that does database reference integrity check\n\t\tRefIntegrityCheck.check(userRepo, userRepoCustom, typeRepo, weapRepo, locoRepo, locoRepoCustom);\n\t\t\n model.addAttribute(\"users\", userRepo.fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo facade di metodo omonimo per facilitarne l'accesso e la leggibilita'
public boolean posizionaASinistraDi(final Component componenteParagone, final int distanzaOrizzantale, final int distanzaVerticale) { return posizionaASinistraDi(componenteParagone, distanzaOrizzantale, distanzaVerticale, this); }
[ "private ReferenciasBancarias() {\n\n\t\t}", "private AlteracaoUtil() {}", "private ServicioAeropuerto()\n\t{\n\t}", "public interface Facade {\r\n /** Thrown on an unauthorized action. */\r\n class NotAuthorizedException extends RuntimeException {}\r\n\r\n /** Thrown on a situation of a positive bus...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new RandomCustomer object RandomCustomers have randomised current and destination floors
public Customer createRandomCustomer(final int NO_FLOORS) { Customer cust = new RandomCustomer(NO_FLOORS); return cust; }
[ "private Customer createRandomCustomer() {\n\n if (new Random().nextInt(10) + 1 < 8) {\n return createLittleFish();\n } else {\n return createBigBoy();\n }\n }", "public RandomCustomer() {\r\n createShoppingList(8);\r\n setMoney(250);\r\n }", "priva...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Liefert den Inhalt der Koordinaten x, y.
public T get( Integer x, Integer y ) { return matrix.get( x ).get( y ); }
[ "public int getXcoordinate(){return xcoordinate;}", "public int getX() {\r\n return coord.x;\r\n }", "public int getY(){ return point.getY(); }", "@Override\r\n public PixelPoint getLocation ()\r\n {\r\n return new PixelPoint(x, y);\r\n }", "public void crois(){\r\n\t\tto_x = in_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs the GUI and displays it on the screen.
public TextEditorGUI() { this.saveButton = new JButton("Save As..."); this.button2 = new JButton("Button 2"); this.southwest = new JButton("Southwest"); this.southeast = new JButton("Southeast"); this.textarea = new JTextArea(); this.frame = new JFrame("326 is great"); ...
[ "public void createGUI() {\n\n\t\tFile directory = new File(\".\");\n\t\tJButton jbConsumer = new JButton(\"Consumer\");\n\t\tJButton jbEvaluation = new JButton(\"Evaluation\");\n\t\tfinal ImageIcon logo = new ImageIcon(directory.getAbsolutePath() + \"/com/cleandroid/consumerSoftware/CleanDroid.png\");\n\t\tJPanel ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Rename and change types and number of parameters
public static NewTransFragment newInstance(String param1, String param2) { NewTransFragment fragment = new NewTransFragment(); return fragment; }
[ "protected void method_5557() {}", "@Override\n\tpublic void use(byte[] parameters) {\n\t\t\n\t}", "@Override\n }", "public abstract String processParameters();", "@Override\n public void extornar() {\n \n }", "@Override\n\tpublic int getNumParameters() {\n return 2;\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines if the element is an XMLSchema lang structure
public boolean isXMLSchemaDatatypeLiteral(String element) { if (this.hasContent(element)) { // take care of CDATA String elementContent = element; if (this.isCDATA(elementContent)) { elementContent = this.getCDATAContent(elementContent); } if (this.hasContent(elementContent)) { if ...
[ "public static boolean SchemaElement(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"SchemaElement\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, SCHEMA_ELEMENT, \"<schema element>\");\n r = SchemaKV(b, l + 1);\n if (!r) r = ConditionalSchemaKV(b, l + 1);\n exit_se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Devolve o numero maximo autorizado de dispositivos.
public int getMaxNDevices() { return maxNDevices; }
[ "@Override\n\tpublic int aforoMaximo() {\n\t\treturn 0;\n\t}", "public static int getMaxLocomotiva() {\n\t\treturn MAXLOCOMOTIVA;\n\t}", "public int getMaxUsers();", "long getMaxActive();", "public void setMaxNumberOfNonInteractiveUsers(int maxNumberOfNonInteractiveUsers)\r\n {\r\n synchronized (m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ access modifiers changed from: private
public void setTimedOutAfterMs(long value) { this.bitField0_ |= 2; this.timedOutAfterMs_ = value; }
[ "@Override\n }", "protected void method_5557() {}", "@Override\n public void extornar() {\n \n }", "@Override\r\n public void publicando() {\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "private InternalReflect() {\n\t\t\t// do nothing\n\t\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Specifying Property Type
@Test public void testSpecifyingPropertyType() throws IOException { String paths = "./src/test/resources/kotlin_real_cases/case13/OtherActivity_s.kt"; String patht = "./src/test/resources/kotlin_real_cases/case13/OtherActivity_t.kt"; SingleDiff diff = run(paths, patht); showChanges(diff); assertTrue(diff...
[ "SimplePropertyType getProperty();", "private void doPropertyType(PropDefImpl pdi) throws ParseException {\r\n if (!currentTokenEquals(Lexer.BEGIN_TYPE)) {\r\n return;\r\n }\r\n nextToken();\r\n if (currentTokenEquals(Lexer.STRING)) {\r\n pdi.setRequiredType(Prope...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
From Restarts Control Panel and resets to log in
public void restartControlPanel(ActionEvent actionEvent) throws ClassNotFoundException, UnsupportedLookAndFeelException, InstantiationException, IllegalAccessException { JComponent comp = (JComponent) actionEvent.getSource() ; Window win = SwingUtilities.getWindowAncestor(comp); win.dispose(); ...
[ "public void clearCredentialsAndRestart() {\n clearCredentials();\n restartApp();\n }", "void relogin() {\n\n String email = mPreferenceProvider.getUserEmail();\n String password = mPreferenceProvider.getUserPassword();\n long serverDeviceId = mPreferenceProvider.getServerDev...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If the text recognition process has found a license plate, the report is updated with this new information. Moreover the view is updated to show the plate found.
@Override public void onTextRecognized(String[] result) { if (result != null && result.length > 0) { Log.d(TAG, "Plate found: " + result[0]); GeneralUtils.showSnackbar(rootView, "Plate found: " + result[0]); if (!report.hasPlate()) { report.setLicensePlate(result[0]); reportViolationActivity.setPlat...
[ "@Override\n public void onSuccess(FirebaseVisionText firebaseVisionText) {\n String text = firebaseVisionText.getText();\n String[] lines = text.split(\"\\n\");\n licenseET.setText(text);\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes rating to movie rated by user.
public boolean deleteRating(long movieId, long userId) throws DAOException { int result; try( PreparedStatement statement = connection.prepareStatement(DELETE_RATING) ) { statement.setLong(1, movieId); statement.setLong(2, userId); result = statement.executeUpdate(); } catch (SQLException e) { t...
[ "@Override\n public void deleteRating(Rating rating) {\n final String sql = \"delete from rating where movieId=:movieId\";\n Map<String,Object> map= new HashMap<>();\n map.put(\"movieId\", rating.getMovieId());\n template.execute(sql,map, (PreparedStatementCallback<Object>) PreparedSt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Displays Snackbar showing the most recently logged item of food
@Override protected void onPostExecute(String result) { if (recent.length() < 1) { Snackbar snackbar = Snackbar .make(findViewById(android.R.id.content), "Welcome to Nutrition Tracker", Snackbar.LENGTH_LONG); snackbar.show(); } else...
[ "private void showUpdateSnackbar() {\n Snackbar snackbar = Snackbar\n .make(frameLayout, \"Book List Updated!\", Snackbar.LENGTH_LONG)\n .setAction(\"VIEW\", (View v) -> {\n rvBookList.setVisibility(View.VISIBLE);\n btnShowBooks.setText(\"Hide...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the "uLnTx" element
void setULnTx(org.openxmlformats.schemas.drawingml.x2006.main.CTTextUnderlineLineFollowText uLnTx);
[ "public void setTx_incl(byte[] tx_incl) {\n this.tx_incl = tx_incl;\n }", "public void setAddrTX(Integer value) {\n\t\tthis.addrTX.set(value);\n\t}", "public void setPwr_tx(double pwr_tx) {\n\t\tthis.pwr_tx = pwr_tx;\n\t}", "public void setNumBytesTX(long numBytesTX) {\n NumBytesTX = numBytes...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Are there some placeholders remaining in the resulting path?
public boolean isPlaceholdersRemaining();
[ "boolean hasPathTemplateMatch();", "java.lang.String getPathTemplateMatch();", "boolean isSetFullPath();", "private boolean lastPathLiteralBothBranchesGenerated() { return this.both_generated.last(); }", "private boolean isPathMapping(String mapping) {\n return mapping.startsWith(\"/\") && mapping.en...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__FullJvmFormalParameter__Group__3" $ANTLR start "rule__FullJvmFormalParameter__Group__3__Impl" InternalSARL.g:24930:1: rule__FullJvmFormalParameter__Group__3__Impl : ( ( rule__FullJvmFormalParameter__ParameterTypeAssignment_3 ) ) ;
public final void rule__FullJvmFormalParameter__Group__3__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalSARL.g:24934:1: ( ( ( rule__FullJvmFormalParameter__ParameterTypeAssignment_3 ) ) ) // InternalSARL.g:24935:1: ( ( rule__F...
[ "public final void rule__FullJvmFormalParameter__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAle.g:12179:1: ( rule__FullJvmFormalParameter__Group__1__Impl )\n // InternalAle.g:12180:2: rule__FullJvmFormalParam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the game Id from the selected row in the table
@Override public void actionPerformed(ActionEvent e) { int gameIndex = getHiddenID(activeGamesTable); if (gameIndex == -1) { return; // No row selected } // Get the selected game info ActiveGameInfo gameInfo = activeGames.get(gameIndex); // Verify the user...
[ "public int getSelectedRow ()\n {\n return selectedRow;\n }", "public Integer getId(int row) {\n return jobs.get(row).getId();\n }", "public String getTableSelectedID();", "TableModel getGameNameByID(int gameId) throws SQLException;", "public int getGameId() {\n Map<String, Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns whether two games are equal. This is the case if they contain exactly the same lines. The header does not matter.
@Override public boolean equals(Object obj) { if (obj == this) { return true; // =====> } if (!(obj instanceof Game game)) { return false; } // =====> return game.getModel().equals(getModel()); }
[ "public boolean getIsSameLine() {\n return isSameLine_;\n }", "public boolean equals(Line other) {\n return (this.start == other.start && this.end == other.end)\n || (this.start == other.end && this.end == other.start);\n }", "@Test\n\tpublic void testEqualityWithSameGame(){\n\t\tga...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the proxyPort property.
public void setProxyPort(int value) { this.proxyPort = value; }
[ "@Override\n\tpublic void setProxy(String ip, String port) {\n\t\tSystem.setProperty(\"http.proxyHost\",ip);\n\t\tSystem.setProperty(\"http.proxyPort\", port);\n\t}", "public void setProxy(String host, int port) {\n setHTTPProxy(host, port, null);\n }", "public static int getProxyPort() {\n return Intege...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an object containing: a flag indicating whether the specified node was found the data for the node, if it was found
public abstract DataTreeLookup lookup(IPath key);
[ "Node findNode(Object data);", "private boolean foundInNode( TwoThreeNodeClass localRef, int searchVal )\n {\n return( localRef.leftData == searchVal || \n localRef.centerData == searchVal || localRef.rightData == searchVal );\n }", "private Boolean getUsingFindNode(int key) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ JADX INFO: super call moved to the top of the method (can break code semantics)
public a(SwitcherItemPresenterImpl switcherItemPresenterImpl, SwitcherItem switcherItem) { super(0); this.a = switcherItemPresenterImpl; this.b = switcherItem; }
[ "public void method_5753() {\r\n super();\r\n }", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void parentMethod() throws Exception {\n\t\tsuper.parentMethod();\r\n\t}", "@Override\n }", "protected void method_5557() {}", "protected void d()\r\n/* 49...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The stage of the Orchestrator definition which contains all the minimum required properties for the resource to be created, but also allows for any other optional properties to be specified.
interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithProperties { /** * Executes the create request. * * @return the created resource. */ Orchestrator create(); /**...
[ "interface WithCreate\n extends DefinitionStages.WithTags,\n DefinitionStages.WithFriendlyName,\n DefinitionStages.WithRoutingRules,\n DefinitionStages.WithLoadBalancingSettings,\n DefinitionStages.WithHealthProbeSettings,\n Defin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_sales_nav_drawer, menu); return true; }
[ "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflator = getMenuInflater();\n\t\tinflator.inflate(R.menu.activity_action_bar, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n public boolean onCreateOptionsMenu( android.view.Menu menu)\r\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public static int debuglevel = 1;
public static void debug(String msg, int level) { if (level > debuglevel) { System.out.println(escape(msg)); } }
[ "public static int debugLevel()\n\t{\n\t\treturn debugLevel;\n\t}", "public int getLogLevel() {\n/* 192 */ return this.logLevel;\n/* */ }", "public void logDebug(Object message) {\n/* 116 */ logInternal(4, message, null);\n/* */ }", "protected int getDebug() {\n return debug;\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the given element from this counter (even if it appears multiple times), if it is present (optional operation). Returns true if this counter contained the specified element t (or equivalently, if this collection changed as a result of the call).
public boolean removeAll(Collection<T> elements){ boolean modified = false; for(T element : elements){ if(this.removeAll(element)){ modified = true; } } return modified; }
[ "@Override\n\tpublic boolean remove(T t) {\n\t\treturn modify(t, -1) > 0;\n\t}", "public boolean remove(Tile t) {\r\n\t\t\r\n\t\tboolean result = false;\r\n\t\t\r\n\t\tif (t instanceof BlankTile) {\r\n\t\t\tif (this.blankTileCount > 0) {\r\n\t\t\t\tthis.blankTileCount--;\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void deleteProfile(Profile profile) { sessionFactory.getCurrentSession().createQuery("DELETE FROM Profile WHERE Id = "+profile.getId()).executeUpdate(); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }