query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Encodes a tree to a single string.
public String serialize(TreeNode root) { return null; }
[ "String toTreeString();", "public String treeToString() {\n\t\treturn tree.toStringTree(parser);\n\t}", "public String serialize(TreeNode root) {\n if(root == null){return \"\";}\n int depth = 0;\n Stack<Pair<TreeNode,Integer>> s = new Stack<Pair<TreeNode,Integer>>();\n s.push(new Pa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
fim adiciona Exibe as informações das contas no array
public void mostraContas() { // Se voce precisar percorrer um array inteiro, voce pode usar o // enchanced for que foi implementado na versao 1.5: for (Conta conta : this.contas) { // Verifica se a posicao esta nula ou nao para evitar erros if (conta != null) { // Imprime as informacoes da conta. Lembra...
[ "public void makeArray(){\n\t\t\r\n\t\teh[0]=this.noInfo;\r\n\t\teh[1]=this.someInfo;\r\n\t\teh[2]=this.EnoughInfo;\r\n\t\teh[3]=this.tooMuchInfo;\r\n\t\teh[4]=this.NA;\r\n\t\t\r\n\t}", "public void ArregloEstudiante()\n {\n Estudiante[] arreglo_estudiante = new Estudiante[2];\n \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates a prompt that expects a numeric input representing a short value. This method loops until valid input is given.
static short promptForShort(String prompt, short min, short max){ if(prompt == null){ IllegalArgumentException myException = new IllegalArgumentException("Prompt cannot be null"); throw myException; } System.out.print(prompt); short num = 0; boolean run = true; String input = null; long check; ...
[ "public static short getShort(String prompt)\r\n\t{\r\n\t\tSystem.out.print(prompt);\r\n\t\tshort value = kb.nextShort();\r\n\t\treturn value;\t\t\r\n\t}", "private static void integerPrompt(Scanner inputValue)\n\t{\n\t\tSystem.out.println(\"The value must be an integer.\\n\");\n\t\tinputValue.next();\n\t}", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Serialise obj to xml
protected static String serialiseObject(Object o) { StringWriter writer = new StringWriter(); Serializer serializer = new Persister(); try { serializer.write(o, writer); System.out.println("Serialised object of class: " + o.getClass() + " to XML:\n" + writer.toString()); return writer.toString();...
[ "static String makeXML(Object obj){\r\n //Convert block object to xml string\r\n try{\r\n JAXBContext jaxbContext = JAXBContext.newInstance(obj.getClass());\r\n Marshaller jaxbMarshaller = jaxbContext.createMarshaller();\r\n\r\n jaxbMarshaller.setProperty(Marshaller.JA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unloads the specified texture if it's managed by this manager.
public boolean unload(Texture texture) { if(texture == null) return false; if(m_textures.containsValue(texture)) { texture.unload(); m_textures.remove(texture); return true; } else return false; }
[ "public boolean removeTexture(ITexture texture);", "public static void unbindTexture() {}", "public static void unbind()\n\t{\n\t\tglBindTexture(GL_TEXTURE_2D, 0);\n\t}", "public void unloadTextures(String path) {\n\t\tList<String> textureFilenames = getAssetFilenames(textureDir(path), \".png\");\n\t\tdepopul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Insert the method's description here. Creation date: (19.04.2002 18:16:53)
public java.lang.String getDepartmentname() { return departmentname; }
[ "public void mo5201a() {\n }", "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "protected void method_5557() {}", "public void mo9609a() {\n }", "@Override\r\n\tpublic void wydaj() {\n\t\t\r\n\t}", "@Override\r\n\tpublic ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Approve clan as defender for siege
public void approveSiegeDefenderClan(int clanId) { if(clanId <= 0) return; _database.saveSiegeClan(ClanTable.getInstance().getClan(clanId), 0, true); _database.loadSiegeClan(); }
[ "public void Approved() {\n\t\t((DataStore2) dataStore).w = 1;\n\t\tmdaefsm.Approved();\n\t}", "public void refuseVatican() throws ActionNotAllowedException{\n\t\tif(!state.vaticanChoice()){\n\t\t\tnotifyError(\"Action not allowed - state is false\");\n\t\t\tthrow new ActionNotAllowedException(\"Action not allowe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get title version string.
public String getTitleVersion(){ return titleVersion; }
[ "java.lang.String getVersionName();", "@DISPID(1073) //= 0x431. The runtime will prefer the VTID if present\r\n @VTID(217)\r\n java.lang.String title();", "public String getVersionString()\n {\n int major = (int) _version, minor = (int) Math.round((_version - major) * 10);\n return \"PDF-\" +...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Leider ist mir nicht viel eingefallen wo ich ein Interface einbauen kann... darum habe ich eine Abstrakte Klasse Vehicle eingebaut, und um ein Enum erweitert.
public static void main(String[] args) { Car car1 = new Car(VehicleType.SUV, CarBrand.VW, "Touran", 190, 21000, 30000, 50, 50, 8, 6); Car car2 = new Car(VehicleType.SPORTSWAGON, CarBrand.SKODA,"Superb", 180, 1200, 25000, 55, 21, 6, 5); Car car3 = new Car(VehicleType.COUPE, CarBrand.PORSCHE,"Por...
[ "public interface Vehicle {\n String getState();\n}", "interface Vehicle {\n\t\tpublic void Wheels(); // interface method (does not have a body)\n\n\t\tpublic void Axles(); // interface method (does not have a body)\n\t}", "public interface Vehicle{\r\n\r\n /**\r\n * Metoda zwraca kierunek pojazdu\r\n...
{ "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() { jDialog1 = new javax.swing.JDialog(); lblIdentificador = new javax.swing.JLabel(); txtId = new javax.swing.JTextField(); btnBu...
[ "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" ] ] } }
TODO Autogenerated method stub
@Override public boolean checkUsernameAndPassword(String u, String p) { 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" ] ] } }
TODO Autogenerated method stub
@Override protected void onRestart() { super.onRestart(); }
[ "@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" ] ] } }
EFFECTS: Sets the scene to the search tool scene
@FXML void onSearchToolClicked(MouseEvent event) throws IOException { AnchorPane search = (AnchorPane) FXMLLoader.load(Main.class.getResource("StattrakGuiSearchScreen.fxml")); // Citation - : https://youtu.be/XCgcQTQCfJQ // Jaret Wright Stage window = (Stage)((Button)event.getSource()).getS...
[ "public void setScene(Scene scene) {\n this.scene = scene;\n }", "void switchScene();", "@Override\n public void handle(ActionEvent event\n ) {\n thestage.setScene(found); // go to the next scene\n\n }", "private final ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Returns true if the list is empty, otherwise false
public boolean isEmpty();
[ "public boolean isEmpty(){\r\n return list.isEmpty();\r\n }", "public boolean isEmpty()\r\n {\r\n return list == null;\r\n }", "boolean isEmpty(){\r\n\t\treturn list.getSize() == 0;\r\n\t}", "public boolean isEmpty(){ \r\n return list.isEmpty();\r\n }", "public boolean...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Represents a description of the order that is displayed in emails to the buyer.
public SetOrderReferenceDetailsRequest setSellerNote(String sellerNote) { this.sellerNote = sellerNote; return this; }
[ "@Override\n public String toString() {\n return \"Order{\" +\n \"id=\" + getId() +\n \"userId=\" + userId +\n \", price=\" + price +\n \", purchaseDate=\" + purchaseDate +\n \", expirationDate=\" + expirationDate +\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form MechAboutDialog
public MechAboutDialog(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); info.setEditable(false); info.addHyperlinkListener(new HyperlinkListener() { public void hyperlinkUpdate(HyperlinkEvent e) { if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { ...
[ "public void actionPerformed(ActionEvent e) {\n //display about box\n GOSlimmerAboutDialog aboutDialog = new GOSlimmerAboutDialog();\n aboutDialog.pack();\n aboutDialog.setVisible(true);\n }", "private void showAboutDialog() {\n AlertDialog.Builder builder = new AlertDialog.B...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the results of a test based on the name and status at end of the test Session ID is passed in as an identifier
public static void updateResults(String testName, String sessionId, boolean testStatus) throws JSONException, IOException { String message = String.format("SauceOnDemandSessionID=%1$s job-name=%2$s", sessionId, testName); System.out.println(message); SauceREST client ...
[ "public void onTestSuccess(ITestResult arg0) {\n String baseURL=\"https://rally1.rallydev.com\";\n String apiKey = \"_8ohhxYLRSTCUVXVPPeCS2iYdgxWx05DnfJHXZaTas\";\n\n try {\n restApi = new RallyRestApi(new URI(baseURL),apiKey); // \"_2RFDlhDSQsS4MjJloQGUoD2BCZFUDZsxP7OQbrJno\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compute the client server time shift
public static long calculate(long serverTime){ return DigipassSDK.computeClientServerTimeShiftFromServerTime(serverTime); }
[ "public void calculatePacketRoundtripTime();", "Long getServerTimeStamp();", "public int getServerTicks() {\n\t\treturn g.getGameClock();\n\t}", "String getCommunication_tamper_event_time();", "public java.lang.Long getServerTime() {\n return serverTime;\n }", "public long getTime() {\r\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void setMaxAngularSpeed(float maxAngularSpeed) { }
[ "@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 static void main(String[] args) { int year,month,date; Scanner obj=new Scanner(System.in); System.out.println("Enter the year : "); year=obj.nextInt(); Scanner sc=new Scanner(System.in); System.out.println("Enter the month : "); month=sc.nextInt(); Scanner str=new Scanner(System.in...
[ "@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 true if the value if present between min and max values
public static boolean isPresent(float minVal, float maxVal, float val){ if(val < maxVal && val > minVal) return true; else return false; }
[ "private boolean valueInRange(int value, int min, int max){\n return (value >= min) && (value <= max);\n }", "public boolean containsWithinLimits(T value){\r\n\t\treturn (min.compareTo(value)<0 && max.compareTo(value)>0);\r\n\t}", "private boolean isInRange(double minValue, double MaxValue, double inp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column pay_account.offline_time
public Date getOfflineTime() { return offlineTime; }
[ "public BigDecimal getAbsentTime() {\n return absentTime;\n }", "public Timestamp getImmediateMshipDisabledTime() {\r\n return this.immediateMshipDisabledTimeDb == null ? null : new Timestamp(this.immediateMshipDisabledTimeDb);\r\n }", "public String getDownTime() {\n return downTime;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
throw new UnsupportedOperationException("Not supported yet.");
public void mousePressed(MouseEvent e) { }
[ "protected void unsupportedOp()\n\t{\n\t\tthrow new UnsupportedOperationException(\"this is not allowed\");\n\t}", "private String throwException() {\n throw new UnsupportedOperationException(\"Not supported\");\n }", "private void Bersih() {\n throw new UnsupportedOperationException(\"Not sup...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by Narsenico on 19/10/2015.
public interface ScrollToTopListener { void scrollToTop(); }
[ "@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\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" ] ] } }
Writes the files referenced by the specified signature. If encrypted, attempts to decrypt the file. Optionally set's the lastmodified timestamp. The writer is not closed.
public Map<ICloud.MBSFile, Outcome> write(ByteString signature, IOFunction<OutputStream, Long> writer) throws IOException, InterruptedException { logger.trace("<< write() < signature: {}", Bytes.hex(signature)); lock.lockInterruptibly(); try { Map<ICloud.MBSFile, Outcom...
[ "public static void signZip(X509Certificate publicKey, PrivateKey privateKey, String signatureAlgorithm,\n String inputZipFilename, String outputZipFilename, List<Object> mod) throws IOException, GeneralSecurityException {\n KeySet keySet = new KeySet(publicKey, privateKey, sign...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column T_MERT_SETTLEMENT_RECORD.STATUS
public void setStatus(String status) { this.status = status == null ? null : status.trim(); }
[ "void setTransactionStatus(String transactionId, TransactionStatus status);", "void setStatus(final OTransaction.TXSTATUS iStatus);", "public void setTransactionstatusid(int param){\n \n this.localTransactionstatusid=param;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional int32 eresult = 1 [default = 2];
public Builder setEresult(int value) { bitField0_ |= 0x00000001; eresult_ = value; onChanged(); return this; }
[ "int getResultNum();", "public int getResultValue() {\n return result_;\n }", "int getSrval();", "public int getRet() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int getResult(int x) {\n\t\treturn 0;\n\t}", "long getValue111();", "long getValue031();", "long getResult();", "long getValue011();"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
End of variables declaration//GENEND:variables
@Override public void aceptar() { Person person = new Person(); person.setFirstName(txtNombres.getText()); person.setLastName(txtApepat.getText()); person.setBirthDate(dateFechNac.getDate()); person.setRoleTypeId(((RoleType)cmbRolEmpleados.getSelectedItem()).getRoleTypeId());...
[ "private static void EX5() {\n\t\t\r\n\t}", "@Override\n\tprotected void initVariable() {\n\t\n\t}", "public void mo17751g() {\n }", "public void mo1857d() {\n }", "public static void Q22()\r\n\t{\r\n\t}", "public void mo28221a() {\n }", "public void mo3914b() {\n }", "protecte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calls DBFacace method to retrieve all projects fitting to the given parameters.
public ArrayList<Project> getProject(String PName){ ArrayList<Project> result = null; // Parse string attributes to correct datatype try { String PNameSQL = (PName); result = DBFacade.getInstance().getProject(PNameSQL); } catch (Exception e) { e.printStackTrace(); } return result; }
[ "public List <Project> selectAllProjects() {\n List <Project> projects = new ArrayList < > ();\n // Step 1: Establishing a Connection\n try (Connection connection = getConnection();\n\n // Step 2:Create a statement using connection object\n PreparedStatement preparedStatem...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests list deserialization with too few bytes.
@Test(expected = IOException.class) public void testDeserializeListTooShort2() throws Exception { // Long + 1 byte (separator) + 1 byte (incomplete Long) KvStateSerializer.deserializeList( new byte[] {1, 1, 1, 1, 1, 1, 1, 1, 2, 3}, LongSerializer.INSTANCE); }
[ "@Test\n public void listDeserializationTest() {\n List<Object> objects = new ArrayList<Object>();\n for (int i = 0; i < 10000; i++) {\n objects.add(new String(\"This is string \" + i));\n }\n final String serializedList = SlimSerializer.serialize(objects);\n\n long start = System...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct an operation preconfigured with the given typesafe data model.
public RenameTopologyChangeOperation(RenameTopologyChange tsMdl) { super(tsMdl); setTypeSafeModel(tsMdl); }
[ "T build() throws ModelCreationException;", "public IDataModelOperation createConfiguredOperation() {\r\n\t\tDeleteTopologyOperation operation = new DeleteTopologyOperation(this);\r\n\t\treturn operation;\r\n\t}", "EPModel createEPModel();", "T create(T t, String include) throws LibraryTechnicalException;", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The function load Load table data from file.
public void load(File filename) throws IOException { ObjectInputStream objectInputStream = null; try { objectInputStream = new ObjectInputStream( new FileInputStream(filename)); HighScoresTable hst = (HighScoresTable) objectInputStream .rea...
[ "protected abstract void loadDataFromFile();", "private static String loadTable(String name, Database db) {\r\n try {\r\n String line;\r\n BufferedReader in = new BufferedReader(new FileReader(name + \".tbl\"));\r\n Table t = Table.createTable(in.readLine().split(COMMA));\r\n \r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Priority that this error message handler should be used.
int priority();
[ "@Override\n public int getPriority() {\n\n return 200;\n }", "@Override\r\n\tpublic int priority() {\n\t\treturn 3;\r\n\t}", "@Override public int getPriority() {\n return priority;\n }", "@Override\n public int priority(){\n return 2;\n }", "RequestPriority getPri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of tipoPdfArrendamientoModified
public void setTipoPdfArrendamientoModified(boolean tipoPdfArrendamientoModified) { this.tipoPdfArrendamientoModified = tipoPdfArrendamientoModified; }
[ "public void setAccesoConsolaXmlPdfModified(boolean accesoConsolaXmlPdfModified)\r\n\t{\r\n\t\tthis.accesoConsolaXmlPdfModified = accesoConsolaXmlPdfModified;\r\n\t}", "public void setPerioricidadModified(boolean perioricidadModified)\r\n\t{\r\n\t\tthis.perioricidadModified = perioricidadModified;\r\n\t}", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the current build. This uses the current jar file (in build/fop.jar) to run the tests with. The output is then compared with the reference output.
protected void testNewBuild() { try { ClassLoader loader = new URLClassLoader( createUrls("build/fop.jar")); Map diff = runConverter(loader, "areatree", "reference/output/"); if (diff != null && !di...
[ "@Test\n public void buildGenerationTest() {\n String buildDoc = getJavaDoc(BUILD_METHOD, TEST_NAME, false, getStubPluginConfig());\n assertThat(true, is(buildDoc.contains(\"Builds object of\") && buildDoc.contains(END_STRING)));\n }", "@Test\n public void testBuilding() throws IOException,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column skill.notes
public String getNotes() { return notes; }
[ "public String getNotes()\n {\n return notes;\n }", "public String getNotes()\n {\n return notes;\n }", "public String getNotes()\n {\n\tif(entity != null)\n\t return ((NamedObject)getEntity()).getNotes();\n\n\treturn notes;\n }", "public String getNotes() {\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if is checks for insert trigger for version.
public boolean isHasInsertTriggerForVersion() { return getEmgrFactory().isHasInsertTriggerForVersion(); }
[ "@Override\n\t\t\tpublic void insertUpdate(DocumentEvent e) {\n\t\t\t\tcheck();\n\t\t\t}", "public boolean hasTransientInsert(SendableInsert insert, Object token);", "public void willInsert() {\n \t// DO NOTHING\n }", "void insertDbVersion(int version) throws SQLException;", "protected abstract boolea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to add / replace fragment
public static void replaceFragment(Fragment fragment, int tag) { // replace fragment in container getActivity().getFragmentManager().beginTransaction().replace(R.id.container, fragment, tag + "").addToBackStack(tag + "").commit(); }
[ "String fragment();", "public void addProcessFragments(String delta){\n\t}", "private void replaceFragment(int container, String fragment_tag, Fragment fragment_in, boolean addToBackStack) {\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n\n if (Objects.equals(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method is used for send post request by using asynchttpclientlibrary without header
public void doHttpPostRequestWithOutHeader(final Context context, String url, RequestParams params, Object listner) { // String appHeader; mRevvNetworkListener = (IJBTResponseController) listner; apiResponse = new APIResponse(); // ...
[ "private byte[] callPostService(String url, String parameterName, byte[] data) throws Exception {\n\t\tHttpDeleteWithBody method = new HttpDeleteWithBody(url);\n\t\tmethod.getParams().setSoTimeout(2 * 1000);\n\t\t// method.setRequestHeader(\"Content-Type\",\"text/html; charset=euc-kr\");\n\t\t// add retry Handler -...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /religions : get all the religions.
@RequestMapping(value = "/religions", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public List<Religion> getAllReligions() { log.debug("REST request to get all Religions"); List<Religion> religions = religionRepository.findAll(); return ...
[ "@GetMapping\n\tpublic @ResponseBody List<Recursos> getAllRecursos() {\n\t\treturn recursoRepository.findAll();\n\t}", "List<RestrictionResponse> getAll();", "public jkt.hms.masters.business.MasReligion getReligion() {\n\t\treturn religion;\n\t}", "public Set<Obligation> getAllObligations() {\r\n Set<O...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Controls the events during the more info tutorial stage
public int moreTouchEvent(MotionEvent event) { int action = event.getActionMasked(); switch (action) { case MotionEvent.ACTION_DOWN: // First finger case MotionEvent.ACTION_POINTER_DOWN: // Second finger and so on break; case MotionEvent.AC...
[ "public void callToIntro(ActionEvent actionEvent) {\n }", "public void showTutorial() {\n }", "@FXML\n\tpublic void information() {\n\t\t\n\t\tString tutorial = \"1. Choose Axe (or Boat) button to change the \\n axe (or boat) location.\"\n\t\t\t\t+ \"\\n2. Click empty grass tile to set new location. \"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
OPTION 3 (Main Menu) This method is used to display the scores of the golfers, in ascending order.
private static void displayScoreboard() { if (scores.isEmpty()) { System.out.println("You haven't added any golfers yet!"); // return will stop the function here return; } //https://www.java67.com/2017/07/how-to-sort-map-by-values-in-java-8.html Map<String, Integer> sortedScores = scores.entrySet() ...
[ "private void showScoreboard() {\n Intent i = new Intent(GameActivity.this, Scoring.class);\n i.putExtra(\"total_score\", gh.returnScoreList()); //add to the intent the list of scoring options with the corresponding game scores\n startActivity(i);\n }", "public static void highScoresMen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If button user wants to send message
@Override public void onClick(View view) { if (view.getId() == R.id.sendMessagesBtn) { if (messageEditText.getText().toString().trim().length() == 0) { Toast.makeText(context, "You need to add text in message field.", Toast.LENGTH_SHORT).show(); } else if (subjectEdit...
[ "public void triggerButtonSend(){ \n \n actionListenerStop = new ActionListener() {\n public void actionPerformed(ActionEvent actionEvent) {\n \n //RETRIEVE MESSAGE TO BROADCAST\n msgBroadcast = view.getTxtBroadcastMessageReference().getTex...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
overwrites the file duke.txt each time there are changes to the list
public static void writeToFile(String filePath) throws IOException { FileWriter fw = new FileWriter(filePath); fw.write(""); fw.close(); }
[ "public void writeToFile(ArrayList<Task> taskList) throws IOException {\n FileWriter fw = new FileWriter(\"data/duke.txt\");\n for (Task t : taskList) {\n fw.write(t.toFileString() + System.lineSeparator());\n }\n fw.close();\n }", "private void updateMasterlistFile()\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Methode um den Erstellungszeitpunkt des BusinessIbjects zu setzen
public void setCreationTimeStamp(Date creationTimeStamp) { this.creationTimeStamp = creationTimeStamp; }
[ "@Override\n public void setBusinessObject(Object newBusinessObject) {\n\t\t// Expects to get a StatisticReportParamsVo\n\t\tsuper.setBusinessObject(newBusinessObject);\t\t\n\t\tfillModel();\n\t}", "public void prepareExternalBusinessObject(BusinessObject businessObject);", "public BusinessObject(){\r\n\t\tt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
run mapreduce to parse doc to word and split
private int runMapReduce() throws Exception { // this.getConf().set("fs.default.name", "hdfs://db1:9000"); Job job = prepareJob(getInputPath(), getOutputPath(), SequenceFileInputFormat.class, FpgrowthResultMaper.class, Text.class, TopKStringPatterns.class, Reducer.class, ...
[ "List<String> tokenize(String document);", "void mapPage2(String text) {\n String[] temp = text.split(\"\\\\s+\");\n p2Length = temp.length;\n //System.out.println(length);\n for (int i = 0; i < p2Length; i++) {\n Word w = new Word(temp[i], 0, 1);\n put(w);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column user_role.rid
public void setRid(Long rid) { this.rid = rid; }
[ "public void setUserRole(Integer userRole) {\r\n this.userRole = userRole;\r\n }", "public void setRoleToUser(String user,int rid) throws SQLException{\n connect();\n String SQL = \"select * from setRoleToUser(\"+rid+\",'\"+user+\"')\";\n rs=statement.executeQuery(SQL);\n }", "void c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public int getProcessContextType() { 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" ] ] } }
TODO Autogenerated method stub
@Override public boolean insertar(UbigeoBean t) throws ServiceException { 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" ] ] } }
optional string create_time = 6;
com.google.protobuf.ByteString getCreateTimeBytes();
[ "public Date getCreateTime()\n/* */ {\n/* 170 */ return this.createTime;\n/* */ }", "public void setCreate_time(java.util.Date create_time) {\n this.create_time = create_time;\n }", "private String createCreationTimeAsString() {\n\t\tfinal SimpleDateFormat simpleDateFormat = new Simpl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
a synset (2nd field of synsets.txt) that is the common ancestor of NounA and nounB in a shortest ancestral path.
public String sap(String nounA, String nounB) { if (nounA == null || nounB == null) throw new NullPointerException("Args cannot be null"); if (!isNoun(nounA) || !isNoun(nounB)) { throw new IllegalArgumentException("tried to make sap with not nouns"); } Set<Integer> wordIDA = wordToID.get(nounA); Set<Intege...
[ "public String sap(String nounA, String nounB){\n if(nounA == null || nounB == null){\n throw new IllegalArgumentException();\n }\n return sets.get(sap.ancestor(setMap.get(nounA), setMap.get(nounB)));\n }", "public String sap(String nounA, String nounB) {\n if (nounA == n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the provisioningState property: Status of diagnostic provisioning.
ProvisioningState provisioningState();
[ "public ProvisioningStates provisioningState() {\n return this.innerProperties() == null ? null : this.innerProperties().provisioningState();\n }", "public DomainsProvisioningState provisioningState() {\n return this.provisioningState;\n }", "public SpacecraftsPropertiesProvisioningState pro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Processes requests for both HTTP GET and POST methods.
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); printData(out); }
[ "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n Enumeration<String> parameterNames = request.getParameterNames(); //checking for unappropriate parameters\r\n if (parameterNames.hasMoreEleme...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
accessor used by customer subsystem to store user's selected ship address during checkout; stores value in shop cart facade
public void setPaymentInfo(CreditCard cc);
[ "Address shippingAddress();", "public String getCustomerAddress()\n {\n return customerAddress;\n }", "public String getShippingCity() {\n return shippingCity;\n }", "java.lang.String getBillingAddress();", "public String getStoreFullAddress()\r\n {\r\n\t return this.address + \",\" + this.cit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compute all neighboring boards.
public Iterable<Board> neighbors() { Stack<Board> neighbors = new Stack<>(); int r = blank / N, c = blank % N; Board neighbor; for (int dr = -1; dr <= +1; dr += 2) { int rp = r + dr; if (rp >= 0 && rp < N) { int i = r * N + c, j = rp * N + c; neighbor = new Board(this, i, j...
[ "public Iterable<Board> neighbors() {\n ArrayList<Board> list = new ArrayList<>();\n addNeighbor(zi - 1, zj, list);\n addNeighbor(zi, zj + 1, list);\n addNeighbor(zi, zj - 1, list);\n addNeighbor(zi + 1, zj, list);\n return list;\n }", "public Iterable<Board> neighbors...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Appends and returns a new empty "MeasureCategoryText" element
public gov.niem.niem.niem_core._2_0.TextType addNewMeasureCategoryText() { synchronized (monitor()) { check_orphaned(); gov.niem.niem.niem_core._2_0.TextType target = null; target = (gov.niem.niem.niem_core._2_0.TextType)get_store().add_element_user(MEASURECATEGOR...
[ "@Test\n public void test001() throws Throwable {\n ExtendedCategoryAxis extendedCategoryAxis0 = new ExtendedCategoryAxis((String) null);\n extendedCategoryAxis0.setLabelToolTip((String) null);\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int r = Integer.parseInt(br.readLine()); String base = br.readLine(); int n = Integer.parseInt(br.readLine()); String[] arr = new String[n]; for ...
[ "@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" ] ] } }
Average number of items processed by each thread
public static List<String> getPerThreadFileLines(long line, int threadNum, String fileName) { long avg = line / threadNum; long remainder = line % threadNum; logger.info("file={}, line={}, each processes={}, remainder={}", fileName, line, avg, remainder); List<String> list = new ArrayLis...
[ "private void avgTime() {\r\n\t\tfloat avgTime = 0;\r\n\t\tfor(RandomClient c: processedClients) {\r\n\t\t\t//output.writeFile(c.toString()+\" \"+c.isProcessed(),file);\r\n\t\t\tif(c.isProcessed())\r\n\t\t\t\tavgTime += c.getService();\r\n\t\t}\r\n\r\n\t\tavgTime /= processedClients.size();\r\n\t\toutput.writeFile(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Issue: 54 ZookeeperDiscoveryHealthIndicator fails on nested structure
@Test public void should_return_a_response_that_app_is_in_a_healthy_state_when_nested_folders_in_zookeeper_are_present() throws Exception { // when: String response = this.testLoadBalancedClient.callService("me", BASE_PATH + "/health"); // then: log.info("Received response [" + response + "]"); then(this....
[ "yandex.cloud.api.k8s.v1.ClusterOuterClass.Cluster.Health getHealth();", "yandex.cloud.api.k8s.v1.NodeOuterClass.Node.Status getStatus();", "yandex.cloud.api.k8s.v1.ClusterOuterClass.Cluster.Status getStatus();", "@Test\n public void getClusterApiStatus() throws Exception {\n }", "yandex.cloud.api.k8s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
copy needed: The returned string pointer is valid until either the prepared statement is destroyed by sqlite3_finalize() or until the statement is automatically reprepared by the first call to sqlite3_step() for a particular run or until the next call to sqlite3_column_name() or sqlite3_column_name16() on the same colu...
static native String sqlite3_column_origin_name(SQLite3Stmt pStmt, int iCol);
[ "ColumnEntity copy();", "ColumnMetaData getColumnMetaData();", "@Test(timeout = 4000)\n public void test125() throws Throwable {\n TableColumnInfo[] tableColumnInfoArray0 = new TableColumnInfo[1];\n TableColumnInfo tableColumnInfo0 = new TableColumnInfo(\"net.sourceforge.squirrel_sql.plugins.dbcopy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 4 /Coverage entropy=1.7917594692280547
@Test(timeout = 4000) public void test04() throws Throwable { NaiveBayesMultinomial naiveBayesMultinomial0 = new NaiveBayesMultinomial(); Evaluation.getGlobalInfo(naiveBayesMultinomial0); CostSensitiveClassifier costSensitiveClassifier0 = new CostSensitiveClassifier(); CostMatrix costMatrix0...
[ "@Test(timeout = 4000)\n public void test147() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n String string0 = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Original signature : int cbWinBufToArray(HGLOBAL, USHORT, long, long) native declaration : line 1668
public static native int cbWinBufToArray(MccUniversalLibraryLibrary.HGLOBAL MemHandle, ShortBuffer DataArray, NativeLong FirstPoint, NativeLong Count);
[ "ArrayBufferView getTypedArray();", "private native void getLatestBufferData(long addr);", "public byte[][] getBuffers();", "private static native int getDescriptorCount0(Buffer ptr);", "public static native byte[] m4658h(byte[] bArr);", "private static native byte[] nativeGetAudioData(long nativePacketHa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SimpleDateFormat simpleDateformat = new SimpleDateFormat("E"); // the day of the week abbreviated System.out.println(simpleDateformat.format(now)); simpleDateformat = new SimpleDateFormat("EEEE"); // the day of the week spelled out completely System.out.println(simpleDateformat.format(now));
public static void main(String[] args) { // simpleDateformat = new SimpleDateFormat("EEEE"); // the day of the week // spelled out completely // System.out.println(simpleDateformat.format(now)); // Calendar calendar = Calendar.getInstance(); calendar.setTime(now); calendar.add(Calendar.DATE, 0); ...
[ "public static String getDayFromGivenDadte(Date dt) {\n\n\t SimpleDateFormat simpleDateformat = new SimpleDateFormat(\"E\"); // the day of the week abbreviated\n\t // System.out.println(\"--->>>\"+simpleDateformat.format(dt));\n\t \n\t return simpleDateformat.format(dt).toLowerCase();\t\t\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: a
private static void m145726a(String[] strArr, C46432f fVar, int[] iArr, int i) { for (int i2 = 0; i2 < iArr.length; i2++) { strArr[(i2 * 2) + i] = fVar.getString(iArr[i2]); } }
[ "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" ] ] } }
/ renamed from: r
void mo64597r();
[ "protected void method_5557() {}", "public abstract void mo30461b();", "T mo12982a(R r);", "public abstract void mo81531l();", "public abstract void mo30462c();", "protected boolean r_()\r\n/* 36: */ {\r\n/* 37: 57 */ return false;\r\n/* 38: */ }", "protected void mo4791d() {\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets rowset's cursor position was in the rowset before this filter has been applied.
@Override protected void keysChanged(final Row Row, final int aColIndex, final Object aOldValue, final Object aNewValue) throws RowsetException { super.keysChanged(Row, aColIndex, aOldValue, aNewValue); if (filterApplied && rowset.isImmediateFilter()) { refilterRowset(); } }
[ "public void setCurrentCursor(Cursor c) { setCursor(c); }", "private void initResultSet(ResultSet sql_set) throws SQLException {\n\t\tif( sql_set.getType() == ResultSet.TYPE_FORWARD_ONLY ) {\n\t\t\tfor( int i = 1; i < mCurRow; i++ ) {\n\t\t\t\tsql_set.next();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tsql_set.absolute(mC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: l
private static boolean m74690l() { int i; TeenageModeSetting teenageModeSetting = f60169c; if (teenageModeSetting != null) { i = teenageModeSetting.getMinorControlType(); } else { i = 0; } if (i == 2) { return true; } re...
[ "public int getL() {\r\n\t\treturn L;\r\n\t}", "L first();", "public void setL(Integer l) {\n\t\tthis.l = l;\n\t}", "public void setL(final double l) {\r\n\t\tthis.l = l;\r\n\t}", "int next(int l) {\n Inst i = inst[l >> 1];\n if ((l & 1) == 0) {\n return i.out;\n }\n return i.arg;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ExecutorService executorService = Executors.newCachedThreadPool(); BlockingQueue> queue = new LinkedBlockingQueue(); ExecutorCompletionService exec = new ExecutorCompletionService(executorService, queue);
public static void main(String... args) { String host = "http://7tav5.top"; String url = "http://7tav5.top/vod/8165.html"; // for (int i = 0; i < 1000; i++) { // executorService.submit(() -> { try { Document document = SpiderUtil.getDocument(url); Str...
[ "public abstract ThreadPoolExecutor c();", "SelectableThread executor();", "public static void main(String[] args) {\n\r\n\t\tBlockingQueue<Runnable> bdqueue =new ArrayBlockingQueue<Runnable>(20);\r\n\t\tThreadPoolExecutor pool=new ThreadPoolExecutor(2,3,2,TimeUnit.MILLISECONDS,bdqueue);\r\n\t\tThread t1=new Th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Defines what float the third param in setRotationAngles of ModelBase is
protected float handleRotationFloat(EntityLivingBase p_77044_1_, float p_77044_2_) { return this.handleRotationFloat((EntitySquid)p_77044_1_, p_77044_2_); }
[ "@VTID(47)\n void setRotation(\n float rhs);", "private static void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }", "public void setRotationAngles(floa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .de.tubs.androidlab.instameet.server.protobuf.ChatMessage messages = 1;
public java.util.List<de.tubs.androidlab.instameet.server.protobuf.Messages.ChatMessage> getMessagesList() { return messages_; }
[ "com.ubbcluj.amcds.myDalgs.communication.Protocol.MessageOrBuilder getMessageOrBuilder();", "java.util.List<protobuf.clazz.coin.CoinProtocol.GamePlayerMsg> \n getPlayerMsgList();", "public void setMessages(List<DataMessage> messages);", "java.util.List<? extends protobuf.clazz.coin.CoinProtocol.GamePla...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void onDeletionNotice(StatusDeletionNotice arg0) { }
[ "@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" ] ] } }
Test of getData method, of class WeekdayModel.
@Test public void testGetData() { System.out.println("getData"); WeekdayModel instance = new WeekdayModel(); ResultSet expResult = null; ResultSet result = instance.getData(); assertEquals(expResult, result); // TODO review the generated test code and remove the d...
[ "@Test\n public void testData_Venda() {\n\n Date result = instance.data_Venda();\n System.out.println(\"data_Venda \" + result);\n }", "@Test\n\tpublic void testModel() {\n\t\t\n\t\tHotelsModel myunit = new HotelsModel(\"A\", \"NY\", \"Jasleen\", 5, 20, 5, 25, 5, 5, 100067, 4500);\n\t\tint day...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Notify Proton of status changes to a provisioned resource when you use selfmanaged provisioning. For more information, see Selfmanaged provisioning in the Proton User Guide.
@Override public NotifyResourceDeploymentStatusChangeResult notifyResourceDeploymentStatusChange(NotifyResourceDeploymentStatusChangeRequest request) { request = beforeClientExecution(request); return executeNotifyResourceDeploymentStatusChange(request); }
[ "private void setUpStatusNotify() {\n\t\tScaleConstantMapper mapper = new ScaleConstantMapper();\n\t\tif (\"true\".equals(DeviceProperties.getPropertyValue(service, mapper, \"getCapStatusUpdate\"))) {\n\t\t\tString current = DeviceProperties.getPropertyValue(service, mapper, \"getStatusNotify\");\n\t\t\tstatusNotif...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Is the passed in genome a valid solution? Does it violate any of the constraints?
public static boolean isValidSolution(KNode sack) { if(sack.violatesConstraints()) { return false; } return true; }
[ "public boolean isValid() {\r\n\t\treturn gene.contains(\"1\");\r\n\t}", "private boolean isSolution() {\n\t\treturn positions.length == pieces.size();\n\t}", "boolean isIsConstraintProblem();", "@Override\n public boolean validateIdealSolution(Individuo s) {\n return (s.getFitness() <= valorminimoE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Description setter method to set testIndicator
public void setTestIndicator(int testIndicator) { this.testIndicator = testIndicator; }
[ "@Test\n public void indicatorTypeTest() {\n // TODO: test indicatorType\n }", "public void setTestDescription()\n {\n super.setTestDescription(\"Reconfigure an existing DVPort with a valid \"\n + \"DVPort key\");\n }", "@Override\n public void setTestDescription()\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check for required fields check for substruct validity
public void validate() throws org.apache.thrift.TException { }
[ "public void validate() throws org.apache.thrift.TException {\n if (cpurate == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'cpurate' was not present! Struct: \" + toString());\n }\n if (memrate == null) {\n throw new org.apache.thrift.protocol.TProtocolExcep...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the rate of pollution creation from a tile
private double getRate(Tile t) { if (!(t.hasProperty(TileProperty.IS_POLLUTION_SOURCE))) { return -1; } return (double) t.getProperty(TileProperty.IS_POLLUTION_SOURCE); }
[ "public int getSpawnRate(){\n return spawnRate;\n }", "public Integer getPollRate() {\n return getInt(POLL_RATE);\n }", "public int getStatistic();", "public int getPollution() {\n int p = 0;\n p -= getHeight();\n p += getIntensity();\n\n return p;\n }", "double ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
redirect handler specialized for groupAuthoring tool
@RequestMapping(value="/redirect/admin/groupAuthoring", method = RequestMethod.GET) public ModelAndView gaRedirect(HttpServletRequest request){ ModelAndView model = new ModelAndView(); String host = request.getRequestURL().toString().replace(request.getRequestURI(), ""); UserDetails userDetails = (UserDetails)Se...
[ "public void handleAccess(HttpServletRequest req, HttpServletResponse res, EntityReference ref) {\n if (req.getRemoteUser() == null) {\n try {\n String url = req.getRequestURL().toString();\n String context = req.getContextPath();\n String prefix = url....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void remove() { checkModCount(); if (currentRemoved || current == null) throw new IllegalStateException(); EntryNode up = current.upper; LinkedMatrix.this.removeNode(current); if (head.disposed()) { current = null; head = null; } else { ...
[ "@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 the sigmoid has been set up, this function accesses it:
static float lookupSigmoid(float x) { return g_sigmoid[(int) constrain((int) floor((x + 5.0f) * 20.0f), 0, 199)]; }
[ "public SigmoidFunction( ) { }", "private double sigmoid(double x) { return 1d / (1 + Math.exp(-x)); }", "@Override\n\tdouble activFunction(double x) {\n\t\treturn -1+2*this.sigmoid(x);\n\t}", "private static double sigmoid(double x) {\r\n\t\treturn 1.0/(1.0 + Math.exp(-x));\r\n\t}", "private double sigmoid...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This Method provides a proper Database Connection
private Connection connect() { Connection mySQLconnection = null; try { Class.forName("com.mysql.jdbc.Driver"); mySQLconnection = DriverManager.getConnection("jdbc:mysql://localhost:3306/paymentDb", "root", "123"); } catch (Exception e) { e.printStackTrace(); } return mySQLco...
[ "public Connection gettingDatabaseConnection () throws Exception;", "private ConnectionDB() {\n\t\tString url = \"jdbc:mysql://localhost:3306/\";\n\t\tString dbName = \"biblioteca\";\n\t\tString userName = \"root\";\n\t\tString password = \"root\";\n\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional uint32 event_id = 4;
public boolean hasEventId() { return ((bitField0_ & 0x00000008) == 0x00000008); }
[ "public void setEventId(Integer event_id) {\n\n\t}", "String getEventID();", "@Override\r\n\tpublic int getEventId() {\n\t\treturn id;\r\n\t}", "public String getEventID() {\n return eventID;\n }", "public int getEventNumber()\n {\n return eventNumber;\n }", "public void setEvent(Integer ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize your data structure here.
public QueueUsingStacks() { this.oldStack = new Stack<>(); this.newStack = new Stack<>(); }
[ "@Override\n\tpublic void initData() {\n\n\t\t\n\t}", "private void initializeData() {\n employees.put(1, \"Amos Burton\");\r\n employees.put(2, \"Julie Mao\");\r\n employees.put(3, \"Alex Kamal\");\r\n employees.put(4, \"James Holden\");\r\n employees.put(5, \"Josephus Miller\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the context menu that appears when right clicking on the simulation canvas.
private Menu createContextMenu() { Menu newContextMenu = new Menu(shell); contextMenuListener = new ContextMenuListener(control, newContextMenu, shell, canvas); newContextMenu.addMenuListener(contextMenuListener); return newContextMenu; }
[ "private void createContextMenu() {\n\t\tMenuManager menuManager = new MenuManager();\n\t\tmenuManager.setRemoveAllWhenShown(true);\n\t\tmenuManager.addMenuListener(new IMenuListener() {\n\t\t\t@Override\n\t\t\tpublic void menuAboutToShow(IMenuManager manager) {\n\t\t\t\tmanager.add(new GroupMarker(\n\t\t\t\t\t\tIW...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void onSensorChanged(SensorEvent event) { if(first_orietation){ lastDegree = event.values[0]; first_orietation = false; }else{ currentDegree = event.values[0]; if(Math.abs(currentDegree - lastDegree) > 10){ degree = lastDegree; //System....
[ "@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" ] ] } }
The status field can be selected from a list, this method allows you to retrieve the current elements from that list. Please note that the elements from that list are key value pairs, so you will need to call getLabel() and getValue() to get the label and value for this entry respectively.
public Object[] getStatusBackingList();
[ "java.util.List getStatus();", "public SelectItem[] getStatus() {\r\n return JsfUtil.getEnumSelectItems(StatusPagamento.class, false,\r\n FacesContext.getCurrentInstance());\r\n }", "public abstract List<Status> getStatus();", "ArrayList<Status> getStatusList()\n {\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .hadoop.yarn.ApplicationAttemptIdProto app_attempt_id = 2;
public org.apache.hadoop.yarn.proto.YarnProtos.ApplicationAttemptIdProto getAppAttemptId() { return appAttemptId_; }
[ "public static int getAppAttemptId(JobContext context) {\n return getAppAttemptId(context.getConfiguration());\n }", "protected final String getTaskAttemptId() {\n return stageConfig.getTaskAttemptId();\n }", "@Override\n\tpublic void setAttemptId(long attemptId) {\n\t\t_testItemAttempt.setAttemptId(att...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
to extract qualified name with prefix
public static Map<Integer, NodeRef<Table>> extractTables(Node root) { ImmutableMap.Builder<Integer, NodeRef<Table>> builder = ImmutableMap.builder(); new TableVisitor().process(root, builder); return builder.build(); }
[ "QualifiedPrefix getName();", "protected static final String getPrefixPart(String qname) {\n/* 818 */ int col = qname.indexOf(':');\n/* 819 */ return (col > 0) ? qname.substring(0, col) : null;\n/* */ }", "public String getNamespacePrefix( );", "String getNamespacePrefix( String namespaceURI ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resets the counter to the minimum value
public void reset() { lock(); try { super.reset(); } finally { unlock(); } }
[ "protected void resetCounter()\n\t{\n\t\tsetCounter(0);\n\t}", "public void setMinValue(int value) {\n this.minValue = value;\n }", "public void incrementCount () \n {\n count = count + 1;\n if (count >= maxValue)\n {\n reset();\n }\n }", "public void setMinimum(int newMin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Counts the ArcEditPartsConnections in the given list
private int countArcConnections(List<?> list){ int count = 0; for (Object con : list) { if (con instanceof ArcEditPart) { count++; } } return count; }
[ "int getConnectionPathsCount();", "int getExtendConnectionCount(String sProxyName);", "int getComponentsCount();", "public int numberOfClients() {\n int counter = 0;\n for (int i = 0; i < this.clients.length; i++) {\n if (this.clients[i] != null) {\n counter++;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the list of connection definition files.
private Iterable<Path> findAllGroovyFiles() { final List<Path> handlerFiles = new ArrayList<>(); Path startPath = config.handlersPath(); LOG.debug("Search for handler files in directory " + startPath); try { Files.walkFileTree(startPath, new SimpleFileVisitor<Path>() { ...
[ "public com.google.protobuf.ProtocolStringList\n getConnectionPathsList() {\n return connectionPaths_;\n }", "public ArrayList<String> getConnectionNames() {\n return connectionNames;\n }", "public java.util.List<com.yandex.yql.analytics.AnalyticsProtos.ConnectionEntity> getConnectionLi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; }
[ "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // INVALID_ARGS\n return INVALID_ARGS;\n default:\n return null;\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct an item object
Item(String text, boolean checked) { this.text= text; this.checked = checked; }
[ "protected abstract T createItem();", "public Item(){\r\n\t\t\r\n\t}", "public Item(String name){\n\t\t\n\t}", "Item()\n\t{\n\t\tsuper();\n\t}", "public Item()\n {\n name = \"\";\n description = \"\";\n\n setupAttributes();\n }", "public ItemTest()\n {\n item = new Ite...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string s2c_msg = 2;
public Builder setS2CMsgBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; s2CMsg_ = value; onChanged(); return this; }
[ "public void setMessage2(String message2){\n this.message2 = message2;\n }", "public com.futu.opend.api.protobuf.Notify.S2C getS2C() {\n return s2C_;\n }", "CtoSMessage parseInCtoSMessage(String message);", "public pomelo.area.ActivityHandler.totalInfo getS2CData() {\n if (s2CDataBui...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of setLastName method, of class Person.
@Test public void testSetLastName() { String lastName = "Gilbourne"; validPerson.setLastName(lastName); assertEquals(lastName, validPerson.getLastName()); }
[ "public void testSetLastname() {\r\n System.out.println(\"setLastname\");\r\n \r\n String lastname = \"\";\r\n com.abbt.timesheet.entities.User instance = new com.abbt.timesheet.entities.User();\r\n \r\n instance.setLastname(lastname);\r\n \r\n // TODO review ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Destroy additional stuff here (ads, etc)
@Override public void onDestroy() { super.onDestroy(); }
[ "@Override\n public void destroy(){\n //interstitialAds don't have a destroy function\n }", "@Override\n\tprotected void onDestroy() {\n\t\tif (adView != null) {\n\t\t adView.destroy();\n\t\t }\n\t\t super.onDestroy();\n\t}", "@Override\n public void onDestroy() {\n// if (adVie...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: a
public void mo26043a(String str, Object... objArr) { for (C8093b a : C8091a.f16271c) { a.mo26043a(str, objArr); } }
[ "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" ] ] } }
Finds next available inner subnet with the newmask after the given subnet. For example, if the current subnet is 192.168.0.0/16, 'after' subnet is 192.168.5.0/24, and newmask is 24, then the subnet returned would be 192.168.6.0/24. Another example, if the current subnet is 192.168.0.0/16, 'after' subnet is 192.168.5.0/...
public Subnet getNextAvailableSubnet(Subnet after, int newMask) { Subnet toCompare = createInnerSubnet(newMask); try { String afterNext = after.getNext().getFirstIPAddressForComparison(); while (toCompare.getFirstIPAddressForComparison().compareTo(afterNext) < 0) { toCompare = toCompare.getNext(); }...
[ "private Coordinate nextBest(Coordinate current){\n\t\t/* Array list of coordinates, which are the neighbors of the current coordinate. There should not be\n\t\t * more than 4 neighbors.*/\n\t\tArrayList<Coordinate> neighbors = getNeighbors(current.getLocalX(),current.getLocalY());\n\t\tDouble closest = Double.POSI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates a new key
public SecretKey generateKey() { try { EncryptionManager.console.info("Generating session key..."); KeyGenerator keyGen = KeyGenerator.getInstance("Rijndael"); keyGen.init(this.keyLength()); return keyGen.generateKey(); } catch (Exception e) { ...
[ "String generateKey(String name);", "public String genereateNewKey(String name) {\n return UUID.randomUUID().toString();\n }", "protected String createKey() {\n \t\tkey = UUID.randomUUID().toString();\n \t\treturn key;\n \t}", "public SecretKey genKey();", "public long generateKey() {\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .Cache_service.MapPackageInfoLine map_package_info_line = 1;
public Cache_service.CacheMessage.MapPackageInfoLine getMapPackageInfoLine(int index) { return mapPackageInfoLine_.get(index); }
[ "public void getMAP() {\n\n }", "public interface CacheOverlayItemImpl extends OverlayItemImpl {\n\n\tpublic cgCoord getCoord();\n\t\n\tpublic String getType();\n\n}", "private static String getPrivatePackage(String line) {\n Pattern pattern = Pattern.compile(\".*in type (.*)$\");\n Matcher mat = patte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }