query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Deletes an item from the rear of Deque. Return true if the operation is successful.
public boolean deleteLast() { if(isEmpty()){ return false; }else{ tail.next.next.prev = tail; tail.next = tail.next.next; count --; return true; } }
[ "Boolean removeItem(Long idItem);", "public boolean deleteLast() {\n if (isEmpty()) {\n return false;\n }\n rear = (rear - 1 + capacity) % capacity;\n return true;\n }", "protected boolean deleteItem(int id, String key) throws TransactionAbortedException\r\n {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ access modifiers changed from: protected
public void reloadPage() { String url = getUrl(); if (Strings.notEmpty(url)) { ViewUtils.setVisible(true, this.browser); ViewUtils.setVisible(false, this.offlineMessage); loadUrlWithAuthHeaders(url); return; } ViewUtils.setVisible(false, th...
[ "@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}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "pro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form DialogPane_R
public DialogPane_R(String content, String time) { initComponents(); jTextArea1.setText(content); jLabel1.setText(time); }
[ "private void createDialog() throws com.sun.star.uno.Exception {\r\n // create the dialog model and set the properties\r\n Object dialogModel = serviceMan.createInstanceWithContext(\r\n \"com.sun.star.awt.UnoControlDialogModel\", context);\r\n XPropertySet xPSetDialog = (XPropert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Represents a literal value in the sqm, e.g. 1 'some string' some.JavaClass.CONSTANT some.JavaEnum.VALUE etc
public interface LiteralSqmExpression<T> extends ImpliedTypeSqmExpression { T getLiteralValue(); }
[ "private Node literal() {\n Token token =\n anyOf(Token.Kind.STRING,\n Token.Kind.INTEGER, Kind.BIG_INTEGER, Kind.LONG,\n Token.Kind.TYPE_IDENT,\n Token.Kind.JAVA_LITERAL,\n Token.Kind.TRUE, Token.Kind.FALSE);\n if (null == token) {\n List<Token> match =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getNavigationPane method, of class NavigationPane.
@Test public void testGetNavigationPane() { System.out.println("getNavigationPane"); NavigationPane instance = new NavigationPane(); VBox expResult = null; VBox result = instance.getNavigationPane(); assertEquals(expResult, result); // TODO review the generated test c...
[ "@Test()\n\tpublic void basepagenavigation() throws IOException\n\t{\n\t\tLandingpage l=new Landingpage(driver);\n\t\t//compare the text from the browser with actual text\n\t\tAssert.assertTrue(l.getnavigationbar().isDisplayed());\n\t\tlog.info(\"successfully navigation bar is dispalyed\");\n\t//\tAssert.assertFals...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constants Static Attributes Constructors Public Tests fromSpecification()
@Test public void fromSpecification_Null() throws Exception { try { CSVFieldFactory.fromSpecification(null); fail("should have thrown exception"); } catch(IllegalArgumentException e) { String msg = e.getMessage(); assertEquals("null field sp...
[ "private HazardEntityTestConstants() {\n\t\tsuper();\n\t}", "private TestConstants() {\n }", "private DataConstants() {\r\n\t}", "public Constants() {\n\n\t}", "private Constants() {\r\n\t\t// avoid instantiation\r\n\t}", "private MetaSchemaConstants()\n {\n }", "private OnboardeeConstants() {\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Model Element'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseUCMModelElement(UCMModelElement object) { return null; }
[ "public abstract ModelElement getElement();", "URNmodelElement getFromElem();", "public T caseResultElement(ResultElement object) {\n\t\treturn null;\n\t}", "@Override\n public ElementModelContainer.ElementModel getElementModel() {\n return instance.getElementModel();\n }", "protected stati...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
the initialisation of the current scene.
@FXML private void initialize() { Platform.runLater(() -> { refreshPacients(); clearAndSetAll(); }); }
[ "public void initScene() {\n if (mSceneController != null) {\n mSceneController.initScene();\n }\n }", "public void initialize(){\n if(connect!=null) initConnectionScene();\n else if(login!=null) initLoginScene();\n else if(schemaChoice!=null) initSchemaChoiceScene...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value related to the column: aul_cap
public void setPagUrl( java.lang.String pagUrl ) { this.pagUrl = pagUrl; }
[ "public void setCapacite_value(int capacite_value) {\r\n\t\tthis.capacite_value = capacite_value;\r\n\t}", "public void setCapacitat(int capacitat) {\n this.capacitat = capacitat;\n }", "public void setCapitol(String capitol) {\n\t\tthis.capitol = capitol;\n\t}", "private void setCap(int cap){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: a
public int compare(Runnable runnable, Runnable runnable2) { if (!(runnable instanceof a) || !(runnable2 instanceof a)) { return 0; } a aVar = (a) runnable; a aVar2 = (a) runnable2; int ordinal = aVar.b.ordinal() - aVar2.b.ordinal(); ...
[ "public interface C3511a {\n /* renamed from: a */\n void mo29057a(int i);\n }", "interface C4511c {\n /* renamed from: a */\n void mo29775a();\n }", "public interface ans {\n /* renamed from: a */\n void mo1174a();\n}", "public interface C24712af {\n /* renamed from...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prints the class name definition of the current class.
public void doType() throws FileNotFoundException { final JavaClass jc = fClass.getJavaClass(); final int className = getDico().getCoqClassName(jc); final int packageName = getDico().getCoqPackageName(jc); /* * final File typeFile = new File(getBaseDir(), fModuleName + * "_type.v"); */ ...
[ "@Override\n public String toString()\n {\n return Formats.formatModifiers(getJavaClass().getModifiers()) + Formats.formatAnnotations(getAnnotations()) + \" class \" + getName() + Formats.formatActualTypeArguments(getActualTypeArguments());\n }", "@Override\n public String toString() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
after removing root and interchanging the last node with root loop through it's children until you find the correct position for new root
public void percolateDown(int index){ Path current = heapArray.get(index); int small; while(index < currentIndex/2){ int left = 2*index + 1; int right = left + 1; if(right < currentIndex && heapArray.get(left).heuristicDistance > heapArray.get(right).heuristicDistance) small = righ...
[ "E removeRoot();", "public void rebuildTree(){\n \t\tif(root == null) return;\n \t\tVector<TreeNode> nodes = getAllNodes(new Vector<TreeNode>(), root);\n \t\tsetRoot(new TreeNode(nodes.remove(0).getValue().toString(), null));\n \t\tfor(TreeNode n : nodes)\n \t\t\taddBreadthFirst(n.getValue().toString());\n \n \t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
reverts the serialized file back to the copy of the object.
public void Deserializable(){ System.out.println("Please enter serialized file."); String fileName = input.next(); try{ FileInputStream fileIn = new FileInputStream("/tmp/grid.ser"); ObjectInputStream in = new ObjectInputStream(fileIn); ...
[ "public Object restore() {\n\t\tObject obj = null;\n\t\ttry {\n\t\t\tFile file = new File(fileName);\n\t\t\tFileInputStream infile = new FileInputStream(file);\n\n\t\t\tbyte fileContent[] = new byte[(int) file.length()];\n\t\t\tObjectInput objout = new ObjectInputStream(infile);\n\n\t\t\tobjout.read(fileContent);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_filter, container, false); spinnerYear = view.findViewById(R.id.spinner_year); spinnerSortBy = view.findV...
[ "@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" ] ] } }
Lemma: Any 2 states that have the same number of generators and microchips per each floor, and the elevator on the same floor, are EQUIVALENT. Proof: We can just replace the chemical names to create multiple equivalent states. Axiom: Any 2 states are called EQUIVALENT if starting from any of them, it takes the same num...
public String getStateHash() { int[] generatorsCount = new int[FLOORS]; int[] microchipsCount = new int[FLOORS]; for ( int i = 0; i < this.floors.size(); i++ ) { ArrayList<String> floor = this.floors.get( i ); for ( String obj : floor ) { if ( isGenerator( obj ) ) { ...
[ "private static HashMap<String, Integer> createStateIndexHash(Automaton automaton) {\n\n HashMap<String, Integer> stateIndexHash = new HashMap<>();\n int length = automaton.getStates().size();\n for (int i = 0; i < length; i++) {\n stateIndexHash.put(automaton.getStates().get(i).getI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
int key = 17; FileResource fr = new FileResource();
public static void testCaesar() { String message = "Duke Computer Science Department Overview"; //String encrypted = encrypt(message, 15); //System.out.println(encrypted); //String decrypted = encrypt(encrypted, 26-key); //System.out.println(decrypted); //String message =...
[ "long getFileResourceContentLength(String key);", "void setFileResource(Resource file);", "public final String getResourceKey() {\n return sResourceKey;\n }", "public interface File extends ResourceDeclaration {\n\n public String source();\n\n public String template();\n\n public String pat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the xcoordinate position of the starting point of Line.
public void setX1(int x1) { getImpl().setX(getElement(), x1, isAttached()); }
[ "public void setStartX(final int the_start_x) {\n my_start_x = the_start_x;\n }", "public void setStartX(Double startX) {\r\n this.startX = startX;\r\n }", "public void setstartX(double startX) {\n this.startX = startX;\n }", "public void setXCoordinate(double x) {\n\t\tsetX(x - SIZE /...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This constructor initializes a player
public Player(String nickname, String motto, boolean first){ this.nickname=nickname; this.motto=motto; this.first=first; this.score=0; this.status=FIRST_SPAWN; this.weapons=new ArrayList<>(3); this.powerups=new ArrayList<>(3); this.position=null; t...
[ "public void initializePlayer() {\n\t\tplayer = goFactory.createPlayer(new Vector2(0, 0), 0);\n\n\t}", "Player(){}", "public void init(BasicPlayer player) {\n this.player = player;\n }", "public Player()\r\n\t{\r\n\t\tthis(0, 0);\r\n\t}", "public Player() {\r\n this(null, null, 0.0f, 0.0f, 0.0f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets data type schema list.
@ResourceMapping(value = "forkNotebook") public void forkNotebook(ResourceRequest request, ResourceResponse response) { RestfulMessageCallbackEvent restfulMessageCallbackEvent = new RestfulMessageCallbackEvent(){ @Override public void executeMethod(ResourceRequest request, ResourceResponse response, RestfulM...
[ "List<SchemaReference> getSchemaList();", "public java.util.List<com.sun.java.xml.ns.jaxRpc.ri.config.SchemaType> getSchemaList()\n {\n final class SchemaList extends java.util.AbstractList<com.sun.java.xml.ns.jaxRpc.ri.config.SchemaType>\n {\n public com.sun.java.xml.ns.jaxRpc.ri.conf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Legt fest, ob sonstige Zeichen zu schreiben erlaubt sein soll
public void setAllowOthers(boolean others) { this.allowOther = others; }
[ "@Override\r\n\tpublic void eintragLoeschen() {\n\t\t\r\n\t}", "@Override\n public void extornar() {\n \n }", "protected abstract void zeichne ();", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\tpublic void trabalhar() {\n\t\t\r\n\t}", "@Override\r\n\tpu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Registers a Difficulty specified by text file into question.
private static void addDifficulty(String source, QuestionBuilder question) throws IllegalValueException { Pattern difficultyPattern = Pattern.compile("Difficulty::(.*?)" + "Topics::", Pattern.DOTALL); Matcher matcher = difficultyPattern.matche...
[ "public void putQuestion(Question question) throws IOException;", "public static void instructions(){\n \n String str = parseInstructionFile(\"instructions/gameinstructions.txt\"); \n if(str != \"\"){\n JOptionPane.showMessageDialog(null, str, \"Game Instructions\", JOptionPane.P...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field errorMsgVertice is set (has been assigned a value) and false otherwise
public boolean isSetErrorMsgVertice() { return this.errorMsgVertice != null; }
[ "public boolean isSetErr_msg() {\r\n return this.err_msg != null;\r\n }", "public boolean hasErrMsg() {\n return result.hasErrMsg();\n }", "public boolean hasErrorMessage() {\n return result.hasErrorMessage();\n }", "public boolean hasErrorMsg() {\n return ((bitF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the content of this v legal draft document.
public void setContent(String content);
[ "void setDocumentContent(DocumentReference documentReference, String content, String editComment,\n boolean isMinorEdit) throws Exception;", "@Override\r\n\tpublic void setContent() {\n\t\t\r\n\t}", "protected void setContent(Buffer content) {\n this.content = content;\n }", "public void setC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void pauseVideo() { }
[ "@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" ] ] } }
TODO Autogenerated method stub
public void destroy() { }
[ "@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" ] ] } }
Once we have focus, keep it if we're visible
public void focusLost(FocusEvent fe) { if (isVisible()) requestFocus(); }
[ "public void deFocus(){\n this.onFocus = false; \n }", "boolean hasFocus()\t\t\t{ return has_focus; }", "public void onLoseFocus() {\r\n\t}", "@SuppressWarnings(\"unused\")\r\n\tprivate boolean hasFocus(){\r\n\t\tboolean hasFocus=false;\r\n\t\treturn hasFocus;\r\n\t}", "public void lostFocus(){}"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
WilcoxonSignedRankTest wilcoxTest = new WilcoxonSignedRankTest();
public static double WilcoxRankSumTest(double[] set1, double[] set2) { MannWhitneyUTest mannWhitney = new MannWhitneyUTest(); double pval = mannWhitney.mannWhitneyUTest(set1, set2); return pval; }
[ "public WilcoxonSignedRankTest(float[] treatment, float[] control){\r\n\t\t//create SamplePairs throwing out zeros\r\n\t\tcreateSamplePairs(treatment,control, true);\r\n \t\ttest();\r\n\t}", "public WilcoxonTest getWilcoxonTest() {\n// this.calculateIfRequired();\n \n return this.wilcoxonTest;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets axis details for dimension within coordinate system. Each dimension in the coordinate system has a corresponding axis.
public AxisInfo getAxis( final int dimension ) { return axis[dimension]; }
[ "public String[] getDimensions() {\r\n \t\t\r\n \t\tif (dimensions == null){\r\n \t\t\tint i = 0;\r\n \t\t\tdimensions = new String[getPageTuples().length + getRowAxisDims().length + getColAxisDims().length];\r\n \t\t\t\r\n \t\t\tfor(PageTuple tuple : getPageTuples()){\r\n \t\t\t\tdimensions[i++] = tuple.getAxis();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return new ModelAndView("index"); Log4JLogger.
@RequestMapping(value="getdata",method={RequestMethod.POST, RequestMethod.GET}) public String get_conn(DatabaseInfo databaseInfo, HttpServletRequest request, HttpServletResponse response) throws IOException,java.sql.SQLException{ System.out.println("收到get_conn请求"); System.out.println(databaseInfo.to...
[ "@Override\r\n\tpublic ModelAndView index(HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\r\n\t}", "@RequestMapping(\"/index\")\n public ModelAndView index()\n {\n return new ModelAndView(\"index\");\n }", "@RequestMapping(\"huellaCarbono.htm\")\r\n public ModelA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update the status of account.
public boolean updateAccountStatusHelper(int accountId ,boolean active){ return updateAccountStatus(accountId, active); }
[ "public void updateUserAccountStatus(int accountId, String status) {\r\n\t\ttry {\r\n\t\t\tconnection = DAOUtility.getConnection();\r\n\t\t\tfinal String sql = \"UPDATE accounts SET account_status = ? WHERE account_id=?;\";\r\n\t\t\tstatement = connection.prepareStatement(sql);\r\n\t\t\tstatement.setString(1, statu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the checked exceptions that this function might throw
public List<JavaType> getExceptions() { return exceptions; }
[ "Throwable getLastError();", "Iterator<Thro> getAvailableThrows();", "public Throwable getException( ) {\n\t\treturn exception;\n\t}", "public Throwable[] getThrowables() {\n/* 157 */ return this.delegate.getThrowables();\n/* */ }", "public abstract Exception mo13719e();", "public final Exceptio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If the response is JSONObject instead of expected JSONArray
@Override public void onSuccess(int statusCode, Header[] headers, JSONObject response) { MessageResponse messsageResponse = new MessageResponse(response); mCallBack.onSuccess(messsageResponse); if(showProgressDialog) pro...
[ "@Test\n\tpublic void testMatch() {\n\t\tJSONArray jsonArray = new JSONArray();\n\t\tJSONObject jsonObject = new JSONObject();\n\t\tSystem.out.println(ClientUtil.isValidJson(jsonArray.toString(),1));\n\t}", "private static boolean m2886a(Object obj) {\n boolean z = false;\n if (!(obj instanceof JSON...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new check for this client
private void addNewClient() { ClientCheck newClientCheck = ClientCheck.newBuilder() .setPaid(false) .setPriceToPay(0) .setTimeToServe(0) .build(); table_info = TableInfo.newBuilder() .mergeFrom(table_info) .addClientChecks(newClientCheck) .build(); // Move to it currentClientId = tab...
[ "public Check() {\n super(\"check\", \"future\");\n }", "public Checkstatus() {\n }", "public Check(String name) {\n\t\tthis.check = name + \"'s Check:\\n\";\n\t\tthis.food = new ArrayList<Food>();\n\t\tthis.prices = new ArrayList<Integer>();\n\t\tthis.total = 0;\n\t}", "public void newcheck () {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This will return the minimum intensity of the RED image img.
public static int red_getMin(MyImage img){ int intensityFreq[] = new int[256]; int minFreq; int minIntensity; //image dimension int width = img.getImageWidth(); int height = img.getImageHeight(); //get intensity for(int y = 0; y < height;...
[ "private void findLightIntensityMin() {\r\n\r\n int diff = lightIntensityCurrMax - lightIntensityMin;\r\n int toAdd = new Random().nextInt(diff);\r\n if (toAdd % 2 == 1) {\r\n toAdd--;\r\n }\r\n lightIntensityCurrMin = lightIntensityMin + toAdd;\r\n }", "public int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__DiEdge__Group_2__0__Impl" $ANTLR start "rule__DiEdge__Group_2__1" InternalStubbrLang.g:17969:1: rule__DiEdge__Group_2__1 : rule__DiEdge__Group_2__1__Impl ;
public final void rule__DiEdge__Group_2__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalStubbrLang.g:17973:1: ( rule__DiEdge__Group_2__1__Impl ) // InternalStubbrLang.g:17974:2: rule__DiEdge__Group_2__1__Impl { ...
[ "public final void rule__Namespace__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalHdbDD.g:464:1: ( rule__Namespace__Group__2__Impl )\n // InternalHdbDD.g:465:2: rule__Namespace__Group__2__Impl\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
to get the weekday representation in Integer from string
private int dayNumOfWeek(String dayOfweek) { if (dayOfweek.equalsIgnoreCase("SUN") || dayOfweek.equalsIgnoreCase("星期日")) { return 0; } else if (dayOfweek.equalsIgnoreCase("MON") || dayOfweek.equalsIgnoreCase("星期一")) { return 1; } else if (dayOfweek.equalsIgnoreCase("TUE")...
[ "private int dayStringToInt (String day) {\n int dayInt = 0; \n switch (day) {\n case \"Monday\":\n dayInt = 1;\n break;\n case \"Tuesday\":\n dayInt = 2;\n break;\n case \"Wednesday\":\n dayInt = 3;\n break;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the full file path to the image stored in the part with specified key, or throws an exception if no image was specified for that part.
public Image getImageForKey (String key) throws NoImageFoundException { Map<String, Object> partCopy = getPartCopy(key); if (!partCopy.keySet().contains(InstanceManager.IMAGE_KEY)) throw new NoImageFoundException("No image is specified for part"); String absoluteImageFilePath = curre...
[ "private ImageIcon load_image_from_disk(String key) {\n String file = \"images/\"+key+\".png\";\n ImageIcon icon = new ImageIcon(file);\n imagebase.put(key, icon);\n return icon;\n }", "abstract String getPath(String key);", "public org.eclipse.swt.graphics.Image getImage(String k...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor used to build a switchable scene with a css file.
public SwitchabScene(final SceneController controller, URL fxml, String cssSheet) { FXMLLoader loader = new FXMLLoader(fxml); try { loader.setControllerFactory(new Callback<Class<?>, Object>() { @Override public Object call(Class<?> aclass) { ...
[ "public FXMainScreen(String cssPath, String title) {\n super(cssPath, title);\n super.setSize(900, 450);\n \n /* Creates the Scene itself */\n this.createScene();\n }", "private void loadBoardAndSetScene() {\n log.info(\"Loading Board.fxml onto primaryStage\");...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor that takes a list of Tokens and an original text block String
public TextBlock(final List<Token> t, final String text) { this.tokens = t; this.theText = text; this.theMarkUp = ""; }
[ "private void replicatesStrTokenizer( String codeBlock ) {\n SyntaxPDautoma rstok = new SyntaxPDautoma();\n tokenStream = rstok.lex(codeBlock);\n }", "public Parser(List<Token> tokens) {\n this.tokens = tokens;\n position = 0;\n }", "public TokenBuffer(final List<Token> ts) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Precondition: This method is the same as the above metod, but only takes n binary numbers.
public static char[][] arrayOfBinaryArrays(char[] num1, char[] num2){ //This takes in arrays of bits (binary numbers) and makes an array of them char[][] binaryA = {num1,num2}; return binaryA; }
[ "private static long[] binarySimplify(long n)\r\n {\r\n assert(n >= 0);\r\n long x, y;\r\n long v = n ^ (n-1);\r\n if (v != 0) {\r\n x = (v >> 1) + 1;\r\n y = n / x;\r\n } else {\r\n x = 1 << 63;\r\n y = 1;\r\n }\r\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the listener for the command MediaRecordStatePictureStateChangedV2 in feature ARDrone3 Listeners are static to the class, and are not to be set on every object
public static void setARDrone3MediaRecordStatePictureStateChangedV2Listener (ARCommandARDrone3MediaRecordStatePictureStateChangedV2Listener _ARCommandARDrone3MediaRecordStatePictureStateChangedV2Listener_PARAM) { _ARCommandARDrone3MediaRecordStatePictureStateChangedV2Listener = _ARCommandARDrone3MediaRecordStat...
[ "private final void m104002b() {\n getPlaybackStateListener().mo96474y().observe(this, new C20747a(this));\n }", "public CameraViewListener() {\n resetBrightnessAndContrastModifiers();\n }", "public interface IRecordingListener {\n /** Callback invoked when the recording starts or stops. ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copy bytes from a large (over 2GB) InputStream to an OutputStream. This method buffers the input internally, so there is no need to use a BufferedInputStream.
public static long copyLarge(InputStream input, OutputStream output) throws IOException { byte[] buffer = new byte[1024 * 4]; long count = 0; int n = 0; while (-1 != (n = input.read(buffer))) { output.write(buffer, 0, n); count += n; } return count...
[ "void copy(InputStream in, OutputStream out, int bufSize);", "public static void copyStream(InputStream in, OutputStream out)\n\t\tthrows IOException\n\t{\n\t\tbyte buffer[] = new byte[4096];\n\t\tint len;\n\t\tint total = 0;\n\t\twhile((len = in.read(buffer)) >= 0)\n\t\t{\n\t\t\tout.write(buffer, 0, len);\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end synpred45_InternalFlow $ANTLR start synpred53_InternalFlow
public final void synpred53_InternalFlow_fragment() throws RecognitionException { // ../de.grammarcraft.flow.ui/src-gen/de/grammarcraft/flow/ui/contentassist/antlr/internal/InternalFlow.g:3216:6: ( ( ( ruleXForLoopExpression ) ) ) // ../de.grammarcraft.flow.ui/src-gen/de/grammarcraft/flow/ui/contenta...
[ "public final boolean synpred5_InternalFlow() {\r\n state.backtracking++;\r\n int start = input.mark();\r\n try {\r\n synpred5_InternalFlow_fragment(); // can never throw exception\r\n } catch (RecognitionException re) {\r\n System.err.println(\"impossible: \"+re);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accessor used to access the mail configuration's portSMTP field.
public int getPortSMTP(){return portSMTP;}
[ "public static String getPort() {\n return (String) props.get(\"mail.smtp.port\");\n }", "public int getMailTransportPort() {\n return new Integer(\n m_Properties.getProperty(\"jwma.mailtransport.port\")\n ).intValue();\n }", "public int[] getSmtpPort() {\n String smtpPort = this.get(SM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is used to clean up the application, by closing connections and things like that.
private void close() { gameSoundPlayer.pauseSound(ENGINE); // Pause the looping engine sound. world.animateFires(false); if (!LOCAL) { try { if (HOST) { // Broadcast a GAME_OVER message: ...
[ "public static void closeApp() {\n\t\tloader.cleanUp();\n\t\tmasterRenderer.cleanUp();\n\t\tguiRenderer.cleanUp();\n\t\ttextureTopLeftBuffer.cleanUp();\n\t\ttextureTopRightBuffer.cleanUp();\n\t\ttextureBottomLeftBuffer.cleanUp();\n\t\ttextureBottomRightBuffer.cleanUp();\n\t\tDisplay.destroy();\n\t}", "private voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
connection.kill(null); // a connection failure occured.
public void onFailure(Throwable value) { System.out.println("MQTTClient.initialize -> Unable to connect."); connected = false; connect(); }
[ "@Override\n\tpublic void terminateConnection() {\n\n\t}", "void kill() throws RemoteException, MalformedURLException, NotBoundException;", "public void kill() {\n logger.log(1, logKey, \"called the kill method\\n\");\n alive = false;\n logger.log(1, logKey, \"set the alive flag to false\\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The AnimatorSets used to animate each of the preview Color_'s in palette
public ImagePatternRecyclerAdapter(Bike_Wheel_Animation colorList) { // Initialize all of the Lists using a list of Color_'s, which corresponds to the slice setColorList(colorList); }
[ "@Override\n public void onGenerated(Palette palette) {\n Palette.Swatch vibrant = palette.getVibrantSwatch();\n if (vibrant != null) {\n int colorFrom = ((ColorDrawable) container.getBackground()).getColor();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method allFalse checks the boolean array and gives us the answer that all elements are false or not.
private static boolean allFalse(Boolean[] states) { for (boolean state : states) { if (state) return false; } return true; }
[ "public boolean all() { \n return this._M_are_all(_Nb); \n }", "@Test\n\t//Contains All: Return false\n\tpublic void testContainsAllFalse(){\n\t\tList<Integer> test = new ArrayList<Integer>();\n\t\ttest.add(3);\n\t\ttest.add(6);\n\t\ttest.add(5);\n\t\ttest.add(1);\n\t\ttest.add(4);\n\t\ttestArrList.add(4);\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method initializes buttonsComposite
private void createButtonsComposite() { RowLayout rowLayout = new RowLayout(); rowLayout.type = org.eclipse.swt.SWT.VERTICAL; rowLayout.justify = false; rowLayout.spacing = 3; rowLayout.fill = true; GridData gridData6 = new GridData(); gridData6.horizontalAlignment = GridData.FILL; gridData6.ver...
[ "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\r\n\t}", "private void createComposite() {\n\t\tGridData gridData = new GridData();\n\t\tgridData.verticalAlignment = GridData.CENTER;\n\t\tgridData.horizontalSpan = 2;\n\t\tgridData.horizontalAlignment = GridData.END;\n\n\t\tcomposi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
click to select checkbox: Surgimap BAA
public void selectSurgimapBAAcheckbox(){ if (!surgimapBusinessAgregateAgreementCheckbox.isSelected()) surgimapBusinessAgregateAgreementCheckbox.click(); }
[ "public void selectCheckBox()\n\t{\n\t\tWebElement checkBox = driver.findElement(progCheckBox);\n\t\tcheckBox.click();\n\t}", "public void selectingcheckbox()\r\n\t\t\t{\r\n\t\t\t\tthis.createdcategory.click();\r\n\t\t\t}", "private static void getCheckBox(ChromeDriver driver) {\n\t\tdriver...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets all reviews of user with specified id
List<UserReview> readReviewsByRecId(BigInteger id);
[ "@GetMapping(\"/review/user/{userId}\")\n public ResponseEntity<List<Review>> findReviewsByUserID(@PathVariable long userId) {\n List<Review> reviews = service.getReviewsByUserId(userId);\n if (reviews == null || reviews.isEmpty()) {\n log.error(\"No reviews are available with user id \"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the recipes that are available for the search model.
private void createFood() { RecipeDA recDA = new RecipeDA(); ArrayList<Recipe> recipes = recDA.getAllRecipes(); for (Recipe recipe : recipes) { searchMealModel.addRecipe(recipe); } }
[ "public void setRecipes(List<Recipe> recipes) {\n this.recipes = recipes;\n }", "public void setRecipes(List<Recipe> recipes) {\n\t\tthis.recipes = recipes;\n\t}", "public void setRecipes(List<Recipe> recipes) {\n this.recipes = recipes;\n //notify adapter of change\n notifyDataSe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sirve para obtener el nombre del usuario logueado
public String devolverNombreUsuario() { Usuario usuario = (Usuario) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("usuario"); return usuario.getApellidoUsuario() + ", " + usuario.getNombreUsuario(); }
[ "public int getLoggedInUserName(Context context)\n {\n \tDatabaseHandler db = new DatabaseHandler(context);\n \treturn Integer.valueOf(db.getUserDetails().get(\"name\"));\n }", "public String obtenerNombreUsuario() {\r\n\r\n String nombre = \"\";\r\n String consulta = \"SELECT nombre FRO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To read each line of a file properly parse the line first and then stores data as an array list use scanner class and array list class
public void read(String Location) throws FileNotFoundException{ File R_Student = new File(Location); Scanner input = new Scanner(R_Student); while (input.hasNextLine()) { String line = input.nextLine(); if (! data.contains(parse(line))) { data.add(parse(line)); } } input.close(); }
[ "private void readFileAndFillArrays(){\r\n // This will reference one line at a time\r\n String line = null;\r\n\r\n try {\r\n // FileReader reads text files in the default encoding.\r\n FileReader fileReader = new FileReader(fileName);\r\n\r\n // Always wrap Fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the count of vertical tiles for tiled rasters.
public void setTilesDown (final @Nonnegative int tilesDown) { this.tilesDown = tilesDown; }
[ "public void setTileSize(int value) {\n RecastJNI.rcConfig_tileSize_set(swigCPtr, this, value);\n }", "public static void setTileHeight(int height){\n\t\ttileHeight = height;\n\t}", "public void setTileValue(int v) { this.tileValue = v;}", "@Override\n public void setPossibleTilesInAr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for property Dist.
public String getDist() { return dist; }
[ "public float[] getdist() {\n\t\t\n\t\treturn this.dist;\n\t}", "public void setDist(Number dist) { this.dist = dist; }", "public AbstractRealDistribution getDistribution() {\n\t\treturn dist;\n\t}", "public GeometricallySeparable getSeparabilityMetric() {\n\t\treturn dist_metric;\n\t}", "public double getD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodos SET de la clase producto
public void setCamisa_id(int id_cam){ this.id_cam=id_cam; }
[ "public void setProducto(Producto producto)\r\n/* 114: */ {\r\n/* 115:119 */ this.producto = producto;\r\n/* 116: */ }", "public void setProducto(Producto producto)\r\n/* 227: */ {\r\n/* 228:303 */ this.producto = producto;\r\n/* 229: */ }", "public void setNombre (String nuevoNombre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1__Impl" $ANTLR start "rule__XSetLiteral__Group__0" InternalCreate.g:12571:1: rule__XSetLiteral__Group__0 : rule__XSetLiteral__Group__0__Impl rule__XSetLiteral__Group__1 ;
public final void rule__XSetLiteral__Group__0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalCreate.g:12575:1: ( rule__XSetLiteral__Group__0__Impl rule__XSetLiteral__Group__1 ) // InternalCreate.g:12576:2: rule__XSetLiteral__Group__...
[ "public final void rule__XSetLiteral__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../jpaqldsl.ui/src-gen/jpaqldsl/ui/contentassist/antlr/internal/InternalJPAQLDsl.g:18246:1: ( rule__XSetLiteral__Group__0__Impl rule__XSetLitera...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find the _Fields constant that matches name, or null if its not found.
public static _Fields findByName(String name) { return byName.get(name); }
[ "public static _Fields findByName(String name)\r\n {\r\n return byName.get(name);\r\n }", "public Field getField(String name) {\n for(Field field : fieldList) {\n if(field.getName().equals(name)) {\n return field;\n }\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
primero creamos una session de hibernate
public Usuario buscaUsuarioPorId(Integer usuarioId) { Session sesion=sessionFactory.openSession(); //una vez que tienen la sesion de hibernate //deben de abrir una transaccion sesion.beginTransaction(); //inicia la transaccion //busca por id en la tabla mapeada por la clase Usuario //el renglon c...
[ "private void conectar(){\n session = HibernateUtil.getSessionFactory().openSession();\n transaction = session.beginTransaction();\n }", "public EmpresasDAOImpl(){\n\t\tthis.session = HibernateUtil.getSessionFactory().openSession();\n\t}", "private void renovarSessaoHibernate() {\n\t\tSession c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
change device name, this is a nick name for device
public void doChangeDeviceName(String device_id, String new_name, final WSCallback<BaseResponse> callback) { Logger.debug("[doChangeDeviceName]"); wsService.changeDeviceName(device_id, new_name) .compose(WSTransformer.<BaseResponse>get()) .subscribe(callback); }
[ "public void setDeviceName(String name) {\n if (name == null || name.trim().length() == 0) {\n Log.d(TAG, \"[setDeviceName] name is empty!!\");\n return;\n }\n mAttribute.mDeviceName = name;\n notfiyChange(DEVICE_NAME_ATTRIBUTE_FLAG);\n }", "public void setDevi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the Task Monitor.
public void setTaskMonitor(TaskMonitor taskMonitor) throws IllegalThreadStateException { this.taskMonitor = taskMonitor; }
[ "public void setMonitor(MonitoredUser monitor) {\r\n\t\tthis.monitor = monitor;\r\n\t}", "public void setMonitor(DirectoryMonitor monitor) {\n this.monitor = monitor;\n }", "public void setTask(Runnable task) {\n this.mTask = task;\n }", "public void setTaskThread(TaskThread tt){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a random number generator. This implementation uses the system random device if available to generate good random numbers. Otherwise it falls back to some lowentropy garbage.
private static SecureRandomAndPad createSecureRandom() { byte[] seed; File devRandom = new File("/dev/urandom"); if (devRandom.exists()) { RandomSeed rs = new RandomSeed("/dev/urandom", "/dev/urandom"); seed = rs.getBytesBlocking(20); } else { seed = R...
[ "public RandomNumberGenerator()\r\n {\r\n this((int)System.currentTimeMillis());\r\n }", "public Random getRandomNumberGenerator() {\n /* Could be synchronized, but since side effects are trivial\n * (ie. possibility of generating more than one SecureRandom,\n * of which all bu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
LayoutInflater inflater = LayoutInflater.from(context); View view1 = inflater.inflate(R.layout.container_banner_facebook, null);;
public void initFacebookBanner(String keyFacebook, final Context context) { nativeBannerAd = new NativeBannerAd(context, keyFacebook); AdSettings.addTestDevice("cc433d54-f202-4ab0-a1a1-1bc6d5f1fa7c"); AdSettings.addTestDevice("e46ccfd7-8274-402f-b315-3f94d7e17f91"); AdSettings.addTestDe...
[ "@Override\n public View createView(Context context) {\n view = LayoutInflater.from(context).inflate(R.layout.banner_item, null, false);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method close the running app from the devices attached
public void bgRunningApp() throws Exception { ExtentCucumberAdapter.addTestStepLog("Run application in background"); driver.runAppInBackground(Duration.ofSeconds(10)); }
[ "public void closeApp() {\n Platform.exit();\n }", "public void closeApp() {\n\t}", "public static void closeApp() {\n CacheUtil.saveInteger(\"app_help_view\", 100);\n ThreadPool.basicPool.shutdown();\n ThreadPool.fixedPool.shutdown();\n while (BasicApplication.activityStac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Metodo que le pone queso al platillo
public void tenerQueso();
[ "private void escribirEnPantalla() {\n }", "private void przesunSamochody(Pas pas) {\n int dlugoscPasa = pas.getDlugosc();\n for (int komorka = dlugoscPasa - 1; komorka >= 0; komorka--) {\n// Pojazd pojazd = pas.getZawartosc(i);\n Pojazd pojazd = pas.getZawartoscFast(komorka...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the treeview control associated with the given index.
public TreeView getTreeView(final int index) throws AutomationException { return new TreeView( new ElementBuilder( this.getElementByControlType(index, ControlType.Tree))); }
[ "public Widget getWidget(int index) {\n return currentVerticalPanel.getWidget(index);\n }", "public Node<String> getNode(int index) {\r\n\t\treturn bases.getNode(index);\r\n\t}", "public Component getPaneAt(int index) {\r\n if (index < 0 || index << 1 >= getComponentCount())\r\n return n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override protected void doLogin() { notifyLoginFailed(); }
[ "@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" ] ] } }
Build the style of text content.
public void buildTextStyle( ITextContent text, StringBuffer styleBuffer, int display ) { IStyle style = text.getStyle( ); // check 'can-shrink' property handleTextShrink( display, style, text.getHeight( ), text.getWidth( ), styleBuffer ); setDisplayProperty( display, HTMLE...
[ "public abstract void buildTextStyle( ITextContent text,\n \t\t\tStringBuffer styleBuffer, int display );", "TextStyleType createTextStyleType();", "public abstract String buildText();", "private void setupTextStyles()\n\t{\n\t\tnormalTextStyle = new SimpleAttributeSet();\n\t\tStyleConstants.setFontFamily(nor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the set of variants registered for the specified content item and for the site being published to, by making an internal request to query the PSX_VARIANT_SITE table.
private Set lookupVariantsForItem( String contentId, String revision, PSComponentSummary folder, String deliveryLocationContext, String contentTypeId) { if (contentId == null || contentId.trim().length() == 0) throw new IllegalArgumentException("contentId may not be null"...
[ "public VariantPool getVariants()\r\n\t{\r\n\t\treturn variants;\r\n\t}", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedIterable<VpnSite> list() {\n return this.serviceClient.list();\n }", "public Collection<Inventory> getSiteInventoryByItemId(Long itemId) {\n\t\treturn null;\n\t}"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Methode de suppression d'un instrument du portefeuille
public void suppr_instru(String cle) { if(recherche_instru(cle).size()==0) System.out.println("Erreur, cet instrument est inexistant"); else { mapInstrument.get(cle).collection.clear(); mapInstrument.remove(cle); } }
[ "@Test\n public void suppression() {\n assertEquals(gestion.supprimerSportif(\"quarta\"), 1);\n // supprier un sportif qui existe pas\n assertEquals(gestion.supprimerSportif(\"KimYahin\"), 0);\n // supprimer un sportif qui à deja été supprimer\n assertEquals(gestion.supprimerSportif(\"quarta\"), 0);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
0. UNKNOWN 1. WIFI 2. 2G 3. 3G 4. 4G
public static int getNetworkType(Context context) { int netType = 0; ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); if (networkInfo != null && ne...
[ "public String getWIFI();", "public static String getNetworkType(Activity activity) {\n try {\n String unknown = activity.getResources().getString(R.string.txtUnknown);\n int networkType = ((TelephonyManager) activity.getSystemService(Context.TELEPHONY_SERVICE)).getNetworkType();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A constructor that initializes the class all the attributes
StackList() { // name used to test top = null; NumberStacks = 0; }
[ "private Attributes() {}", "public MyConstructor() {\t//Create a Class Constructor same as Class name\r\n\t\tx = 5;\t\t\t\t\t//Set the initial value for the Class Attribute x\r\n\t\t\t\r\n\t}", "private Child()\n {\n // Give a default name (to be filled out later)\n firstName = \"FirstName\";\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use DownloadableNibConstants.newBuilder() to construct.
private DownloadableNibConstants(Builder builder) { super(builder); }
[ "private DownloadDetail(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "private NetworkInterfaceSpec(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private HttpDownl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles the HTTP POST method.
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //processRequest(request, response); try { request.setCharacterEncoding("UTF-8"); if(request.getParameter("btnSubmit").toLowerCas...
[ "@Override\n\tpublic void handlePost(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\n\n\n }", "@Override\n public void post(String path) {\n \n }", "@Override\r\n\tpub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GENERATE FLEXOR DIGITORUM PROFUNDUS MUSCLES This generates the Flexor Digitorum Profundus Muscles
public int generateFlexorDigitorumProfundusMuscle(String startID, String componentType, String componentName, String componentID, String parentID, double[][] currentPoints) throws DataException, DataSecurityException { System.out.println("Generate FlexorDigitorumProfundusMuscle"); int bodyID = 1; i...
[ "protected void generatePermutations() {\n // Use Heap's algorithm to generate all permutations and store them in the field result;\n }", "public void generateObjectiveCollect() {\n\t\t//liste objectifs et liste infos pour le tri\n\t\tArrayList<String> obj = new ArrayList<String>();\n\t\tArrayList<Coupl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the hw1_1000000LOC19() constructor test.
@Test public void testHw1_1000000LOC19_1() throws Exception { hw1_1000000LOC19 result = new hw1_1000000LOC19(); assertNotNull(result); // add additional test code here }
[ "@Test\n\tpublic void testHw1_1000000LOC29_1()\n\t\tthrows Exception {\n\t\thw1_1000000LOC29 result = new hw1_1000000LOC29();\n\t\tassertNotNull(result);\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void testHw1_1000000LOC5_1()\n\t\tthrows Exception {\n\t\thw1_1000000LOC5 result = new hw1_1000000...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Notify a add link event
public void addLinkEvent(Link link) { }
[ "public void addLink(String link){\n guiLink=link;\r\n Platform.runLater(rl);\r\n }", "void addLinkListener(OspfLinkListener listener);", "public void addLink( IMetaverseLink link ) {\n links.add( link );\n }", "public void hyperlinkUpdate(HyperlinkEvent event){\n\t\t\t\t\tif(event.getEve...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Renders the limit mapping for the given parent expression to the given query builder.
public <T extends LimitBuilder<?> & OrderByBuilder<?>> void renderLimit(String parent, ParameterHolder<?> parameterHolder, Map<String, Object> optionalParameters, T builder);
[ "public default ByProjectKeyProductProjectionsSearchPost addLimit(final Function<StringBuilder, StringBuilder> op) {\n return addFormParam(\"limit\", op.apply(new StringBuilder()));\n }", "@Override\n public void appendLimit(StringBuilder sqlSb, boolean isSubquery, String limit, String offset) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an adapter for the target.
@Override public Adapter createAdapter(Notifier target) { return modelSwitch.doSwitch((EObject)target); }
[ "@Override\n public Adapter createAdapter(final Notifier target) {\n return modelSwitch.doSwitch((EObject) target);\n }", "protected abstract T getAdapter();", "public JsonService addAdapter(String name, Class target, Object mixin) throws Exception;", "public IModelToProviderAdapter(IModel adapte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public void dispose() { }
[ "@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" ] ] } }
Lazily initializes the empty array
public static HubCreateHubRequest[] emptyArray() { if (_emptyArray == null) { synchronized ( com.google.protobuf.nano.InternalNano.LAZY_INIT_LOCK) { if (_emptyArray == null) { _emptyArray = new HubCreateHubRequest[0]; } } } return _emptyArray...
[ "private void initArray() {\n if (null == homeBankListSamples) {\n homeBankListSamples = new ArrayList<>();\n }\n if (null == homeBankListSamples1) {\n homeBankListSamples1 = new ArrayList<>();\n }\n if (null == homeBankListSamples2) {\n homeBankLi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
javac d . classpath /apache/tomcat/common/lib/servletapi.jar ccServlet.java UriReport.java ccServletListener.java
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); double res; out.println("<html>"); out.println("<head><title>cc ...
[ "public static void main(String[] args) {\n\n post(\"/compile\", (reqJson, res) -> {\n try {\n CompileJobRequest request = gson.fromJson(reqJson.body(), CompileJobRequest.class);\n CompileJobResponse response = new CompileJobResponse();\n String suffix ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when no database exists in disk and the helper class needs to create a new one.
public void onCreate(SQLiteDatabase db) { db.execSQL("CREATE TABLE " + TABLE1 + "(" + C_ID + " INTEGER PRIMARY KEY AUTOINCREMENT," + Name + " text unique not null)"); db.execSQL("CREATE TABLE " + TABLE5 + "(" + C_ID + " INTEGER PRIMARY KEY AUTOINCREMENT," + Name + " tex...
[ "public void createNewDatabase() {\r\n try (Connection conn = DriverManager.getConnection(driverURL)) {\r\n if (conn != null) {\r\n DatabaseMetaData meta = conn.getMetaData();\r\n// System.out.println(\"Database database.db created.\");\r\n }\r\n } c...
{ "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() { jPanel1 = new javax.swing.JPanel(); jLabel15 = new javax.swing.JLabel(); cmbTipoMovil = new javax.swing.JComboBox(); cbxMovil ...
[ "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" ] ] } }
Returns the base bean model.
public POSBaseBeanModel getPOSBaseBeanModel() { return beanModel; }
[ "ModelObject getBase();", "public DeploymentModel baseModel() {\n return this.baseModel;\n }", "public Object getModel()\n {\n return cBean;\n }", "public Model getModelBase() {\n return new Model(opensimMocoJNI.MocoProblemRep_getModelBase(swigCPtr, this), false);\n }", "@Override\n\tpubl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
io.sockets().emit("response", msg); socket.set("room", msg, null);
public void handle(JsonObject msg) { logger.info("==========join : " + msg.getString("room")); socket.join(msg.getString("room")); //logger.info("==========join : " + msg.getString("grpReqNo")); //socket.join(msg.getString("grpReqNo")); }
[ "private void broadcast(Socket sender, String msg){\n\n }", "private void send(ServerResponse message) throws IOException {\n output.writeObject(message);\n output.flush();\n }", "private void sendMessage(String message) {\n edtMessage.setText(\"\");\n mSocket.emit(\"client_sen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
disable going back to the MainActivity
@Override public void onBackPressed() { if(currentStep==0) { Intent intent = new Intent(this, FirstActivity.class); intent.putExtra("id", member_id); startActivity(intent); finish(); }else if(currentStep==1){ currentStep--; sv....
[ "@Override\n public void onBackPressed() {\n // NO GO BACK IS ALLOWED!\n }", "@Override\n public void onBackPressed() {\n Intent mainMenu = new Intent(this, MainActivity.class);\n onPause();\n mainMenu.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);\n mainMenu.putExtr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to get books on hold list by user
@Override public List<BookOnHoldTO> getBooksOnHoldList(long userId) { return bookDao.getBooksOnHoldList(userId); }
[ "List<Book> listBooksInHandsOf(LibraryUser libraryUser);", "public Response<ItemAdapter> getBorrowedItems(LoggedInUser user);", "private void fetchBookByUserNameLoan() {\n List<Book> books = mAppDatabase.bookModel().findBooksBorrowedByNameSync(\"Mike\");\n showListInUI(books, mTextMessage);\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a copy of this temple
public Temple copy() { Temple t = new Temple(position.x, position.y, type, cityId); t.turnsToScore = this.turnsToScore; t.level = this.level; return t; }
[ "public TemplatesTree cloneMe() {\n\t\tTemplatesTree result = new TemplatesTree();\n\t\t\n\t\tresult.setName(this.getName());\n\t\tresult.setDescription(this.getDescription());\n\t\tfor (TemplatesBranch tb : this.getBranches()) {\n\t\t\tresult.addBranch(tb.cloneMe());\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the given value is valid.
public boolean isValid(String in) { return true; }
[ "public boolean isValidValue(DataValue valueToCheck);", "public abstract boolean validate(Object value);", "public boolean valid(long value) {\n return validator.valid(new Long(value));\n }", "boolean isValid(V value);", "private static boolean isFieldValid(String field, String value) {\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void onMouseMove(MouseMoveEvent event) { if (Utils.DEBUGUI2){ eventBus.fireEvent(new LogMessagePanelEvent(Message.ERROR, "on mouse move")); } }
[ "@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" ] ] } }
Marks the leaf "routingoption" with operation "delete".
public void markRoutingOptionDelete() throws JNCException { markLeafDelete("routingOption"); }
[ "public void markXudtOptionDelete() throws JNCException {\n markLeafDelete(\"xudtOption\");\n }", "public void markOptAuthenticationControlDelete() throws JNCException {\n markLeafDelete(\"optAuthenticationControl\");\n }", "void setDeleteAndChangeStatusPermission(RouteDTO routeDTO) throws C...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert 4 bytes from the buffer at offset into a long value.
private long fourByteToLong(byte[] bytes, int offset) { return (byteToLong(bytes[offset + 0]) + (byteToLong(bytes[offset + 1]) << 8) + (byteToLong(bytes[offset + 2]) << 16) + (byteToLong(bytes[offset + 3]) << 24)); }
[ "public static long getIntLong( byte[] bytes, int offset) {\n return (\n ((bytes[offset++] & 0x000000FFL)) |\n ((bytes[offset++] << 8) & 0x0000FF00L) |\n ((bytes[offset++] << 16) & 0x00FF0000L) |\n ((bytes[offset ] << 24) & 0xFF000000L)\n );\n }", "pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional uint32 modified = 1;
public Builder setModified(int value) { bitField0_ |= 0x00000001; modified_ = value; onChanged(); return this; }
[ "int getModifiedStat();", "void modify() {}", "protected int changes() {\n/* 2294 */ return this.changes;\n/* */ }", "public boolean setDirtyBit(){ dirty = true; return dirty; }", "public long getDateModified() {\n/* 284 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "String fla...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create builder for ImportOperationStatus instance
public static ImportOperationStatusBuilder builder(final ImportOperationStatus template) { return ImportOperationStatusBuilder.of(template); }
[ "private STATUS(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private CustomResourceDefinitionStatus(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private KubernetesStatus(com.google.protobuf.GeneratedMessageV3.Build...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public List<GetClockingUnitProc> fetchClockinUnit(Integer userId) { return this.getClockingUnitProcDao.fetchClockinUnit(userId); }
[ "@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" ] ] } }
Retrieves and returns Student object regarding their information such as username, matriculation number, and name.
public String printStudentList(){ StringBuilder sb = new StringBuilder(); sb.append("====================Student List====================\n"); try { File file=new File("src/Students"); FileReader fr=new FileReader(file); //reads the file BufferedReader br=new BufferedReader(fr); String ...
[ "public com.joyxj.protobuf.DataInfo.Student getStudent() {\n if (oneofNameCase_ == 2) {\n return (com.joyxj.protobuf.DataInfo.Student) oneofName_;\n }\n return com.joyxj.protobuf.DataInfo.Student.getDefaultInstance();\n }", "public StudentInfo getStudentInfo() {\n return studentIn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by jordano on 21/01/2018.
@Repository public interface EnderecoRepository extends JpaRepository<Endereco, Integer> { }
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "@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\n public int utilite() {\n return 0;\n }", "@Override\r\n\tpublic void hablar() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Applies the given formats to the string, resetting it at the string's end. afc stands for applychatformattings.
public static String acf(String s,EnumChatFormatting... formats) { String ret=""; for(EnumChatFormatting f:formats) { ret+=f; } return ret+s+EnumChatFormatting.RESET; }
[ "public String applyFormats(String text) {\n\t\tString replaced = text;\n\t\tfor (RGBFormatter formatter : formats) {\n\t\t\treplaced = formatter.reformat(replaced);\n\t\t}\n\t\tfor (GradientPattern pattern : gradients) {\n\t\t\treplaced = pattern.applyPattern(replaced);\n\t\t}\n\t\treturn replaced;\n\t}", "prote...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }