query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Called when the activity is starting. Restores the activity state.
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Crashlytics.start(this); if (savedInstanceState != null) { mIsInResolution = savedInstanceState.getBoolean(KEY_IN_RESOLUTION, false); } setContentView(R.layout.activity_main); getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, BirdsFragment.newInstance(), BirdsFragment.TAG).commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }", "@Override()\n protected void onCreate(final Bundle state)\n {\n logEnter(LOG_TAG, \"onCreate\", state);\n\n super.onCreate(state);\n\n final Intent i = getIntent();\n final ...
[ "0.7342364", "0.7311034", "0.70562875", "0.70133734", "0.6958199", "0.6958199", "0.6958199", "0.6958199", "0.6833111", "0.6824633", "0.6812315", "0.6796826", "0.6717847", "0.67139095", "0.67059225", "0.66739357", "0.6660357", "0.66552657", "0.6651366", "0.66337085", "0.662989...
0.0
-1
Called when activity gets invisible. Connection to Play Services needs to be disconnected as soon as an activity is invisible.
@Override protected void onStop() { if (mGoogleApiClient != null) { mGoogleApiClient.disconnect(); } if( mLocationClient != null ) mLocationClient.disconnect(); super.onStop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onInvisible() {\n\n\t}", "@Override\n public void disconnect() {\n getMvpView().showLoading();\n getDataManager().setSetupStatus(false);\n getDataManager().setIpAddress(\"\");\n getMvpView().setIpDetails(\"\", \"Disconnected\");\n\n new Handler().pos...
[ "0.67360085", "0.64511716", "0.64360845", "0.6254479", "0.6253969", "0.6228845", "0.62204146", "0.6213152", "0.6213152", "0.62067395", "0.6192358", "0.61844885", "0.6151039", "0.6148576", "0.61443543", "0.61434925", "0.6130456", "0.6122255", "0.6103545", "0.607868", "0.607468...
0.0
-1
Saves the resolution state.
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putBoolean(KEY_IN_RESOLUTION, mIsInResolution); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveState() {\n\t\tsuper.saveState();\n\t}", "@Override\r\n protected void onSaveInstanceState(Bundle outState) {\r\n super.onSaveInstanceState(outState);\r\n outState.putBoolean(KEY_IN_RESOLUTION, mIsInResolution);\r\n }", "public void saveState() \n\t{\n\t\tsuper.saveState();\...
[ "0.6882792", "0.68590087", "0.67599595", "0.6721297", "0.6653567", "0.66318846", "0.6623868", "0.660058", "0.65894175", "0.65705794", "0.6536322", "0.65036136", "0.6404952", "0.6346725", "0.6340696", "0.6325729", "0.6319193", "0.6312291", "0.6283956", "0.62778366", "0.6212583...
0.68486506
2
Handles Google Play Services resolution callbacks.
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case REQUEST_CODE_RESOLUTION: retryConnecting(); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(mActivity);\n if (apiAvailability.isUserResolvableError(c...
[ "0.68970877", "0.6864345", "0.6864345", "0.6864345", "0.6862086", "0.6818521", "0.6386026", "0.63405037", "0.6249903", "0.6084009", "0.59022385", "0.58945215", "0.5889601", "0.5824917", "0.5824464", "0.57920486", "0.5789564", "0.57702065", "0.576941", "0.57514757", "0.5744219...
0.0
-1
The userID of the current user
public CommandToRetrieveFriendList(int userID) { this.userID = userID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getCurrentUserId() {\n\t\tUser currentUser = UserDirectoryService.getCurrentUser();\n \tString currentUserId = currentUser.getId();\n\t\treturn currentUserId;\n\t}", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public i...
[ "0.8581326", "0.84605926", "0.84605926", "0.84605926", "0.84605926", "0.84605926", "0.84605926", "0.84605926", "0.84605926", "0.84605926", "0.84605926", "0.84605926", "0.84605926", "0.84605926", "0.84605926", "0.84605926", "0.8459733", "0.8459733", "0.8449043", "0.84256047", ...
0.0
-1
A list of the friends associated with the given user
@Override public String getResult() { String ret = ""; for (Friend x : Session.getInstance().getPerson().getFriends()) { if (!ret.equals("")) { ret = ret + ","; } ret = ret + x.getDisplayName(); } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UserFriendsEntry getUserFriendsList(Integer user_id);", "public User[] getFriends(int user) {\n\t\treturn users.get(user).friends.toArray(new User[0]);\n\t}", "UserFriendsFriendsEntry getFriendsFriends(Integer user_id);", "List<UserInfo> getFriendsOfMine(Integer user_id);", "public List<Friend> Get_All_Fri...
[ "0.7755835", "0.752421", "0.7503292", "0.73185503", "0.6800538", "0.68001336", "0.6765672", "0.66300845", "0.6617618", "0.65900207", "0.6581585", "0.6501942", "0.64206564", "0.63927937", "0.6356412", "0.635206", "0.6300024", "0.6292229", "0.62615657", "0.62611365", "0.6235629...
0.0
-1
Created by farhad on 8/27/14.
public interface IStationDA extends IGenericDA<StationEntity, Long> { public List<StationEntity> getStationsByUsername( UserEntity userEntity ); public StationEntity getStationByName( StationEntity stationEntity ); public StationEntity getStationByStationNameAndUsername( StationEntity stationEntity, UserEntity userEntity ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "protected boolean func_70814_o() { return true; }", "private void m50366E() {\n }", "public void method_4270() {}", "public final void mo51373a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n publi...
[ "0.5726631", "0.56735885", "0.56149524", "0.55774224", "0.55614305", "0.554685", "0.5539604", "0.5501137", "0.5472312", "0.5458235", "0.5443707", "0.54129463", "0.5411841", "0.5378774", "0.537088", "0.53705895", "0.5346912", "0.5346912", "0.53427386", "0.5328182", "0.5327671"...
0.0
-1
TODO Autogenerated method stub
@Override public void gstudentAdd(Gstudent gstudent) { GstudentMapper.gstudentAdd(gstudent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Compares two numbers with allowance for errors.
public static int comp( double a, double b ) { return equal( a, b, REL_TOL, ABS_TOL ) ? 0 : (a < b ? -1 : 1 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean almostEqual(double a, double b);", "@Override\r\n public int compare(AlgebraicInteger numberA, AlgebraicInteger numberB) {\r\n return Long.compare(numberA.norm(), numberB.norm());\r\n }", "public void testComparisons() {\n\tfinal double small = Math.pow(2.0, -42);\n\n\t// Input: a, ...
[ "0.6236868", "0.6220094", "0.6169544", "0.60887414", "0.60753226", "0.60008645", "0.59178334", "0.58821446", "0.5879215", "0.5869409", "0.5854037", "0.57507724", "0.57466054", "0.5742835", "0.57196075", "0.5719199", "0.57140476", "0.57066715", "0.5705983", "0.56930524", "0.56...
0.62221485
1
Compares two numbers with allowance for errors.
public static int comp( double a, double b, double relTol, double absTol ) { return equal( a, b, relTol, absTol ) ? 0 : ( a < b ? -1 : 1 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean almostEqual(double a, double b);", "public static int comp( double a, double b ) {\n return equal( a, b, REL_TOL, ABS_TOL ) ? 0 : (a < b ? -1 : 1 );\n }", "@Override\r\n public int compare(AlgebraicInteger numberA, AlgebraicInteger numberB) {\r\n return Long.compare(numberA.n...
[ "0.6235593", "0.62216365", "0.6220518", "0.61674947", "0.6089924", "0.60751784", "0.5999768", "0.5917133", "0.58809114", "0.5879588", "0.58696276", "0.585326", "0.5746884", "0.57416797", "0.57199013", "0.57183063", "0.57110536", "0.5706076", "0.5703672", "0.5695104", "0.56821...
0.5750483
12
Compares two numbers with allowance for errors.
public static int comp( float a, float b ) { return equal( a, b, FREL_TOL, FABS_TOL ) ? 0 : (a < b ? -1 : 1 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean almostEqual(double a, double b);", "public static int comp( double a, double b ) {\n return equal( a, b, REL_TOL, ABS_TOL ) ? 0 : (a < b ? -1 : 1 );\n }", "@Override\r\n public int compare(AlgebraicInteger numberA, AlgebraicInteger numberB) {\r\n return Long.compare(numberA.n...
[ "0.6235593", "0.62216365", "0.6220518", "0.61674947", "0.6089924", "0.60751784", "0.5999768", "0.5917133", "0.58809114", "0.58696276", "0.585326", "0.5750483", "0.5746884", "0.57416797", "0.57199013", "0.57183063", "0.57110536", "0.5706076", "0.5703672", "0.5695104", "0.56821...
0.5879588
9
Compares two numbers with allowance for errors.
public static int comp( float a, float b, float relTol, float absTol ) { return equal( a, b, relTol, absTol ) ? 0 : ( a < b ? -1 : 1 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean almostEqual(double a, double b);", "public static int comp( double a, double b ) {\n return equal( a, b, REL_TOL, ABS_TOL ) ? 0 : (a < b ? -1 : 1 );\n }", "@Override\r\n public int compare(AlgebraicInteger numberA, AlgebraicInteger numberB) {\r\n return Long.compare(numberA.n...
[ "0.6237446", "0.622236", "0.62209153", "0.6170097", "0.6089691", "0.60757995", "0.60008454", "0.5917225", "0.58818096", "0.5879732", "0.5871602", "0.5854552", "0.57515424", "0.57437027", "0.5721309", "0.571911", "0.57136893", "0.57074106", "0.57063836", "0.5693459", "0.568312...
0.57474506
13
TODO Autogenerated method stub
@Override public boolean accept(File fich) { return extension(fich); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public String getDescription() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
/ Member Functions Constructs a UDP input channel bound the the specified endpoint.
public UdpOutputChannel(final UdpEndpoint endpoint) { this.endpoint = endpoint; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "InputPort createInputPort();", "EndPoint createEndPoint();", "public NioDatagramChannel() {\n/* 116 */ this(newSocket(DEFAULT_SELECTOR_PROVIDER));\n/* */ }", "private UDPSender(final URI serverURI) {\n\t\tsuper(serverURI);\n\t\t\n\t\t\t\t\n\t\t//InternalLoggerFactory.setDefaultFactory(new Slf4JLogg...
[ "0.5753819", "0.5492999", "0.5487557", "0.541872", "0.54051965", "0.5373405", "0.536665", "0.5273861", "0.5233033", "0.51882815", "0.517363", "0.51278645", "0.51190263", "0.5103248", "0.50867623", "0.50662166", "0.5038428", "0.4994187", "0.49619132", "0.49245372", "0.48963562...
0.6209633
0
/ Send server port of the client
@Override protected void requesting(ExtendedDataOutputStream out) throws Exception { out.writeObject(this.clientServerPort); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int serverPort ();", "public ChatRoomServer(int portNumber){\n this.ClientPort = portNumber;\n }", "public int getPort();", "public int getPort();", "public int getPort();", "public static int getServerPort() { return Integer.parseInt(tfJoinPort.getText()); }", "void port(int port);", "void...
[ "0.7109134", "0.68416274", "0.6756319", "0.6756319", "0.6756319", "0.67535764", "0.6701573", "0.6701573", "0.66878456", "0.66849893", "0.66849893", "0.66642535", "0.6643653", "0.66433936", "0.66433936", "0.66295516", "0.66295516", "0.66021985", "0.660117", "0.659694", "0.6584...
0.6877074
1
This method returns all values of object as string
@Override public String toString() { return "Visitor{" + "period=" + period + '}'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() {\n\t\treturn (getValue().toString());\r\n\t}", "public String toString()\n\t{\n\t\tField[] fields = this.getClass().getDeclaredFields();\n\t\tint i, max = fields.length;\n\t\tString fieldName = \"\";\n\t\tString fieldType = \"\";\n\t\tString ret = \"\";\n\t\tString value = \"\";\n\t\tbo...
[ "0.7471383", "0.7399556", "0.72472066", "0.7200458", "0.71856445", "0.71695507", "0.715112", "0.7125453", "0.7085232", "0.70841163", "0.70838624", "0.7070477", "0.7061714", "0.7049987", "0.7033909", "0.70316476", "0.7025796", "0.70225996", "0.70225996", "0.7018906", "0.701418...
0.0
-1
steekt alle gegevens in de textfields
@Override public void update(Observable o, Object arg) { if (arg != null) { if (arg.equals("maakAllesLeegNaWijziging")) { grid.setVisible(false); lblTitelDetail.setVisible(false); btnFoto.setVisible(false); btnAnnuleer.setVisible(false); btnVerwijderen.setVisible(false); btnToevoegenAnnuleren.setVisible(false); btnWijzigen.setVisible(false); btnLeegmaken.setVisible(false); btnVoegProductToe.setVisible(false); lblOnbeschikbaar.setVisible(false); txtOnbeschikbaar.setVisible(false); } if (!arg.equals("maakAllesLeegNaWijziging")) { boolean isToevoeging = false; if (dc.getHuidigProduct() == null && (!txtAantal.getText().equalsIgnoreCase("") || !txtArtikelnummer.getText().equalsIgnoreCase("") || !txtEmailFirma.getText().equalsIgnoreCase("") || !txtFirma.getText().equalsIgnoreCase("") || !txtNaam.getText().equalsIgnoreCase("") || !txtOmschrijving.getText().equalsIgnoreCase("") || !txtPlaats.getText().equalsIgnoreCase("") || !txtPrijs.getText().equalsIgnoreCase(""))) { isToevoeging = true; } else { grid.setVisible(true); lblTitelDetail.setVisible(true); btnFoto.setVisible(true); btnAnnuleer.setVisible(true); btnVerwijderen.setVisible(true); btnToevoegenAnnuleren.setVisible(false); btnWijzigen.setVisible(true); btnLeegmaken.setVisible(false); btnVoegProductToe.setVisible(false); lblOnbeschikbaar.setVisible(true); txtOnbeschikbaar.setVisible(true); } //binnenkomend product dc.setCancelled(false); try { if (this.wijziging) { resetWaardenprivate(); btnWijzigen.setDisable(true); btnVerwijderen.setDisable(true); btnVoegProductToe.setVisible(false); btnToevoegenAnnuleren.setVisible(false); lblOnbeschikbaar.setVisible(true); txtOnbeschikbaar.setVisible(true); dc.setNieuwHuidigProduct(null); } else { //binnenkomend product dc.setCancelled(false); Product product = (Product) arg; // we gaan in deze klasse een huidigProduct moeten maken //eerst controleren of deze null is, zo ja dan wordt het product dat binnen komt het huidigProduct //als deze niet nul is (we hebben dus al een product geselecteerd en klikken nu op een ander) // dan controleren we of de attributen (alles wat in de tekstvelden staat) van ons huidigproduct anders zijn //dan de attributen van dat product die opgeslaan zijn in de database if (dc.getHuidigProduct() != null || isToevoeging) { if (dc.getHuidigProduct() != null) { oudProduct = dc.getProductById(dc.getHuidigProduct().getId()); } if (dc.getHuidigProduct() == null || (!String.format("%s", oudProduct.getAantal()).equals(txtAantal.getText()) || !String.format("%s", oudProduct.getArtikelnummer()).equals(txtArtikelnummer.getText()) //|| opgeslagenProduct.getDoelgroepen()!= opgeslagenProduct.getDoelgroepen() || !oudProduct.getFirma().getNaam().equalsIgnoreCase(txtFirma.getText()) //|| opgeslagenProduct.getFoto() != foto //|| opgeslagenProduct.getLeergebieden()!= huidigProduct.getLeergebieden() || !oudProduct.getNaam().equalsIgnoreCase(txtNaam.getText()) || !oudProduct.getOmschrijving().equalsIgnoreCase(txtOmschrijving.getText()) || !oudProduct.getPlaats().equalsIgnoreCase(txtPlaats.getText()) || !String.format("%s", oudProduct.getAantalOnbeschikbaar()).equals(txtOnbeschikbaar.getText()) || !String.format("%.2f", oudProduct.getPrijs()).replace(",", ".").equals(txtPrijs.getText()))) { Stage stage = new Stage(); Alert alert = new Alert(Alert.AlertType.CONFIRMATION); alert.setTitle("Confirmatie"); alert.setHeaderText("Niet opgeslagen wijzigingen gevonden"); alert.setContentText("OK om ze te verwerpen, Cancel om ze aan te passen"); Optional<ButtonType> result = alert.showAndWait(); if (result.get() == ButtonType.OK) { // OK wijzigingen verwerpen dc.setCancelled(false); dc.setNieuwHuidigProduct(product); grid.setVisible(true); lblTitelDetail.setVisible(true); btnFoto.setVisible(true); btnAnnuleer.setVisible(true); btnVerwijderen.setVisible(true); btnToevoegenAnnuleren.setVisible(false); btnWijzigen.setVisible(true); btnLeegmaken.setVisible(false); btnVoegProductToe.setVisible(false); lblOnbeschikbaar.setVisible(true); txtOnbeschikbaar.setVisible(true); // stage.close(); } else { // Niet OK dc.setCancelled(true); // dc.setNieuwHuidigProduct(oudProduct); throw new IllegalArgumentException("Gelieve uw wijzigingen te bevestigen of te annuleren"); } stage.close(); } } //} if (!dc.getCancelled() || dc.getHuidigProduct() == null) { dc.setNieuwHuidigProduct(product); lblError.setText(""); maakLabelsTerugNormaal(); // Product product = (Product) arg; txtAantal.setText(Integer.toString(product.getAantal())); txtArtikelnummer.setText(Integer.toString(product.getArtikelnummer())); txtFirma.setText(product.getFirma().getNaam()); txtEmailFirma.setText(product.getFirma().getEmailContactPersoon()); txtOnbeschikbaar.setText(Integer.toString(product.getAantalOnbeschikbaar())); //String format = String.format("%.2f", product.getPrijs()); txtPrijs.setText(String.format("%.2f", product.getPrijs()).replace(",", ".")); txtNaam.setText(product.getNaam()); txtOmschrijving.setText(product.getOmschrijving()); txtPlaats.setText(product.getPlaats()); listLeergebieden.setItems(dc.getVoorlopigeLeergebieden()); listDoelgroepen.setItems(dc.getVoorlopigeDoelgroepen()); //alles terug enablen als er iets geselcteerd wordt btnVerwijderen.setDisable(false); btnAnnuleer.setDisable(false); btnWijzigen.setDisable(false); btnLeegmaken.setVisible(false); if (product.getFoto() != null) { try { BufferedImage img = ImageIO.read(product.getFoto()); Image image = SwingFXUtils.toFXImage(img, null); imgViewFoto.setImage(image); } catch (IOException ex) { Logger.getLogger(ProductDetailController.class.getName()).log(Level.SEVERE, null, ex); } } else { imgViewFoto.setImage(null); } btnSelecteerDoelgroep.setDisable(false); listDoelgroepen.setDisable(false); /*} else { ongewijzigdProductBevestiging(); }*/ } } dc.setCancelled(false); this.wijziging = false; } catch (IllegalArgumentException e) { lblError.setText(e.getMessage()); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BestellingAfleveradres() {\n initComponents();\n txtGemeente.setText(gemeente);\n txtGemeente.setEnabled(false);\n txtPostcode.setText(postcode2);\n txtPostcode.setEnabled(false);\n }", "public void praticien_zone(){\n\n JLabel lbl_Praticien = new JLabel(\"Prat...
[ "0.66655546", "0.6488147", "0.6432672", "0.63280755", "0.62172365", "0.62144643", "0.6198421", "0.6160009", "0.6118574", "0.610062", "0.60167384", "0.5977671", "0.5925937", "0.5852689", "0.5834302", "0.58105975", "0.57949346", "0.5793086", "0.57926655", "0.5786431", "0.578599...
0.0
-1
Constructor, take a model in parameter
public MonteCarloGUI(MonteCarlo monteCarlo) throws IOException { super(); // Model this.monteCarlo = monteCarlo; // View String title; if (monteCarlo.getClass().equals(MonteCarloSingleThread.class)) title = "Monte Carlo Single Thread"; else title = "Monte Carlo Multi Thread"; this.setTitle(title); this.setBoxes((String) select.getSelectedItem()); this.setSize(600, 400); this.setResizable(false); // Center window Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize(); int x = (int) ((dimension.getWidth() - this.getWidth()) / 2); int y = (int) ((dimension.getHeight() - this.getHeight()) / 2); this.setLocation(x, y); this.setDefaultCloseOperation(EXIT_ON_CLOSE); this.setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Model(){}", "public Model() {\n\t}", "public Model() {\n\t}", "public Model() {\n }", "public Model() {\n }", "public Model() {\n }", "public Model() {\n\n }", "public Controller(Model model) {\n this.model = model; // Initializing the Model\n }", "public ViewModel(IMo...
[ "0.7780094", "0.74697536", "0.74697536", "0.74601877", "0.74601877", "0.74601877", "0.7405371", "0.7378059", "0.72711504", "0.7225472", "0.71706635", "0.7137861", "0.69676495", "0.6927845", "0.6875502", "0.6875502", "0.6875502", "0.6875502", "0.6875502", "0.6875502", "0.68755...
0.0
-1
Listener, used as a controller
public void actionPerformed(ActionEvent event) { if (event.getActionCommand().equals("comboBoxChanged")) { this.setBoxes((String) select.getSelectedItem()); } else if (event.getActionCommand().equals("Start")) { t = new Thread(this); t.start(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void setListener() {\n\n\t}", "@Override\n\tprotected void setListener() {\n\n\t}", "@Override\n\tpublic void getListener(){\n\t}", "@Override\r\n\tprotected void listeners() {\n\t\t\r\n\t}", "public ASListener(){\n \t\treload();\n \t}", "@Override\r\n\tpublic void setListener() {\...
[ "0.7214379", "0.7214379", "0.7133926", "0.7102954", "0.7060132", "0.7003851", "0.7003851", "0.69760585", "0.6937615", "0.67647296", "0.67424875", "0.656652", "0.64963883", "0.64713246", "0.64691424", "0.6456632", "0.64231986", "0.6389185", "0.6384882", "0.6370196", "0.6343716...
0.0
-1
Run the Monte Carlo algorithm in a parallel thread
@Override public void run() { startButton.setEnabled(false); try { long start = System.nanoTime(); double premium = monteCarlo.runMonteCarlo(callPutFlagField.getText(), Double.parseDouble(sField.getText()), Double.parseDouble(xField.getText()), Double.parseDouble(tField.getText()), Double.parseDouble(rField.getText()), Double.parseDouble(bField.getText()), Double.parseDouble(vField.getText()), Integer.parseInt(nStepsField.getText()), Integer.parseInt(nSimulationsField.getText())); long end = System.nanoTime(); resultArea.append("Price = " + premium + "\n"); resultArea.append("calculated in " + (end - start)/1.0e9 + " seconds\n\n"); } catch (NumberFormatException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } startButton.setEnabled(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void runCalculations()\n {\n // TODO Create two different empty concurrent histograms\n\n // Create a sleep time simulator, it will sleep for 10 milliseconds in each call\n BaseSyncOpSimulator syncOpSimulator = new SyncOpSimulSleep(10);\n\n // List of threads\n ...
[ "0.6754301", "0.66581774", "0.65957785", "0.6455044", "0.63567084", "0.6320028", "0.6232371", "0.6231668", "0.6221254", "0.62054193", "0.61795634", "0.6165935", "0.61319554", "0.6034244", "0.60225105", "0.6008521", "0.59986115", "0.59985375", "0.5979351", "0.59500796", "0.594...
0.5657887
69
Read from values.txt to have parameters to run the Monte Carlo
public ArrayList<String> readFromFile(String fileName) throws IOException { BufferedReader reader = new BufferedReader(new FileReader(fileName)); ArrayList<String> retour = new ArrayList<String>(); String line = null; while((line = reader.readLine()) != null) retour.add(line); reader.close(); return retour; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void generateParameterValues()\n\t{\n\t\t/*\n\t\t * Initialize variables for storage of the actual parameter data and prepare the histogram bins aggregating them. \n\t\t */\n\t\t\n\t\t// Init storage.\n\t\tparameterValues.clear();\n\t\tparameterValues.put(\"alpha\", new ArrayList<Double>(numberOfDivisions...
[ "0.57160264", "0.5702192", "0.56443465", "0.56392187", "0.55800045", "0.55422103", "0.553469", "0.5479275", "0.54469365", "0.54208386", "0.5410188", "0.54055417", "0.54013", "0.5373623", "0.5368242", "0.5299919", "0.52867913", "0.5281791", "0.5281125", "0.5278892", "0.5257115...
0.0
-1
Set JTextFields from values in JComboBox (the select built by the file values.txt)
public void setBoxes(String params) { final String[] paramsArray = params.split(","); int i=0; for (Component c : this.westPanel.getComponents()) { if (c instanceof JTextField) { ((JTextField) c).setText(paramsArray[i]); i++; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void setComboBoxes() { Something was changed in the row.\n //\n final Map<String, Integer> fields = new HashMap<>();\n\n // Add the currentMeta fields...\n fields.putAll(inputFields);\n\n Set<String> keySet = fields.keySet();\n List<String> entries = new ArrayList<>(keySet);\n\n Stri...
[ "0.6569916", "0.6554051", "0.64710873", "0.6452854", "0.6390238", "0.63254833", "0.61870027", "0.60814685", "0.6031837", "0.59819233", "0.5942972", "0.5905306", "0.5901488", "0.5867274", "0.58567655", "0.5854388", "0.5839184", "0.5810941", "0.58058596", "0.57799613", "0.57534...
0.56583035
29
Override from KeyListener Implementation, used to check each field to verify user's inputs
@Override public void keyReleased(KeyEvent e) { int i=0; for (Component c : this.westPanel.getComponents()) { if (c instanceof JTextField) { JTextField field = (JTextField) c; if (field.equals(callPutFlagField)) { // callPutFlag must be 'p' or 'c' if (!field.getText().equals("c") && !field.getText().equals("p")) { field.setBackground(Color.RED); startButton.setEnabled(false); } else { field.setBackground(Color.WHITE); startButton.setEnabled(true); } } else if (i > 0 && i < 7) { // S, X T, R, B, V must be double if (Pattern.matches(fpRegex, field.getText())) { field.setBackground(Color.WHITE); startButton.setEnabled(true); } else { field.setBackground(Color.RED); startButton.setEnabled(false); } } else { // Steps, Simulation must be Integer if (isInteger(field.getText())) { field.setBackground(Color.WHITE); startButton.setEnabled(true); } else { field.setBackground(Color.RED); startButton.setEnabled(false); } } i++; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t// Check if input fields are filled in\n\t\t\ttoggleSearchButton();\n\t\t}", "@Override\n\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t// Check if input fields are filled in\n\t\t\ttoggleSearchButton();\n\t\t}", "@Override\n\t\tpublic void keyTyped(K...
[ "0.67832017", "0.67832017", "0.67357033", "0.6705216", "0.6644985", "0.6644985", "0.64722896", "0.6407597", "0.6382568", "0.6354934", "0.6324659", "0.62699986", "0.6217501", "0.6210168", "0.62034816", "0.62024474", "0.6151075", "0.6148724", "0.6113636", "0.6089713", "0.606923...
0.0
-1
Check if a string can be parsed as an Integer for GUI JTextField
public static boolean isInteger(String s) { try { Integer.parseInt(s); } catch(NumberFormatException e) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isInt(TextField input);", "public boolean isInteger() {\n try {\n Integer.parseInt(txt.getText());\n return true;\n } catch (Exception e) {\n return error(\"El valor debe ser un numero entero!\");\n }\n }", "private boolean checkInteger(String st...
[ "0.7920997", "0.7618694", "0.7320569", "0.7162452", "0.7153654", "0.7109913", "0.7077578", "0.7068552", "0.70374954", "0.7021374", "0.6987955", "0.6969417", "0.6953272", "0.6930531", "0.6918919", "0.69179904", "0.6883727", "0.6853159", "0.6852319", "0.68401957", "0.681193", ...
0.6637772
34
TODO Autogenerated method stub
@Override public void keyTyped(KeyEvent e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
this one has no decorator
public static void main(String[] args) throws InterruptedException { PlayerService player = new PlayerContract(); LevelService level = new LevelImpl(); GameEngService eng = new GameEngImpl(); // INIT PHASE // hashmap for init HashMap<Specialty, Integer> chips = new HashMap<Specialty, Integer>(); chips.put(Specialty.CLIMBER, 5); chips.put(Specialty.DIGGER, 5); chips.put(Specialty.STOPPER, 5); chips.put(Specialty.BASHER, 5); chips.put(Specialty.BUILDER, 5); chips.put(Specialty.MINER, 5); chips.put(Specialty.FLOATER, 5); chips.put(Specialty.BOMBER, 5); player.init(chips); level.init(60, 40); eng.init(6, 3); // END INIT PHASE // BINDING PHASE player.bindEngine(eng); eng.bindLevel(level); QApplication.initialize(args); GuiQT gui = new GuiQT(); gui.bindEngine(eng); gui.bindLevel(level); gui.bindPlayer(player); gui.show(); gui.resize(1024, 1980); QApplication.execStatic(); QApplication.shutdown(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n protected void prot() {\n }", "protected Doodler() {\n\t}", "@Override\n\tpublic void comer() {\n\t\...
[ "0.65794206", "0.6366421", "0.6366421", "0.6246898", "0.61600757", "0.6159241", "0.61458343", "0.61211216", "0.61075556", "0.6067977", "0.606434", "0.5992447", "0.59881145", "0.59861445", "0.5931292", "0.59227884", "0.58980596", "0.5896261", "0.5878944", "0.5866865", "0.58629...
0.0
-1
Creates an instance of the UserProfile and if the creation is not null, then it works.
@Test public void testConstructor() { assertNotEquals(null, up); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UserProfile createUserProfile(String username, UserProfile newProfile);", "@Override\n\tpublic void createUserProfile(User user) throws Exception {\n\n\t}", "public UserProfile() {}", "@Test\r\n public void testUpdateUserProfileOfCreatedUser() throws Exception {\r\n UserVO user = new UserVO(...
[ "0.7655342", "0.7570574", "0.73334104", "0.71047693", "0.69842046", "0.63838685", "0.6373356", "0.63657457", "0.6355635", "0.6280913", "0.62586296", "0.6234979", "0.60744804", "0.60489386", "0.6039396", "0.5977711", "0.5974793", "0.5971372", "0.59661764", "0.59412694", "0.592...
0.0
-1
Creates two equal instances of a UserProfile, then checks if equals() method properly returns.
@Test public void testEqualsIdentical() { int userID = 0; int[] pref = new int[11]; int[] health = new int[9]; int[] diet = new int[5]; int[] meal = new int[3]; UserProfile up2 = new UserProfile(userID, pref, health, diet, meal); assertEquals(up, up2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean equals(Object object) {\n if (!(object instanceof UserProfile)) {\n return false;\n }\n UserProfile other = (UserProfile) object;\n if ((this.userid == null && other.userid != null) || (this.userid != null && !this.userid.equals(other.userid))) {...
[ "0.7407035", "0.72096115", "0.71450347", "0.68225086", "0.6364683", "0.6254437", "0.6145522", "0.6129278", "0.6069812", "0.60613036", "0.60563624", "0.60522246", "0.60179114", "0.6003288", "0.5990509", "0.5988359", "0.5964952", "0.59642476", "0.5958351", "0.5942522", "0.59425...
0.74775815
0
Creates two unequal instances of a UserProfile, then checks if equals() method properly returns.
@Test public void testEqualsNonIdentical() { int userID = 0; int[] pref = new int[11]; int[] health = new int[9]; int[] diet = new int[5]; int[] meal = new int[3]; UserProfile up2 = new UserProfile(userID, pref, health, diet, meal); assertEquals(up, up2); up2 = new UserProfile(userID, pref, health, diet, meal, "01203"); assertNotEquals(up, up2); int[] pref2 = {-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; up2 = new UserProfile(userID, pref2, health, diet, meal); assertNotEquals(up, up2); int[] health2 = {-2, 0, 0, 0, 0, 0, 0, 0, 0}; up2 = new UserProfile(userID, pref2, health2, diet, meal); assertNotEquals(up, up2); int[] diet2 = {-3, 0, 0, 0, 0}; up2 = new UserProfile(userID, pref, health2, diet2, meal); assertNotEquals(up, up2); int[] meal2 = {-4, 0, 0}; up2 = new UserProfile(userID, pref, health2, diet2, meal2); assertNotEquals(up, up2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEqualsIdentical() {\n int userID = 0;\n int[] pref = new int[11];\n int[] health = new int[9];\n int[] diet = new int[5];\n int[] meal = new int[3];\n UserProfile up2 = new UserProfile(userID, pref, health, diet, meal);\n assertEquals(up, ...
[ "0.7395457", "0.7294265", "0.6855965", "0.67264307", "0.6114238", "0.6056317", "0.5971323", "0.59479177", "0.5918448", "0.590763", "0.59042907", "0.58957946", "0.58710426", "0.58704555", "0.58680856", "0.5851705", "0.5833557", "0.5827486", "0.5827486", "0.58194786", "0.580731...
0.75773025
0
Method for Reading the URL and Depth Value from the property files. Param: Name of the property file. Return: Map of Property and their value.
public Map executeFileLoader(String propertyFile) { Properties propertyVals = new Properties(); try { InputStream inputStream = getClass().getClassLoader().getResourceAsStream(propertyFile); propertyVals.load(inputStream); String URL = propertyVals.getProperty("URL"); String Depth = propertyVals.getProperty("Depth"); factorVals = new HashMap<String, String>(); for(int i=0; i<2; i++) { if(i==0) { factorVals.put("URL", URL); } else { factorVals.put("Depth", Depth); } } } catch (IOException e) { System.out.println("File not Found."); e.printStackTrace(); } return factorVals; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HashMap<String, String> readPropertyFile(String propertyFilePath) throws Exception {\n File propertyFile = null;\n InputStream inputStream = null;\n Properties properties = null;\n HashMap<String, String> propertyMap = new HashMap<String, String>();\n try {\n\n ...
[ "0.6368529", "0.63253474", "0.6187668", "0.61382365", "0.5939136", "0.584199", "0.57076716", "0.56608945", "0.5608215", "0.5608215", "0.5601266", "0.5601016", "0.5535904", "0.5520584", "0.55069625", "0.55005324", "0.5499475", "0.54874575", "0.5484876", "0.5484876", "0.5472901...
0.7258977
0
todo does this work?
@RequestMapping("/{invoice}") public String viewInvoice(@PathVariable Invoice invoice, Model model){ model.addAttribute("invoice", invoice); return "invoice/invoice"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private void poetries() {\n\n\t}", "private void strin() {\n\n\t}", "@Override\n\tpublic void comer(...
[ "0.5543341", "0.5543262", "0.54862905", "0.54479694", "0.5393194", "0.5392699", "0.5372861", "0.535427", "0.53309494", "0.532836", "0.53267515", "0.5298509", "0.5245181", "0.52155626", "0.5202607", "0.5198022", "0.5186349", "0.5185266", "0.518122", "0.518122", "0.5145629", ...
0.0
-1
todo get getLoggedInUser, ain't that in commons ?
@RequestMapping(value = "/save", method = RequestMethod.POST) public String saveNewInvoice(@Valid @ModelAttribute Invoice invoice) { invoice.setCreatedUser(annonsePersonController.getLoggedInUser()); invoice.setLastEditedUser(annonsePersonController.getLoggedInUser()); invoice.setCreatedDate(Calendar.getInstance()); invoice.setLastEditedDate(Calendar.getInstance()); invoiceService.saveAndFlush(invoice); for(Sale sale: invoice.getSales()){ salesService.saveAndFlush(sale); } return "redirect:/annonseweb/invoice/" + invoice.getId(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "User getCurrentLoggedInUser();", "public abstract User getLoggedInUser();", "LoggedUser getLoggedUser();", "public User getLoggedUser();", "private String getLoggedInUser() {\r\n\t\tOptional<Authentication> authentication = Optional\r\n\t\t\t\t.ofNullable(SecurityContextHolder.getContext().getAuthenticatio...
[ "0.8665831", "0.8489829", "0.8480846", "0.84785366", "0.7575885", "0.7464816", "0.7424271", "0.7384776", "0.7321976", "0.72150326", "0.71945703", "0.7160099", "0.71201", "0.7055397", "0.7055397", "0.70489967", "0.7010393", "0.7010238", "0.69969004", "0.6995466", "0.6903873", ...
0.0
-1
enum Create LogicTreeProcessor by loading a job configuration from the available KVS. The configuration file is serialized as JSON.
public LogicTreeProcessor(Cache cache, String key) { Properties properties = new Gson().fromJson((String) cache.get(key), Properties.class); config = ConfigurationConverter.getConfiguration(properties); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void load(String filename, Supervisor k) throws FileNotFoundException{\n String source = \"\";\n try {\n Scanner in = new Scanner(new FileReader(filename));\n while(in.hasNext()){\n source = source + in.next();\n }\n } catch (FileNo...
[ "0.5226176", "0.50284106", "0.49737963", "0.4872166", "0.48472205", "0.47787455", "0.47315654", "0.47193047", "0.47072113", "0.4669764", "0.4665316", "0.46568748", "0.46416676", "0.46048826", "0.46038058", "0.45998034", "0.455886", "0.45505217", "0.45332327", "0.4492893", "0....
0.5147875
1
Set the GEM1ERF params given the parameters defined in
public void setGEM1ERFParams(GEM1ERF erf) { // set minimum magnitude /* * xxr: TODO: !!!type safety!!! apache's Configuration interface handles * a similar problem this way: Instead of defining one single method * like public void setParameter(String key, Object value) {...} there * is one method per type defined: setString(), setDouble(), setInt(), * ... */ erf.setParameter(GEM1ERF.MIN_MAG_NAME, config .getDouble(ConfigItems.MINIMUM_MAGNITUDE.name())); // set time span TimeSpan timeSpan = new TimeSpan(TimeSpan.NONE, TimeSpan.YEARS); timeSpan.setDuration(config.getDouble(ConfigItems.INVESTIGATION_TIME .name())); erf.setTimeSpan(timeSpan); // params for area source // set inclusion of area sources in the calculation erf.setParameter(GEM1ERF.INCLUDE_AREA_SRC_PARAM_NAME, config .getBoolean(ConfigItems.INCLUDE_AREA_SOURCES.name())); // set rupture type ("area source rupture model / // area_source_rupture_model / AreaSourceRuptureModel) erf.setParameter(GEM1ERF.AREA_SRC_RUP_TYPE_NAME, config .getString(ConfigItems.TREAT_AREA_SOURCE_AS.name())); // set area discretization erf.setParameter(GEM1ERF.AREA_SRC_DISCR_PARAM_NAME, config .getDouble(ConfigItems.AREA_SOURCE_DISCRETIZATION.name())); // set mag-scaling relationship erf .setParameter( GEM1ERF.AREA_SRC_MAG_SCALING_REL_PARAM_NAME, config .getString(ConfigItems.AREA_SOURCE_MAGNITUDE_SCALING_RELATIONSHIP .name())); // params for grid source // inclusion of grid sources in the calculation erf.setParameter(GEM1ERF.INCLUDE_GRIDDED_SEIS_PARAM_NAME, config .getBoolean(ConfigItems.INCLUDE_GRID_SOURCES.name())); // rupture model erf.setParameter(GEM1ERF.GRIDDED_SEIS_RUP_TYPE_NAME, config .getString(ConfigItems.TREAT_GRID_SOURCE_AS.name())); // mag-scaling relationship erf .setParameter( GEM1ERF.GRIDDED_SEIS_MAG_SCALING_REL_PARAM_NAME, config .getString(ConfigItems.AREA_SOURCE_MAGNITUDE_SCALING_RELATIONSHIP .name())); // params for fault source // inclusion of fault sources in the calculation erf.setParameter(GEM1ERF.INCLUDE_FAULT_SOURCES_PARAM_NAME, config .getBoolean(ConfigItems.INCLUDE_FAULT_SOURCE.name())); // rupture offset erf.setParameter(GEM1ERF.FAULT_RUP_OFFSET_PARAM_NAME, config .getDouble(ConfigItems.FAULT_RUPTURE_OFFSET.name())); // surface discretization erf.setParameter(GEM1ERF.FAULT_DISCR_PARAM_NAME, config .getDouble(ConfigItems.FAULT_SURFACE_DISCRETIZATION.name())); // mag-scaling relationship erf.setParameter(GEM1ERF.FAULT_MAG_SCALING_REL_PARAM_NAME, config .getString(ConfigItems.FAULT_MAGNITUDE_SCALING_RELATIONSHIP .name())); // mag-scaling sigma erf.setParameter(GEM1ERF.FAULT_SCALING_SIGMA_PARAM_NAME, config .getDouble(ConfigItems.FAULT_MAGNITUDE_SCALING_SIGMA.name())); // rupture aspect ratio erf.setParameter(GEM1ERF.FAULT_RUP_ASPECT_RATIO_PARAM_NAME, config .getDouble(ConfigItems.RUPTURE_ASPECT_RATIO.name())); // rupture floating type erf.setParameter(GEM1ERF.FAULT_FLOATER_TYPE_PARAM_NAME, config .getString(ConfigItems.RUPTURE_FLOATING_TYPE.name())); // params for subduction fault // inclusion of fault sources in the calculation erf .setParameter( GEM1ERF.INCLUDE_SUBDUCTION_SOURCES_PARAM_NAME, config .getBoolean(ConfigItems.INCLUDE_SUBDUCTION_FAULT_SOURCE .name())); // rupture offset erf.setParameter(GEM1ERF.SUB_RUP_OFFSET_PARAM_NAME, config .getDouble(ConfigItems.SUBDUCTION_FAULT_RUPTURE_OFFSET.name())); // surface discretization erf.setParameter(GEM1ERF.SUB_DISCR_PARAM_NAME, config .getDouble(ConfigItems.SUBDUCTION_FAULT_SURFACE_DISCRETIZATION .name())); // mag-scaling relationship erf .setParameter( GEM1ERF.SUB_MAG_SCALING_REL_PARAM_NAME, config .getString(ConfigItems.SUBDUCTION_FAULT_MAGNITUDE_SCALING_RELATIONSHIP .name())); // mag-scaling sigma erf.setParameter(GEM1ERF.SUB_SCALING_SIGMA_PARAM_NAME, config .getDouble(ConfigItems.SUBDUCTION_FAULT_MAGNITUDE_SCALING_SIGMA .name())); // rupture aspect ratio erf.setParameter(GEM1ERF.SUB_RUP_ASPECT_RATIO_PARAM_NAME, config .getDouble(ConfigItems.SUBDUCTION_RUPTURE_ASPECT_RATIO.name())); // rupture floating type erf .setParameter(GEM1ERF.SUB_FLOATER_TYPE_PARAM_NAME, config .getString(ConfigItems.SUBDUCTION_RUPTURE_FLOATING_TYPE .name())); // update erf.updateForecast(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setParameters() {\n\t\t\n\t}", "public void setParameters(Map<String, String> param) {\n\n // check the occurrence of required parameters\n if(!(param.containsKey(\"Indri:mu\") && param.containsKey(\"Indri:lambda\"))){\n throw new IllegalArgumentException\n (\"Req...
[ "0.66784173", "0.65368706", "0.6318162", "0.6229887", "0.6218974", "0.61948055", "0.6103335", "0.60864294", "0.60629064", "0.60008323", "0.5985183", "0.5965486", "0.5954436", "0.5954436", "0.59115803", "0.5903683", "0.58943516", "0.5887139", "0.5852047", "0.5817272", "0.58122...
0.83790237
0
/ JADX WARNING: Removed duplicated region for block: B:74:0x009a A[SYNTHETIC, Splitter:B:74:0x009a]
public static boolean UnzipFile(ZipFile zf, String filepathinzip, File fileinfiledir) { BufferedOutputStream Output_fos = null; BufferedInputStream bufbr = null; try { ZipEntry ze = zf.getEntry(filepathinzip); if (ze != null) { BufferedOutputStream Output_fos2 = new BufferedOutputStream(new FileOutputStream(fileinfiledir)); try { byte[] buf = new byte[65536]; BufferedInputStream bufbr2 = new BufferedInputStream(zf.getInputStream(ze)); while (true) { try { int readlen = bufbr2.read(buf); if (readlen < 0) { break; } Output_fos2.write(buf, 0, readlen); } catch (Exception e) { e = e; bufbr = bufbr2; Output_fos = Output_fos2; } catch (Throwable th) { th = th; bufbr = bufbr2; Output_fos = Output_fos2; if (Output_fos != null) { try { Output_fos.close(); if (bufbr != null) { try { bufbr.close(); } catch (IOException e2) { e2.printStackTrace(); return false; } } } catch (IOException e3) { e3.printStackTrace(); if (bufbr == null) { return false; } try { bufbr.close(); return false; } catch (IOException e4) { e4.printStackTrace(); return false; } } finally { if (bufbr != null) { try { bufbr.close(); } catch (IOException e5) { e5.printStackTrace(); return false; } } } } throw th; } } if (Output_fos2 != null) { try { Output_fos2.close(); if (bufbr2 != null) { try { bufbr2.close(); } catch (IOException e6) { e6.printStackTrace(); BufferedInputStream bufferedInputStream = bufbr2; BufferedOutputStream bufferedOutputStream = Output_fos2; return false; } } } catch (IOException e7) { e7.printStackTrace(); if (bufbr2 != null) { try { bufbr2.close(); } catch (IOException e8) { e8.printStackTrace(); BufferedInputStream bufferedInputStream2 = bufbr2; BufferedOutputStream bufferedOutputStream2 = Output_fos2; return false; } } BufferedInputStream bufferedInputStream3 = bufbr2; BufferedOutputStream bufferedOutputStream3 = Output_fos2; return false; } finally { if (bufbr2 != null) { try { bufbr2.close(); } catch (IOException e9) { e9.printStackTrace(); BufferedInputStream bufferedInputStream4 = bufbr2; BufferedOutputStream bufferedOutputStream4 = Output_fos2; return false; } } } } BufferedInputStream bufferedInputStream5 = bufbr2; BufferedOutputStream bufferedOutputStream5 = Output_fos2; return true; } catch (Exception e10) { e = e10; Output_fos = Output_fos2; try { e.printStackTrace(); if (Output_fos == null) { return false; } try { Output_fos.close(); if (bufbr == null) { return false; } try { bufbr.close(); return false; } catch (IOException e11) { e11.printStackTrace(); return false; } } catch (IOException e12) { e12.printStackTrace(); if (bufbr == null) { return false; } try { bufbr.close(); return false; } catch (IOException e13) { e13.printStackTrace(); return false; } } finally { if (bufbr != null) { try { bufbr.close(); } catch (IOException e14) { e14.printStackTrace(); return false; } } } } catch (Throwable th2) { th = th2; if (Output_fos != null) { } throw th; } } catch (Throwable th3) { th = th3; Output_fos = Output_fos2; if (Output_fos != null) { } throw th; } } else if (Output_fos == null) { return false; } else { try { Output_fos.close(); if (bufbr == null) { return false; } try { bufbr.close(); return false; } catch (IOException e15) { e15.printStackTrace(); return false; } } catch (IOException e16) { e16.printStackTrace(); if (bufbr == null) { return false; } try { bufbr.close(); return false; } catch (IOException e17) { e17.printStackTrace(); return false; } } finally { if (bufbr != null) { try { bufbr.close(); } catch (IOException e18) { e18.printStackTrace(); return false; } } } } } catch (Exception e19) { e = e19; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test (timeout=180000)\n public void testValidLingeringSplitParent() throws Exception {\n TableName table =\n TableName.valueOf(\"testLingeringSplitParent\");\n Table meta = null;\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // make sure data in regi...
[ "0.5944777", "0.579341", "0.57421225", "0.56517583", "0.5629622", "0.55517924", "0.5437441", "0.53983426", "0.5387401", "0.5382859", "0.53632617", "0.531905", "0.5306918", "0.52865577", "0.5275156", "0.52437586", "0.52303886", "0.52156067", "0.52070653", "0.5206413", "0.51749...
0.0
-1
/ JADX WARNING: Removed duplicated region for block: B:50:0x0099 A[SYNTHETIC, Splitter:B:50:0x0099] / JADX WARNING: Removed duplicated region for block: B:76:0x00cf A[SYNTHETIC, Splitter:B:76:0x00cf]
public static int Comparetxtinzip(ZipFile apkzf, String filepathinzip, File fileinfiledir) { String tmpzipstr; BufferedInputStream checkfbr; int result; BufferedInputStream checkzbr = null; BufferedInputStream checkfbr2 = null; ZipEntry cookie_entry = apkzf.getEntry(filepathinzip); if (cookie_entry == null) { try { Log.i(TAG, "no this file in zip"); if (checkzbr != null) { try { checkzbr.close(); if (checkfbr2 != null) { try { checkfbr2.close(); } catch (IOException e) { e.printStackTrace(); return ERROR_EXCEPTION; } } } catch (IOException e2) { e2.printStackTrace(); if (checkfbr2 != null) { try { checkfbr2.close(); } catch (IOException e3) { e3.printStackTrace(); return ERROR_EXCEPTION; } } return ERROR_EXCEPTION; } finally { if (checkfbr2 != null) { try { checkfbr2.close(); } catch (IOException e4) { e4.printStackTrace(); return ERROR_EXCEPTION; } } } } return ERROR_FILE_NOT_FOUND_INZIP; } catch (Exception e5) { e = e5; try { e.printStackTrace(); if (checkzbr != null) { try { checkzbr.close(); if (checkfbr2 != null) { try { checkfbr2.close(); } catch (IOException e6) { e6.printStackTrace(); return ERROR_EXCEPTION; } } } catch (IOException e7) { e7.printStackTrace(); if (checkfbr2 != null) { try { checkfbr2.close(); } catch (IOException e8) { e8.printStackTrace(); return ERROR_EXCEPTION; } } return ERROR_EXCEPTION; } finally { if (checkfbr2 != null) { try { checkfbr2.close(); } catch (IOException e9) { e9.printStackTrace(); return ERROR_EXCEPTION; } } } } return ERROR_EXCEPTION; } catch (Throwable th) { th = th; if (checkzbr != null) { try { checkzbr.close(); if (checkfbr2 != null) { try { checkfbr2.close(); } catch (IOException e10) { e10.printStackTrace(); return ERROR_EXCEPTION; } } } catch (IOException e11) { e11.printStackTrace(); if (checkfbr2 != null) { try { checkfbr2.close(); } catch (IOException e12) { e12.printStackTrace(); return ERROR_EXCEPTION; } } return ERROR_EXCEPTION; } finally { if (checkfbr2 != null) { try { checkfbr2.close(); } catch (IOException e13) { e13.printStackTrace(); return ERROR_EXCEPTION; } } } } throw th; } } } else { byte[] checkzipbuf = new byte[1024]; byte[] checkfilebuf = new byte[1024]; BufferedInputStream checkzbr2 = new BufferedInputStream(apkzf.getInputStream(cookie_entry)); try { tmpzipstr = new String(checkzipbuf).substring(0, checkzbr2.read(checkzipbuf)); checkfbr = new BufferedInputStream(new FileInputStream(fileinfiledir)); } catch (Exception e14) { e = e14; checkzbr = checkzbr2; e.printStackTrace(); if (checkzbr != null) { } return ERROR_EXCEPTION; } catch (Throwable th2) { th = th2; checkzbr = checkzbr2; if (checkzbr != null) { } throw th; } try { if (new String(checkfilebuf).substring(0, checkfbr.read(checkfilebuf)).equals(tmpzipstr)) { result = 1; } else { result = 0; } if (checkzbr2 != null) { try { checkzbr2.close(); if (checkfbr != null) { try { checkfbr.close(); } catch (IOException e15) { e15.printStackTrace(); BufferedInputStream bufferedInputStream = checkfbr; BufferedInputStream bufferedInputStream2 = checkzbr2; return ERROR_EXCEPTION; } } } catch (IOException e16) { e16.printStackTrace(); if (checkfbr != null) { try { checkfbr.close(); } catch (IOException e17) { e17.printStackTrace(); BufferedInputStream bufferedInputStream3 = checkfbr; BufferedInputStream bufferedInputStream4 = checkzbr2; return ERROR_EXCEPTION; } } BufferedInputStream bufferedInputStream5 = checkfbr; BufferedInputStream bufferedInputStream6 = checkzbr2; return ERROR_EXCEPTION; } finally { if (checkfbr != null) { try { checkfbr.close(); } catch (IOException e18) { e18.printStackTrace(); BufferedInputStream bufferedInputStream7 = checkfbr; BufferedInputStream bufferedInputStream8 = checkzbr2; return ERROR_EXCEPTION; } } } } BufferedInputStream bufferedInputStream9 = checkfbr; BufferedInputStream bufferedInputStream10 = checkzbr2; return result; } catch (Exception e19) { e = e19; checkfbr2 = checkfbr; checkzbr = checkzbr2; } catch (Throwable th3) { th = th3; checkfbr2 = checkfbr; checkzbr = checkzbr2; if (checkzbr != null) { } throw th; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void reportSplit(HRegionInfo oldRegion, HRegionInfo newRegionA,\n HRegionInfo newRegionB) {\n \n outboundMsgs.add(new HMsg(HMsg.Type.MSG_REPORT_SPLIT, oldRegion,\n (oldRegion.getRegionNameAsString() + \" split; daughters: \" +\n newRegionA.getRegionNameAsString() + \", \" +\n newReg...
[ "0.56159776", "0.56119055", "0.55586773", "0.5490608", "0.5433412", "0.54311424", "0.54270977", "0.5368338", "0.53590804", "0.5340217", "0.5302345", "0.5241587", "0.5233319", "0.5194203", "0.51196104", "0.5080091", "0.50755316", "0.5053645", "0.50330275", "0.50145227", "0.500...
0.0
-1
/ JADX WARNING: Removed duplicated region for block: B:336:0x0ef0 A[SYNTHETIC, Splitter:B:336:0x0ef0] / JADX WARNING: Removed duplicated region for block: B:56:0x02fa / JADX WARNING: Removed duplicated region for block: B:61:0x0374 / JADX WARNING: Removed duplicated region for block: B:66:0x03ee / JADX WARNING: Removed duplicated region for block: B:75:0x0471 A[SYNTHETIC, Splitter:B:75:0x0471]
public static int PrepareSecurefiles(Context ctx, ZipFile apkzf) { ZipEntry fileUnzip; ZipEntry fileUnzip2; ZipEntry fileUnzip3; RandomAccessFile raf = null; FileLock file_lock = null; RandomAccessFile raf2 = null; String Appfiledir = new StringBuilder(String.valueOf(ctx.getFilesDir().getAbsolutePath())).append("/prodexdir").toString(); File Appprofiledir = new File(Appfiledir); if (!Appprofiledir.isDirectory()) { Appprofiledir.mkdir(); } String Cookiefilepath = new StringBuilder(String.valueOf(Appfiledir)).append("/").append(versionname).toString(); String backupfilepath = new StringBuilder(String.valueOf(Appfiledir)).append("/backUp").toString(); String firstloadfilepath = new StringBuilder(String.valueOf(Appfiledir)).append("/firstLoad").toString(); String Cookiefileinzip = "assets/" + versionname; String Libnameinapk = "libtosprotection." + CPUABI + ".so"; try { raf = new RandomAccessFile(Cookiefilepath, "rw"); try { raf = raf.getChannel(); file_lock = raf.lock(); File Cookiefile = new File(Cookiefilepath); try { if (Cookiefile.length() != 0) { int compareResult = Comparetxtinzip(apkzf, Cookiefileinzip, Cookiefile); if (compareResult == 1) { File secureDataFile = new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename5).toString()); if (!secureDataFile.exists() || secureDataFile.length() == 0) { SafeUnzipFile(apkzf, "assets/" + securename5, secureDataFile, 0); } else { SafeUnzipFile(apkzf, "assets/" + securename5, secureDataFile, getFileCRC32(secureDataFile)); } ZipEntry fileUnzip4 = apkzf.getEntry("assets/" + Libnameinapk); if (fileUnzip4 != null) { if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(libname).toString(), fileUnzip4.getSize())) { UnzipFile(apkzf, "assets/" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(libname).toString())); } } ZipEntry fileUnzip5 = apkzf.getEntry("assets/" + Libnameinapk); if (fileUnzip5 != null) { if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename6).toString(), fileUnzip5.getSize())) { UnzipFile(apkzf, "assets/" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename6).toString())); } } ZipEntry fileUnzip6 = apkzf.getEntry("assets/" + Libnameinapk); if (fileUnzip6 != null) { if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename7).toString(), fileUnzip6.getSize())) { UnzipFile(apkzf, "assets/" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename7).toString())); } } ZipEntry fileUnzip7 = apkzf.getEntry(Cookiefileinzip); if (fileUnzip7 != null && !isFileValid(Cookiefilepath, fileUnzip7.getSize())) { File file = new File(Cookiefilepath); UnzipFile(apkzf, Cookiefileinzip, file); } if (file_lock != null) { try { file_lock.release(); if (raf != null) { try { raf.close(); if (raf != null) { try { raf.close(); } catch (IOException e) { e.printStackTrace(); RandomAccessFile randomAccessFile = raf; File file2 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } } catch (IOException e2) { e2.printStackTrace(); if (raf != null) { try { raf.close(); } catch (IOException e3) { e3.printStackTrace(); RandomAccessFile randomAccessFile2 = raf; File file3 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } RandomAccessFile randomAccessFile3 = raf; File file4 = Cookiefile; return ERROR_FILE_NOT_FOUND; } finally { if (raf != null) { try { raf.close(); } catch (IOException e4) { e4.printStackTrace(); RandomAccessFile randomAccessFile4 = raf; File file5 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } } } } catch (IOException e5) { e5.printStackTrace(); if (raf != null) { try { raf.close(); if (raf != null) { try { raf.close(); } catch (IOException e6) { e6.printStackTrace(); RandomAccessFile randomAccessFile5 = raf; File file6 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } } catch (IOException e7) { e7.printStackTrace(); if (raf != null) { try { raf.close(); } catch (IOException e8) { e8.printStackTrace(); RandomAccessFile randomAccessFile6 = raf; File file7 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } RandomAccessFile randomAccessFile7 = raf; File file8 = Cookiefile; return ERROR_FILE_NOT_FOUND; } finally { if (raf != null) { try { raf.close(); } catch (IOException e9) { e9.printStackTrace(); RandomAccessFile randomAccessFile8 = raf; File file9 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } } } RandomAccessFile randomAccessFile9 = raf; File file10 = Cookiefile; return ERROR_FILE_NOT_FOUND; } finally { if (raf != null) { try { raf.close(); if (raf != null) { try { raf.close(); } catch (IOException e10) { e10.printStackTrace(); RandomAccessFile randomAccessFile10 = raf; File file11 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } } catch (IOException e11) { e11.printStackTrace(); if (raf != null) { try { raf.close(); } catch (IOException e12) { e12.printStackTrace(); RandomAccessFile randomAccessFile11 = raf; File file12 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } RandomAccessFile randomAccessFile12 = raf; File file13 = Cookiefile; return ERROR_FILE_NOT_FOUND; } finally { if (raf != null) { try { raf.close(); } catch (IOException e13) { e13.printStackTrace(); RandomAccessFile randomAccessFile13 = raf; File file14 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } } } } } RandomAccessFile randomAccessFile14 = raf; File file15 = Cookiefile; return 2; } else if (compareResult != 0) { Process.killProcess(Process.myPid()); System.exit(0); } } DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(libname).toString()); DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename6).toString()); int file_count = 0; while (file_count < MAX_DEX_NUM) { int deletedexresult = DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(CreatenewFileName(securename0, ".", "_" + file_count)).toString()); int deletejarresult = DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(CreatenewFileName(securename1, ".", "_" + file_count)).toString()); int deleteodexresult = DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append("/").append("odexdir").append("/").append(CreatenewFileName(securename0, ".", "_" + file_count)).toString()); int deleteflagresult = DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append("/").append("odexdir").append("/").append(CreatenewFileName(securename8, ".", "_" + file_count)).toString()); DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append("/").append("oat/arm").append("/").append(CreatenewFileName(securename8, ".", "_" + file_count)).toString()); if (ERROR_FILE_NOT_FOUND == deletedexresult && ERROR_FILE_NOT_FOUND == deletejarresult && ERROR_FILE_NOT_FOUND == deleteodexresult) { break; } if (ERROR_EXCEPTION == deletedexresult || ERROR_EXCEPTION == deletejarresult || ERROR_EXCEPTION == deleteodexresult) { Process.killProcess(Process.myPid()); System.exit(0); } file_count++; } DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename9).toString()); DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename5).toString()); UnzipFile(apkzf, "assets/" + securename5, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename5).toString())); UnzipFile(apkzf, "assets/" + libname, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(libname).toString())); UnzipFile(apkzf, "assets/" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename6).toString())); UnzipFile(apkzf, "assets/" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename7).toString())); File file16 = new File(Cookiefilepath); UnzipFile(apkzf, Cookiefileinzip, file16); for (int file_count2 = 0; file_count2 < file_count; file_count2++) { int deletedexresult2 = DeleteFile(new StringBuilder(String.valueOf(backupfilepath)).append("/").append(CreatenewFileName(securename0, ".", "_" + file_count2)).toString()); int deletejarresult2 = DeleteFile(new StringBuilder(String.valueOf(backupfilepath)).append("/").append(CreatenewFileName(securename1, ".", "_" + file_count2)).toString()); int deleteodexresult2 = DeleteFile(new StringBuilder(String.valueOf(backupfilepath)).append("/").append("odexdir").append("/").append(CreatenewFileName(securename0, ".", "_" + file_count2)).toString()); int deleteflagresult2 = DeleteFile(new StringBuilder(String.valueOf(backupfilepath)).append("/").append("odexdir").append("/").append(CreatenewFileName(securename8, ".", "_" + file_count2)).toString()); DeleteFile(new StringBuilder(String.valueOf(backupfilepath)).append("/").append("oat/arm").append("/").append(CreatenewFileName(securename8, ".", "_" + file_count2)).toString()); if (ERROR_FILE_NOT_FOUND == deletedexresult2 && ERROR_FILE_NOT_FOUND == deletejarresult2 && ERROR_FILE_NOT_FOUND == deleteodexresult2) { break; } if (ERROR_EXCEPTION == deletedexresult2 || ERROR_EXCEPTION == deletejarresult2 || ERROR_EXCEPTION == deleteodexresult2) { Process.killProcess(Process.myPid()); System.exit(0); } } for (int file_count3 = 0; file_count3 < file_count; file_count3++) { int deletedexresult3 = DeleteFile(new StringBuilder(String.valueOf(firstloadfilepath)).append("/").append(CreatenewFileName(securename0, ".", "_" + file_count3)).toString()); int deletejarresult3 = DeleteFile(new StringBuilder(String.valueOf(firstloadfilepath)).append("/").append(CreatenewFileName(securename1, ".", "_" + file_count3)).toString()); int deleteodexresult3 = DeleteFile(new StringBuilder(String.valueOf(firstloadfilepath)).append("/").append("odexdir").append("/").append(CreatenewFileName(securename0, ".", "_" + file_count3)).toString()); int deleteflagresult3 = DeleteFile(new StringBuilder(String.valueOf(firstloadfilepath)).append("/").append("odexdir").append("/").append(CreatenewFileName(securename8, ".", "_" + file_count3)).toString()); DeleteFile(new StringBuilder(String.valueOf(firstloadfilepath)).append("/").append("oat/arm").append("/").append(CreatenewFileName(securename8, ".", "_" + file_count3)).toString()); if (ERROR_FILE_NOT_FOUND == deletedexresult3 && ERROR_FILE_NOT_FOUND == deletejarresult3 && ERROR_FILE_NOT_FOUND == deleteodexresult3) { break; } if (ERROR_EXCEPTION == deletedexresult3 || ERROR_EXCEPTION == deletejarresult3 || ERROR_EXCEPTION == deleteodexresult3) { Process.killProcess(Process.myPid()); System.exit(0); } } ZipEntry fileUnzip8 = apkzf.getEntry("assets/" + Libnameinapk); if (fileUnzip8 != null) { if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(libname).toString(), fileUnzip8.getSize())) { UnzipFile(apkzf, "assets/" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(libname).toString())); } } ZipEntry fileUnzip9 = apkzf.getEntry("assets/" + Libnameinapk); if (fileUnzip9 != null) { if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename6).toString(), fileUnzip9.getSize())) { UnzipFile(apkzf, "assets/" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename6).toString())); } } ZipEntry fileUnzip10 = apkzf.getEntry("assets/" + Libnameinapk); if (fileUnzip10 != null) { if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename7).toString(), fileUnzip10.getSize())) { UnzipFile(apkzf, "assets/" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename7).toString())); } } ZipEntry fileUnzip11 = apkzf.getEntry(Cookiefileinzip); if (fileUnzip11 != null && !isFileValid(Cookiefilepath, fileUnzip11.getSize())) { File file17 = new File(Cookiefilepath); UnzipFile(apkzf, Cookiefileinzip, file17); } if (file_lock != null) { try { file_lock.release(); if (raf != null) { try { raf.close(); if (raf != null) { try { raf.close(); } catch (IOException e14) { e14.printStackTrace(); RandomAccessFile randomAccessFile15 = raf; File file18 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } } catch (IOException e15) { e15.printStackTrace(); if (raf != null) { try { raf.close(); } catch (IOException e16) { e16.printStackTrace(); RandomAccessFile randomAccessFile16 = raf; File file19 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } RandomAccessFile randomAccessFile17 = raf; File file20 = Cookiefile; return ERROR_FILE_NOT_FOUND; } finally { if (raf != null) { try { raf.close(); } catch (IOException e17) { e17.printStackTrace(); RandomAccessFile randomAccessFile18 = raf; File file21 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } } } } catch (IOException e18) { e18.printStackTrace(); if (raf != null) { try { raf.close(); if (raf != null) { try { raf.close(); } catch (IOException e19) { e19.printStackTrace(); RandomAccessFile randomAccessFile19 = raf; File file22 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } } catch (IOException e20) { e20.printStackTrace(); if (raf != null) { try { raf.close(); } catch (IOException e21) { e21.printStackTrace(); RandomAccessFile randomAccessFile20 = raf; File file23 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } RandomAccessFile randomAccessFile21 = raf; File file24 = Cookiefile; return ERROR_FILE_NOT_FOUND; } finally { if (raf != null) { try { raf.close(); } catch (IOException e22) { e22.printStackTrace(); RandomAccessFile randomAccessFile22 = raf; File file25 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } } } RandomAccessFile randomAccessFile23 = raf; File file26 = Cookiefile; return ERROR_FILE_NOT_FOUND; } finally { if (raf != null) { try { raf.close(); if (raf != null) { try { raf.close(); } catch (IOException e23) { e23.printStackTrace(); RandomAccessFile randomAccessFile24 = raf; File file27 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } } catch (IOException e24) { e24.printStackTrace(); if (raf != null) { try { raf.close(); } catch (IOException e25) { e25.printStackTrace(); RandomAccessFile randomAccessFile25 = raf; File file28 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } RandomAccessFile randomAccessFile26 = raf; File file29 = Cookiefile; return ERROR_FILE_NOT_FOUND; } finally { if (raf != null) { try { raf.close(); } catch (IOException e26) { e26.printStackTrace(); RandomAccessFile randomAccessFile27 = raf; File file30 = Cookiefile; return ERROR_FILE_NOT_FOUND; } } } } } } RandomAccessFile randomAccessFile28 = raf; File file31 = Cookiefile; return 0; } catch (Exception e27) { e = e27; raf2 = raf; File file32 = Cookiefile; } catch (Throwable th) { th = th; raf2 = raf; File file33 = Cookiefile; ZipEntry fileUnzip12 = apkzf.getEntry("assets/" + Libnameinapk); if (fileUnzip12 != null && !isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(libname).toString(), fileUnzip12.getSize())) { UnzipFile(apkzf, "assets/" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(libname).toString())); } ZipEntry fileUnzip13 = apkzf.getEntry("assets/" + Libnameinapk); if (fileUnzip13 != null && !isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename6).toString(), fileUnzip13.getSize())) { UnzipFile(apkzf, "assets/" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename6).toString())); } ZipEntry fileUnzip14 = apkzf.getEntry("assets/" + Libnameinapk); if (fileUnzip14 != null && !isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename7).toString(), fileUnzip14.getSize())) { UnzipFile(apkzf, "assets/" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename7).toString())); } ZipEntry fileUnzip15 = apkzf.getEntry(Cookiefileinzip); if (fileUnzip15 != null && !isFileValid(Cookiefilepath, fileUnzip15.getSize())) { File file34 = new File(Cookiefilepath); UnzipFile(apkzf, Cookiefileinzip, file34); } if (file_lock != null) { try { file_lock.release(); if (raf != null) { try { raf.close(); if (raf != null) { try { raf.close(); } catch (IOException e28) { e28.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } } catch (IOException e29) { e29.printStackTrace(); if (raf != null) { try { raf.close(); } catch (IOException e30) { e30.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } return ERROR_FILE_NOT_FOUND; } finally { if (raf != null) { try { raf.close(); } catch (IOException e31) { e31.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } } } } catch (IOException e32) { e32.printStackTrace(); if (raf != null) { try { raf.close(); if (raf != null) { try { raf.close(); } catch (IOException e33) { e33.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } } catch (IOException e34) { e34.printStackTrace(); if (raf != null) { try { raf.close(); } catch (IOException e35) { e35.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } return ERROR_FILE_NOT_FOUND; } finally { if (raf != null) { try { raf.close(); } catch (IOException e36) { e36.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } } } return ERROR_FILE_NOT_FOUND; } finally { if (raf != null) { try { raf.close(); if (raf != null) { try { raf.close(); } catch (IOException e37) { e37.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } } catch (IOException e38) { e38.printStackTrace(); if (raf != null) { try { raf.close(); } catch (IOException e39) { e39.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } return ERROR_FILE_NOT_FOUND; } finally { if (raf != null) { try { raf.close(); } catch (IOException e40) { e40.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } } } } } throw th; } } catch (Exception e41) { e = e41; raf2 = raf; try { e.printStackTrace(); fileUnzip = apkzf.getEntry("assets/" + Libnameinapk); if (fileUnzip != null) { if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(libname).toString(), fileUnzip.getSize())) { UnzipFile(apkzf, "assets/" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(libname).toString())); } } fileUnzip2 = apkzf.getEntry("assets/" + Libnameinapk); if (fileUnzip2 != null) { if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename6).toString(), fileUnzip2.getSize())) { UnzipFile(apkzf, "assets/" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename6).toString())); } } fileUnzip3 = apkzf.getEntry("assets/" + Libnameinapk); if (fileUnzip3 != null) { if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename7).toString(), fileUnzip3.getSize())) { UnzipFile(apkzf, "assets/" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename7).toString())); } } ZipEntry fileUnzip16 = apkzf.getEntry(Cookiefileinzip); if (fileUnzip16 != null && !isFileValid(Cookiefilepath, fileUnzip16.getSize())) { File file35 = new File(Cookiefilepath); UnzipFile(apkzf, Cookiefileinzip, file35); } if (file_lock != null) { try { file_lock.release(); if (raf != null) { try { raf.close(); if (raf != null) { try { raf.close(); } catch (IOException e42) { e42.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } } catch (IOException e43) { e43.printStackTrace(); if (raf != null) { try { raf.close(); } catch (IOException e44) { e44.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } return ERROR_FILE_NOT_FOUND; } finally { if (raf != null) { try { raf.close(); } catch (IOException e45) { e45.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } } } } catch (IOException e46) { e46.printStackTrace(); if (raf != null) { try { raf.close(); if (raf != null) { try { raf.close(); } catch (IOException e47) { e47.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } } catch (IOException e48) { e48.printStackTrace(); if (raf != null) { try { raf.close(); } catch (IOException e49) { e49.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } return ERROR_FILE_NOT_FOUND; } finally { if (raf != null) { try { raf.close(); } catch (IOException e50) { e50.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } } } return ERROR_FILE_NOT_FOUND; } finally { if (raf != null) { try { raf.close(); if (raf != null) { try { raf.close(); } catch (IOException e51) { e51.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } } catch (IOException e52) { e52.printStackTrace(); if (raf != null) { try { raf.close(); } catch (IOException e53) { e53.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } return ERROR_FILE_NOT_FOUND; } finally { if (raf != null) { try { raf.close(); } catch (IOException e54) { e54.printStackTrace(); return ERROR_FILE_NOT_FOUND; } } } } } } return ERROR_FILE_NOT_FOUND; } catch (Throwable th2) { th = th2; ZipEntry fileUnzip122 = apkzf.getEntry("assets/" + Libnameinapk); UnzipFile(apkzf, "assets/" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(libname).toString())); ZipEntry fileUnzip132 = apkzf.getEntry("assets/" + Libnameinapk); UnzipFile(apkzf, "assets/" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename6).toString())); ZipEntry fileUnzip142 = apkzf.getEntry("assets/" + Libnameinapk); UnzipFile(apkzf, "assets/" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename7).toString())); ZipEntry fileUnzip152 = apkzf.getEntry(Cookiefileinzip); File file342 = new File(Cookiefilepath); UnzipFile(apkzf, Cookiefileinzip, file342); if (file_lock != null) { } throw th; } } catch (Throwable th3) { th = th3; raf2 = raf; ZipEntry fileUnzip1222 = apkzf.getEntry("assets/" + Libnameinapk); UnzipFile(apkzf, "assets/" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(libname).toString())); ZipEntry fileUnzip1322 = apkzf.getEntry("assets/" + Libnameinapk); UnzipFile(apkzf, "assets/" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename6).toString())); ZipEntry fileUnzip1422 = apkzf.getEntry("assets/" + Libnameinapk); UnzipFile(apkzf, "assets/" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append("/").append(securename7).toString())); ZipEntry fileUnzip1522 = apkzf.getEntry(Cookiefileinzip); File file3422 = new File(Cookiefilepath); UnzipFile(apkzf, Cookiefileinzip, file3422); if (file_lock != null) { } throw th; } } catch (Exception e55) { e = e55; e.printStackTrace(); fileUnzip = apkzf.getEntry("assets/" + Libnameinapk); if (fileUnzip != null) { } fileUnzip2 = apkzf.getEntry("assets/" + Libnameinapk); if (fileUnzip2 != null) { } fileUnzip3 = apkzf.getEntry("assets/" + Libnameinapk); if (fileUnzip3 != null) { } ZipEntry fileUnzip162 = apkzf.getEntry(Cookiefileinzip); File file352 = new File(Cookiefilepath); UnzipFile(apkzf, Cookiefileinzip, file352); if (file_lock != null) { } return ERROR_FILE_NOT_FOUND; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test (timeout=180000)\n public void testValidLingeringSplitParent() throws Exception {\n TableName table =\n TableName.valueOf(\"testLingeringSplitParent\");\n Table meta = null;\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // make sure data in regi...
[ "0.5616294", "0.55942976", "0.538713", "0.53289926", "0.5291915", "0.52713037", "0.5265817", "0.51654917", "0.5124979", "0.51175344", "0.50814337", "0.5015438", "0.50060856", "0.49950424", "0.49880096", "0.49770907", "0.49739215", "0.4967251", "0.49483877", "0.4916859", "0.49...
0.0
-1
/ JADX WARNING: Removed duplicated region for block: B:124:0x0101 A[SYNTHETIC, Splitter:B:124:0x0101]
public static boolean SafeUnzipFile(ZipFile zf, String filepathinzip, File fileinfiledir, long crc) { BufferedOutputStream Output_fos = null; BufferedInputStream bufbr = null; try { ZipEntry ze = zf.getEntry(filepathinzip); if (ze == null) { if (Output_fos != null) { try { Output_fos.close(); if (bufbr != null) { try { bufbr.close(); } catch (IOException e) { e.printStackTrace(); return false; } } } catch (IOException e2) { e2.printStackTrace(); if (bufbr != null) { try { bufbr.close(); } catch (IOException e3) { e3.printStackTrace(); return false; } } return false; } finally { if (bufbr != null) { try { bufbr.close(); } catch (IOException e4) { e4.printStackTrace(); return false; } } } } return false; } if (crc != 0) { if (ze.getCrc() == crc) { if (Output_fos != null) { try { Output_fos.close(); if (bufbr != null) { try { bufbr.close(); } catch (IOException e5) { e5.printStackTrace(); return false; } } } catch (IOException e6) { e6.printStackTrace(); if (bufbr != null) { try { bufbr.close(); } catch (IOException e7) { e7.printStackTrace(); return false; } } return false; } finally { if (bufbr != null) { try { bufbr.close(); } catch (IOException e8) { e8.printStackTrace(); return false; } } } } return true; } } byte[] buf = UnzipFile(zf, ze); if (1 != 0) { BufferedOutputStream Output_fos2 = new BufferedOutputStream(new FileOutputStream(fileinfiledir)); try { Output_fos2.write(buf, 0, buf.length); Output_fos = Output_fos2; } catch (Exception e9) { e = e9; Output_fos = Output_fos2; try { e.printStackTrace(); if (Output_fos != null) { try { Output_fos.close(); if (bufbr != null) { try { bufbr.close(); } catch (IOException e10) { e10.printStackTrace(); return false; } } } catch (IOException e11) { e11.printStackTrace(); if (bufbr != null) { try { bufbr.close(); } catch (IOException e12) { e12.printStackTrace(); return false; } } return false; } finally { if (bufbr != null) { try { bufbr.close(); } catch (IOException e13) { e13.printStackTrace(); return false; } } } } return false; } catch (Throwable th) { th = th; if (Output_fos != null) { } throw th; } } catch (Throwable th2) { th = th2; Output_fos = Output_fos2; if (Output_fos != null) { try { Output_fos.close(); if (bufbr != null) { try { bufbr.close(); } catch (IOException e14) { e14.printStackTrace(); return false; } } } catch (IOException e15) { e15.printStackTrace(); if (bufbr != null) { try { bufbr.close(); } catch (IOException e16) { e16.printStackTrace(); return false; } } return false; } finally { if (bufbr != null) { try { bufbr.close(); } catch (IOException e17) { e17.printStackTrace(); return false; } } } } throw th; } } if (Output_fos != null) { try { Output_fos.close(); if (bufbr != null) { try { bufbr.close(); } catch (IOException e18) { e18.printStackTrace(); return false; } } } catch (IOException e19) { e19.printStackTrace(); if (bufbr != null) { try { bufbr.close(); } catch (IOException e20) { e20.printStackTrace(); return false; } } return false; } finally { if (bufbr != null) { try { bufbr.close(); } catch (IOException e21) { e21.printStackTrace(); return false; } } } } return true; } catch (Exception e22) { e = e22; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test (timeout=180000)\n public void testValidLingeringSplitParent() throws Exception {\n TableName table =\n TableName.valueOf(\"testLingeringSplitParent\");\n Table meta = null;\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // make sure data in regi...
[ "0.58902645", "0.5691384", "0.56449664", "0.5542934", "0.54841894", "0.54280216", "0.5427225", "0.52820283", "0.5280687", "0.5280173", "0.5271365", "0.5226862", "0.5206154", "0.5197882", "0.517796", "0.5170288", "0.51597834", "0.5153348", "0.51331365", "0.51109284", "0.501417...
0.0
-1
this method adds a given hit listener to a list of hit listeners in this hit notifier.
void addHitListener(HitListener hl);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addHitListener(HitListener hl) {\nthis.hitListeners.add(hl);\n}", "public void addHitTestListener(HitTestListener l) {\n hitTestListenerList.add(HitTestListener.class, l);\n }", "public void addHitListener(HitListener hl) {\n this.hitListeners.add(hl);\n }", "public void addHitListe...
[ "0.7939308", "0.759045", "0.74553686", "0.73354554", "0.7261941", "0.6929178", "0.6370521", "0.6345784", "0.62687796", "0.6168392", "0.60547924", "0.6015566", "0.5995683", "0.59911317", "0.59683037", "0.59341294", "0.5909613", "0.58734447", "0.58670765", "0.5852726", "0.58466...
0.7420389
5
this method removes a given hit listener object from the list of hit listeners in this hit notifier.
void removeHitListener(HitListener hl);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeHitListener(HitListener hl) {\nthis.hitListeners.remove(hl);\n}", "public void removeHitTestListener(HitTestListener l) {\n hitTestListenerList.remove(HitTestListener.class, l);\n }", "public void removeHitListener(HitListener hl) {\n this.hitListeners.remove(hl);\n }", "publi...
[ "0.8281208", "0.7926446", "0.7696187", "0.7585134", "0.75707984", "0.73713493", "0.7077662", "0.70315063", "0.69973063", "0.6986824", "0.6978558", "0.69718474", "0.694815", "0.6929077", "0.69081897", "0.6899041", "0.683982", "0.6824448", "0.67903394", "0.6777483", "0.67772555...
0.7902012
4
TODO Autogenerated method stub
public Node create(Requirement requirement) { Node nodeRequirementDb = db.createNode(requirementNode.REQUIREMENT); nodeRequirementDb.setProperty( "Name", requirement.getName()); nodeRequirementDb.setProperty( "Type", requirement.getRequirementType().getNamespaceURI()+":"+requirement.getRequirementType().getLocalPart()); nodeRequirementDb.setProperty( "Namespace", requirement.getRequirementType().getNamespaceURI()); nodeRequirementDb.setProperty( "Prefix", preFixDao.getPrefixByNameSpaceUrl(requirement.getRequirementType().getNamespaceURI())); nodeRequirementDb.setProperty( "Localpart", requirement.getRequirementType().getLocalPart()); nodeRequirementDb.setProperty( "LowerBound", requirement.getLowerBound()); nodeRequirementDb.setProperty( "UpperBound", requirement.getUpperBound()); if(requirement.getConstraints() != null){ Iterator<Constraint> iteratorConstraint = requirement.getConstraints().getConstraint().iterator(); Constraint nextConstraint = null; while (iteratorConstraint.hasNext()) { nextConstraint = iteratorConstraint.next(); constraintDao.create(nextConstraint); } } return nodeRequirementDb; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { contato = new Contato(); try { contato.RecuperarLista(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Create the input fluid to the TEG process and saturate it with water at scrubber conditions
public static void main(String[] args) { neqsim.thermo.system.SystemInterface feedGas = new neqsim.thermo.system.SystemSrkCPAstatoil(273.15 + 42.0, 10.00); feedGas.addComponent("nitrogen", 1.03); feedGas.addComponent("CO2", 1.42); feedGas.addComponent("methane", 83.88); feedGas.addComponent("ethane", 8.07); feedGas.addComponent("propane", 3.54); feedGas.addComponent("i-butane", 0.54); feedGas.addComponent("n-butane", 0.84); feedGas.addComponent("i-pentane", 0.21); feedGas.addComponent("n-pentane", 0.19); feedGas.addComponent("n-hexane", 0.28); feedGas.addComponent("water", 0.0); feedGas.addComponent("TEG", 0); feedGas.createDatabase(true); feedGas.setMixingRule(10); feedGas.setMultiPhaseCheck(true); Stream dryFeedGas = new Stream("dry feed gas", feedGas); dryFeedGas.setFlowRate(11.23, "MSm3/day"); dryFeedGas.setTemperature(30.4, "C"); dryFeedGas.setPressure(52.21, "bara"); StreamSaturatorUtil saturatedFeedGas = new StreamSaturatorUtil(dryFeedGas); Stream waterSaturatedFeedGas = new Stream(saturatedFeedGas.getOutStream()); saturatedFeedGas.setName("water saturator"); neqsim.thermo.system.SystemInterface feedTEG = (neqsim.thermo.system.SystemInterface) feedGas.clone(); feedTEG.setMolarComposition(new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.02, 0.98 }); Stream TEGFeed = new Stream("lean TEG to absorber", feedTEG); TEGFeed.setFlowRate(6.1 * 1100.0, "kg/hr"); TEGFeed.setTemperature(35.4, "C"); TEGFeed.setPressure(52.21, "bara"); SimpleTEGAbsorber absorber = new SimpleTEGAbsorber("SimpleTEGAbsorber"); absorber.addGasInStream(waterSaturatedFeedGas); absorber.addSolventInStream(TEGFeed); absorber.setNumberOfStages(10); absorber.setStageEfficiency(0.35); Stream dehydratedGas = new Stream(absorber.getGasOutStream()); dehydratedGas.setName("dry gas from absorber"); Stream richTEG = new Stream(absorber.getSolventOutStream()); ThrottlingValve glycol_flash_valve = new ThrottlingValve(richTEG); glycol_flash_valve.setName("Rich TEG HP flash valve"); glycol_flash_valve.setOutletPressure(4.9); Heater richGLycolHeaterCondeser = new Heater(glycol_flash_valve.getOutStream()); richGLycolHeaterCondeser.setName("rich TEG preheater"); richGLycolHeaterCondeser.setOutTemperature(273.15 + 35.5); Heater richGLycolHeater = new Heater(richGLycolHeaterCondeser.getOutStream()); richGLycolHeater.setName("rich TEG heater HP"); richGLycolHeater.setOutTemperature(273.15 + 62.0); Separator flashSep = new Separator(richGLycolHeater.getOutStream()); flashSep.setName("degasing separator"); Stream flashGas = new Stream(flashSep.getGasOutStream()); flashGas.setName("gas from degasing separator"); Stream flashLiquid = new Stream(flashSep.getLiquidOutStream()); flashLiquid.setName("liquid from degasing separator"); Heater richGLycolHeater2 = new Heater(flashLiquid); richGLycolHeater2.setName("LP rich glycol heater"); richGLycolHeater2.setOutTemperature(273.15 + 139.0); richGLycolHeater2.setOutPressure(1.23); Mixer mixerTOreboiler = new Mixer("reboil mxer"); mixerTOreboiler.addStream(richGLycolHeater2.getOutStream()); Heater heaterToReboiler = new Heater(mixerTOreboiler.getOutStream()); heaterToReboiler.setOutTemperature(273.15 + 206.6); Separator regenerator2 = new Separator(heaterToReboiler.getOutStream()); Stream gasFromRegenerator = new Stream(regenerator2.getGasOutStream()); Heater sepregenGasCooler = new Heater(gasFromRegenerator); sepregenGasCooler.setOutTemperature(273.15 + 109.0); sepregenGasCooler.setOutPressure(1.23); // sepregenGasCooler.setEnergyStream(richGLycolHeaterCondeser.getEnergyStream()); Separator sepRegen = new Separator(sepregenGasCooler.getOutStream()); Stream liquidRegenReflux = new Stream(sepRegen.getLiquidOutStream()); Recycle resycle2 = new Recycle("reflux resycle"); resycle2.addStream(liquidRegenReflux); Heater coolerRegenGas = new Heater(sepRegen.getGasOutStream()); coolerRegenGas.setOutTemperature(273.15 + 35.5); Separator sepregenGas = new Separator(coolerRegenGas.getOutStream()); Stream gasToFlare = new Stream(sepregenGas.getGasOutStream()); Stream liquidToTrreatment = new Stream(sepregenGas.getLiquidOutStream()); Stream hotLeanTEG = new Stream(regenerator2.getLiquidOutStream()); neqsim.thermo.system.SystemInterface stripGas = (neqsim.thermo.system.SystemInterface) feedGas.clone(); stripGas.setMolarComposition(new double[] { 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }); Stream strippingGas = new Stream("stripGas", stripGas); strippingGas.setFlowRate(70.0, "kg/hr"); strippingGas.setTemperature(206.6, "C"); strippingGas.setPressure(1.23, "bara"); WaterStripperColumn stripper = new WaterStripperColumn("TEG stripper"); stripper.addGasInStream(strippingGas); stripper.addSolventInStream(hotLeanTEG); stripper.setNumberOfStages(10); stripper.setStageEfficiency(0.5); Recycle resycle3 = new Recycle("gas stripper resycle"); resycle3.addStream(stripper.getGasOutStream()); Pump hotLeanTEGPump = new Pump(stripper.getSolventOutStream()); hotLeanTEGPump.setName("hot lean TEG pump"); hotLeanTEGPump.setOutletPressure(20.0); Heater coolerhOTteg = new Heater(hotLeanTEGPump.getOutStream()); coolerhOTteg.setName("hot lean TEG cooler"); coolerhOTteg.setOutTemperature(273.15 + 116.8); Heater coolerhOTteg2 = new Heater(coolerhOTteg.getOutStream()); coolerhOTteg2.setName("medium hot lean TEG cooler"); coolerhOTteg2.setOutTemperature(273.15 + 89.3); Heater coolerhOTteg3 = new Heater(coolerhOTteg2.getOutStream()); coolerhOTteg3.setName("lean TEG cooler"); coolerhOTteg3.setOutTemperature(273.15 + 44.85); Pump hotLeanTEGPump2 = new Pump(coolerhOTteg3.getOutStream()); hotLeanTEGPump2.setName("lean TEG HP pump"); hotLeanTEGPump2.setOutletPressure(52.21); Stream leanTEGtoabs = new Stream(hotLeanTEGPump2.getOutStream()); leanTEGtoabs.setName("lean TEG to absorber"); neqsim.thermo.system.SystemInterface pureTEG = (neqsim.thermo.system.SystemInterface) feedGas.clone(); pureTEG.setMolarComposition(new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 }); Stream makeupTEG = new Stream("lean TEG to absorber", pureTEG); makeupTEG.setFlowRate(1e-6, "kg/hr"); makeupTEG.setTemperature(35.4, "C"); makeupTEG.setPressure(52.21, "bara"); Calculator makeupCalculator = new Calculator("makeup calculator"); makeupCalculator.addInputVariable(dehydratedGas); makeupCalculator.addInputVariable(flashGas); makeupCalculator.addInputVariable(gasToFlare); makeupCalculator.addInputVariable(liquidToTrreatment); makeupCalculator.setOutputVariable(makeupTEG); StaticMixer makeupMixer = new StaticMixer("makeup mixer"); makeupMixer.addStream(leanTEGtoabs); makeupMixer.addStream(makeupTEG); Recycle resycleLeanTEG = new Recycle("lean TEG resycle"); resycleLeanTEG.addStream(makeupMixer.getOutStream()); neqsim.processSimulation.processSystem.ProcessSystem operations = new neqsim.processSimulation.processSystem.ProcessSystem(); operations.add(dryFeedGas); operations.add(saturatedFeedGas); operations.add(waterSaturatedFeedGas); operations.add(TEGFeed); operations.add(absorber); operations.add(dehydratedGas); operations.add(richTEG); operations.add(glycol_flash_valve); operations.add(richGLycolHeaterCondeser); operations.add(richGLycolHeater); operations.add(flashSep); operations.add(flashGas); operations.add(flashLiquid); operations.add(richGLycolHeater2); operations.add(mixerTOreboiler); operations.add(heaterToReboiler); operations.add(regenerator2); operations.add(gasFromRegenerator); operations.add(sepregenGasCooler); operations.add(sepRegen); operations.add(liquidRegenReflux); operations.add(resycle2); operations.add(coolerRegenGas); operations.add(sepregenGas); operations.add(gasToFlare); operations.add(liquidToTrreatment); operations.add(hotLeanTEG); operations.add(strippingGas); operations.add(stripper); operations.add(resycle3); operations.add(hotLeanTEGPump); operations.add(coolerhOTteg); operations.add(coolerhOTteg2); operations.add(coolerhOTteg3); operations.add(hotLeanTEGPump2); operations.add(leanTEGtoabs); operations.add(makeupCalculator); operations.add(makeupTEG); operations.add(makeupMixer); operations.add(resycleLeanTEG); operations.run(); richGLycolHeater2.getOutStream().getFluid().display(); System.out.println("Energy reboiler " + heaterToReboiler.getDuty()); mixerTOreboiler.addStream(liquidRegenReflux); mixerTOreboiler.addStream(resycle3.getOutStream()); // operations.run(); absorber.replaceSolventInStream(resycleLeanTEG.getOutStream()); operations.run(); // richGLycolHeater2.getOutStream().getFluid().display(); System.out.println("Energy reboiler 2 " + heaterToReboiler.getDuty()); System.out.println("wt lean TEG after stripper " + ((WaterStripperColumn) operations.getUnit("TEG stripper")).getSolventOutStream().getFluid() .getPhase("aqueous").getWtFrac("TEG")); operations.save("c:/temp/TEGprocessSimple.neqsim"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private float getHeatOfVaporization(Fluid fluid) {\n\t\tif(fluid == null) { throw new IllegalArgumentException(\"Cannot pass a null fluid to getHeatOfVaporization\"); } // just in case\n\n\t\t// TODO: Make a registry for this, do a lookup\n\t\treturn 4f; // TE converts 1mB steam into 2 RF of work in a steam turbin...
[ "0.5411312", "0.5383954", "0.53598857", "0.53410983", "0.51947886", "0.5163683", "0.5156472", "0.5125527", "0.50417584", "0.49954605", "0.49869782", "0.49731785", "0.4967702", "0.49635085", "0.49541855", "0.49518135", "0.49499786", "0.4946747", "0.49320394", "0.49319822", "0....
0.54883313
0
Creates new form latihanIV
public latihanIV() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "public Latihan2() {\n initComponents();\n }", "FORM createFORM();", "publ...
[ "0.6243488", "0.62220925", "0.6215574", "0.61476487", "0.6143139", "0.6113486", "0.60150224", "0.6007698", "0.5972852", "0.59565943", "0.59368724", "0.593108", "0.5928742", "0.58766055", "0.5869295", "0.58612806", "0.583827", "0.58194554", "0.58165437", "0.57876694", "0.57516...
0.65259045
0
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() { buttonGroup1 = new javax.swing.ButtonGroup(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); Nama = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); Kelas = new javax.swing.JTextField(); jLabel4 = new javax.swing.JLabel(); rb1 = new javax.swing.JRadioButton(); rb2 = new javax.swing.JRadioButton(); baca = new javax.swing.JCheckBox(); tulis = new javax.swing.JCheckBox(); jLabel5 = new javax.swing.JLabel(); renang = new javax.swing.JCheckBox(); lari = new javax.swing.JCheckBox(); btnSubmit = new javax.swing.JButton(); btnHapus = new javax.swing.JButton(); btnKeluar = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); TAHasil = new javax.swing.JTextArea(); jPanel1 = new javax.swing.JPanel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); getContentPane().setLayout(null); jLabel1.setText("Biodata Siswa"); getContentPane().add(jLabel1); jLabel1.setBounds(150, 10, 90, 20); jLabel2.setText("Nama : "); getContentPane().add(jLabel2); jLabel2.setBounds(70, 40, 50, 14); Nama.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { NamaActionPerformed(evt); } }); getContentPane().add(Nama); Nama.setBounds(130, 40, 140, 30); jLabel3.setText("Kelas : "); getContentPane().add(jLabel3); jLabel3.setBounds(70, 80, 50, 14); Kelas.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { KelasActionPerformed(evt); } }); getContentPane().add(Kelas); Kelas.setBounds(130, 80, 140, 30); jLabel4.setText("Jurusan :"); getContentPane().add(jLabel4); jLabel4.setBounds(70, 110, 70, 14); buttonGroup1.add(rb1); rb1.setText("RPL"); rb1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { rb1ActionPerformed(evt); } }); getContentPane().add(rb1); rb1.setBounds(130, 110, 60, 23); buttonGroup1.add(rb2); rb2.setText("TKJ"); rb2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { rb2ActionPerformed(evt); } }); getContentPane().add(rb2); rb2.setBounds(210, 110, 60, 23); baca.setText("Membaca"); getContentPane().add(baca); baca.setBounds(130, 140, 80, 23); tulis.setText("Menulis"); tulis.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { tulisActionPerformed(evt); } }); getContentPane().add(tulis); tulis.setBounds(130, 170, 80, 23); jLabel5.setText("Hobi : "); getContentPane().add(jLabel5); jLabel5.setBounds(70, 140, 50, 14); renang.setText("Berenang"); getContentPane().add(renang); renang.setBounds(220, 140, 80, 23); lari.setText("Berlari"); lari.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { lariActionPerformed(evt); } }); getContentPane().add(lari); lari.setBounds(220, 170, 70, 23); btnSubmit.setText("Submit"); btnSubmit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSubmitActionPerformed(evt); } }); getContentPane().add(btnSubmit); btnSubmit.setBounds(60, 200, 80, 23); btnHapus.setText("Hapus"); btnHapus.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnHapusActionPerformed(evt); } }); getContentPane().add(btnHapus); btnHapus.setBounds(150, 200, 70, 23); btnKeluar.setText("Keluar"); btnKeluar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnKeluarActionPerformed(evt); } }); getContentPane().add(btnKeluar); btnKeluar.setBounds(223, 200, 80, 23); TAHasil.setColumns(20); TAHasil.setRows(5); jScrollPane1.setViewportView(TAHasil); getContentPane().add(jScrollPane1); jScrollPane1.setBounds(60, 250, 250, 130); jPanel1.setBackground(new java.awt.Color(153, 255, 153)); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 390, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 420, Short.MAX_VALUE) ); getContentPane().add(jPanel1); jPanel1.setBounds(0, 0, 390, 420); setBounds(0, 0, 400, 460); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7319396", "0.7290941", "0.7290941", "0.7290941", "0.7285927", "0.7248002", "0.72139066", "0.72086275", "0.71958303", "0.718997", "0.7184516", "0.7159095", "0.71481097", "0.709288", "0.70806605", "0.70578784", "0.6986726", "0.6977067", "0.6955257", "0.6954392", "0.6945326",...
0.0
-1
return the gui folder with settings
public GuiStem getGuiFolderWithSettings() { if (this.grouperObjectTypesAttributeValue == null) { return null; } String stemId = this.grouperObjectTypesAttributeValue.getObjectTypeOwnerStemId(); Stem stem = GrouperDAOFactory.getFactory().getStem().findByUuid(stemId, false); if (stem == null) { return null; } return new GuiStem(stem); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GuiSettings getGuiSettings();", "GuiSettings getGuiSettings();", "GuiSettings getGuiSettings();", "GuiSettings getGuiSettings();", "GuiSettings getGuiSettings();", "GuiSettings getGuiSettings();", "GuiSettings getGuiSettings();", "private static String getConfigFile() {\n\n final String sPath = ...
[ "0.70236975", "0.70236975", "0.70236975", "0.70236975", "0.70236975", "0.70236975", "0.70236975", "0.6402591", "0.61258626", "0.6121375", "0.596304", "0.595693", "0.59562814", "0.59358567", "0.59027445", "0.58897424", "0.581588", "0.57596016", "0.5754654", "0.57453966", "0.57...
0.63176596
8
Counter for loop labels
protected FunctionNode(AbstractNode parent, FunctionOrMethod function) { super(parent); loopCounter = 0; children = new ArrayList<AbstractNode>(); variables = new HashSet<String>(); params = loadParams(function.type()); this.name = function.name(); //Add label to variables variables.add(LABEL_VAR); //Function is going to have various subnodes which now need to be parsed, and strung together for (Code code : function.body().bytecodes()){ children.addAll(createNodeFromCode(code, this)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getLabelsCount();", "int getLabelsCount();", "int getLabelsCount();", "int getLabelsCount();", "public void incrementLoopCount() {\n this.loopCount++;\n }", "private void displayCount() {\n\t\tlabel.setText(String.format(\"%2d\", game.getCount()));\n\t}", "public String label() {\n\t\tret...
[ "0.70403826", "0.70403826", "0.70403826", "0.70403826", "0.64960057", "0.63587475", "0.6318133", "0.62979233", "0.6265745", "0.62566066", "0.6203827", "0.6180267", "0.6139535", "0.60951155", "0.6088244", "0.60775447", "0.60775447", "0.6058147", "0.60503817", "0.60341156", "0....
0.0
-1
Returns the parameters available for a function
private static List<String> loadParams(Type.FunctionOrMethod function){ int numParams = function.params().size(); List<String >params = new ArrayList<String>(); //Params are numbered in order, so just put in the variable names for (int i = 0; i < numParams; i++){ params.add(String.format("$%d", i)); } return params; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map getFuncParams() {\r\n\t\treturn funcParams;\r\n\t}", "public FunctionParameters getFunctionParameters() {\n return (FunctionParameters) get(FUNCTION_PARAMETERS_NAME);\n }", "public Parameters getParameters();", "@Override\n public FunctionParameters getParameters() {\n return _parameters;\...
[ "0.72511053", "0.7221615", "0.7178857", "0.717343", "0.71161014", "0.7060542", "0.7014588", "0.68261343", "0.67072785", "0.67072785", "0.6700454", "0.66924405", "0.6685695", "0.6608028", "0.64928484", "0.6483376", "0.6479077", "0.64328897", "0.6405189", "0.63780105", "0.63377...
0.71137345
5
set view height using data binding
@BindingAdapter({"layout_height"}) public static void setHeight(View view, int height) { view.getLayoutParams().height = Math.round(height * view.getContext().getResources().getDisplayMetrics().density); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setHeight(int height);", "public void setHeight(int height);", "public void yBindHeight(String bind_name, ObservableValue<? extends Number> height, boolean stroke_included);", "public void setHeight(int newValue)\n {\n height = newValue;\n }", "public void setHeight(int value) {\n ...
[ "0.6855721", "0.6855721", "0.6787676", "0.67456216", "0.6712472", "0.6679681", "0.6679681", "0.66473216", "0.6638206", "0.6517029", "0.65069485", "0.64486724", "0.64385307", "0.6400112", "0.6380439", "0.6373592", "0.63616127", "0.6341751", "0.6288713", "0.62751323", "0.626207...
0.7579133
0
set view height using data binding
@BindingAdapter({"layout_width"}) public static void setWidth(View view, int width) { view.getLayoutParams().width = Math.round(width * view.getContext().getResources().getDisplayMetrics().density); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@BindingAdapter({\"layout_height\"})\n public static void setHeight(View view, int height) {\n view.getLayoutParams().height = Math.round(height * view.getContext().getResources().getDisplayMetrics().density);\n }", "public void setHeight(int height);", "public void setHeight(int height);", "pub...
[ "0.7579133", "0.6855721", "0.6855721", "0.6787676", "0.67456216", "0.6712472", "0.6679681", "0.6679681", "0.66473216", "0.6638206", "0.6517029", "0.65069485", "0.64486724", "0.64385307", "0.6400112", "0.6380439", "0.6373592", "0.63616127", "0.6341751", "0.6288713", "0.6275132...
0.0
-1
set view height using data binding
@BindingAdapter({"layout_marginTop"}) public static void setmarginTop(View view, int marginTop) { ViewGroup.MarginLayoutParams marginParams = (ViewGroup.MarginLayoutParams) view.getLayoutParams(); marginParams.setMargins(marginParams.leftMargin, Math.round(marginTop * view.getContext().getResources().getDisplayMetrics().density), marginParams.rightMargin, marginParams.bottomMargin); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@BindingAdapter({\"layout_height\"})\n public static void setHeight(View view, int height) {\n view.getLayoutParams().height = Math.round(height * view.getContext().getResources().getDisplayMetrics().density);\n }", "public void setHeight(int height);", "public void setHeight(int height);", "pub...
[ "0.7579133", "0.6855721", "0.6855721", "0.6787676", "0.67456216", "0.6712472", "0.6679681", "0.6679681", "0.66473216", "0.6638206", "0.6517029", "0.65069485", "0.64486724", "0.64385307", "0.6400112", "0.6380439", "0.6373592", "0.63616127", "0.6341751", "0.6288713", "0.6275132...
0.0
-1
set view height using data binding
@BindingAdapter(value = {"backgroundRes", "backgroundColor"}, requireAll = false) public static void setBackground(View view, @DrawableRes int backgroundRes, @ColorInt int backgroundColor) { if (backgroundRes != 0) { view.setBackgroundResource(backgroundRes); return; } view.setBackgroundColor(backgroundColor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@BindingAdapter({\"layout_height\"})\n public static void setHeight(View view, int height) {\n view.getLayoutParams().height = Math.round(height * view.getContext().getResources().getDisplayMetrics().density);\n }", "public void setHeight(int height);", "public void setHeight(int height);", "pub...
[ "0.7579133", "0.6855721", "0.6855721", "0.6787676", "0.67456216", "0.6712472", "0.6679681", "0.6679681", "0.66473216", "0.6638206", "0.6517029", "0.65069485", "0.64486724", "0.64385307", "0.6400112", "0.6380439", "0.6373592", "0.63616127", "0.6341751", "0.6288713", "0.6275132...
0.0
-1
Constructor: Don't forget to set variables!
public Email() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public CyanSus() {\n\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public Pitonyak_09_02() {\r\n }", "public PSRelation()\n {\n }", "public Chick() {\n\t}", "private TMCourse() {\n\t}", "private Reken...
[ "0.85226715", "0.77848583", "0.73238885", "0.7299575", "0.7258378", "0.7236827", "0.7180204", "0.7175385", "0.7175127", "0.7132976", "0.71236914", "0.71233714", "0.7086688", "0.70766723", "0.70724446", "0.7067131", "0.7067131", "0.7067131", "0.7062119", "0.70601153", "0.70601...
0.0
-1
Convenience Constructor: The bare minimum information you need to send an email.
public Email(String from, String to, String subject, String body) { this.from = from; this.to.add(to); this.subject = subject; this.body = body; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Email(){}", "public MailSender() {\r\n }", "public EmailSender()\r\n {\r\n this(\"javaemailsender\" ,\"sendtestemail\");\r\n }", "public Email() {\n\t}", "public MailMessage() {\n }", "public EmailObj(String to, String from, String subject, String body) {\n this(to, from, su...
[ "0.727833", "0.72441757", "0.7190312", "0.70505583", "0.6904634", "0.689538", "0.68604547", "0.68109256", "0.6775626", "0.6764764", "0.6722615", "0.67186755", "0.6710817", "0.66198474", "0.65784377", "0.657643", "0.6569413", "0.6455452", "0.6452451", "0.63683635", "0.633829",...
0.6420437
19
Constructor: Use for emails without attachments
public Email(String from, List<String> to, List<String> cc, List<String> bcc, String subject, String body) { this.from = from; this.to = to; this.cc = cc; this.bcc = bcc; this.subject = subject; this.body = body; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private SimpleAttachment() {\n }", "public MailMessage() {\n }", "public Email(){}", "public Email() {\n\t}", "public PurchaseRequestAttachment() {\r\n }", "public PurchaseRequestAttachmentContent() {\r\n }", "public MimeMultipart() {\n/* 163 */ this(\"mixed\");\n/* */ }", "priv...
[ "0.7610495", "0.70935255", "0.7021509", "0.6989137", "0.6978029", "0.6945904", "0.6902395", "0.68970525", "0.68595105", "0.68006027", "0.67184645", "0.6637451", "0.6410448", "0.63937825", "0.6326652", "0.6271227", "0.626121", "0.620039", "0.615309", "0.61075217", "0.6092517",...
0.5457612
81
Full Constructor: Use for emails with attachments
public Email(String from, List<String> replyTo, List<String> to, List<String> cc, List<String> bcc, String subject, String body, boolean html, List<MimeBodyPart> bodyParts) { this.from = from; this.replyTo = replyTo; this.to = to; this.cc = cc; this.bcc = bcc; this.subject = subject; this.body = body; this.html = html; this.bodyParts = bodyParts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private SimpleAttachment() {\n }", "public PurchaseRequestAttachment() {\r\n }", "public PurchaseRequestAttachmentContent() {\r\n }", "public MimeMultipart() {\n/* 163 */ this(\"mixed\");\n/* */ }", "public MimeMultipart(DataSource ds) throws MessagingException {\n/* 206 */ if (ds...
[ "0.787139", "0.72234637", "0.72201", "0.72072685", "0.69854885", "0.6694467", "0.65946066", "0.6552022", "0.65404636", "0.6474758", "0.64404976", "0.6400231", "0.6390039", "0.63645416", "0.63608766", "0.63477534", "0.63354445", "0.62957656", "0.6248563", "0.6177017", "0.61677...
0.5647518
58
Convenience method. Allows adding of many attachments on one method call. Does not allow you to handle your own exceptions.
public List<EmailAttachment> addEmailAttachments(EmailAttachment... attachment) { List<EmailAttachment> failedAttachments = new ArrayList<EmailAttachment>(); for (EmailAttachment emailAttachment : attachment) { try { boolean success = addEmailAttachment(emailAttachment); if (!success) { failedAttachments.add(emailAttachment); } } catch (Exception ex) { failedAttachments.add(emailAttachment); } } return failedAttachments; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addAttachments(Multipart multipart) throws MessagingException {\n\t\tEnumeration<?> properties = props.keys();\n\n\t\twhile (properties.hasMoreElements()) {\n\t\t\tString key = (String) properties.nextElement();\n\n\t\t\tif ((props.getPropertyMime(key) == null) || (key.equals(Email.MAIL_CONTENT)) || (...
[ "0.68213093", "0.6820942", "0.65540236", "0.6360502", "0.63283557", "0.62918806", "0.62650365", "0.6231524", "0.61909777", "0.6179576", "0.6097113", "0.6079531", "0.60408396", "0.60373753", "0.59850645", "0.5974519", "0.5944906", "0.592722", "0.5851937", "0.5841446", "0.57407...
0.6550632
3
Adds the given attachment as a body part. First checks whether the attachment has bytes already. This allows you to give an email attachment which has bytes in memory and doesn't have an actual file. If the bytes are null it reads the bytes from the file. If the file is null no attachment is added.
public boolean addEmailAttachment(EmailAttachment attachment) throws Exception { if (attachment.getBodyPart() == null) { boolean success = attachment.generateMimeBodyPart(); if (!success) { return false; } } bodyParts.add(attachment.getBodyPart()); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void addAttachmentPart(AttachmentPart attachmentpart);", "private void addAttachment(MimeMultipart multipart, String filePath) throws MessagingException, IOException {\n\n MimeBodyPart part = new MimeBodyPart();\n File file = new File(filePath);\n try (InputStream fin = new F...
[ "0.6588256", "0.6336871", "0.60481906", "0.60119003", "0.5875642", "0.5807076", "0.569519", "0.56254745", "0.56162316", "0.55486465", "0.5503851", "0.537432", "0.5348328", "0.5292826", "0.5247045", "0.5190541", "0.5169242", "0.51494884", "0.5125271", "0.5110268", "0.51036716"...
0.6973483
0
Gets the body body part with proper encoding
public MimeBodyPart getContentBodyPart() throws MessagingException { MimeBodyPart contentBodyPart = new MimeBodyPart(); if (html) { contentBodyPart.setHeader("Content-Type", "text/html"); contentBodyPart.setContent(body, "text/html"); } else { contentBodyPart.setContent(body, "text/plain"); } return contentBodyPart; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getBody();", "public String getBodyString()\r\n\t{\r\n\t\tString charsetName = this.request.getCharacterEncoding();\r\n\t\tif (charsetName == null || charsetName == \"\")\r\n\t\t\tcharsetName = \"UTF-8\";\r\n\t\t\r\n\t\treturn this.getBodyString(charsetName);\r\n\t}", "public byte[] getBodyByt...
[ "0.76843643", "0.74766284", "0.74566126", "0.7347177", "0.7347177", "0.7347177", "0.7347177", "0.7026362", "0.7026362", "0.70245486", "0.70209795", "0.69957155", "0.69606113", "0.6939723", "0.6934014", "0.6929634", "0.691949", "0.69186884", "0.6899188", "0.6865617", "0.686034...
0.5601345
95
Returns information about the email object.
public String getEmailInString() { String shortenedBody = StringHelper.shortenString(body, 75, .5); String indentedBody = "\t" + shortenedBody.replace(StringHelper.newline, StringHelper.newline + "\t"); String bodyLine = "(Shortened) Body (html >>> " + html + "):" + StringHelper.newline + indentedBody; StringBuilder bodyPartBuilder = new StringBuilder("bodyParts:"); for (MimeBodyPart mimeBodyPart : bodyParts) { bodyPartBuilder.append(StringHelper.newline).append("\t"); try { bodyPartBuilder.append(mimeBodyPart.getFileName()); } catch (Throwable ex) { //We don't care if this error is thrown. We don't want this to break anything. bodyPartBuilder.append("N/A"); } } return StringHelper.splitBy(StringHelper.newline, "from: " + from, "replyTo: " + StringHelper.splitBy(", ", replyTo), "to: " + StringHelper.splitBy(", ", to), "cc: " + StringHelper.splitBy(", ", cc), "bcc: " + StringHelper.splitBy(", ", bcc), "subject: " + subject, bodyLine, bodyPartBuilder.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getEmail() {\r\n // Bouml preserved body begin 00040D82\r\n\t System.out.println(email);\r\n\t return email;\r\n // Bouml preserved body end 00040D82\r\n }", "public Email getEmail() {\n return email;\n }", "public Email getEmail() { return this.email; }", "java.lang.String g...
[ "0.66129994", "0.64671934", "0.6466612", "0.64541066", "0.64541066", "0.64541066", "0.64541066", "0.64541066", "0.64541066", "0.6441778", "0.6434917", "0.6412183", "0.6346008", "0.6325424", "0.6317075", "0.6299361", "0.62992865", "0.6292762", "0.62916875", "0.628282", "0.6280...
0.0
-1
Adds the given address(es) to the to list
public void addTo(String... address) { to.addAll(java.util.Arrays.asList(address)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addTo(List<String> addresses) {\n\t\tto.addAll(addresses);\n\t}", "public String addAddressList(BufferedReader address);", "@Override\n\tpublic List<Studentbean2> Addaddress(List<AddressBean> findAllAddress) {\n\t\tfor(AddressBean a:findAllAddress)\n\t\t\tfor(Studentbean2 e:stu2)\n\t\t\t{ \n\t\t\t\...
[ "0.7738898", "0.75967145", "0.69051677", "0.6865089", "0.67962027", "0.67524433", "0.67304176", "0.66289407", "0.6613895", "0.65302205", "0.6435231", "0.6431233", "0.6427784", "0.64256793", "0.6398467", "0.63809216", "0.6341057", "0.6325121", "0.6288929", "0.62677675", "0.622...
0.7685869
1
Adds the given address(es) to the cc list
public void addCc(String... address) { cc.addAll(java.util.Arrays.asList(address)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addCc(List<String> addresses) {\n\t\tcc.addAll(addresses);\n\t}", "public void addBcc(String... address) {\n\t\tbcc.addAll(java.util.Arrays.asList(address));\n\t}", "public void addBcc(List<String> addresses) {\n\t\tbcc.addAll(addresses);\n\t}", "public void addTo(String... address) {\n\t\tto.add...
[ "0.8256242", "0.75205034", "0.7235217", "0.71030444", "0.6870639", "0.6716262", "0.6588964", "0.6299704", "0.61981875", "0.6160412", "0.6118592", "0.6017918", "0.59946644", "0.59833974", "0.5979356", "0.5898834", "0.5811455", "0.57815063", "0.57708865", "0.5764422", "0.572467...
0.84319615
0
Adds the given address(es) to the bcc list
public void addBcc(String... address) { bcc.addAll(java.util.Arrays.asList(address)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addBcc(List<String> addresses) {\n\t\tbcc.addAll(addresses);\n\t}", "public void addCc(String... address) {\n\t\tcc.addAll(java.util.Arrays.asList(address));\n\t}", "public void addCc(List<String> addresses) {\n\t\tcc.addAll(addresses);\n\t}", "public void addTo(String... address) {\n\t\tto.addAl...
[ "0.8015306", "0.7775167", "0.76416254", "0.707476", "0.68524617", "0.66562575", "0.6357455", "0.6326261", "0.63000625", "0.6209517", "0.6104788", "0.6081975", "0.6064125", "0.60369015", "0.60263366", "0.6015618", "0.6000326", "0.59545714", "0.59461486", "0.5849626", "0.578527...
0.8223671
0
Adds the given address(es) to the replyTo list
public void addReplyTo(String... address) { replyTo.addAll(java.util.Arrays.asList(address)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addReplyTo(List<String> addresses) {\n\t\treplyTo.addAll(addresses);\n\t}", "public void addTo(String... address) {\n\t\tto.addAll(java.util.Arrays.asList(address));\n\t}", "public void addTo(List<String> addresses) {\n\t\tto.addAll(addresses);\n\t}", "public void setReplyTo(Collection<Address> r...
[ "0.79559654", "0.7030389", "0.6908478", "0.6631021", "0.65272725", "0.63304347", "0.60863674", "0.6049305", "0.59712976", "0.59031165", "0.58790237", "0.58425707", "0.58200926", "0.577557", "0.57498366", "0.5707965", "0.56896144", "0.568713", "0.56589377", "0.5650595", "0.564...
0.7991939
0
Adds the given address(es) to the to list
public void addTo(List<String> addresses) { to.addAll(addresses); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addTo(String... address) {\n\t\tto.addAll(java.util.Arrays.asList(address));\n\t}", "public String addAddressList(BufferedReader address);", "@Override\n\tpublic List<Studentbean2> Addaddress(List<AddressBean> findAllAddress) {\n\t\tfor(AddressBean a:findAllAddress)\n\t\t\tfor(Studentbean2 e:stu2)\...
[ "0.7685869", "0.75967145", "0.69051677", "0.6865089", "0.67962027", "0.67524433", "0.67304176", "0.66289407", "0.6613895", "0.65302205", "0.6435231", "0.6431233", "0.6427784", "0.64256793", "0.6398467", "0.63809216", "0.6341057", "0.6325121", "0.6288929", "0.62677675", "0.622...
0.7738898
0
Adds the given address(es) to the cc list
public void addCc(List<String> addresses) { cc.addAll(addresses); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addCc(String... address) {\n\t\tcc.addAll(java.util.Arrays.asList(address));\n\t}", "public void addBcc(String... address) {\n\t\tbcc.addAll(java.util.Arrays.asList(address));\n\t}", "public void addBcc(List<String> addresses) {\n\t\tbcc.addAll(addresses);\n\t}", "public void addTo(String... addr...
[ "0.84319615", "0.75205034", "0.7235217", "0.71030444", "0.6870639", "0.6716262", "0.6588964", "0.6299704", "0.61981875", "0.6160412", "0.6118592", "0.6017918", "0.59946644", "0.59833974", "0.5979356", "0.5898834", "0.5811455", "0.57815063", "0.57708865", "0.5764422", "0.57246...
0.8256242
1
Adds the given address(es) to the bcc list
public void addBcc(List<String> addresses) { bcc.addAll(addresses); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addBcc(String... address) {\n\t\tbcc.addAll(java.util.Arrays.asList(address));\n\t}", "public void addCc(String... address) {\n\t\tcc.addAll(java.util.Arrays.asList(address));\n\t}", "public void addCc(List<String> addresses) {\n\t\tcc.addAll(addresses);\n\t}", "public void addTo(String... addres...
[ "0.8223671", "0.7775167", "0.76416254", "0.707476", "0.68524617", "0.66562575", "0.6357455", "0.6326261", "0.63000625", "0.6209517", "0.6104788", "0.6081975", "0.6064125", "0.60369015", "0.60263366", "0.6015618", "0.6000326", "0.59545714", "0.59461486", "0.5849626", "0.578527...
0.8015306
1
Adds the given address(es) to the replyTo list
public void addReplyTo(List<String> addresses) { replyTo.addAll(addresses); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addReplyTo(String... address) {\n\t\treplyTo.addAll(java.util.Arrays.asList(address));\n\t}", "public void addTo(String... address) {\n\t\tto.addAll(java.util.Arrays.asList(address));\n\t}", "public void addTo(List<String> addresses) {\n\t\tto.addAll(addresses);\n\t}", "public void setReplyTo(Col...
[ "0.7991939", "0.7030389", "0.6908478", "0.6631021", "0.65272725", "0.63304347", "0.60863674", "0.6049305", "0.59712976", "0.59031165", "0.58790237", "0.58425707", "0.58200926", "0.577557", "0.57498366", "0.5707965", "0.56896144", "0.568713", "0.56589377", "0.5650595", "0.5642...
0.79559654
1
Get all patient information from the database and add them to the patient table
private void loadPatient() { patient = PatientsDatabaseAccessObject.getInstance().getPatients(); table.getItems().clear(); for (int i = 0; i < patient.size(); ++i) { table.getItems().add(patient.get(i)); } table.refresh(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Patient> getPatientList()\n {\n ArrayList<Patient> patientList = new ArrayList<Patient>();\n Connection con = getConnection();\n String query = \"SELECT * FROM patients\";\n \n java.sql.Statement st;\n ResultSet rs;\n try ...
[ "0.66046846", "0.66032916", "0.65875924", "0.653469", "0.65063906", "0.63689315", "0.625237", "0.6216556", "0.6139798", "0.6128931", "0.6112417", "0.6083567", "0.60384", "0.6028058", "0.6014432", "0.59774363", "0.5926901", "0.58940727", "0.58822703", "0.58417845", "0.58352643...
0.68092716
0
Create a child stage for current window
private Stage getChildStage(Stage parent) { Stage child = new Stage(); child.initOwner(parent); child.initModality(Modality.WINDOW_MODAL); return child; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void createStage(Stage stage){\n\t\tstage.setHeight(background.getHeight()+25);//displays full image (1)\r\n\t\tstage.setWidth(background.getWidth());\r\n\t\tshowBackground.setFitWidth(stage.getWidth());\r\n\t\tshowBackground.setFitHeight(stage.getHeight()-23);//displays full image (1)\r\n\t\r\n\t\tstage.setAlways...
[ "0.7444991", "0.7012775", "0.68134683", "0.67221117", "0.66739213", "0.6620287", "0.6607355", "0.6594188", "0.6573011", "0.65435743", "0.65311176", "0.6519217", "0.6487484", "0.64717823", "0.6469307", "0.64580274", "0.64538914", "0.6443069", "0.6435297", "0.6419503", "0.63483...
0.7266646
1
First decode with inJustDecodeBounds=true to check dimensions
public static Bitmap decodeSampledBitmapFromResource(Resources res, int resId, int reqWidth, int reqHeight) { final BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeResource(res, resId, options); // Calculate inSampleSize options.inSampleSize = calculateInSampleSize(options, reqWidth, reqHeight); // Decode bitmap with inSampleSize set options.inJustDecodeBounds = false; Bitmap temp = BitmapFactory.decodeResource(res, resId, options); Bitmap scaled = Bitmap.createScaledBitmap(temp, reqWidth, reqHeight, true); temp.recycle(); return scaled; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nullable\n public static Pair<Integer, Integer> decodeDimensions(InputStream param0) {\n }", "@Test public void inJustDecodeBoundsIfResizing() {\n final Request requiresResize = new Request.Builder(TestUtils.URI_1).resize(20, 15).build();\n final BitmapFactory.Options resizeOptions = createBitmapOptio...
[ "0.64346766", "0.61364377", "0.51399887", "0.51004833", "0.50957596", "0.5087106", "0.5046298", "0.5022017", "0.5018126", "0.49542722", "0.49402583", "0.4937284", "0.48971418", "0.48961717", "0.4894804", "0.4892185", "0.48899516", "0.48632044", "0.4861749", "0.48505214", "0.4...
0.0
-1
Raw height and width of image
public static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) { final int height = options.outHeight; final int width = options.outWidth; int inSampleSize = 1; if (height > reqHeight || width > reqWidth) { final int halfHeight = height / 2; final int halfWidth = width / 2; // Calculate the largest inSampleSize value that is a power of 2 and keeps both // height and width larger than the requested height and width. while ((halfHeight / inSampleSize) >= reqHeight && (halfWidth / inSampleSize) >= reqWidth) { inSampleSize *= 2; } } return inSampleSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getImageHeight() {\n\treturn height;\n }", "public int getImageWidth() {\n\treturn width;\n }", "private void getImgSize(){\n imgSizeX = 1080; //mAttacher.getDisplayRect().right - mAttacher.getDisplayRect().left;\n imgSizeY = 888.783f; //mAttacher.getDisplayRect().botto...
[ "0.7013478", "0.699988", "0.67583126", "0.6750033", "0.6720698", "0.669873", "0.6689511", "0.66860753", "0.66664755", "0.65853953", "0.6539114", "0.6529669", "0.6516078", "0.65081245", "0.64257", "0.63865346", "0.63722134", "0.63092506", "0.6291426", "0.6288455", "0.6252946",...
0.0
-1
SingleTon ton1 = new SingleTon(); SingleTon ton2 = new SingleTon();
public static void main(String[] args) { SingleTon ton1 = SingleTon.getInstance(); SingleTon ton2 = SingleTon.getInstance(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String args[]){\n SingleTonClass myobject= SingleTonClass.objectCreationMethod();\r\n SingleTonClass myobject1= SingleTonClass.objectCreationMethod();\r\n myobject.display();\r\n myobject.b = 600;\r\n myobject1.display();\r\n myobject1.b = 800;\r\n ...
[ "0.72455114", "0.7091031", "0.6885129", "0.6858256", "0.64905953", "0.6256603", "0.6129407", "0.6058501", "0.5828043", "0.5805904", "0.57953703", "0.5789949", "0.57862496", "0.57576215", "0.57031417", "0.56849694", "0.5670018", "0.5560554", "0.55523443", "0.55315685", "0.5501...
0.7429155
0
Instantiate the new Fragment
@Override public boolean onPreferenceStartFragment(PreferenceFragmentCompat caller, Preference pref) { final Bundle args = pref.getExtras(); final Fragment fragment = getSupportFragmentManager().getFragmentFactory().instantiate( getClassLoader(), pref.getFragment()); fragment.setArguments(args); fragment.setTargetFragment(caller, 0); // Replace the existing Fragment with the new Fragment getSupportFragmentManager().beginTransaction() .replace(R.id.settings, fragment) .addToBackStack(null) .commit(); setTitle(pref.getTitle()); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract Fragment createFragment();", "public void createFragment() {\n\n }", "public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n ...
[ "0.79080194", "0.78737", "0.7799445", "0.75798535", "0.7488878", "0.74608016", "0.72799397", "0.7236062", "0.7230987", "0.7207063", "0.7169229", "0.7168543", "0.7142899", "0.7141591", "0.7122081", "0.7100687", "0.7094165", "0.70908815", "0.70863473", "0.70766616", "0.7061991"...
0.0
-1
Create DCI info from DciValue object
public ChartDciConfig(DciValue dci) { nodeId = dci.getNodeId(); dciId = dci.getId(); dciName = dci.getName(); dciDescription = dci.getDescription(); type = dci.getDcObjectType(); name = dci.getDescription(); color = UNSET_COLOR; lineWidth = 2; area = false; showThresholds = false; invertValues = false; multiMatch = false; instance = ""; //$NON-NLS-1$ column = ""; //$NON-NLS-1$ displayFormat = "%s"; //$NON-NLS-1$ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createValue() {\n value = new GisInfoCaptureDO();\n }", "public DValParser(int objid, int num)\r\n/* 31: */ {\r\n/* 32: 88 */ this.objectId = objid;\r\n/* 33: 89 */ this.numDVRecords = num;\r\n/* 34: 90 */ this.validityDataCached = true;\r\n/* 35: */ }", "public...
[ "0.59440994", "0.5337542", "0.52447", "0.51619035", "0.5154397", "0.5095847", "0.5095607", "0.50484043", "0.50222284", "0.50029033", "0.500167", "0.49390787", "0.49364394", "0.4927049", "0.49187592", "0.4903051", "0.48246995", "0.4787758", "0.47801167", "0.47630945", "0.47582...
0.5791384
1
Get DCI name. Always returns nonempty string.
public String getName() { return ((name != null) && !name.isEmpty()) ? name : ("[" + Long.toString(dciId) + "]"); //$NON-NLS-1$ //$NON-NLS-2$ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getName()\n {\n read_if_needed_();\n \n return _get_name;\n }", "public String getName()\n {\n ensureLoaded();\n return m_clzName.getValue();\n }", "public String getdName() {\n return dName;\n }", "@Override\n public String getName() {...
[ "0.7091475", "0.67847526", "0.676054", "0.6751363", "0.66387665", "0.6619265", "0.65997547", "0.65927446", "0.65692174", "0.65449554", "0.65362984", "0.6514215", "0.6514215", "0.6514215", "0.6514215", "0.6514215", "0.6514215", "0.6514215", "0.6514215", "0.6514215", "0.6514215...
0.7812157
0
Upon entering a new act, the map is opened and it scrolls down unless it's precisely the Exordium. This here prevents that if the custom act has a set starting event, or is act 1.
@SpireInsertPatch( locator = Locator.class ) public static SpireReturn<Void> Insert(CardCrawlGame __instance) { if(CustomDungeon.dungeons.containsKey(CardCrawlGame.nextDungeon) && (CustomDungeon.dungeons.get(CardCrawlGame.nextDungeon).hasEvent() || BehindTheScenesActNum.getActNum() == 1)) { InputHelper.updateLast(); if (CInputHelper.controller != null) { CInputHelper.updateLast(); } return SpireReturn.Return(null); } return SpireReturn.Continue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void react_mainRegion__entry_Default() {\n\t\tenterSequence_mainRegion_State1_default();\n\t}", "@Override\n\t\t\tpublic void enter(InputEvent event, float x, float y, int pointer,\n\t\t\t\t\tcom.badlogic.gdx.scenes.scene2d.Actor fromActor) {\n\t\t\t\tgetStage().setScrollFocus(centerPanel);\n\t\t\t}", ...
[ "0.5893099", "0.58797246", "0.55879545", "0.55879545", "0.55281985", "0.5480962", "0.54127604", "0.54091007", "0.53887403", "0.53802043", "0.53478575", "0.5340601", "0.52944267", "0.52941686", "0.52941686", "0.52941686", "0.52941686", "0.52941686", "0.5280442", "0.5280442", "...
0.0
-1
Sole entry point to the class and application.
public static void main(String[] args) { doStringTokenizer1(); doStringTokenizer2(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MainEntryPoint() {\r\n\r\n }", "public static void main(String arg[]) {\n\n\t\tUtility.runApplication();\n\t}", "public static void main() {\n \n }", "public static void main(String[] args) {\r\n \t\r\n // Creates new controller named the main controller\r\n GlobalResourc...
[ "0.72242916", "0.716365", "0.71187913", "0.7103342", "0.707661", "0.7062218", "0.7062131", "0.69763947", "0.69725966", "0.69581515", "0.6958139", "0.69552004", "0.69099087", "0.69083047", "0.687513", "0.68510133", "0.6834705", "0.680646", "0.6787879", "0.6774242", "0.67573315...
0.0
-1
The node to represent a branch ("if") statement
public interface BranchNode extends StatementNode { /** * Set the branching condition. * * @param condition * the condition of the branch. */ public void setCondition(ExpressionNode condition); /** * Get the branching condition. * * @return the condition of the branch. */ public ExpressionNode getCondition(); /** * Set the statement that is executed when the condition evaluates to true. * * @param statement * The statement to execute when the condition evaluates to true. */ public void setStatementNodeOnTrue(StatementNode statement); /** * The statement that is executed when the condition evaluates to true. * * @return The statement to execute when the condition evaluates to true. */ public StatementNode getStatementNodeOnTrue(); /** * Set the statement that is executed when the condition evaluates to false. * This is the else statement. If there is no else set to null. * * @param statement * The statement to execute when the condition evaluates to false or * null if no else branch is needed. */ public void setStatementNodeOnFalse(StatementNode statement); /** * The statement that is executed when the condition is false. This is the else * branch. If no else branch exists this will return null. * * @return The statement to execute when the condition evaluates to false. */ public StatementNode getStatementNodeOnFalse(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Branch parseIf(Tokenizer in) {\n\t\tBranch branch = new Branch();\n\t\tToken expectParen = in.next();\n\t\tif (expectParen.type != Token.TokenType.OPEN_PARENTHESIS)\n\t\t\tthrow new SyntaxError(\"Expected ( got: '\"+expectParen+\"'\"+expectParen.generateLineChar());\n\t\tbranch.condition = parseParen(in);\...
[ "0.6858633", "0.67587346", "0.650165", "0.6491718", "0.6457964", "0.63940066", "0.6389645", "0.6387913", "0.6380958", "0.63573503", "0.6325411", "0.6198163", "0.6138457", "0.61335474", "0.6108819", "0.60657495", "0.60611516", "0.60449034", "0.60400933", "0.5986226", "0.595749...
0.76460123
0
Set the branching condition.
public void setCondition(ExpressionNode condition);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void setcond(String cond) {\n\t\n\t}", "public static void setCondition (String condition) {\n BValue cond = getCond (condition);\n synchronized (cond) {\n if (cond.v) {\n return;\n }\n cond.v = true;\n cond.notifyAll();...
[ "0.6750383", "0.6605263", "0.66033834", "0.65256804", "0.6471626", "0.60140306", "0.5985891", "0.58259714", "0.5710474", "0.56864303", "0.56040066", "0.55842215", "0.5551816", "0.5516973", "0.54770064", "0.5457579", "0.54327244", "0.54267496", "0.5390846", "0.5383797", "0.537...
0.6637444
1
Get the branching condition.
public ExpressionNode getCondition();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Expression getCondition()\n {\n return this.condition;\n }", "public Condition getCondition(){\n\t\treturn this.cond;\n\t}", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "public Condition getCondition() {\n return condition;\n }", "Expression getCond();", "OclExpressi...
[ "0.7063135", "0.69826186", "0.68725544", "0.66946775", "0.6689368", "0.6682311", "0.6619174", "0.6605099", "0.6577811", "0.6559009", "0.6550272", "0.6541549", "0.6532177", "0.6532042", "0.6514633", "0.6466026", "0.6458282", "0.64080924", "0.63721555", "0.6257623", "0.61650413...
0.68181115
3
Set the statement that is executed when the condition evaluates to true.
public void setStatementNodeOnTrue(StatementNode statement);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCondition(Expression condition)\n {\n this.condition = condition;\n }", "public void setCondition(ExpressionNode condition);", "public static void setCondition (String condition) {\n BValue cond = getCond (condition);\n synchronized (cond) {\n if (cond.v) {\n ...
[ "0.68205625", "0.6626561", "0.6535548", "0.65103185", "0.64322025", "0.63481224", "0.6322539", "0.616442", "0.6126549", "0.6104072", "0.609464", "0.6077434", "0.6061941", "0.6019197", "0.6014036", "0.59091985", "0.5851452", "0.5814735", "0.57279336", "0.56978786", "0.5689245"...
0.6877137
0
The statement that is executed when the condition evaluates to true.
public StatementNode getStatementNodeOnTrue();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Expression getCondition()\n {\n return this.condition;\n }", "AlgNode handleConditionalExecute( AlgNode node, Statement statement, LogicalQueryInformation queryInformation );", "protected Expression analyzeCondition() throws AnalysisException {\n final var condition = analyzeExpression();\n ...
[ "0.67104673", "0.66061497", "0.65135705", "0.6433419", "0.6426437", "0.63313943", "0.63266337", "0.6295545", "0.62929136", "0.6242193", "0.6226709", "0.6219715", "0.62067825", "0.6088635", "0.60794896", "0.6074657", "0.60246456", "0.60211635", "0.5984839", "0.59733546", "0.59...
0.598942
18
Set the statement that is executed when the condition evaluates to false. This is the else statement. If there is no else set to null.
public void setStatementNodeOnFalse(StatementNode statement);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setElseStm(Statement elseStm);", "public void setElse(Statement elseStatement)\n {\n this.elseStatement = elseStatement;\n }", "public Statement getElseStm();", "public Statement getElse()\n {\n return this.elseStatement;\n }", "final public void conditional() throws ParseException {\...
[ "0.73592186", "0.73323673", "0.6836895", "0.66683364", "0.6307029", "0.62399787", "0.61359257", "0.61267096", "0.6088074", "0.60740995", "0.5964163", "0.5833008", "0.5829373", "0.582278", "0.5761391", "0.57464874", "0.570755", "0.5706469", "0.5684764", "0.56808096", "0.564321...
0.64187634
4
The statement that is executed when the condition is false. This is the else branch. If no else branch exists this will return null.
public StatementNode getStatementNodeOnFalse();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Statement getElseStm();", "public Statement getElse()\n {\n return this.elseStatement;\n }", "SequenceOfStatements getElseStatements();", "@Override\n public String visit(IfStmt n, Object arg) {\n return null;\n }", "final public IASTPKGStatement ConditionalStatement() throws Parse...
[ "0.74949837", "0.7342704", "0.66137934", "0.65628237", "0.65468657", "0.65340304", "0.6496729", "0.6434907", "0.64295614", "0.64103675", "0.63248515", "0.61857057", "0.60946125", "0.60871065", "0.6049077", "0.6042561", "0.60382485", "0.60352015", "0.60176384", "0.59715194", "...
0.5725971
34
/ metodo: Simples objetivo: Construir um automato simples. (Casos Bases)
public Automato simples(Character c){ Automato r = new Automato(); switch (c) { //Palavra Vazia(Epsilon) case 'E' : r.addEstado(new Estado(0)); r.addEstadoFinal(r.getQ().get(0)); break; //Linguagem Vazia(Vazio) case 'V': r.addEstado(new Estado(0)); break; default: r.addEstado(new Estado(0)); r.addEstado(new Estado(1)); r.addEstadoFinal(r.getQ().get(1)); r.addTransicao(r.getQ().get(0), r.getQ().get(1), c); break; } return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ejecucion() throws Exception {\n\t\t//Activamos las trazas\n\t\tsetTrazaFichero();\n\t\n\t\ttry{\n\t\t\t//Sacamos la acción a realizar y ejecutamos la acción correspondiente\n\t\t\tString accion = conectorParametro(PARAMETRO_GENERICO_ACCION);\n\t\t\tString origen = conectorParametro(PARAMETRO_GENERICO_...
[ "0.6051628", "0.6051628", "0.60360235", "0.59618753", "0.5816732", "0.57871044", "0.57131", "0.57069147", "0.56934136", "0.56933534", "0.5693015", "0.56731004", "0.56582683", "0.56429315", "0.557769", "0.5543524", "0.5542989", "0.55304337", "0.5529918", "0.55269516", "0.55204...
0.0
-1
/ metodo: AplicaOperacao objeetivo: realizar a operacao de acordo com "op"
public Automato aplicaOperacao(Automato a, Automato b, Character op){ Automato r = new Automato(); switch (op) { case '*': r = Operacao.estrela(a); break; case '.': r = Operacao.concatencao(a, b); break; case '+': r = Operacao.uniao(a, b); break; default: r = simples(op); break; } return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOp(String op) {\n this.op = op;\n }", "public void setOper(String oper) {\n this.oper = oper;\n }", "public String operator( String op);", "Operations operations();", "public void setOperation(String op) {this.operation = op;}", "abstract String getOp();", "public vo...
[ "0.75345546", "0.7523616", "0.75118273", "0.74885964", "0.74491245", "0.73852146", "0.7372668", "0.73400515", "0.73400515", "0.73400515", "0.7296722", "0.726213", "0.7220014", "0.7211754", "0.71405125", "0.7112418", "0.70828444", "0.70828444", "0.7055393", "0.69602334", "0.67...
0.72904223
11
/ metodo: Montar objetivo: montar uma String com os IDs dos Estados
public String montar(ArrayList<Estado> e){ String data = ""; Iterator<Estado> it = e.iterator(); while(it.hasNext()){ Estado a = it.next(); data += a.getId(); } return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String[] getStringBasedOnCoordinate(String idNames, String[] id_to_coord_list){\n String[] subID = idNames.split(\"\\\\n\");\n String[] string_of_id = new String[subID.length-1];\n for(int i=1; i< subID.length; i++){\n string_of_id[i-1] = id_to_coord_list[Integer.pars...
[ "0.544831", "0.54130787", "0.53942096", "0.53289574", "0.52147114", "0.52147114", "0.51953125", "0.51837677", "0.5174083", "0.51612484", "0.5125581", "0.5123759", "0.5112702", "0.5092585", "0.5071873", "0.5050755", "0.5042041", "0.50339377", "0.5014669", "0.4994931", "0.49678...
0.6510132
0
/ metodo: Atribur Finais objeetivo: define como final os estado de a que possuem algum ID dos finais.
public void atribuirFinais(Automato a, ArrayList<Estado> finais){ for (int i = 0; i < a.getQ().size(); i++) { Iterator<Estado> it = finais.iterator(); while(it.hasNext()){ Estado e = it.next(); if (a.getQ().get(i).getLabel().contains(e.getLabel())){ a.getF().add(a.getQ().get(i)); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getIdfilial(){\r\n return idfilial;\r\n }", "public void setIdfilial(int idfilial){\r\n this.idfilial = idfilial;\r\n }", "public int elimiarAlInicio(){\n int edad = inicio.edad;\n if(inicio==fin){\n inicio=fin=null;\n }else{\n inicio=in...
[ "0.6653595", "0.65695393", "0.62452847", "0.62286615", "0.6135101", "0.61074233", "0.6105264", "0.60700065", "0.6061487", "0.6047082", "0.60315573", "0.6031432", "0.6009015", "0.598109", "0.59684795", "0.5958565", "0.59476125", "0.59393454", "0.5938291", "0.58904815", "0.5885...
0.579371
28
/ metodo: Equivalencia AFNe(com transicao Epsilon) para AFN objeetivo: Criar o Automato equivalente sem transicoes Epsilon
public Automato equalAF2AFN(Automato a){ //a construcao da equivalencia de A será feita, utilizando a //tecnica de busca em largura. Automato r = new Automato(); //fechamento transitivo vazio (Epsilon) ArrayList<Estado> fecho = new ArrayList<>(); //conjunto de estados resultante do movimento com simbolo '0' ArrayList<Estado> zero = new ArrayList<>(); //conjunto de estados resultante do movimento com simbolo '1' ArrayList<Estado> um = new ArrayList<>(); //fila com os filhos(zero e um) do fechamento transtivo ArrayList<ArrayList<Estado>> fila = new ArrayList<>(); //calcula o fechamento do estado inicial fecho = a.fechamento(a.getQ().get(0)); fila.add(fecho); while(!fila.isEmpty()){ fecho = fila.get(0); Estado inicial = new Estado(montar(fecho)); //se os estado nao existir cria-se esse novo estado. if (!r.existe(inicial)) r.addEstado(inicial); else inicial = r.getEstado(inicial); //calcula os movimentos com 0 e 1 zero = a.movimento(fecho, '0'); um = a.movimento(fecho, '1'); if (!zero.isEmpty()){ //se possui movimento com 0 calcula o fechamento fecho = a.fechamento(zero); Estado e = new Estado(montar(fecho)); if (!r.existe(e)) //se o estado nao existe cria o estado r.addEstado(e); else e = r.getEstado(e); if (!r.existe(inicial, e, '0')){ //se a trasicao nao existe cria a transicao //e adiciona o fechamento na fila fila.add(fecho); r.addTransicao(inicial, e, '0'); } } if (!um.isEmpty()){ fecho = a.fechamento(um); Estado e = new Estado(montar(fecho)); if (!r.existe(e)) //se o estado nao existe cria o estado r.addEstado(e); else e = r.getEstado(e); if (!r.existe(inicial, e, '1')){ //se a trasicao nao existe cria a transicao //e adiciona o fechamento na fila fila.add(fecho); r.addTransicao(inicial, e, '1'); } } fila.remove(0); } atribuirFinais(r, a.getF()); Operacao.updateIndex(r); return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Automato equalAFN2AFD(Automato a){\n\t\tAutomato r = a;\n\t\tEstado morto = new Estado(\"morto\");\n\t\tr.addEstado(morto);\n\t\tr.addTransicao(morto,morto,'0');\n\t\tr.addTransicao(morto,morto,'1');\n\t\tIterator<Estado> it = r.getQ().iterator();\n\t\twhile(it.hasNext()){\n\t\t\tEstado e = it.next();\n\t\t...
[ "0.7115305", "0.5710779", "0.5666044", "0.5611057", "0.5609009", "0.54863125", "0.5485762", "0.5411949", "0.5400166", "0.52985823", "0.52943116", "0.5280824", "0.52394634", "0.5233767", "0.52259725", "0.52166283", "0.52096325", "0.5202657", "0.51820856", "0.5173847", "0.51668...
0.74279714
0
/ metodo: Equivalencia AFN para AFD objetivo: Criar o Automato AFD equivalente
public Automato equalAFN2AFD(Automato a){ Automato r = a; Estado morto = new Estado("morto"); r.addEstado(morto); r.addTransicao(morto,morto,'0'); r.addTransicao(morto,morto,'1'); Iterator<Estado> it = r.getQ().iterator(); while(it.hasNext()){ Estado e = it.next(); if (r.findAll(e, '0').isEmpty()){ r.addTransicao(e, morto, '0'); } if (r.findAll(e, '1').isEmpty()){ r.addTransicao(e, morto, '1'); } } Operacao.updateIndex(r); return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Automato equalAF2AFN(Automato a){\n\t\t//a construcao da equivalencia de A será feita, utilizando a \n\t\t//tecnica de busca em largura.\n\t\t\n\t\tAutomato r = new Automato();\n\t\t//fechamento transitivo vazio (Epsilon)\n\t\tArrayList<Estado> fecho = new ArrayList<>();\n\t\t//conjunto de estados resultant...
[ "0.7273913", "0.6499612", "0.6451683", "0.6425833", "0.55951864", "0.558608", "0.5540868", "0.54732513", "0.5462246", "0.54476196", "0.53861517", "0.53539795", "0.53395414", "0.5338901", "0.52889556", "0.5288209", "0.5240062", "0.5222095", "0.5214809", "0.52103186", "0.519574...
0.7039181
1
Initialize Retrofit and OkHttp
public UserDataRepository() { userDetailBeanMutableLiveData = new MutableLiveData<>(); HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor(); interceptor.level(HttpLoggingInterceptor.Level.BODY); OkHttpClient client = new OkHttpClient.Builder().addInterceptor(interceptor).build(); userDetailDataService = new retrofit2.Retrofit.Builder() .baseUrl(GlobalConstants.USER_DATA_URL) .client(client) .addConverterFactory(GsonConverterFactory.create()) .build() .create(UserDetailDataService.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initRetrofitClient() {\n if (this.mRetrofit != null) {\n this.mRetrofit = null;\n } else {\n // create new mRetrofit client\n Retrofit.Builder retrofitBuilder = new Retrofit.Builder()\n .baseUrl(BASE_URL)\n .addConver...
[ "0.76999426", "0.76453334", "0.7221751", "0.7164183", "0.71198374", "0.7109102", "0.69436294", "0.6941022", "0.69267935", "0.66802084", "0.6582748", "0.6549308", "0.6502992", "0.6476163", "0.64577365", "0.6450469", "0.6444892", "0.6438772", "0.64164656", "0.6366698", "0.63390...
0.0
-1
Get User Data Using API
public void getUserDetailData(int pageNo) { userDetailDataService.getUserData(""+pageNo) .enqueue(new Callback<UserDetailBean>() { @Override public void onResponse(Call<UserDetailBean> call, Response<UserDetailBean> response) { if (response.body() != null) { userDetailBeanMutableLiveData.postValue(response.body()); } } @Override public void onFailure(Call<UserDetailBean> call, Throwable t) { userDetailBeanMutableLiveData.postValue(null); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getUserData() {\n TwitterApiClient twitterApiClient = TwitterCore.getInstance().getApiClient();\n AccountService statusesService = twitterApiClient.getAccountService();\n Call<User> call = statusesService.verifyCredentials(true, true, true);\n call.enqueue(new Callback<User...
[ "0.72771573", "0.714267", "0.7135063", "0.6949526", "0.6924478", "0.68809736", "0.6856951", "0.6830512", "0.6803205", "0.6793823", "0.677652", "0.6711312", "0.6705744", "0.6699331", "0.66751504", "0.6662898", "0.6623869", "0.6609149", "0.65754366", "0.6570032", "0.6548668", ...
0.0
-1
Notify User Data to Observer
public MutableLiveData<UserDetailBean> getUserResponseLiveData() { return userDetailBeanMutableLiveData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void notifyObservers();", "public void notifyObservers();", "public void notifyObservers();", "@Override\n\tpublic void NotifyObserver() {\n\n\t}", "private void observeData() {\n viewModel.profile.observe(this, new Observer<User>() {\n @Override\n public void onChanged(...
[ "0.70432484", "0.70432484", "0.70432484", "0.7036104", "0.70356476", "0.7007807", "0.6996664", "0.6996664", "0.69844455", "0.6949214", "0.6869275", "0.685641", "0.6830151", "0.67830384", "0.6681176", "0.66702926", "0.65897703", "0.65585077", "0.65470546", "0.6536499", "0.6501...
0.0
-1
Check if no view has focus:
@Override public void onComplete(@NonNull Task<AuthResult> task) { View view = getCurrentFocus(); if (view != null) { // Hiding the Soft Keyboard Forcefully. Not A Best Practice. || TODO: REFACTOR THIS LATER InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } if(task.isSuccessful()){ Toast.makeText(getApplicationContext(), "Login Successful", Toast.LENGTH_LONG).show(); startActivity(new Intent(getApplicationContext(), HomeActivity.class)); mProgress.dismiss(); } else { Toast.makeText(getApplicationContext(), "Problem Occur While Login", Toast.LENGTH_LONG).show(); mProgress.dismiss(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean m36208d(View view) {\n return view != null && view.hasWindowFocus();\n }", "public boolean hasFocus() {\n return hasFocus;\n }", "@Override\r\n\tpublic boolean isFocused() {\n\t\treturn false;\r\n\t}", "boolean hasFocus() {\n\t\t\tif (text == null || text.isDisposed())...
[ "0.752144", "0.71540445", "0.71503836", "0.71252257", "0.6989558", "0.6839896", "0.6835727", "0.68034774", "0.67644054", "0.6644914", "0.65743554", "0.65302986", "0.6448699", "0.643322", "0.6394429", "0.6380685", "0.63306206", "0.6325382", "0.63178706", "0.62391496", "0.62239...
0.0
-1
TODO Autogenerated method stub
@Override public List<indent> selectAll() { return indentmapper.selectAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
It would seem to make sense to pass in the min and the max, but we want to allow people to use custom implementations which will be created when the AxisChart constructor gets called and we will not have looped the data to find the min and max yet. No sense in making people do that when we will do that already.
public UserDefinedScaleCalculator( double userDefinedMinimum, double userDefinedIncrement ) { this.userDefinedMinimum = userDefinedMinimum; this.userDefinedIncrement = userDefinedIncrement; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAxisRange(double xMin,double xMax, double yMin, double yMax) {\n minXValue=xMin;\n maxXValue=xMax;\n minYValue=yMin;\n maxYValue=yMax;\n this.customAxis=true;\n addGraphPanel();\n\n }", "@Override\r\n public void setMinMax(Double min, Double max) {\r\n this.minIn = min...
[ "0.742719", "0.6839216", "0.67483044", "0.653603", "0.6435193", "0.63882065", "0.6377362", "0.634859", "0.62537336", "0.6252822", "0.6233697", "0.62133276", "0.6212053", "0.61823404", "0.61444336", "0.61439085", "0.61373246", "0.61311054", "0.61123794", "0.6050574", "0.603439...
0.5383635
95
Computes the axis increment WITHOUT taking into account the user specified rounding criteria and sets it to the super class increment variable. You can extend this class and override this method to compute you own scale.
protected void computeIncrement() { super.increment = this.userDefinedIncrement; double powerOfTen = Math.pow( 10, Math.abs( this.getRoundingPowerOfTen() ) ); //---round the increment according to user defined power super.increment = super.round( super.increment, powerOfTen ); //---if we round this down to zero, force it to the power of ten. //---for example, round to nearest 100, value = 35...would push down to 0 which is illegal. if( super.increment == 0 ) { super.increment = powerOfTen; } super.setMinValue( super.round( this.userDefinedMinimum, powerOfTen ) ); super.setMaxValue( super.getMinValue() + ( super.increment * super.getNumberOfScaleItems() ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void _setTicks() {\n if (!Double.isNaN(tickIncrement)) {\n setTicksByIncr(tickIncrement);\n return;\n }\n double diff = Math.abs(max - min);\n if (!(diff > 0.)) {\n int tn = 2;\n tn += nanW > 0 ? 2 : 0;\n tn += negW > 0 ? 2 : 0;\n tn += nanW > 0 || negW > 0 ? 2 : 0;...
[ "0.5642908", "0.5398267", "0.53796935", "0.53676933", "0.5327132", "0.5276336", "0.5273752", "0.52651227", "0.52414334", "0.5231269", "0.5199863", "0.5147618", "0.51462805", "0.5120061", "0.5109604", "0.5101146", "0.5070481", "0.5062862", "0.50520337", "0.50475436", "0.504754...
0.64208025
0
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_assessment_info, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1