query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Method to disconnect with server.
public synchronized void disconnect() throws FTPException { //Check that tokenizer exist. if (this.lexer == null) { throw new FTPException(FTPStatus.OK, lc.getLanguage() .notConnected()); } //Disconnect new DisconnectCommand().execute(lexer); this.lexer = null; }
[ "public void disconnect() {\n serverConnection.disconnect();\n }", "public void disconnect() {\n quitServer();\n }", "public void disconnect(String server) {\n\t}", "public void disconnect() {\n if (isConnected()) {\n try {\n connection.close();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The function updates the board.
public void update(Point[] snakes, Point[] gates, Point[] food) { this.snakes = snakes; this.gates = gates; this.food = food; repaint(); }
[ "@Override\r\n\tpublic void update(Board board) {\n\t\t\r\n\t}", "public void update(QubicBoard board);", "private void boardUpdate()\n {\n // Sets Score to Current Score\n scoreText.setText(\"Score: \" + board.getScore() );\n\n // Finds Appropriate Rectangle and Text in Arrays\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ 32: / 33:
public final Executor getConcurrentExecutor() /* 34: */ { /* 35: 90 */ return this.concurrentExecutor; /* 36: */ }
[ "public int mo5868b() {\r\n return 32;\r\n }", "public int U()\r\n/* 2728: */ {\r\n/* 2729:2743 */ return 256;\r\n/* 2730: */ }", "private int yyr32() {\n {\n yyrv = tree.new OutputNode(yysv[yysp-2], true);\n }\n yysv[yysp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the queries and building the results
private List<QueryResult> ExecuteQueries(Directory index, List<DocumentData> trainDocuments, List<AnalyzerQuery> queries, int k) throws IOException { List<QueryResult> result = m_QueriesRunner.ExecuteQueries(index, trainDocuments, queries, k); return result; }
[ "protected void buildQueries()\n {\n buildChildrenQuery();\n buildUpdateNodeQuery();\n }", "private List<Result> getResultsForQuery(Connection connection, PreparedStatement statement, String sql) throws SQLException {\n ResultSet rs = statement.executeQuery();\n List<Result> results = ne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts date String to Date object
private Date convertToDate(String dateString) { Date date = null; SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); formatter.setLenient(false); try { date = formatter.parse(dateString); } catch (ParseException e) { e.printStackTrace(); return null; } return date; }
[ "public static Date fromStringTODate(String strDate) {\n\t\t DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t Date date = null;\n\t\t try {\n\t\t date = dateFormat.parse(strDate);\n\t\t }catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t return date;\n\t}", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ / / /
public static Allocator loadAllocator(int address) /* */ { /* 46 */ int id = MainMemory.getByte(address); /* */ try { /* 48 */ return _ALLOCATORS[id]; /* */ } catch (ArrayIndexOutOfBoundsException aie) {} /* 50 */ return null; /* */ }
[ "public static void main (String arg[]){\n\tSystem.out.println(\" ( ) ( ( \"); \n\n\tSystem.out.println(\" ( )\\\\ ) ( /( ( )\\\\ ) ( )\\\\ ) \");\n\t\n\tSystem.out.println(\" )\\\\ (()/( ( )\\\\()) )\\\\ (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Whether this LogEntry reads/writes a BINDelta logrec.
@Override public boolean isBINDelta() { return true; }
[ "protected boolean processEntry(ByteBuffer entryBuffer)\n throws DatabaseException {\n\n /* Figure out what kind of log entry this is */\n byte curType = currentEntryHeader.getType();\n LogEntryType lastEntryType = LogEntryType.findType(curType);\n\n /* Print out a common header f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Replace bytes on an existing key. If the key doesn't exist, the operation has no effect.
public abstract Future<Boolean> replace(String key, Buf value);
[ "public boolean replace(@Nonnegative final int txId, @Nonnull final byte[] oldKey, @Nonnull final byte[] newKey,\n @Nonnull final ByteBuffer data, @Nonnegative final int offset, @Nonnegative final int length)\n throws IbsException, IllegalArgumentException, IbsIOException, IndexOutOfBoundsExce...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public Integer deletConsultantById(Integer consultantId) { return consultantMapper.deletConsultantById(consultantId); }
[ "@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" ] ] } }
MyList integers = new MyList(); integers.add(1); integers.add(2); integers.add(3); integers.add(4); System.out.println(integers);
public static void main(String[] args) { for (int i = 0; i < 10; i++) { if (i==5){ break; } System.out.println(i); } // int [] ints=new int[34]; // int size=0; // ints[size++]=5; // System.out.println(ints[0]); // // S...
[ "public static void main(String[] args) {\n\t\n\t\tList<Integer> dd=new customArrayList<>();\n\t\tdd.add(1);dd.add(2);dd.add(4);dd.add(5);\n\t\tSystem.out.println(dd);\n\n}", "public static void main(String[] args) {\n\t\t\n\t\tArrayList<Integer> mylist =new ArrayList<>();\n\t\tmylist.add(12);\n\tmylist.add(24);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@PostConstruct public void injectBaseMapper() { super.injectBaseMapper(userMapper); }
[ "@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 Image update(Image entity) { return ir.save(entity); }
[ "@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" ] ] } }
Executes SQL which is expected to return a single long/int value, such as a COUNT statement would.
public Long executeLongScalar(String sql, Object ...data) throws SQLException{ Connection conn = getConnection(); try(PreparedStatement statement = conn.prepareStatement(sql)){ if(data != null){ bindData(statement,data); } try(ResultSet resultSet = statement.executeQuery()){ return resultSet.getLong(1); ...
[ "public int executeStatementReturnsInt(String sql, String columnLabel) {\n java.sql.Connection conn = Connection.getInstance().connect();\n Statement stmt = null;\n ResultSet rs;\n int results = -1;\n if (conn == null) {\n return results;\n }\n\n try {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/////////////////////////////////////// KickStart SAX in main // //////////////////////////////////////
public static void addHashmap() { String TOMCAT_HOME = System.getProperty("catalina.home"); new SaxParserDataStore(TOMCAT_HOME+"\\webapps\\HealthHub\\ProductCatalog.xml"); }
[ "@Override\n\t\tpublic void startDocument() throws SAXException {\n\t\t\t\n\t\t}", "public void startDocument() throws SAXException {\n System.out.println(\"Document Start\");\r\n }", "protected SAXEventHandler() {}", "public void startDocument() throws SAXException{\r\n System.out.println(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Memory size in GB
public Long getMemoryNum() { return this.MemoryNum; }
[ "public long totalMemory();", "public long getProcessPhysicalMemorySize();", "public String totalMem() {\n return appropriateSizeUnit(Runtime.getRuntime().totalMemory());\n }", "private long getMemoryTotalSizeFromProp() {\n return android.os.SystemProperties.getLong(\"system.ram.total\", 512)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__PageContainer__Group_7__4" $ANTLR start "rule__PageContainer__Group_7__4__Impl" ../pimar.editor.textual.xgcore.ui/srcgen/pimar/editor/textual/xgcore/ui/contentassist/antlr/internal/InternalXgcore.g:1948:1: rule__PageContainer__Group_7__4__Impl : ( '}' ) ;
public final void rule__PageContainer__Group_7__4__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../pimar.editor.textual.xgcore.ui/src-gen/pimar/editor/textual/xgcore/ui/contentassist/antlr/internal/InternalXgcore.g:1952:1: ( ( '}' ) ) ...
[ "public final void rule__RelativeNamespace_Impl__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSeronetGw.g:1719:1: ( ( '}' ) )\n // InternalSeronetGw.g:1720:1: ( '}' )\n {\n // Intern...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read the primary and foreign keys from the DatabaseMetaData and notify the given table of the keys
private static void readTableKeys(DatabaseMetaData meta, String schemaPattern, DBTable table, Map tables) throws SQLException { ResultSet keys = null; try { if (null != schemaPattern && schemaPattern.trim().length() > 0) schemaPattern = schemaPattern.trim(); else schemaPattern = meta.getUserName...
[ "private void readPrimaryKeys() throws SQLException\r\n {\n java.sql.ResultSet rs = null;\r\n try\r\n {\r\n rs = dbMeta.getPrimaryKeys(null, \r\n this.getDBSchema().getSchemaName(), this.strTableName);\r\n while (rs.next())\r\n {\r\n String strCatalog...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Schedule a job for the eventdispatching thread: creating and showing this application's GUI.
public static void main(String[] args) { javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { new Display().populateMainFrame(); } }); }
[ "public static void createAndShowGUI(){\r\n //Schedule a job for the event-dispatching thread:\r\n //creating and showing this application's GUI.\r\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\r\n public void run() {\t\r\n\t\t\t\t//Create and set up the window.\r\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If call, then should call after newView() called first
public static void updateData(ChartPanel panel) { final double[][] data = (double[][]) panel.getClientProperty("data"); data[1] = BaseImageProc.calcGreyFilter(data[0]); final JFreeChart chart = panel.getChart(); final XYPlot plot = chart.getXYPlot(); final DefaultXYDataset datase...
[ "@Override\n public void onViewInitFinished(boolean arg0) {\n }", "private void prepareView() {\n\n }", "public void AlreadyCreated(View view) {\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n startActivityForResult (intent,0);\n }", "void afterIn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
documentation inherited from interface ClientObserver
public void clientDidClear (Client client) { // nothing doing }
[ "public interface IClientConnectedListener {\n\n\n}", "public interface Listener {\n void onClientUpdated();\n }", "@Override\n \tpublic void clientConnected(Client connectedClient) {\n \t\tSystem.out.println(\"Connected to \" + connectedClient);\n \t\tthis.knownClients.add(connectedClient);\n \t}", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new MerchantShellAppConfigPage
public MerchantShellAppConfigPage(WebDriver driver) { this.driver=driver; PageFactory.initElements(driver,this); }
[ "public InitialConfigWindow() {\n initComponents();\n layout = (CardLayout) container.getLayout();\n layout.show(container, \"site\");\n setTitle(\"JTill Setup - Site Details\");\n }", "public SAPFrontpage() {\n Option[] accountTypes = new Option[] {\n new Option(\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ We reset the boolean so see if the fields are filled in
@Override public void onClick(View v) { getCheckEditTextIsEmptyOrNot(); /* If so, we sent this data to the database */ if (CheckEditText) { sendDataToServer(GetNUMBER); /* Allow the text file to update itself */ ...
[ "private boolean isAllSet(){\n boolean isSet = true;\n if (nameTextField.getText().isEmpty() ||\n descriptionTextArea.getText().isEmpty() ||\n companyTextField.getText().isEmpty() ||\n positionTextField.getText().isEmpty()) {\n isSet = false;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .com.google.openrtb.BidResponse bidresponse = 2; Mbr: mbrbidresponse.proto.
public com.google.openrtb.OpenRtb.BidResponseOrBuilder getBidresponseOrBuilder() { return bidresponse_; }
[ "public Builder clearBidresponse() {\n if (bidresponseBuilder_ == null) {\n bidresponse_ = com.google.openrtb.OpenRtb.BidResponse.getDefaultInstance();\n onChanged();\n } else {\n bidresponseBuilder_.clear();\n }\n bitField0_ = (bitField0_ & ~0x00000002);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
draw inner circle based on percentage pulled
private void updateInnerCirclePosition() { innerCircleCenterPositionX = (int) (outerCircleCenterPositionX + actuatorX*outerCircleRadius); innerCircleCenterPositionY = (int) (outerCircleCenterPositionY + actuatorY*outerCircleRadius); // Log.d("DEBUG", "innerCircleX " + innerCircleCenterPositionX +...
[ "public void paintCircle() {\n var gc = getGraphicsContext2D();\n var radius = 8;\n gc.setFill(Color.color(1.0, 1.0, 1.0, 0.5));\n gc.fillOval((width / 2) - radius, (height / 2) - radius, radius * 2, radius * 2);\n }", "@Override\n \tpublic void renderPointOfInterestCircle(float rad...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This interface must be implemented by activities that contain this fragment to allow an interaction in this fragment to be communicated to the activity and potentially other fragments contained in that activity. See the Android Training lesson Communicating with Other Fragments for more information.
public interface SignInInterfaceListener { void gotoRegistration(); }
[ "public interface MainActivityFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}", "public interface ActivitytoFragment {\n void communicate(boolean comm);\n\n}", "public interface TalkToIndividualFragment {\n /**\n * report how many has added in remote data...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the default native library path for the Java platform the application uses.
protected List<Path> getPlatformNativeLibraryPath() { return (_ct = getCallTarget(Capsule.class)) != null ? _ct.getPlatformNativeLibraryPath() : getPlatformNativeLibraryPath0(); }
[ "private Path getPathForNativeLibs() {\n return getBinPath(\"__native_libs_%s__\");\n }", "public static String libraryPath() {\n return Sys.VM.libraryPath();\n }", "public String defaultClassPath() {\n if (Options.v().src_prec() != Options.src_prec_apk) {\n for (String entry : Options.v().proce...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Overwrite custom dimensions on this MetricsLogger instance, with an option to preserve default dimensions.
public MetricsLogger setDimensions(boolean useDefault, DimensionSet... dimensionSets) { return applyReadLock( () -> { context.setDimensions(useDefault, dimensionSets); return this; }); }
[ "public void setDimensions() {\r\n\t\t// By default, do nothing\r\n\t}", "public void setDimensions(Dimensions dimensions);", "public Builder clearDimensions() {\n dimensions_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ 73: / 74:
public final String Conditions() /* 75: */ { /* 76:101 */ return this.text.substring(this.text.indexOf("IF ") + 3, this.text.indexOf("IF ") + 3 + this.text.indexOf(" THEN") - 3); /* 77: */ }
[ "public void mo26342c() {\n }", "public static void Elyazi_53() {\n\t\t\n\t}", "public int method_5482() {\r\n return 4;\r\n }", "private static void EX5() {\n\t\t\r\n\t}", "public void mo6726a() {\n }", "public void mo17751g() {\n }", "protected void method_5557() {}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the CheckingSet field. The point at which issues of this type are created.
@gw.internal.gosu.parser.ExtendedProperty public typekey.UWIssueCheckingSet getCheckingSet() { return (typekey.UWIssueCheckingSet)__getInternalInterface().getFieldValue(CHECKINGSET_PROP.get()); }
[ "public java.lang.String getCheckingType() {\r\n return checkingType;\r\n }", "public void setChecking_type(Integer checking_type) {\n this.checking_type = checking_type;\n }", "public String getCheckObject() {\n return checkObject;\n }", "public final IndexedCheckModel<T> getChe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This component inject dependencies to all Fragments across the application
@PerFragment @Subcomponent(modules = FragmentModule.class) public interface FragmentComponent { void inject(MainFragment mainFragment); void inject(FavoriteFragment favoriteFragment); }
[ "@ScopedActivity\n@Component(\n modules = FlickrFragmentModule.class,\n dependencies = ApplicationComponent.class\n)\npublic interface FlickrFragmentComponent {\n void inject(PhotoslideFragment fragment);\n}", "@ViewScope\n@Component(dependencies = RoliqueApplicationComponent.class)\ninterface Co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the algorithm name of this CertPathValidator.
public final String getAlgorithm() { return algorithm; }
[ "public static String getAlgorithm() {\n return algorithmName;\n }", "public String getAlgorithm() {\r\n return algorithm;\r\n }", "public String getAlgorithm() {\r\n\t\treturn algorithm;\r\n\t}", "public String getAlg() {\n return this.alg;\n }", "public static String getAlgro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 324 /Coverage entropy=2.347591028475528
@Test(timeout = 4000) public void test324() throws Throwable { ErrorPage errorPage0 = new ErrorPage(); Table table0 = new Table(errorPage0, ""); table0.tbody(); assertEquals("Table_1", table0.getComponentId()); errorPage0._clear(); assertEquals("wheel_ErrorPage", errorPage...
[ "@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" ] ] } }
Created by li on 2017/2/20.
public interface Api { //首页广告轮播 @FormUrlEncoded @POST("recommend/operationElement") Call<HomeRollPageBean> getRollPageBean(@FieldMap Map<String,String> params); //首页广告轮播详情列表界面 @FormUrlEncoded @POST("topics/topic/listByIds") Call<HomeRollPageDetailBean> getRollPageDetailBean(@FieldMap Map...
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "private static void EX5() {\n\t\t\r\n\t}", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public int utilite() {\n return 0;\n }", "@Override\r\n\tpublic void hablar() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
override postHandle() and afterCompletion()
public void afterCompletion(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, Exception arg3) throws Exception { System.out.println("After Completions"); }
[ "void postprocess(CompletionHandler<Void, Void> completionHandler);", "@Override\n\t\t\tpublic void afterCompletion(HttpServletRequest request,\n\t\t\t\t\tHttpServletResponse response, Object handler, Exception ex)\n\t\t\t\t\tthrows Exception {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void afterCompletion(Http...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_times, menu); return true; }
[ "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflator = getMenuInflater();\n\t\tinflator.inflate(R.menu.activity_action_bar, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n public boolean onCreateOptionsMenu( android.view.Menu menu)\r\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional float high_value = 8;
public Builder setHighValue(float value) { bitField0_ |= 0x00000080; highValue_ = value; onChanged(); return this; }
[ "float getHighControlLimit();", "public float newHigh()\n\t{\n\t\treturn high.newValue();\n\t}", "public float floatValue()\n{\n float temp;\n\n temp = (_data < 0 ? MAX_SHORT_VALUE + _data + 1: _data);\n return temp;\n}", "public int getHigh() {return 1023 - _hundred;}", "float getMaximumValue();", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Descripcion: Actualiza el Estado del Participante del Tablon. Lo Retira o lo Expulsa.
public static Boolean actualizarEstadoParticipanteTablon( String correoTurista, String codeTablonColonia, String estadoParticipante) throws UnknownException{ PersistenceManager pm=null; Transaction tx= null; try{ pm = PMF.getPMF().getPersistenceManager(); tx=pm.currentTransaction(); tx.begin(...
[ "public void actualizarDatos() {\n List<EntradaParticipacion> entradas = fa.obtenerDatosParticipaciones(u);\n listaActual = entradas;\n this.empresasDiferentes.setText(String.valueOf(entradas.size()));\n int sum = 0;\n for (EntradaParticipacion e : entradas) {\n sum += ...
{ "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" ] ] } }
returns direction to Cartesian b from a in radians.
public static double getDirectionInRadians(Cartesian a, Cartesian b) { return Math.atan2(b.y() - a.y(), b.x() - a.x()); }
[ "public static Vector3 dir(Vector3 a, Vector3 b) {\n\t\treturn a.cpy().sub(b.cpy()).nor().scl(-1);\n\t}", "public static float[] getDirection(GameObject a, GameObject b)\n\t{\n\t\tfloat[] dir = new float[2];\n\t\tdir[0] = (b.getX() - a.getX());\n\t\tdir[1] = (b.getY() - a.getY());\n\t\tfloat mag = (float)Math.sqr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO review if this commonCode is applicable in this project, as its only used once so far.
private void populateCommonFields(AuditEntry auditEntry, AuditActions action, String username, String serviceName) { auditEntry.setAction(action); auditEntry.setUsername(username); a...
[ "@Override\n public void extornar() {\n \n }", "protected void method_5557() {}", "@Override\n }", "protected void mo4791d() {\n }", "private static void EX5() {\n\t\t\r\n\t}", "protected SameIndivType() {/* intentionally empty block */}", "@Override\n public int utilite() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CAn the player jump
protected boolean canJump() { switch(getState()) { case IDLE: case WALK_HORIZONTAL: case WALK_VERTICAL: return true; default: return false; } }
[ "void jump()\n\t{\n\t\t//jump when Mario is still on the ground or when he is on a tube. \n\t\tif (y >= 400 - h || numFramesInAir < 5) \n\t\t{\n\t\t\tvert_vel += -10; \n\t\t}\n\t}", "public void jump() {\r\n level.getPlayer().setVy(-300);\r\n }", "private void playerJump()\n {\n if (cl.isPlayerOnG...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function to return size of stack
public int size(){ return stack.size; }
[ "public int sizeStack(){\n return runTimeStack.size();\n }", "public int size()\n {\n return this.stack.size();\n }", "public int getstackSize() {\n\t\treturn stackSize;\n\t}", "public int size()\n\t{\n\t\tif (isEmpty())\n\t\t{//if there is nothing in the stack\n\t\t\treturn 0;//will be...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column qltn_m_note_report.NOTE_REPORT_ID
public String getNoteReportId() { return noteReportId; }
[ "public String getReportID() {\n return reportID;\n }", "String getNoteId();", "public int getNoteId();", "public int getLBR_NotaFiscalNote_ID();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getReportNumber() {\n return (java.lang.Integer)__getInternalInterface()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Random random = new Random();
public static void main(String[] args) { try{ File file1 = new File("C:\\\\Program Files\\\\ImageJ\\\\images\\\\confocal-series-10001.tif"); //File file2 = new File("C:\\Program Files\\ImageJ\\images\\confocal-series-10000.tif"); ImagePlus image1 = new ImagePlus("C:\\\\Pro...
[ "private void setRandom(Random rand){\n random = rand;\n }", "static public void initialize(){\n rand = new Random();\n }", "@Override\r\n\tpublic void random() {\n\t\t\r\n\t}", "public Random getRandom(){\n return this.random;\n }", "double myRandom() {\n\treturn myRandGen.nextDoubl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the current progress of the goal.
public void setProgress(double progress) { this.progress = progress; }
[ "public void setProgress(double value);", "private void setProgress(double value) {\n \n progress_ = value;\n }", "public void setProgress(int progress)\r\n {\r\n m_progress = progress;\r\n }", "public void setProgress(final int newCurrentValue, final int newMaxValue);", "public vo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Bean for CSV Item Reader
@Bean public FlatFileItemReader<Transaction> csvReader() { FlatFileItemReader<Transaction> reader = new FlatFileItemReader<Transaction>(); reader.setStrict(false); reader.setLinesToSkip(1); reader.setLineMapper(new DefaultLineMapper<Transaction>() {{ setLineTo...
[ "@Bean\n public FlatFileItemReader<CisCustProdHold> readerCisCustProdHold() {\n FlatFileItemReader<CisCustProdHold> reader = new FlatFileItemReader<CisCustProdHold>();\n\n reader.setResource(new ClassPathResource(inputFileName));\n // skip csv header\n reader.setLinesToSkip(1);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub / Instantiate the client class and start it's thread
@Override public void handle(ActionEvent Event) { Client client; try { client = new Client(hostNameField.getText(), Integer .parseInt(portNumberField.getText()), nameField .getText()); Thread clientThread = new Thread(client); clientThread.setDaemon(true); clientThread.start...
[ "@Override\n public void run() {\n Client client = new Client(\"127.0.0.1\", 9000);\n }", "public static void start() {\r\n\t\tthread = new Thread(new TestClient(), \"Test Client\");\r\n\t\tthread.start();\r\n\t}", "private void runClient() {\r\n\t\tconnection = new Connecti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Valida el login, es decir busca en la BD si existe esta cuent con esta contrasena
private String isValidLogin(){ String user = userField.getText(); String password = passwordField.getText(); // Esto es de prueba if(user.equals("ejecutivo") && password.equals("ejecutivo") && comboBox.getValue().equals("Ejecutivo")) return "Ejecutivo"; else if(user....
[ "public boolean validarCadastroUsuario(String login) throws Exception {\n\t\tboolean valido;\n\t\tusuario.setLogin(login);\n\n\t\tif (usuarioDao.consultarUsuario(login)) {\n\t\t\tvalido = false;\n\t\t} else {\n\t\t\tvalido = true;\n\t\t}\n\t\treturn valido;\n\t}", "public boolean validateLogin(String n, String p)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This interface must be implemented by activities that contain this fragment to allow an interaction in this fragment to be communicated to the activity and potentially other fragments contained in that activity. See the Android Training lesson Communicating with Other Fragments for more information.
public interface OnFragmentInteractionListener { // TODO: Update argument type and name void onFragmentInteraction(Uri uri); }
[ "public interface MainActivityFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}", "public interface ActivitytoFragment {\n void communicate(boolean comm);\n\n}", "public interface TalkToIndividualFragment {\n /**\n * report how many has added in remote data...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns edges and weights in a string.
public String toString() { String o = ""; for (City v : cities) { boolean first = true; o += "City "; o += v.getCityName(); o += " has neighbors: "; ArrayList<City> ngbr = v.getNeighbors(); for (City n : ngbr) { o +=...
[ "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(vertex).append('(').append(weight).append(')');\n return sb.toString();\n }", "private static SimpleWeightedGraph<String, DefaultEdge> createSimpleWeightedStringGraph()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Generated Class Name' attribute. The default value is "software.amazon.awscdk.services.rds.OracleSe2InstanceEngineProps".
String getGeneratedClassName();
[ "@Override\n public com.gensym.util.Symbol getG2ClassName() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.CLASS_);\n return (com.gensym.util.Symbol)retnValue;\n }", "public String getDriverClassName() {\n\t\treturn properties.getProperty(DB_CLASS_NAME)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Basic example of simplification based on edge contractions Simply select at random edges to be contracted
public void simplify() { if (this.polyhedron3D.halfedges.size()==0) return; int i = (int)(Math.random() * this.polyhedron3D.halfedges.size()); Halfedge<Point_3> halfedge = this.polyhedron3D.halfedges.get(i); if(!this.isLegal(halfedge)) return; edgeCollapse(halfedge); return; }
[ "@ParameterizedTest\n @ArgumentsSource(FixtureProvider.class)\n public void testFindPathWithTurnRestriction_two_different_loops(Fixture f) {\n f.graph.edge(0, 1).setDistance(20).set(f.speedEnc, 10, 0);\n f.graph.edge(1, 5).setDistance(10).set(f.speedEnc, 10, 10);\n f.graph.edge(5, 0).setD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stores the content of one record into influxDB. Stores nothing if null
public void storeRecord(Record record) { if (record == null) return; write(record.assignedFrom.createMeasurement(record)); }
[ "@Override\n public long putRecord(Record rec) {\n try (Connection conn = sql2o.open()) {\n conn.createQuery(\"INSERT INTO records(loc_id, ts, temperature, humidity, wind_speed, wind_direction) \" +\n \"VALUES (:locid, :ts, :temp, :hum, :ws, :wd)\")\n .addP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the character(s) that will be shown between the app name and the module in the prompt display. By default, this separator is ": " a colon with a space after it. Be advised that this separator will only be displayed if the client has multiple modules. The following examples show two prompts with the same settings b...
public void setModuleSeparator(String separator) { this.moduleSeparator = separator; }
[ "void setSeparator(char separator);", "public static void setSep( String sep )\n {\n try {\n MacAddressApplet.sep = sep;\n } catch( Exception ex ) {\n // don't care\n }\n }", "@attribute(value = \"\", required = false, defaultValue=\"\\\\\")\r\n\tpublic void set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GENLAST:event_jComSerKeyPressed /Cuando se presiona una tecla en el control de la fecha de
private void jDFechKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jDFechKeyPressed //Llama a la función escalable vKeyPreEsc(evt); }
[ "private void jComSerKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jComSerKeyPressed\n\n //Llama a la función escalable\n vKeyPreEsc(evt);\n\n }", "private void txtFechaFin_keyPressed(KeyEvent e)\n {\n if(e.getKeyCode() == KeyEvent.VK_ENTER){\n \n }\n else if (e.getKeyCode() =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO maybe resolve some stuff...
@Override public void resolve() throws ClassFileException { }
[ "protected void method_5557() {}", "@Override\n public void extornar() {\n \n }", "@Override\n }", "protected void mo4791d() {\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 util...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
toString Returns the state of the object as a String.
public String toString() { return "Human - Name: " + Name + " Age: " + this.getAge() + " owns " + PetCount + " pets"; }
[ "public String toString() {\n return this.obj.toString();\n }", "public String toString() {\r\n\t\treturn StringUtil.formatObjectToString(this);\r\n\t}", "public String toString() {\n return convertToString(false);\n }", "public java.lang.String toString() {\n \n }", "@Override\n \tp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check whether any part of this Rectangle is colliding with another, including sides intersecting but also one being completely inside the other.
public boolean collides(Rect other) { return (V2.dot(new V2(pos(), other.pos().add(other.size())), new V2(other.pos(), pos().add(size()))) > 0); }
[ "public boolean isColliding(Rectangle other) { return this.hitBox.overlaps(other); }", "public boolean intersects(Rectangle other) {\n return(\n\t\t\t(this.getTop() < other.getRight() && other.getTop() < this.getRight()) &&\n\t\t\t(this.getLeft() < other.getBottom() && other.getLeft() < this.getBottom())\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Bitmap bm = null;
public FSubCategoryAdapter(List<Product> products, Context context) { this.products = products; this.context = context; }
[ "void mo24355a(Bitmap bitmap);", "Bitmap getBitmap() {\n return mBitmap;\n }", "public void setBitmap(Bitmap bitmap){\n\t\t\tthis.bmp = bitmap;\n\t\twidth = bmp.getWidth();\n\t\theight = bmp.getHeight();\n\t\tdisposed = false;\n\t}", "public void mo61496a(Bitmap bitmap) {\n this.f2669d = bitm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__EClass__Group_10_3__0" $ANTLR start "rule__EClass__Group_10_3__0__Impl" ../pimar.editor.textual.xwcore.ui/srcgen/pimar/editor/textual/xwcore/ui/contentassist/antlr/internal/InternalXwcore.g:15890:1: rule__EClass__Group_10_3__0__Impl : ( ',' ) ;
public final void rule__EClass__Group_10_3__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../pimar.editor.textual.xwcore.ui/src-gen/pimar/editor/textual/xwcore/ui/contentassist/antlr/internal/InternalXwcore.g:15894:1: ( ( ',' ) ) ...
[ "public final void rule__EClassOpDef__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../it.univaq.coevolution.emfmigrate.ui/src-gen/it/univaq/coevolution/emfmigrate/ui/contentassist/antlr/internal/InternalEmig.g:2799:1: (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disable going back to the previous activity
@Override public void onBackPressed() { moveTaskToBack(true); }
[ "@Override\n protected boolean canGoBack() {\n return false;\n }", "@Override\n public void onBackPressed() {\n // NO GO BACK IS ALLOWED!\n }", "public void onBackPressed() {\n moveTaskToBack(false);\n }", "public boolean onBackPressed() {\n\t\treturn false;\n\t}", "@Override\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Referenced classes of package org.springframework.core.io: ResourceLoader, Resource
public interface ProtocolResolver { public abstract Resource resolve(String s, ResourceLoader resourceloader); }
[ "private ResourceLoader() {\n\t\tString packagePath = getClass().getPackage().getName();\n\t\tpackagePath = packagePath.replace(\".\", \"/\");\n\t\tmessages = ResourceBundle.getBundle(packagePath + \"/messages\",\n\t\t\t\tLocale.US);\n\t}", "InputStream loadResource(String resourcePath);", "public interface Res...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds an AccountWithSigningPublicKey by email and checks if it exists.
protected AccountWithSigningPublicKeyEntity findAndCheckAccountWithSigningPublicKeyByEmail( String email) { AccountWithSigningPublicKeyEntity account = accountWithSigningPublicKeyEntitiesRepository.findByEmail(email); if (account == null) { throw new ServiceException( ...
[ "public boolean existsByEmail(String email);", "Boolean existEmail(String email);", "Boolean emailIsExist(String email);", "Optional<Account> findByEmail(String email);", "private boolean ifExist(String email) {\n List<Users> listOfUsers = getUsers();\n for (int i = 0; i < getUsers().size(); i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The doPost method of the servlet. This method is called when a form has its tag value method equals to post.
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //1定义一个用户对象 然后将用户名和密码填入该用户中 Users bean = new Users(); bean.setUname(request.getParameter("uname")); bean.setUpwd(request.getParameter("upwd")); //2 实例化数据操作 层 来增加或者修改用户 UsersDao usersdao ...
[ "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n \t perForm(request, response);\r\n \t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n }", "prote...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Factory Methods for Collections (JEP 269) JDK 8
public static void main(String [] args) { List<String> citySC = new ArrayList<>(); citySC.add("Florianópolis"); citySC.add("São José"); citySC = Collections.unmodifiableList(citySC); // citySC.add("Palhoça"); citySC.stream().forEach(c -> System.out.println(c)); //...
[ "public interface BetterCollection {\r\n}", "protected Collection() {}", "public static void testCollections(){\n\t\t\n\t}", "JavalutionCollectionFactory() {\r\n }", "private ListUtil(){}", "Collection<L> list();", "CollectionTypeCS createCollectionTypeCS();", "Collection8Test(CollectionImplementat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
list items at your shop
public void listItems() throws IOException{ try { statement= connection.createStatement(); String listItems = String.format("SELECT * FROM Items WHERE owner == '%s';",client.username); ResultSet items = statement.executeQuery(listItems); StringBuilder text = new ...
[ "public void listItems() {\n\t\tfor (String s : shoppingList) {\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}", "public abstract String listItems();", "@NotNull\n private String listAllItems()\n {\n StringBuilder stringBuilder = new StringBuilder();\n\n stringBuilder.append(\"Item list:\\n\");\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: h
private int m8053h() { return (int) DatabaseUtils.queryNumEntries(this.f7048d.getReadableDatabase(), "events"); }
[ "@Override\r\n\tpublic int get_h() {\n\t\treturn super.get_h();\r\n\t}", "public void H() {}", "private static final int hash(int h)\n\t{\n\t h ^= (h >>> 20) ^ (h >>> 12);\n\t return h ^ (h >>> 7) ^ (h >>> 4);\n\t}", "private static int supplementalHash(int h){\n\t\th ^= ( h >>> 20) ^ (h >>> 12);\n\t\tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reset the operation counter to 0
public void resetOperations() { operations = 0; }
[ "protected void resetCounter()\n\t{\n\t\tsetCounter(0);\n\t}", "public void reset() {\n\t\tthis.count = 0;\n\t}", "public void reset() {\n\t\tadds = 0;\n\t\tcompares = 0;\n\t}", "public void reset() {\n successCount.set(0);\n failedCount.set(0);\n }", "@Override\n public void reset() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/the method returns false if it has reached the boundaries or it is adjacent to the already fallen Tetris pieces
public boolean isMovable(Block b,int posX,int posY,int move){ for (int i = 0; i < 4; i++) { int x = posX + b.coordX(i); int y = posY - b.coordY(i); if(move==1){ if (x==WIDTH||map[x][y-1]==1) { return false; } }...
[ "private boolean isLegalBishopMove() {\n\n\t\tif (!(Math.abs(toRow - fromRow) == Math.abs(toCol - fromCol))) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// check whether this piece moves over pieces\n\n\t\tif ((toRow > fromRow) && (toCol > fromCol)) {\n\t\t\tint l = toRow - fromRow;\n\t\t\tfor (int i = 1; i < l; i++) {\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the object with the settings used for calls to updateUptimeCheckConfig.
public UnaryCallSettings<UpdateUptimeCheckConfigRequest, UptimeCheckConfig> updateUptimeCheckConfigSettings() { return updateUptimeCheckConfigSettings; }
[ "public com.google.speech.soda.SodaCoreConfigProto.UptimeReportingConfig getUptimeReportingConfig() {\n if (uptimeReportingConfigBuilder_ == null) {\n return uptimeReportingConfig_ == null ? com.google.speech.soda.SodaCoreConfigProto.UptimeReportingConfig.getDefaultInstance() : uptimeReportingConfig...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Robin: du + ku_n = g
public void setParam(Function k,Function c,Function g,Function d) { this.g_k = k; //this.g_c = c; //this.g_g = g; //this.g_d = d; }
[ "@Override\n\tpublic double chuVi() {\n\t\t return (d1.Khoangcach(d2) + d2.Khoangcach(d3) + d3.Khoangcach(d1));\n\t}", "public static void main(String[] args) throws Exception{\n\r\n\r\n uvBigNum uv = BigNumGCD.getuv(new BigNum(17), new BigNum(23));\r\n System.out.println(\"u = \" + uv.getu());\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Contents move down to bottom
private int contentMoveDown(int dy, RecyclerView.Recycler recycler) { int actualDy = dy; int maxHeightItemIndex = getMaxHeightIndexInLine(0); View maxHeightItem = getChildAt(maxHeightItemIndex); int offScreenTop = topVisibleEdge() - getDecoratedTop(maxHeightItem); if (offScreenTop > Math.abs(actualDy)) { o...
[ "@Override\n\tpublic void setPositionToBottom() {\n\t\tUtils.setTransitionDuration(getWidget().getElement(), 0);\n\t\tUtils.setTranslateY(getWidget().getElement(), this.getElement().getClientHeight()\n\t\t\t\t- this.getElement().getScrollHeight());\n\t}", "private void getBackToBottom() {\n\t\tturnAround();\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the privileges for a certain role. NOTE: Only performed if the acting user has all the privileges he is trying to grant. FIXME: Shouldn't that be "... to grant / withdraw"?
public void setPrivilegesForRole(Role role, Privilege[] privileges) throws GeneralSecurityException { SecurityAccessManager.getInstance().verify(this); Privilege[] holderPrivileges = user.getPrivileges(this); HashSet holderSet = new HashSet(holderPrivileges.length); for (int ...
[ "@Override\n public void assignPrivileges(Role role, List<Privilege> privileges) {\n for (Privilege tmp : privileges) {\n assignPrivilege(role,tmp);\n }\n }", "public void addPrivilegesToRole(String roleId, String[] privilegeIds)throws Exception;", "void setRole(final UserRoles ro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the string has all the unique characters in it
public static boolean isAllUniqueChars(String s) { // make sure the spaces are not taken in account char[] chars = s.replaceAll(" ", "").toLowerCase().toCharArray(); boolean found[] = new boolean[256];// ASCII charecter set for (char c : chars) { int val = c; System.out.println(c + ":" + val); // found...
[ "public boolean doesStringHaveUniqueChars(String inputString);", "public static boolean hasUniqueCharacters(String str) {\n int checker = 0; \r\n \r\n for (int i = 0; i < str.length(); i++) { \r\n int bitAtIndex = str.charAt(i) - 'a'; \r\n \r\n // if that bit is already set i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
not in program, need to figure out clean way to implement
public void moneySetup() { GridPane moneyPaneTop = new GridPane(); moneyPaneTop.setHgap(10); moneyPaneTop.setVgap(10); moneyPaneTop.setPadding(new Insets(10, 10, 10, 10)); GridPane moneyPaneCenter = new GridPane(); moneyPaneCenter.setHgap(10); moneyPaneCenter.setVgap(10); moneyPaneCenter.setPadding(new ...
[ "protected void method_5557() {}", "private static void EX5() {\n\t\t\r\n\t}", "protected abstract void mo3493a();", "void abstraheren();", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "void mo37715E_();", "String work();"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the vmmax property.
public void setVMMAX(double value) { this.vmmax = value; }
[ "public void setMaximum(double max) {\n model.setMaximum(max);\n }", "public void setMax(int _max) {\n\t\tgetStateHelper().put(PropertyKeys.max, _max);\n\t}", "public void setMaxValue(T maxvalue) {\n if (propertyChange(\"maxvalue\", this.maxvalue, this.maxvalue = maxvalue, false)) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
simply just add connected vertex
void addEdge(Vertex v1, Vertex v2) { adjVertices.get(v1).add(v2); }
[ "public void addAdjacent(Node vertex){\n adjacent.add(vertex);\n }", "public void addEdge(int u, int v) {\n // YOUR CODE HERE\n if(u==v){\n return;\n }\n Vertex temp1 = vertices.get(u);\n Vertex temp2 = vertices.get(v);\n\n temp1.edges.add(tem...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Starts the state building section.
public StateBuilder states() { return new StateBuilder(); }
[ "@Override\n\tpublic void start()\n\t{\n\t\tLOGGER.debug(\"Action start() called on \" + this);\n\n\t\t// Compute State Machine.\n\t\tswitch(getState().getValue()) {\n\n\t\tcase ComputeStatus.ACTIVE_VALUE:\n\t\t\tLOGGER.debug(\"Fire transition(state=active, action=\\\"start\\\")...\");\n\n\t\t\t// TODO Implement tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
onClick radiobutton group for choose tune
public void setInstrument(View view) { Button b = (Button) view; String temp = b.getText().toString(); Log.d("Button", "The Button " + temp); if (temp.compareTo("Bass") == 0) instrument = 2; else if (temp.compareTo("Drums") == 0) instrument = 3; else if (temp.compareTo("Xylo") == 0) instrument = ...
[ "public void radioButtonClicked(RadioButton radioButton);", "public void onRadioButtonClicked(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.zoom:\n if (checked) { ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is the constructor for the Timer object. The elapsedTimer that is given to the act method of the controller is needed to get the remaining time. First all variable are set by using the reset() method.
public ActionTimer(ElapsedCpuTimer cpuTimer) { this.cpuTimer = cpuTimer; this.startTime = getRemaining(); iteration = 0; }
[ "public Timer(){\n this.timeRemaining = 17;\n this.hasBiddingTimeStopped = false;\n }", "public Timer(Controller pCtr) \n\t{\n\t\tthis.ctr = pCtr;\n\t}", "public Timer(int paramInt, ActionListener paramActionListener) {\n/* 219 */ this\n/* 220 */ .acc = AccessController.getContext();\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Clicking on the previous page on the document navigation bar
public void clickOnPreviousPageWithDocNavBar() { try { elementhandler.clickElement(PropertiesRepository.getString("com.trgr.maf." + BaseTest.productUnderTest + ".previouspage")); } catch(Exception ex ) { extentLogger.log(LogStatus.INFO, "Error in : clickOnPreviousPageWithDocNavBar <br>"+displayErrorMe...
[ "public void previousPage(ActionEvent event)\r\n {\r\n try\r\n {\r\n // if their is is a currentDocument then go to the next page.\r\n if (null != getCurrentDocumentState())\r\n {\r\n int currentPage = getCurrentDocumentState().getPageCursor();\r\n currentPa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method will return all the experiment IDs for a given user
@GET @Path(ResourcePathConstants.ProvenanceResourcePathConstants.GET_EXPERIMENT_ID_USER) @Produces(MediaType.APPLICATION_XML) public Response getExperimentIdByUser(@QueryParam("username") String username) { airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_RE...
[ "Set<String> getUserIds();", "public java.util.List<java.lang.Long>\n getUserIdsList() {\n return userIds_;\n }", "public List<Integer> getPLProjectIds(User user);", "@java.lang.Override\n public java.util.List<java.lang.Long> getUserIdsList() {\n return userIds_;\n }", "List<Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This method checks out equipment from the database by updating the owner and location fields of that specific piece of information
public int borrowEquipment(String ownerName, String location, String idKey) { if (checkItemID(idKey)) { DatabaseReference item = equipmentDatabase.child(idKey).child("Item"); item.child("Owner").setValue(ownerName); item.child("Location").setValue(location); retur...
[ "static void updateEquipment(Equipment e) throws InsertFailedException {\n if(e.getType().getCategory().equals(\"Equipment\")) {\n Query q = new Query(\"update\", \"updateEquipment\", \"equipment_type=\" + e.getType().getID() +\n \"&location_id=\" + e.getLocation().getLocationID...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public PageBean queryShopcategoryByPage(Shopcategory shopcategory, PageBean pageBean) { StringBuffer sb=new StringBuffer("FROM Shopcategory s WHERE 1=1"); Map<String,Object> parms=new HashMap<String,Object>(); if(shopcategory!=null){ if(shopcategory.getCategory()!=null){ sb.append("AND ...
[ "@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" ] ] } }
/ Transmission rate matrix Input. Can have two different dimensions, 1.: dim = states > transmission only allowed within deme or 2.: states states > transmission allowed within as well as in between demes
private void updateMigrationTransmission(){ int count = 0; RealParameter tRate = transmissionRateInput.get(); /* * Transmission can only happen in the diagonal */ if (tRate.getDimension() == states){ minTransRate = true; // Flag to indicate that transmission only happens in the dia...
[ "public void getRate(double[] state, double[] rate) {\n // getRate is called twice for each call to step.\n // accelerations computed for every other call to getRate because\n // new velocity is computed from previous and current acceleration.\n // Previous acceleration is saved in step method of Verlet...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unit test: To test all the attribute sets
@Test public void unit02_Booking() throws Exception { int bookingId = 1; setChildren(); // set BookingPickupId & ActualPickupId assertEquals(92, manager.getObject(ywd, bookingId).getBookingPickupId()); assertEquals(-1, manager.getObject(ywd, bookingId).getActualPickupId());...
[ "@Test\n public void should_set_and_get_attributes_correctly() {\n assertThat(bundleAlgorithmContainer.getRank(), is(equalTo(1)));\n assertThat(bundleAlgorithmContainer.getAlgorithm(), is(equalTo(bundleAlgorithm)));\n }", "public void testGetAttributeTypes() {\n assertEquals(Major.class...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The main Controller class. The Controller takes in all screen classes as well as a connection from the Main class and expands it. All listeners to all buttons with its functions are written here.
public Controller(Login Login, Home Home, Model Model, Camera Camera, Email Email, About About, Settings Settings,RequestAccount RequestAccount, Connection conn, ManualAccount ManualAccount) { this.Login = Login; this.Home = Home; Controller.conn = conn; this.Camera = Camera; ...
[ "public Controller() {\n super(\"best_ever_magic_7 Train Simulator\");\n setContentPane(new DrawPane());\n setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n pack();\n setVisible(true);\n setSize(900, 900);\n addMouseListener(this);\n setState(new Main...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method thats allow the player to locate the robots before the game starts, by clicking on the screen.
public void addManualRobots() { int i=0; int num = d.getNumRobot(); while(i<num) { if(StdDraw.isMousePressed()) { StdDraw.isMousePressed = false; Collection<node_data> point = d.getV(); for (node_data nodes : point) { double x = nodes.getLocation().x(); double y = nodes.get...
[ "public void start() {\n // this method is called when the \"start\" button is clicked\n // in the user interface\n\n super.active = true;\n\n if (super.robot.getRuns() == 0) {\n // Initialise robotData and set the robot to explore mode on the first run\n\n super.robotData = new RobotData();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs the command if the patch is to be applied to the index.
ApplyCommand(Repository repo) { super(repo); }
[ "@Override\n public Command prepareCommand(String args) {\n args = args.trim();\n int targetIndex = START_INDEX;\n if (args.indexOf(\n StringUtil.STRING_WHITESPACE) != StringUtil.INVALID_POSITION) {\n targetIndex = args.indexOf(StringUtil.STRING_WHITESPACE);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method for get all user requests
@Override public List<UserRequest> getAllRequests(String email) { List<UserRequest> userRequests = orderDAO.getAllRequests(email); if (userRequests.isEmpty()) { throw new NotAnyRequest(); } return userRequests; }
[ "public List<User> getFriendRequests();", "@GetMapping\n @ResponseStatus(HttpStatus.OK)\n public Collection<User> getAll() {\n System.out.println(\"-------> : getAllUsers\");\n logger.debug(\"Getting all users.\");\n return serv.getAllUsers();\n }", "public void getRequests() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
id getter & setter
public Long getId() { return id; }
[ "Declaracao getId();", "private int getId() {\n return id;\n }", "public void setId(long id) { _id = id; }", "public int getId () { return id; }", "public void setId(long id){ \r\n this.id = id; \r\n }", "public int getId(){ return this.id;}", "public void setId( long id ) { this.id ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
prints out a formatted string of a students information
public void print(String id){ // find the index of the student int index = this.findIndexById(id); // if student number was found if(index > -1){ System.out.println(students.get(index).toString()); } // if the sutdent was not found print a message saying so else{ System.out.println("Record not found...
[ "private static void displayStudentDetails()\r\n {\r\n System.out.println(\"Ananth Kadekodi\");\r\n System.out.println(\"32920719\");\r\n System.out.println(\"External enrolment\");\r\n System.out.println(\"Tutor: Ferdous Sohel\");\r\n }", "public void dis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get DataElement Map with categoryOption list
public Map<Integer, List<Integer>> getDataElementMapWithCategoryOption() { //System.out.println(" Inside query"); Map<Integer, List<Integer>> dataElementMapWithCategoryOption = new HashMap<Integer, List<Integer>>(); try { String query = "SELECT dataelement.dataelement...
[ "public Map<String, String> findAllCategories() throws Exception;", "public Map<VehicleOptionCategory, VehicleOption> getVehicleOptions();", "public static Map<String, String> getCategoryMap() {\r\n\t\treturn getMap(\"categories.category.key\", \"categories.category.localization\");\r\n\t}", "public List<Hash...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
All child notes of this chord are processed as MeiNote objects and the tick count then set appropriately.
public MeiChord(MeiStaff currentStaff, MeiMeasure currentMeasure, Sequence sequence, MeiElement chord, MeiSpecificStorage nonMidiStorage, MeiData meiData) { super(currentStaff, currentMeasure, sequence, chord, nonMidiStorage, meiData); this.chord = chord; noteList = new Array...
[ "private void drawAllMidiNotes() {\n \t\tfor (int i = 0; i < midiManager.getMidiNotes().size(); i++) {\n \t\t\tif (midiManager.getMidiNotes().size() <= i)\n \t\t\t\tbreak;\n \t\t\tMidiNote midiNote = midiManager.getMidiNote(i);\n \t\t\tif (midiNote != null) {\n \t\t\t\tdrawMidiNote(midiNote,\n \t\t\t\t\t\tmidiNote....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end getFileData Read the Settings file and return it as a String.
private static String getSettingsFileAsString(String fileName) throws Exception { BufferedReader reader = null; StringBuffer strReturn = new StringBuffer(); //We have the path top the setting file in this.settingsFilePath File file = new File(fileName); i...
[ "public String getDataFile() {\n return (String) MRUFileList.get();\n }", "public static String readFromSettingsFile() {\r\n\t\tString chosenLine = new String();\r\n\t\tBufferedReader br = null;\r\n\t\ttry {\r\n\r\n\t\t\tbr = new BufferedReader(new FileReader(fileLocation));\r\n\t\t\tList<String> lines = new ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets formatted up time.
public final String getFormattedUpTime() { DateFormat timeInstance = SimpleDateFormat.getTimeInstance(); return timeInstance.format(SystemClock.uptimeMillis()); }
[ "public static String getUpTime() {\n long diff = ManagementFactory.getRuntimeMXBean().getUptime();\n diff /= 1000 * 60;\n long minutes = diff % 60;\n diff /= 60;\n long hours = diff % 24;\n diff /= 24;\n long days = diff;\n StringBuilder buf = new StringBuild...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate initial/periodic distribution of sugar in Cellspace when seasonal processes have been activated.
public void growGoodsBySeason() { float cellSugar, cellSpice; String area1 = ((getTimePeriod() / GoLconst.SEASON_DURATION) % 2) == 0 ? "SUMMER" : "WINTER"; int border = cellRows / 2; int j; for(int i = 0; i < cellCols; i++) { for(j = 0; j < border; j++) //renewing SUMMER section of grid { cellSug...
[ "public void autonomousPeriodic() {\n print(\"Autonomous\");\n Scheduler.getInstance().run();\n }", "public void setupSimulation() {\n Pool skookumchuk = new Pool(\"Skookumchuk\", SKOOKUMCHUK_VOLUME_LITRES,\n SKOOKUMCHUK_TEMP_CELSIUS, SKOOKUMCHUK_PH, SKOOKUMCHUK_NUTRIENT_COE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A marker superinterface of a entity must be impls.
public interface IEntity<I extends Serializable> extends Serializable { /** * return the entity id. * * @return the entity id. */ @Nullable I getId(); /** * set id to this entity. * * @param id id */ void setId(@Nullable I id); }
[ "public interface InternalEntityRepresentation {\r\n// Empty marker-interface\r\n}", "public interface entity {\n}", "public interface CoNoLocationIF extends CoLocationSpecIF,CoImmutableNoLocationIF\n{\n}", "public interface Cheese extends Ingredient {\n}", "public interface Lien extends EObject {\r\n}",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Refactored using "Extract Method" Changed the function into a defined variable Refactored by Levi Potutschnig
public void keyPressed(KeyEvent event){ int spiderSize = 60+movementCounter/6; t.start(); SpiderMovement(); int code = event.getKeyCode(); if (code == KeyEvent.VK_UP){ up(); movementCounter++; if ((movementCounter%growSpiderAft...
[ "protected abstract void extract();", "private void extractFunction() {\n\n\t\tint end = ++currentIndex;\n\n\t\tif (end >= data.length || !Character.isLetter(data[end])) {\n\t\t\tthrow new LexerException(\"Function name must have a letter after @, \"\n\t\t\t\t\t+ \"and then zero or more letters, digits or undersc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if inserting correctly, is full if we have odd number of node
public boolean isFull(){ return this.size%2==1; }
[ "@Override\n public boolean processFullInsert() {\n return true;\n }", "@Test\r\n\tpublic void test06isEmptyAfterInsertRemoveMany(){\r\n\t\t// Declare fields\r\n\t\tfinal int NUM_ITEMS_TO_TEST = 10; // the number of many elements to test\r\n\t\tAVLTree<Integer> tree = new AVLTree<Integer>();\r\n\t\ttry ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }