query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Get Proxy address. Address of your proxy server
public String getProxyAddress() { return (String)get_Value("ProxyAddress"); }
[ "public String getProxyHost() {\r\n return getHelpedParameters().getFirstValue(\"proxyHost\",\r\n System.getProperty(\"http.proxyHost\"));\r\n }", "public String getHttpProxy() {\n return httpProxy;\n }", "public static Proxy getProxy() {\n\t\treturn new Proxy(Proxy.Type.HTTP, ne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Saves data of friends in ArrayLists.
public void addFriendInformation(String friendName, String friendID){ mFriendsCompleteNames.add(friendName); mFriendsCompleteIDs.add(friendID); }
[ "public void saveFriends() {\n for (Person p : friends) {\n p.setCanEdit(false);\n }\n }", "public void storeBuddyList() {\n\tSTUser[] usersList = m_awarenessList.getItems();\n\n\ttry {\n\t\tPrintStream p = new PrintStream(new FileOutputStream(\"stbuddy.dat\"));\n\n\t\tfor (int i = 0; ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Send the Text using Locator ID
public static void Enter_ID(WebDriver wd, String pr, String dt, String strStep) throws InterruptedException, IOException { try { WebDriverWait wait = new WebDriverWait(wd, 60); WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(pr))); //((JavascriptExecutor) wd).executeScr...
[ "public void sendText(String locator, String text, locatorType selector) {\n\t\ttry {\n\t\t\tsleep(1);\n\t\t\tif (locator != null && text != null) {\n\t\t\t\tswitch (selector.toString().toLowerCase()) {\n\t\t\t\tcase CLASS_NAME:\n\t\t\t\t\tdriver.findElement(By.className(locator)).sendKeys(text);\n\t\t\t\t\tbreak;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Notify given event at given severity
private void notify(ExecutionEvent event) { if(notifyingEvents.contains(event.getType())) { GntpNotification notification = notificationFor(event); if (notification != null) { try { client.notify(notification, 1, TimeUnit.SECONDS); } catch(Exception e) { logger.warn("unable to growl notificati...
[ "void notify(EventObject event) throws Exception;", "public void log(ChannelSeverity severity, String message);", "public static void logEvent(Object c, int severity, Object o) {\n\t\tString classname = c.getClass().getName();\r\n\t\tif (severity > 0) {\r\n\t\t\t@SuppressWarnings(\"deprecation\")\r\n\t\t\tStrin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start the registration module
private void startRegistrationModule() throws IOException { String menu = getMenuRegistration(); int option; System.out.println(menu); option = readOption(); executeOperationRegister(option); }
[ "public void startRegistration() {\n Map record = new HashMap();\n record.put(\"listenport\", String.valueOf(5678));\n record.put(\"name\", \"Psycho\" + (int) (Math.random() * 1000));\n record.put(\"available\", \"visible\");\n\n // Service information. Pass it an instance name, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
finds the intersections of the boundaries of two neurons with the line that connects their centers sets the local variables to those two points (x1,y1) for the source neuron, (x2,y2) for the target neuron
public void setEdgeEndpoints(Neuron source, Neuron target) { int sourceX = source.getX(); int sourceY = source.getY(); int targetX = target.getX(); int targetY = target.getY(); //distance from source to target double distance = Math.sqrt( Math.pow((targetX - sourceX), 2) + Math.pow((targetY - sourceY), 2...
[ "public Point specialCasesOfIntersection(Line other) {\n\n /*using temp variables to compare the values of the lines,the start of the lines will get the minimum values\n of either x or y and the end of the lines will get the maximum values\n (other and this are names of the two lines)*/\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Devuelve un Element a partir de un java.lang.String que debe ser un xml bien formado.
public Element makeElement(String xmlFrom) throws Exception { return this.makeDocument(xmlFrom).getDocumentElement(); }
[ "public static Element getElement(String xmlDataString) {\n // Create an instance of SAXBuilder\n //\n SAXBuilder builder = new SAXBuilder();\n Element e = null;\n try {\n //\n // Tell the SAXBui...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create variable to store sum loop over reviews and add stars divide sum by number of reviews update star
private void updateStars(){ int total = 0; for (int i = 0; i < reviews.size(); i++){ total += reviews.get(i).stars; } total /= reviews.size(); this.star = total; }
[ "public void compute(){\r\n // Local Variable deceleration.\r\n int count = 0;\r\n // Local Variable deceleration ends.\r\n for (int i =0; i< restID.size(); i++) {\r\n ArrayList<Double> rate = reviewRate.get(i);\r\n int sum = 0;\r\n int value = 0;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form CreateBoxPanel
public CreateQuadPanel() { initComponents(); }
[ "public void createPanel()\n {\n //creates main panel and adds compoenents to it\n panel = new JPanel();\n bunnyField = new JTextField(TEXTFIELD_LENGTH);\n earsField = new JTextField(TEXTFIELD_LENGTH);\n earsField.setEditable(false);\n \n panel.add(new JLabel(\"Nu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new ArrowEvent with the specified source JinChessclubConnection, Game, id, square where the arrow starts and square where the arrow ends.
public ArrowEvent( JinChessclubConnection conn, String clientTag, Game game, int id, Square fromSquare, Square toSquare) { super(conn, clientTag, game); switch (id) { case ARROW_ADDED: case ARROW_REMOVED: break; default: throw new IllegalArg...
[ "public Arrow (Canvas canvas, float sight_x, float sight_y, Target target, boolean scoring_system) {\r\n\t\tarrow_state = ARROW_LOADED;\r\n\t\tarrow_distance = 0.0;\r\n\t\tarrow_x = sight_x;\r\n\t\tarrow_y = sight_y;\t\t\r\n\t\tarrow_diameter = 10;\r\n\t\ttargetx = target.mTargetX;\r\n\t\ttargety = target.mTargetY;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "T__33" $ANTLR start "T__34"
public final void mT__34() throws RecognitionException { try { int _type = T__34; int _channel = DEFAULT_TOKEN_CHANNEL; // InternalReflex.g:13:7: ( '}' ) // InternalReflex.g:13:9: '}' { match('}'); } state.type = ...
[ "public final void mT__34() throws RecognitionException {\r\n try {\r\n int _type = T__34;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // ../org.openmodelica.modelicaml.editor.xtext.equationsection.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/equation/ui/contentassis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public boolean parseValidate() { return true; }
[ "@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" ] ] } }
params defines all the paramaters of the module. .evmos.inflation.v1.Params params = 1 [(.gogoproto.nullable) = false];
public Builder clearParams() { if (paramsBuilder_ == null) { params_ = null; onChanged(); } else { params_ = null; paramsBuilder_ = null; } return this; }
[ "IRequestManager params(Map<String, String> params);", "axelar.evm.v1beta1.ParamsOuterClass.ParamsOrBuilder getParamsOrBuilder();", "SM9Parameter getParams();", "public void setParams(ParamSet params) {\n\tthis.params = params;\n }", "private void initParams() {\n }", "public ParameterMessageBehavio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when a new location is found by the network location provider.
public void onLocationChanged(android.location.Location l) { if (getLastLocation() == null) { lastLocation = new Location(l.getLatitude(), l.getLongitude(), getString(R.string.current_location), 0.0, Constants.DEFAULT_ZOOM); loadStoriesFromServerWithLocation(); ...
[ "@Override\n public void gotNewLocation(Location location) {\n fail();\n }", "@Override\r\n\t\t\tprotected void onRelevantLocationChanged(\r\n\t\t\t\t\tLocation newLocation) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void onLocationChanged(Location location) {\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public Integer removeOne(int num) { return null; }
[ "@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" ] ] } }
returns the size of the heap
public int getSize() { return Heap.size() - 1; }
[ "public int size() {\n return heap.size();\n }", "public int getHeapSize () { return heapSize; }", "public static int getHeapSize() {\r\n\t\treturn heapSize;\r\n\t}", "public int size() {\r\n\t\t// as size of the heap is equal to the size of the tree\r\n\t\t// return the size of the tree\r\n\t\treturn _...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the app key.
@Column(name = "app_key", length = 45) public String getAppKey() { return this.appKey; }
[ "String getApplicationKey();", "public java.lang.String getApplicationKey() {\n\t\t return applicationKey;\n\t }", "byte[] loadApplicationKey() {\n\t\ttry {\n\t\t\t// Read in the key.der file (downloaded from the developer portal)\n\t\t\tInputStream inputStream = getResources().openRawResource(R.raw.key);\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Returns the number of nodes in between the two sentinels
public int size() { return this.size; }
[ "public int getAdjacentNodeCount();", "public void calculateNodeBetweenness(){\n\t}", "private int distanceBetween(Reviewer r1, Reviewer r2){\n\t\tLinkedList<Node> q = new LinkedList<Node>();\n\t\tfor (Node n : nodes.values()){\n\t\t\tn.clearMark();\n\t\t}\n\t\tNode n1 = getNode(r1), n2 = getNode(r2), current;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a query parser customized for OpenGrok.
public CustomQueryParser(String field) { super(field, new CompatibleAnalyser()); setDefaultOperator(AND_OPERATOR); setAllowLeadingWildcard( RuntimeEnvironment.getInstance().isAllowLeadingWildcard()); // Convert terms to lower case manually to prevent changing the case ...
[ "String queryParse(String query);", "public static PSGQueryObject parseQuery(String query) {\n\t\t// Step 1: define query plan needed parameters\n\t\t// those parameters reflected the key words of query\n\t\tboolean hasSELECT = true;\n\t\tboolean hasSUBSCRIBE = true; // ignore subscription first\n\t\tboolean hasF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load all the postings into memory for fast access
public PostingBuilderMem loadPostingIntoMemory(IIndex0 indexSearcher);
[ "private void loadPostingList(PriorityQueue<Integer> postingLines) throws Exception {\n postingListMap = new HashMap<>();\n int lineNumber;\n int currentLine = 0;\n String line;\n\n File postingList = new File(outPut + \"postingList.txt\");\n try {\n FileReader f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a specified FirewallAppInfo to the app list.
public void addAppInfo(FirewallAppInfo appInfo) { mAppList.add(appInfo); }
[ "@SuppressWarnings(\"unchecked\")\n public void addApplication(String theApp) {\n ((List<String>) getAttribute(APPLICATIONS)).add(theApp);\n }", "public void addApplication(Application app) {\r\n try {\r\n apps.put(app);\r\n\r\n } catch (InterruptedException e) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Don't remember what this is getPermissionRequest().setReasonCd(reasonCd);
public void setReasonCd(long reasonCd) { }
[ "public void requestPermissions(int requestCode) {\n }", "public abstract String setPermission();", "private void showRequestPermissionRational() {\n new AlertDialog.Builder(this)\n .setMessage(R.string.permission_request_rationale)\n .setPositiveButton(R.string.o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creates a new audit trail entry with initialized data hashtable
public AuditTrailEntryImpl() { element = null; eventType = null; timestamp = null; originator = null; attributes = new DataSection(); instanceNumber = nextInstanceNumber(); elementModelReferences = null; typeModelReferences = null; originatorModelReferences = null; }
[ "void createAuditRecord(AuditHeader record) throws AuditPersistenceException;", "public com.idetronic.portlet.model.UserImportLog create(long entryId);", "public static AuditRecord createEntity() {\n AuditRecord auditRecord = new AuditRecord()\n .what(DEFAULT_WHAT)\n .when(DEFAULT_W...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
String action = request.getServletPath();
private void showTeste(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter imprimir = response.getWriter(); imprimir.println("<html><body>"); imprimir.println("Funcionando!!</br>"); imprimir.println("</body></html>"); }
[ "public ActionServlet getActionServlet()\n {\n return servlet_;\n }", "private String getControllerPathInServlet(HttpServletRequest request) {\n\t\tString uri = request.getServletPath();\n\t\tPattern pattern = Pattern.compile(\"/([^/]*)/.*\");\n\t\tMatcher matcher = pattern.matcher(uri);\n\t\tif (matcher.fin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
// startTxRN171DeviceGetStatus // //
public void startTxRN171DeviceGetStatus() { this.startupCheckTimerCount = 0; this.startupCheckTimer = new Timer(); this.startupCheckTimer.schedule(new TimerTask() { @Override public void run() { Log.d("myApp", "Rinnai34Lighting: Tick.. " + st...
[ "private void startDeviceStatusReport()\n {\n if (deviceStatusActive.getAndSet(true)) return;\n\n final int handlerTaskId = deviceStatusGeneratorTaskId.incrementAndGet();\n\n serviceHandler.postDelayed(new Runnable()\n {\n @Override\n public void run()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
used for character type
public void testConstantExpressionTypes() throws Exception { assertEquals(Type.INTEGER, getType("3")); assertEquals(Type.REAL, getType("3.0")); assertEquals(Type.CHARACTER, getType(character)); assertEquals(Type.DOUBLEPRECISION, getType("3.0D+00")); assertEquals(Type.COMPLEX,...
[ "public boolean isCharacterType () {\n return SQLTypeUtil.isCharacter(getType());\n\t}", "public abstract char getType();", "public static String getType(char arg) {\n return \"char\";\n }", "default boolean isChar() {\n return false;\n }", "public static String getType(Character ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parsing the helmet data and
public void parse( byte[] received_data){ if( received_data.length < 2){ return; } // Session Summary // Session summary's header if (received_data[0] == (byte)0xAC) // for session summary { //Log.d(TAG, "parse in device1: Received session summary...
[ "public interface LHelps {\r\n\t\r\n\t/** Help Legend help. */\r\n\tLRHtml HELP_LEGEND = new LRHtml( \"Help Legend\", h( \"help-legend\" ) );\r\n\t\r\n\t/** Computer Skill Level help. */\r\n\tLRHtml COMP_SKILL_LEVEL = new LRHtml( \"Computer Skill Level\", h( \"computer-skill-level...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles messages of type RESERVE_FLIGHT
private TCPMessage handleReserveFlight(TCPMessage r) { Trace.info("MW::Received RESERVE_FLIGHT request from [" + clientHost + ":" + clientPort + "], checking customer and forwarding to flightsHost"); Customer customer = middleware.getCustomer(r.id, r.customerID); // If customer does not exist, return -1 if ...
[ "@Override\n public void onReceive(Context context, Intent intent) {\n if (RequestStatus.isRequestAccept && \"Emergency\".equals(RequestStatus.title)) {\n book = (Book) intent.getSerializableExtra(\"request\");\n //ScheduleMovingTimer scheduleDriverTracking = new Sche...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is a setter method for defaultKnowledgeBase.
public void setDefaultKnowledgeBase( KnowledgeBaseSettingPlugin defaultKnowledgeBase) { this.defaultKnowledgeBase = defaultKnowledgeBase; }
[ "@Override\n public SpringEngineBuilder defaultKnowledgeBaseName(String defaultKnowledgeBaseName) {\n return (SpringEngineBuilder) super.defaultKnowledgeBaseName(defaultKnowledgeBaseName);\n }", "@Override\n public SpringEngineBuilder knowledgeBase(KnowledgeBase knowledgeBase) {\n return (S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Notify observers that a ball hit a brick.
public void notifyBallHitBrick(Ball ball, Brick brick) { for (CollisionObserver observer : observers) { observer.onBallHitBrick(ball, brick); } }
[ "private void notifyHit(Ball hitter) {\n List<HitListener> listeners = new ArrayList<HitListener>(this.hitListeners);\n for (HitListener hl : listeners) {\n hl.hitEvent(this, hitter);\n }\n }", "private void notifyHit(Ball hitter) {\n // Make a copy of the hitListeners be...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an error message.
private static String createErrorMessage(NoteModificationResult result, Locale locale) { String message; ResourceBundleManager rbm = ResourceBundleManager.instance(); switch (result.getStatus()) { case NOTIFICATION_ERROR: StringBuilder messageBuilder = new StringBuilder(...
[ "String createErrorMessage(String errorMessage, String errorType);", "private String createErrorMessage(String message) {\n return String.format(Locale.US, \"Parsing error at line: %d column: %d. %s\",\n locator.getLineNumber(), locator.getColumnNumber(), message);\n }", "private Text createErrorText...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fired when the user clicks on the sendButton.
@Override public void onClick(ClickEvent event) { final String text = nameField.getText(); System.out.println("onClick[" + text + "]"); // Add the cellList to the dataProvider. server.getNumberOfSuggestedReceipes(text, new AsyncCallback<Long>() { @Override public void onFailure(Throwable ...
[ "@Override\n public void sendClicked() {\n }", "@Override\n\t\tpublic void onSendBtnClicked(String content) {\n\n\t\t}", "public void triggerButtonSend(){ \n \n actionListenerStop = new ActionListener() {\n public void actionPerformed(ActionEvent actionEvent) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public boolean isFormField() { return false; }
[ "@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" ] ] } }
/ This filterablelike interface is used to filter the egg groups by egg group type and by name
public interface TypeAndTextFilterable { Filter getFilter(FilterMode filterMode); }
[ "boolean hasAssetGroupListingGroupFilterOperation();", "public abstract void filter(String type);", "private void groups() {\n\t\tList<String> filtered = filter();\n\t\t\n\t\tfor (String f : filtered) {\n\t\t\tMatcher matcher = maskPattern.matcher(f);\n\t\t\tif (!matcher.matches()) {\n\t\t\t\tcontinue;\n\t\t\t}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Play a (MIDI) note, that is, make the Roomba a musical instrument notenums 32127: notenum == corresponding note played thru beeper velocity == duration in number of 1/64s of a second (e.g. 64==1second) notenum 24: notenum == main vacuum velocity == nonzero turns on, zero turns off notenum 25: blink LEDs, velcoity is co...
public void playMidiNote( int notenum, int velocity ) { updateDisplay("play note: "+notenum+","+velocity+"\n"); if( !roombaCommSerial.connected() ) return; if( notenum >= 31 ) { // G and above if( velocity == 0 ) return; if( velocity < 4 ) velocity...
[ "@Override\n\tpublic void play() throws MidiUnavailableException {\n\t\tSequencer<ToneInstrument> s = new ToneSequencer(400);\n\t\t//synth.open();\n\n\t\tChordBuilder builder = new ChordBuilder();\n\t\t\n\t\tChord cMajor = builder.get(C, Major);\n\t\tChord aMinor = builder.get(A, Minor);\n\t\tChord fMajor = builder...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds a realizer from an irtg and a model.
public MinecraftRealizer(InterpretedTreeAutomaton irtg, FirstOrderModel mcModel) { this(irtg); refA.setModel(mcModel); }
[ "public Recommender buildRecommender(DataModel model) throws TasteException{\n\t\t\t\tItemSimilarity similarity = new LogLikelihoodSimilarity(model);//1.77\r\n\t\t\t\t\r\n\t\t\t\treturn new GenericItemBasedRecommender(model, similarity);\r\n\t\t\t}", "public RealizationUML(ClassUML class_, InterfaceUML interface_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
[ "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch(item.getItemId()){\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home\n Intent intent = new Intent(this, MainMenuCard.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public static void main(String[] args) { }
[ "@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" ] ] } }
Sets the the unit that has this item on its inventory.
@Override public void setOnInventory(IUnit onInventory) { this.onInventory = onInventory; }
[ "public void setUnit(EUnitType unit)\n\t{\n\t\tthis.unit = unit;\n\t}", "@Override\n\tpublic void setUnit(java.lang.String unit) {\n\t\t_officeSupply.setUnit(unit);\n\t}", "public void setUnit(String unit) { // setter for unit\n // TODO: check input before assign the value to the class field\n thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the city's y position.
int gety() { return this.ypos; }
[ "public final int getY() {\n return yLoc;\n }", "public int getY() {\r\n\t\treturn coord.y;\r\n\t}", "public int getY() {\n return yCoord;\n }", "String getYCoordinate();", "public double getY() {\n return y_coord;\n }", "public int getY() { \r\n\t\treturn position.y; \r\n\t}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
System.out.printf("%10s%13s%s\n", getNama(), getPenyakit(), getLamaInap());
public void tampilDataPasien() { }
[ "public void show() {\n System.out.printf(\"\\n%5s %23s %10s %21s %13s %15s\\n\",\"ID\",\"Hoten\",\"tuoi\",\"Diachi\",\" Diemthi\",\"Phone\");\n for (Student student : studentList) {\n System.out.format(\"%5d | \", student.getID());\n System.out.format(\"%20s | \", student.getN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Notified when an event within a doubletap gesture occurs, including the down, move, and up events.
@Override public boolean onDoubleTapEvent(MotionEvent e) { tcMessage.setText("onDoubleTapEvent"); return true; }
[ "public void onDoubleTapConfirmed(MotionEvent ev) {\n }", "private void heldDown(MotionEvent event) {\n\n }", "private void parseUpEvent(MainView body, MotionEvent event) {\n }", "@Override\n\t\tpublic boolean onDown(MotionEvent event) {\n\t\t\tdManager.saveData(\"onDown\",System.currentTimeMilli...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests Operations Constructor for 100% coverage
@Test public void testConstructor() { new ConstructorTestClass(); }
[ "@Test\n public void constructorTest()\n {\n // We aren't actually testing anything here - just addressing a bug in the\n // code coverage computation\n new Bank();\n // Web-Cat wants an Assert here: use one that will always pass\n Assert.assertTrue(true);\n }", "priva...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to initialize the report
public void startReportSession(String className, String timeStamp) { String workingDirectory = System.getProperty("user.dir"); dir = workingDirectory +File.separator+"Report"+File.separator +className + "_" + timeStamp; dirScr = dir + File.separator +"Screenshot"; path = dir+File.pathSeparator +className+"_"+ti...
[ "public ReportHandler() {\r\n super();\r\n \r\n concurrentReportInfo = new HashMap();\r\n \r\n //initialize the random number generator\r\n rand = new Random();\r\n Date d = new Date();\r\n rand.setSeed(d.getTime());\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
invoked when thread.start is called operations to be executed by this global thread is to call the beginning of the operations to fill the properties asynchronously by another thread and wait for him to terminate
@Override public synchronized void run() { //calling this thread to begin the procedure of input of user choice //to initialize or not the new widget new AsynchrnousDialogBoxYesNoResultConsumer().start(); try { //wait for the user to make a c...
[ "@Override\n public void run() {\n initObject();\n initChannel();\n initDetails();\n initDescription();\n initge();\n }", "void initResource() {\n\t\tfreeResourc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this method should calculate what percentage the thisMany argument is of thatMany DONE
public float percentageOf(float thisMany, float thatMany) { return thisMany/thatMany*100f; }
[ "@Override\n double getPercentage() {\n return Arrays.stream(list).sum() / list.length;\n }", "private static void myPercentOfClassCombined() {\n\t\tint selectNumber = (nbCLass * 10) / 100;\n\t\tint cpt = 0;\n\t\tfor (SetType setType : classWithManyMethods) {\n\t\t\tfor (SetType setType2 : classWithM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Locate and return the verification point Z1116_Status object in the SUT.
protected IFtVerificationPoint Z1116_StatusVP() { return vp("Z1116_Status"); }
[ "com.bsnbase.sdk.util.pb.XchainOuterClass.DposStatus getStatus();", "sifnode.oracle.v1.Types.Status getStatus();", "public SystemStatus getSystemStatus() {\n SystemStatus status = new SystemStatus();\n\n write8(reg_t.BNO055_PAGE_ID_ADDR, (byte) 0x00);\n\n /*\n * System Status (see s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table obj_user
public boolean isDistinct() { return distinct; }
[ "private User mapUserObject(ResultSet resultSet, User user) throws SQLException {\n user.setUserId(resultSet.getLong(ID_FIELD_NAME));\n user.setUsername(resultSet.getString(USER_USERNAME_FIELD_NAME));\n user.setPassword(resultSet.getString(USER_PASSWORD_FIELD_NAME));\n user.setEmail(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set up recyclerView, adapter and format of displayed movies
private void recyclerViewOrientation() { recyclerView = (RecyclerView) findViewById(R.id.recycleViewerId); recyclerView.removeAllViewsInLayout(); if(exists == false) { movieInfoList = new ArrayList<>(); exists = true; } movieAdapter = new MovieAdapter...
[ "private void setUpRecyclerView() {\n\n adapter = new MovieGridAdapter(getActivity(), movieItems);\n recyclerView.setLayoutManager(new GridLayoutManager(getActivity(),getResources().getInteger(R.integer.row_items)));\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n recyclerVi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { lblUsuario = new javax.swing.JLabel(); lblSenha = new javax.swing.JLabel(); txtUsuario = new javax.swing.JTextField(); btnLogi...
[ "public StForm() {\n initComponents();\n }", "public CineForm() {\n initComponents();\n }", "public javaform() {\n initComponents();\n }", "public EditDemographicForm() {\n initComponents();\n }", "public FightForm() {\n initComponents();\n }", "public For...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Enqueues the first node and then loops while the queue is nonempty. In the loop, it dequeues and stores the result. It checks if this result is the first of a disconected portion of the graph to be processed. If so, we give it an arbitrary color (1). It then enqueues the neighbors. If this results in the discovery th...
private int BFS(){ //an integer queue for the BFS TCQueue q = new TCQueue(); //add the first unvisited node to the queue q.enqueue(AL.getUnvisitedHead().getContents()); //until the queue is empty while(!q.isEmpty()){ int currVertex = q.dequeue(); //first node of a separated cut, set arbi...
[ "public void BFS()\n {\n int flag = 0;\n for(int c = 0; c<queue.size(); c++)\n {\n String cl = checkProcessed((queue.get(c)).router);\n if(cl.equals(\"WHITE\"))\n {\n for(int i = 0; i < routerCount; i++)\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Anchors are meaningless to us in this context
private void splitFragQuery() { int hash = _path.indexOf("#"); if (hash > -1) _path = _path.substring(0, hash); int ques = _path.indexOf("?"); if (ques > -1) { _query = _path.substring(ques + 1); _path = _path.substring(0, ques); } ...
[ "private void activateUseOfAnchors() {\r\n\t\tanyAnchorsActive = true;\r\n\t}", "public String getAnchor() \r\n {\r\n return anchor;\r\n }", "public void setAnchors(){\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Method Code\"> \r\n for(Site site : siteArray){\r\n if(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public boolean onTouchEvent(MotionEvent event) { long ctim=java.lang.System.currentTimeMillis(); if(ctim-pretime>500){ sarf=sarf.touch((int)event.getX(),(int)event.getY()); pretime=ctim; } return true; }
[ "@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" ] ] } }
Sets the given group's option node to the value
public void setGroupInfoBoolean(String world, String group, String node, boolean value);
[ "protected Element setOption(String elementName, String value) {\n\n Element optionsElement =\n (Element) component.getChild(\"options\");\n if (value != null) {\n String escapedValue = WorkflowFileUtils.htmlEncode(value.replace(\"\\n\", \"\").replace(\"\\r\", \"\"));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
radius The radius of the sphere. slices The number of subdivisions around the Z axis (similar to lines of longitude). stacks The number of subdivisions along the Z axis (similar to lines of latitude).
public void solidSphere(double radius, int slices, int stacks) { double twopi = 2 * Math.PI; for (int i = 0; i < stacks; i++) { GL11.glBegin(GL11.GL_QUAD_STRIP); for (int j = 0; j <= slices; j++) { for (int k = 1; k >= 0; k--) { double s = (i ...
[ "public static final MeshObject makeSphere(int stacks, int slices,\r\n\t\t\tString name) {\r\n\t\t// Create all the vertex data\r\n\t\tint size = (stacks + 1) * (slices + 1);\r\n\r\n\t\t// slices have 20 vertices each\r\n\t\tfloat[] vertices = new float[3 * size];\r\n\t\tfloat[] normals = new float[3 * size];\r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
int32 userid = 1;
public Builder clearUserid() { userid_ = 0; onChanged(); return this; }
[ "int getUserIdLow();", "Long getUserIdAsLong( );", "public int getUserId() {\n return pref.getInt(KEY_ID,0);\n\n }", "public void setUserId(String tmp) {\n this.userId = Integer.parseInt(tmp);\n }", "public int getUserId() {\n\t\t return userID;\n\t\t }", "public int\tTEST_getuserid...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for property thisReturnId.
public void setThisReturnId(int thisReturnId) { this.thisReturnId = thisReturnId; }
[ "public String getReturnId() {\n return returnId;\n }", "public void setReturnId(String returnId)\n {\n this.returnId = returnId;\n }", "public Integer getReturnMoneyId() {\r\n return returnMoneyId;\r\n }", "protected String getId () {\n return myId;\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Invoked when an ActivityBase Activity is stopped
void onActivityStopped(ActivityBase activity);
[ "public void onStop(Activity paramActivity) {\n\n }", "@Override // androidx.fragment.app.FragmentActivity, androidx.appcompat.app.AppCompatActivity\n public void onStop() {\n this.lifecycleSubject.onNext(ActivityEvent.STOP);\n super.onStop();\n }", "@Override\n protected void onStop()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds a new query with the given data.
public SparqlQuery(final com.hp.hpl.jena.query.Query query, final boolean hybrid) { this.query = query; this.hybrid = hybrid; }
[ "@Override\n protected SqlQueryData buildQuery() throws Exception {\n final String METHODNAME = \"buildQuery\";\n log.entering(CLASSNAME, METHODNAME);\n\n StringBuilder queryString = new StringBuilder();\n queryString.append(InclusionQuerySegmentAggregator.SELECT_ROOT).append(LEFT_PAR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generated method Getter of the TestItem.a attribute defined at extension core.
@Accessor(qualifier = "a", type = Accessor.Type.GETTER) public String getA() { return getPersistenceContext().getPropertyValue(A); }
[ "public ItemType getItemType() {\n return NodeKindTest.ATTRIBUTE;\n }", "public static String getA() {\n\t\treturn a;\n\t}", "public T getA(){\n\t\treturn a;\n\t}", "double getA() {\r\n\t\treturn a;\r\n\t}", "public final int a() {\n return this.c.b;\n }", "Property getAtt();", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts the specified value to Integer data type.
static private Integer toInteger(Object value){ // XXX if(value instanceof String){ String string = (String)value; return Integer.valueOf(string); } else if(value instanceof Integer){ return (Integer)value; } throw new EvaluationException(); }
[ "Integer getValueAsInteger() throws ClassCastException;", "public void setIntegerValue(Integer value) {\r\n setTypeInteger(\"IntegerValue\" , value);\r\n }", "public int getAsInteger() {\n try {\n return Integer.parseInt(value);\n } catch (NumberFormatException e) {\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FROM and INTO Load data from another generated Record/POJO implementing the common interface IChatTranslations
public void from(com.lvl6.mobsters.db.jooq.generated.tables.interfaces.IChatTranslations from);
[ "public void load_tables() {\r\n\t\tint i = 0;\r\n\t\tString original = null;\r\n\t\tString translation = null;\r\n\t\t\r\n\t\tif (is_array(this.cache_translations) && is_array(this.table_originals) && is_array(this.table_translations)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t/* get original and translations tab...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public String getColumnText(Object element, int columnIndex) { Node node = (Node)element; switch(columnIndex){ case 0: return node.getNodeID(); case 1: return String.valueOf(node.getNeighbour_NUM()); } return null; }
[ "@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" ] ] } }
BF time: O(n^2) space: O(1)
public static int minSubArrayLen_bf(int target, int[] nums) { if (nums == null || nums.length == 0) { return 0; } int len = nums.length; int ans = Integer.MAX_VALUE; for (int i = 0; i < len; i++) { int sum = 0; for (int j = i; j < len; j++) ...
[ "public static void BFSIterative(int n){\n Queue<Node2> backQueue=new LinkedList<>();\n for(int i=0;i<n;i++){\n backQueue.offer(new Node2(i,null));\n }\n while(backQueue.size()>0){\n Node2 first=backQueue.poll();\n for(int i=0;i<n;i++){\n N...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the first literal argument in the given method call's argument list.
protected static @Nullable Object getFirstLiteralArgumentValue(@NotNull GrMethodCall gmc) { GrLiteral lit = getFirstLiteralArgument(gmc); return lit != null ? lit.getValue() : null; }
[ "java.lang.String getArg1();", "java.lang.String getArg(int index);", "java.lang.String getArgu1();", "Double getFirstArgument();", "private static String getParam()\n\t{\n\t\treturn _arguments[_argumentCounter++];\n\t}", "protected String getArgument(String name) {\n\t\tString arg = null;\n\t\tif(!hasArg...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
does this board equal y?
@Override public boolean equals(Object y) { if (this == y) { return true; } if (y == null) { return false; } if (this.getClass() != y.getClass()) { return false; } if (dimension() != ((Board) y).dimension()) { re...
[ "public boolean equals(Object y){\n if(y == this) return true;\n if(y == null) return false;\n if(y.getClass() != this.getClass()) return false;\n Board that = (Board) y;\n if(that.dimension()!=this.dimension()) return false;\n for(int i=0;i<N;i++){\n for(int j=0...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a number of cache attribute misses.
public long getMisses() { return Long.parseLong(getStatistics(CacheStatistics.MISSES)); }
[ "public long getNCacheMiss() {\n return nCacheMiss;\n }", "public int getImageCacheMisses() {\n/* 136 */ return this.imageCacheMisses;\n/* */ }", "long getQueryCacheMissCount();", "public int getNumMisses ()\n {\n return _misses;\n }", "long getNaturalIdCacheMissCount();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The character set used to encode JAR metadata like file names. Defaults to UTF8. You can change this property but it is not recommended as JVMs expect JAR metadata to be encoded using UTF8
@Override public void setMetadataCharset(String metadataCharset) { super.setMetadataCharset(metadataCharset); }
[ "private static String determineConfigurationFileEncoding(String[] args) {\r\n for (String arg : args) {\r\n if (isPropertyArgument(arg) && \"configFileEncoding\".equals(getArgumentProperty(arg))) {\r\n return getArgumentValue(arg);\r\n }\r\n }\r\n\r\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Selects the object in the listbox and change the tab. Event is forwarded in the corresponding listbox.
public void onDoubleClickedArticleItem(Event event) { // logger.debug(event.toString()); Article anArticle = getSelectedArticle(); if (anArticle != null) { setSelectedArticle(anArticle); setArticle(anArticle); // check first, if the tabs are create...
[ "public void setSelectedItem(Object anObj) { _selectedItem = anObj; fireContentsChanged(this, -1, -1); }", "@Override\r\n\tpublic void stateChanged(ChangeEvent arg0) {\n\t\tint select_index = tabbed_pane.getSelectedIndex();\r\n\t\ttabbed_pane.setSelectedIndex(select_index);\r\n\t}", "public void selectTab();",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void addClase(Clase c) throws IOException { }
[ "@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" ] ] } }
algoritmo que calcula el area del triangulo
public static void main(String[]args) { float b, h, area; b = 12.45f; h = 12.5f; area = (b * h)/2; System.out.println("el area del triangulo es: " + area); }
[ "private double areaTotalPiramide (){\r\n double altura = Math.pow(lado3Piramide(),2) - (lado2Piramide() / 2);\r\n double perimetro = lado1Piramide() + lado2Piramide() + lado3Piramide();\r\n double areaLateral = ((perimetro * altura) / 2);\r\n double areaBase = ( lado2Piramide() * altura...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a division if no exceptions are thrown
public void addDivision(Division division){ boolean exists = false; for(Division d : this.divisions) // Mudar o for para um iterator { if(d.getName().equals(division.getName())) { try { verifyDivisionNa...
[ "private static int divideEYFP() {\n\t\ttry {\r\n\t\t\treturn x/y;\r\n\t\t}\r\n\t\tcatch(ArithmeticException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Inside catch\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public static void division(int a , int b) { \n\t\tSystem.out.println(\"This is a division method\");\n\t\ti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get ObjectStudio image filename.
public String getOstudioImage() { return ostudioImage == null ? "ostudio.img" : ostudioImage; }
[ "public String getImageName(){\n String[] arrayString = this.imageLocalPath.split(\"/\");\n return arrayString[arrayString.length-1];\n }", "public String toString(){\n return this.imageFile.getName();\n }", "public static String createImageFileName() {\n String fileName = null...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Installs a retry manager (if specified) to the given controller.
protected void maybeBuildAndSetRetryManager(AbstractDraweeController controller) { if (!mTapToRetryEnabled) { return; } controller.getRetryManager().setTapToRetryEnabled(mTapToRetryEnabled); maybeBuildAndSetGestureDetector(controller); }
[ "public static void retryStartUp() {\n StartRetryUTask task = new StartRetryUTask.Builder().build();\n LogSendProxy.getInstance().runTask(task);\n }", "protected void incrementRetries(){\n\t\tthis.numRetries++;\n\t}", "public LockRetryController() {\n }", "public void testConnectionControl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO add test methods here.
@Test public void kezdetbenMindenUres() { Bank b = new Bank("111"); int szdb = b.getSzamlaCount(); int trdb = b.getTranzakcioCount(); assertEquals("Szamlak szama nem nulla", 0, szdb); assertEquals("Tranzakciok szama nem nulla", 0, trdb); }
[ "@Override\n }", "@Override\n public void extornar() {\n \n }", "protected void method_5557() {}", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleXFeatureCall" $ANTLR start "entryRuleFeatureCallID" ../org.xtext.guicemodules/srcgen/org/xtext/guicemodules/parser/antlr/internal/InternalGuiceModules.g:4429:1: entryRuleFeatureCallID returns [String current=null] : iv_ruleFeatureCallID= ruleFeatureCallID EOF ;
public final String entryRuleFeatureCallID() throws RecognitionException { String current = null; AntlrDatatypeRuleToken iv_ruleFeatureCallID = null; try { // ../org.xtext.guicemodules/src-gen/org/xtext/guicemodules/parser/antlr/internal/InternalGuiceModules.g:4430:2: (iv_ruleFeat...
[ "public final String entryRuleFeatureCallID() throws RecognitionException {\n String current = null;\n\n AntlrDatatypeRuleToken iv_ruleFeatureCallID = null;\n\n\n try {\n // ../hsh.swa.ocl/src-gen/hsh/swa/ocl/parser/antlr/internal/InternalOCL.g:4442:2: (iv_ruleFeatureCallID= ruleFeat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the test case
public AppTest( String testName ) { super( testName ); }
[ "@Test\n public void testUseCase1MainScenario() throws Exception{\n // Step 1\n System SoftwareHouse = new System();\n\n // Step 2\n String PID01 = \"Project01\";\n\n // Step 3\n assertEquals(1,SoftwareHouse.getProjects().size());\n SoftwareHouse.createProject(PID...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Toast.makeText(MusicActivity.this, "" + track.getTitle(), Toast.LENGTH_SHORT).show();
@Override public void accept(Track track) throws Exception { }
[ "@Override\n public void onClick(View v) {\n TextView viewMain =(TextView) v.findViewById(R.id.textTitle);\n Toast.makeText(context, \"You Clicked \" + viewMain.getText(), Toast.LENGTH_LONG).show();\n }", "@Override\r\n public void onClick(View v) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Internals. Takes care of user interaction through JFileChooser and writes the polygon to a file.
protected void savePolygon() { assert (polygon != null); FileFilter svgFilter = new FileFilter() { @Override public boolean accept(File f) { return true; } @Override public String getDescription() { return ".svg (Scalable Vector Graphics)"; } }; File...
[ "public void save()\n {\n JFileChooser fileChooser = new JFileChooser();\n fileChooser.setDialogTitle(\"Save File\");\n fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\n File fileToSave = null;\n \n int userSele...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
modifies flow of reversals
protected boolean processLocally(AuthTransaction authTran){ return true; }
[ "Flow link(Flow successor);", "private void transition() {\n \t\t\n \t\t// An uncontrollable transition is only possible if the task\n \t\t// at the current location has been performed.\n \t\tif (!executing && executed) {\n \t\t\tfor (IEdge edge : current.outputEdges) {\n \t\t\t\tif (edge.checkGuard(getTime())) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ access modifiers changed from: packageprivate
public void o(b0 b0Var, l.c cVar, l.c cVar2) { h(b0Var); b0Var.F(false); if (this.N.c(b0Var, cVar, cVar2)) { L0(); } }
[ "protected void method_5557() {}", "@Override\n }", "@Override\n public void extornar() {\n \n }", "public void mo28221a() {\n }", "protected void mo4791d() {\n }", "protected void method_2117() {\n }", "@Override\r\n public void publicando() {\n }", "private ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
add statements, read input parameters setup dataFile or dataRandom
private void setupParameters() { Scanner input = new Scanner(System.in); do{ System.out.println("ENTER NUMBER OF CASHIERS BETWEEN 1-10: "); numCashiers= input.nextInt(); }while((numCashiers<1) || (numCashiers>10)); do{ System.out.println("ENTER A SI...
[ "protected void inputData() {\n Scanner sc = new Scanner(System.in);\n \n System.out.println(\"\\nGENERATE RANDOM EXPERIMENTAL DATA\\n\");\n \n System.out.print(\"How many instances do you want? -> \");\n int instances = sc.nextInt();\n\n System.out.print(\"Number of...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { lblID = new javax.swing.JLabel(); lblNome = new javax.swing.JLabel(); lblCNPJ = new javax.swing.JLabel(); lblFone = new javax....
[ "public StForm() {\n initComponents();\n }", "public CineForm() {\n initComponents();\n }", "public javaform() {\n initComponents();\n }", "public EditDemographicForm() {\n initComponents();\n }", "public FightForm() {\n initComponents();\n }", "public For...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by Xiaowu on 2016/9/27.
public interface Mapper_report { public Do_report get(@Param("report_id") int report_id); public List<Do_report> findByItem(@Param("item_id") int item_id); public List<Do_report> findByUserAndItemDemo(@Param("item_id") int item_id); public List<Do_report> findByUserAndClassifyDemo(@Param("classify_i...
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "private static void EX5() {\n\t\t\r\n\t}", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Factory method allowing for varying query preprocessing strategies.
protected ProcessHierarchyPreprocessor createQueryPreprocessor() { return new ProcessHierarchyAndDataPreprocessor(); }
[ "public interface QueryExecutorFactory {\n\n QueryExecutor buildQueryExecutor();\n\n}", "private Query<T> createQuery() {\n if (query == null) {\n query = (Query<T>) queryEngine.buildQuery(queryFactory, parsingResult, namedParameters, startOffset, maxResults, local);\n if (timeout > 0) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ignore CrashReportDialog because we want the last application Activity that was started so that we can explicitly kill it off.
@Override public void onActivityCreated(Activity activity, Bundle savedInstanceState) { lastActivityCreated = activity; }
[ "@Override\n\tpublic void onProgramCrash() {\n\t\tnew EndProgramWindow(false);\n\t}", "private void killMyself() {\n PackageManager pm = getPackageManager();\n ComponentName name = new ComponentName(this, CtsAutoSettingActivity.class);\n pm.setComponentEnabledSetting(name, PackageManager.COMPONENT_ENABLE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assert that a specific XPath exists in some given XML
public void assertXpathExists(String xPathExpression, String inXMLString) throws IOException, SAXException, XpathException { XMLAssert.assertXpathExists(xPathExpression, inXMLString); }
[ "@Test(priority=5)\r\n\t\tvoid TestUsingXPath2() {\r\n\t\t\twhen()\r\n\t\t\t.get(\"http://thomas-bayer.com/sqlrest/INVOICE/\")\r\n\t\t\t.then()\r\n\t\t\t.body(hasXPath(\"/INVOICEList/INVOICE[text()='30']\"))\r\n\t\t\t.log().all();\r\n\t\t}", "XmlString getXPath();", "public WebElement findElementByXPath(String ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public long getItemId(int position) { return 0; }
[ "@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" ] ] } }
Follow an aStar path to the goal
private void getAStarPathToGoal(Toroidal2DPhysics space, Ship ship, Position goalPosition) { // If path is clear of obstructions, don't use A* pathClear = !shouldUseAStar || space.isPathClearOfObstructions(ship.getPosition(), interceptPosition.get(ship.getId()), getObstructions(space, ship), 10); if (!pathClear)...
[ "public void startMoving() {\r\n \tastar.newPath(startLocation, goalLocation);\r\n }", "@Test\n public void testAiMovementWithGoalBase() {\n\n // Setup starting model state.\n final ModelState modelStateStart = new MyModelState(START);\n\n Map<String, MyNodeDataSet> transitionMap = new MyTransitio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shows the running total.
public void showRunningTotal() { System.out.println("Running Total: " + runningTotal + "\n" + "<See last added item below>"); }
[ "private void printTotal()\n {\n // add commas to the number\n String formattedNumber = format(runningTotal);\n\n // print the number with equals sign.\n System.out.printf(\"= %s\\n\", formattedNumber);\n }", "public static double getTotal() {\n return runningTotal;\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
It sets the user object of UserVehicle
public void setUser(User user) { this.user = user; }
[ "public void setUser(Person user) {\n this.user = user;\n }", "public void setUser(Person User){\n this.User = User;\n }", "public void setUser(User user) {\n this.user = user;\n }", "public void setUser(User user) {\n }", "public void setUser(User user) {\n\tthis.user = u...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compute sine and cosine of angles sum.
public static SinCos sum(final SinCos scAlpha, final SinCos scBeta) { return new SinCos(MathArrays.linearCombination(scAlpha.sin, scBeta.cos, scAlpha.cos, scBeta.sin), MathArrays.linearCombination(scAlpha.cos, scBeta.cos, -scAlpha.sin, scBeta.sin)); }
[ "@Test\n \tpublic void testSinCos() {\n \t\tSystem.out.println(\"testSinCos\");\n \n \t\tassertEquals(1.0, GenMath.cosSmall(0), 0);\n \t\tassertEquals(0.0, GenMath.sinSmall(0), 0);\n \t\tassertEquals(0.5, GenMath.sinSmall(300), 0);\n \t\tassertEquals(Math.sqrt(0.5), GenMath.cosSmall(450), 0);\n \t\tassertEquals(Mat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getLastName method, of class UserModel.
@Test public void testGetLastName() { user.setLastName("Madonna"); String result = user.getLastName(); assertEquals("Should return Madonna", "Madonna", result); }
[ "public void testGetLastname() {\r\n System.out.println(\"getLastname\");\r\n \r\n com.abbt.timesheet.entities.User instance = new com.abbt.timesheet.entities.User();\r\n \r\n String expResult = \"\";\r\n String result = instance.getLastname();\r\n assertEquals(expRe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is where we can create the modal for edit delete
public void setListener(ListView lv){ lv.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // Start the CAB using the ActionMode.Callback defined above ...
[ "void showDeleteBtn();", "@FXML\n protected void delete(MouseEvent e){\n this.showDeleteDialog();\n }", "public ModalEdicion(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n \n n.addColumn(\"Id\");\n n.addColumn(\"Edicion\");\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .Cache_service.AreaMapLatestVersionLine area_map_latest_version_line = 1;
public Cache_service.CacheMessage.AreaMapLatestVersionLine getAreaMapLatestVersionLine(int index) { return areaMapLatestVersionLine_.get(index); }
[ "public interface GeoProto$FullRouteInfoOrBuilder extends MessageLiteOrBuilder {\n C7068c1 getRoutes(int i);\n\n int getRoutesCount();\n\n List<C7068c1> getRoutesList();\n}", "public interface WeatherProto$WeatherRegionCacheEntryOrBuilder extends MessageLiteOrBuilder {\n Timestamp getExpiresAt();\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If mousePressed while object is selected, deny the player's move.
@Override public void mousePressed(final MouseEvent e) { if (currentLocation.getLocation().equals("Passenger Corridor") && gameState == 2) { notification.setText("UNSELECT THE ...
[ "@Override\n public boolean handleMouseDownMove(int x, int y, int mouseButton) {\n return false;\n }", "private void mouseMove(MouseEvent e) {\r\n if (!isMouseDown)\r\n return;\r\n }", "@Override\r\n public void mousePressed() {\r\n if (isMouseOver())\r\n isDragging = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This constructor takes in HTMLTags that make up an HTML page.
public HTMLManager(Queue<HTMLTag> page) { if (page.equals(null)) { throw new IllegalArgumentException("The HTMLTags can't be null!"); } this.tagStorage = new LinkedList<HTMLTag>();// initialize the field. int size = page.size(); for (int i = 0; i < size; i++) { ...
[ "public HtmlParser(){\r\n\t}", "public HTMLParser()\n {\n //Init the list\n this.nonClosedTags = new ArrayList<String>();\n _listeners = new ArrayList();\n }", "protected TagsHtml() {}", "public HTMLParser(String resourcelocn) throws ParserException {\n\t\tparser = new Parser(resour...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Render this filter to the given PApplet.
public abstract void applyFilter(PApplet p);
[ "public void drawOverlay(PApplet window, DImage original, DImage filtered);", "public void render(PApplet pa) {\n pa.fill( pa.map(colorCount, 0, 100, 162, 10) , pa.map(colorCount, 0, 100, 180, 37), pa.map(colorCount, 0, 100, 250, 93));\n \n \n //the sky is a rectangle\n pa.noStroke(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Rounds and formats a value to six integer places. If the value does not take up all six places, then zeros are added onto the front.
private String padSixPlaces(double input){ //if < 6 add 0's on to front double x = (input * 100000); int y = (int)Math.round(x); return String.format("%06d", y); }
[ "public static String int6car(int value) {\r\n String s = \" \" + Integer.toString(value);\r\n\r\n return s.substring(s.length() - 6, s.length());\r\n }", "private static String padToTwoDigitsWithZeroes(int value) {\r\n\t\treturn (value < 10) ? \"0\" + value : \"\" + value;\r\n\t}", "privat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table rich_account
public String getOrderByClause() { return orderByClause; }
[ "@Override\r\n\t\t\t\t\tpublic List<Account> extractData(ResultSet rs) throws SQLException, DataAccessException {\n\t\t\t\t\t\tList acc1 = new ArrayList<>();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\twhile(rs.next())\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tAccount a = new Account();\r\n\t\t\t\t\t\t\t\ta.setAccountId(rs.getInt(\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }