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
Gets the user attributes that were injected
public Map<String, Map<String, String>> getUserAttributes() { return m_userAttributes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IAttributes getAttributes();", "public Hashtable getUserProperties() {\n PropertyHelper ph = PropertyHelper.getPropertyHelper(this);\n return ph.getUserProperties();\n }", "Attributes getAttributes();", "Map<String, Object> getAttributes();", "Map<String, Object> getAttributes();", "M...
[ "0.65240693", "0.65003556", "0.6445756", "0.63711894", "0.63711894", "0.63711894", "0.6280774", "0.62443095", "0.60949606", "0.6090853", "0.60644996", "0.60644996", "0.60298866", "0.6004378", "0.60036534", "0.5994209", "0.59725744", "0.59144086", "0.5893534", "0.58927673", "0...
0.7263961
0
Load a template file from this package.
public static String getTemplate(String template) { return templates.get(template); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Templates load(URL fileSource) throws Exception {\n return m_factory.newTemplates(new StreamSource(fileSource.openStream()));\n }", "private String loadTemplate(String fileName)\n throws IOException, URISyntaxException\n {\n File file = new File(resolveResourcePath(this.TEMPLATE_PATH + f...
[ "0.7058184", "0.7042138", "0.6858148", "0.66828924", "0.66394246", "0.64422226", "0.6294819", "0.60753167", "0.604996", "0.5990038", "0.59057885", "0.58817536", "0.58178097", "0.57685006", "0.56887835", "0.56698763", "0.56421083", "0.55889386", "0.55451065", "0.5480533", "0.5...
0.4745064
100
Load a template file from this package.
public static String getTemplate(String template, Pair<String, String>... replacements) { String ret = getTemplate(template); if (ret != null) { for (Pair<String, String> p : replacements) { ret = ret.replaceAll(p.fst, p.snd); } } return ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Templates load(URL fileSource) throws Exception {\n return m_factory.newTemplates(new StreamSource(fileSource.openStream()));\n }", "private String loadTemplate(String fileName)\n throws IOException, URISyntaxException\n {\n File file = new File(resolveResourcePath(this.TEMPLATE_PATH + f...
[ "0.7058184", "0.7042138", "0.6858148", "0.66828924", "0.66394246", "0.64422226", "0.6294819", "0.60753167", "0.604996", "0.5990038", "0.59057885", "0.58817536", "0.58178097", "0.57685006", "0.56887835", "0.56698763", "0.56421083", "0.55889386", "0.55451065", "0.5480533", "0.5...
0.0
-1
Load a template file from this package.
public static Element getXmlTemplate(String template, Pair<String, String>... replacements) { return parseSafe(getTemplate(template, replacements)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Templates load(URL fileSource) throws Exception {\n return m_factory.newTemplates(new StreamSource(fileSource.openStream()));\n }", "private String loadTemplate(String fileName)\n throws IOException, URISyntaxException\n {\n File file = new File(resolveResourcePath(this.TEMPLATE_PATH + f...
[ "0.7058184", "0.7042138", "0.6858148", "0.66828924", "0.66394246", "0.64422226", "0.6294819", "0.60753167", "0.604996", "0.5990038", "0.59057885", "0.58817536", "0.58178097", "0.57685006", "0.56887835", "0.56698763", "0.56421083", "0.55889386", "0.55451065", "0.5480533", "0.5...
0.0
-1
/mQueue mq = new mQueue(1); mq.enqueue(2); mq.dequeue(); mq.enqueue(3); mq.printQueue();
public static void main(String ar[]){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printQueue();", "void runQueue();", "public void onQueue();", "public static void main(String args[]) {\r\n /* Create a queue with items 1 2 3 */\r\n Queue q = new Queue();\r\n q.stack1 = new Stack<>();\r\n q.stack2 = new Stack<>();\r\n enQueue(q, 1);\r\n ...
[ "0.7926221", "0.7392837", "0.7276956", "0.7244996", "0.72438437", "0.7242408", "0.7175411", "0.7175411", "0.71611345", "0.71331483", "0.7116509", "0.70359", "0.7023963", "0.7003775", "0.69779783", "0.69430786", "0.6930225", "0.69230074", "0.6913003", "0.69009167", "0.6843414"...
0.0
-1
sanity: jar, no classifier and file exists
private PluginInfo extractPluginInfo(Artifact artifact) { if (artifact != null && "jar".equals(artifact.getExtension()) && "".equals(artifact.getClassifier()) && artifact.getFile() != null) { Path artifactPath = artifact.getFile().toPath(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean isJar(){\n\t\tString str = IOHandler.class.getResource(\"IOHandler.class\").toString();\n\t\treturn str.toLowerCase().startsWith(\"jar\") && JAROVERRIDE;\n\t}", "boolean hasOutputjar();", "String validateBundleAndGetFilename( final URL url,\n fina...
[ "0.6287036", "0.62603676", "0.5952196", "0.5946392", "0.58811164", "0.57940334", "0.57506627", "0.570503", "0.5660741", "0.56289804", "0.56150055", "0.55885446", "0.55867547", "0.5569983", "0.5558822", "0.55300754", "0.5528013", "0.55242026", "0.5523052", "0.54616785", "0.545...
0.0
-1
Decode a new RescueObject from the buffer
public RescueObject readObject(int timestamp, Object source) { int type = readInt(); if (type==RescueConstants.TYPE_NULL) return null; int id = readInt(); int size = readInt(); RescueObject result = RescueObject.newObject(type); if (result==null) skip(size); else if (size>0) { result.read...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void DecodeFromCBORObject(CBORObject messageObject) throws CoseException;", "public abstract Object decode(InputStream is) ;", "void decodeObject();", "Object decode(String encoded);", "void decode2(DataBuffer buffer, T object);", "public Object decode(Object pObject) throws DecoderExc...
[ "0.6657247", "0.62646264", "0.6094158", "0.6057751", "0.60015047", "0.57604855", "0.5733122", "0.563861", "0.5594124", "0.55746067", "0.55661345", "0.5547842", "0.5534293", "0.55094016", "0.5498344", "0.5472301", "0.5470789", "0.54595083", "0.5455558", "0.54483426", "0.539718...
0.56181073
8
Decode a set of objects from the buffer.
public RescueObject[] readObjects(int timestamp, Object source) { List<RescueObject> result = new ArrayList<RescueObject>(); int count = readInt(); for (int i = 0; i < count; ++i) { RescueObject next = readObject(timestamp, source); result.add(ne...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void decodeObjectArray();", "public abstract Object decode(InputStream is) ;", "void decode2(DataBuffer buffer, T object);", "void decodeObject();", "void decode(Collection<Frame> into, ShareableBytes bytes)\n {\n decode(into, bytes, HEADER_LENGTH);\n }", "T decode1(DataBuffer buffer);", "...
[ "0.6806104", "0.6452783", "0.62920433", "0.6274992", "0.61933714", "0.59041154", "0.581771", "0.57022876", "0.56619006", "0.56480736", "0.55685014", "0.5456892", "0.54225045", "0.53976667", "0.53762627", "0.52763104", "0.5264474", "0.52630085", "0.5250304", "0.51968247", "0.5...
0.0
-1
Decode a set of commands from the buffer.
public Command[] readCommands() { List<Command> result = new ArrayList<Command>(); Command next = null; do { next = readCommand(); if (next!=null) { result.add(next); } } while (next!=null); return (Command[])result.toArray(new Command[0]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Command decode(ByteBuf buffer) {\n\t\tbyte [] bucket = readPackageFromBuffer(buffer);\n\t\t\n\t\t//read the type\n\t\tCommand.Type type = Command.Type.getTypeForValue(bucket[0]);\n\t\t\n\t\t//call the factory with the actual type to give a hint to it of wth this package is about\n\t\treturn CommandFa...
[ "0.6586838", "0.57796913", "0.5647252", "0.5624028", "0.55957514", "0.54946667", "0.5474025", "0.54472333", "0.5354116", "0.52613604", "0.5193898", "0.5182187", "0.51698565", "0.5134869", "0.5129288", "0.5090621", "0.50757325", "0.50608087", "0.5021737", "0.50103056", "0.4974...
0.54527354
7
Manipulates the map once available. This callback is triggered when the map is ready to be used. This is where we can add markers or lines, add listeners or move the camera. In this case, we just add a marker near Sydney, Australia. If Google Play services is not installed on the device, the user will be prompted to in...
@Override public void onMapReady(GoogleMap googleMap) { final LatLng thirdIntersection = new LatLng(45.425329, -75.682833); final LatLng fourthIntersection = new LatLng(45.426029, -75.681261); mMap = googleMap; // Moving the camera LatLngBounds Ottawa = new LatLngBounds(new ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onMapReady(GoogleMap googleMap) {\n Geocoder geoCoder = new Geocoder(getActivity(), Locale.getDefault());\n double lat, lng;\n try {\n List<Address> addresses = geoCoder.getFromLocationName(\"Western Sydney Paramatta, NSW\", 5);\n ...
[ "0.81888163", "0.80429345", "0.80365956", "0.803331", "0.7998251", "0.79769045", "0.79576075", "0.79573464", "0.7954103", "0.79424566", "0.79369086", "0.79300386", "0.79146415", "0.79048055", "0.78882027", "0.7884916", "0.7884916", "0.7884916", "0.7884916", "0.78779477", "0.7...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { int a = 80; if (a > 100) System.out.println("a > 100"); else if (a > 50) System.out.println("50 < a < 100"); else System.out.println("50 > a"); }
{ "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
Constructor Privado// Constructor Privado
public static GestorPersonas instanciar(){ if(gestor == null){ gestor = new GestorPersonas(); } return gestor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public Curso() {\r\n }", "public Pasien() {\r\n }", "private Rekenhulp()\n\t{\n\t}", "public Pitonyak_09_02() {\r\n }", "public Alojamiento() {\r\n\t}", "public Odontologo() {\n }", "public CyanSus() {\n\n }", "pub...
[ "0.8289099", "0.8074334", "0.7694526", "0.7693531", "0.7593976", "0.7550665", "0.75476426", "0.75470215", "0.75060683", "0.74973184", "0.74966156", "0.7491612", "0.7415499", "0.7414383", "0.7396446", "0.7393599", "0.73895675", "0.7383053", "0.73624146", "0.73611253", "0.73447...
0.0
-1
Si el profesor es nulo o apellido, nombre y cx son nulos devolvemos error.
@Override public String modificarProfesor(Profesor profesor, String apellidos, String nombres, Cargo cargo) { if( profesor == null || ( apellidos == null && nombres == null && cargo == null )){ //Si todos los parametros son nulos devolvemos error. return ERROR_MOD_PROFESOR; } //Si algun parametro es nul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void estiloError() {\r\n /**Bea y Jose**/\r\n\t}", "private boolean hasErroNome(String nome) {\r\n\t\terroNome.setText(\"\");\r\n\t\terroNome.setFont(new Font(\"Arial\", Font.BOLD, 12));\r\n\t\terroNome.setBounds(150, 155, 250, 20);\r\n\t\terroNome.setForeground(Color.RED);\r\n\r\n\t\tif (!Validacao.v...
[ "0.62304485", "0.6102016", "0.5900753", "0.5824673", "0.5812289", "0.5800452", "0.5794738", "0.5775948", "0.5750142", "0.5733098", "0.5722045", "0.5656525", "0.5652414", "0.5650151", "0.5641382", "0.56086", "0.55971074", "0.5596901", "0.55724376", "0.55695426", "0.55417526", ...
0.5743051
9
Si el alumno es nulo o apellido, nombre y cx son nulos devolvemos error.
@Override public String modificarAlumno(Alumno alumno, String apellidos, String nombres, String cx) { if( alumno == null || ( apellidos == null && nombres == null && cx == null )){ return ERROR_MOD_ALUMNO; } //Si algun parametro es nulo no lo modificamos. if( apellidos != null && !apellidos.isEmpty())...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void exibeDataNascimentoInvalida() {\n JOptionPane.showMessageDialog(\n null,\n Constantes.GERENCIAR_FUNCIONARIO_DATA_NASCIMENTO_INVALIDA,\n Constantes.GERENCIAR_FUNCIONARIO_TITULO,\n JOptionPane.PLAIN_MESSAGE\n );\n }", "private...
[ "0.577391", "0.5744817", "0.5730135", "0.5724948", "0.5714076", "0.57103926", "0.56949353", "0.5692869", "0.56895006", "0.5664888", "0.55847", "0.55598325", "0.55106086", "0.54842526", "0.5478851", "0.5450035", "0.54451483", "0.5444557", "0.5420594", "0.5406711", "0.5405497",...
0.6181495
0
Initializes the UI components.
private void initComponents() { dataPanel = new TransparentPanel(); dataPanel.setLayout(new BoxLayout(dataPanel, BoxLayout.Y_AXIS)); // info text infoTextArea = new JTextArea(); infoTextArea.setEditable(false); infoTextArea.setFocusable(false); infoTextArea.s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void initialize()\n {\n uiFactory.configureUIComponent(this, UI_PREFIX);\n\n initializeFields();\n initializeLabels();\n initLayout();\n }", "private void initComponents()\n {\n //LAYOUT\n initLayoutComponents();\n \n //TRANSITION COMPONE...
[ "0.83491236", "0.82560277", "0.815828", "0.8133378", "0.8133378", "0.8036985", "0.79693073", "0.7901185", "0.7895634", "0.78853106", "0.78370506", "0.7820781", "0.7781579", "0.77037716", "0.76980466", "0.7675194", "0.7659282", "0.76276267", "0.76275086", "0.76073843", "0.7596...
0.0
-1
Shows an input dialog to the user to obtain the master password.
public static String showInput(final boolean prevSuccess) { try { if(!SwingUtilities.isEventDispatchThread()) { SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showPasswordPrompt();", "public Optional<String> showPasswordDialog() {\n Dialog<String> passwordDialog = new Dialog<>();\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/dialog/password_dialog.fxml\"));\n passwordDialog.setTitle(\"Password\")...
[ "0.7836111", "0.71928775", "0.6851471", "0.67691606", "0.663687", "0.6521976", "0.6480499", "0.64284164", "0.63986075", "0.6392517", "0.63698965", "0.63169956", "0.6263292", "0.6257578", "0.62165725", "0.6184688", "0.610138", "0.60870945", "0.6083228", "0.607554", "0.6067841"...
0.66019076
5
OK button click event handler. Retrieves the password and hides the dialog.
public void actionPerformed(ActionEvent e) { JButton sourceButton = (JButton) e.getSource(); if (sourceButton.equals(okButton)) { password = new String( currentPasswdField.getPassword()); } // hide dialog and unblock applica...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n private void handleOKPressed() {\n\n if (Authenticator.validatePassword(accountId.getText(), password.getText())) {\n application.accountLogging(accountId.getText());\n confirmLogin = true;\n dialogStage.close();\n } else {\n errorMessage.setVisi...
[ "0.7286021", "0.71971244", "0.7191876", "0.6922297", "0.6893226", "0.6865769", "0.6772449", "0.6654296", "0.6607686", "0.65678704", "0.6564384", "0.6524942", "0.6503753", "0.6495977", "0.63977593", "0.6362196", "0.6295957", "0.62635094", "0.62635094", "0.6249435", "0.6249435"...
0.700109
3
Resets the password by clearing the input field and setting password to null. Disables the OK button.
private void resetPassword() { password = null; currentPasswdField.setText(""); currentPasswdField.requestFocusInWindow(); okButton.setEnabled(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearPassword() {\n\t\tpassword.setValue(\"\");\n\t}", "private void clearPassword() {\n \n password_ = getDefaultInstance().getPassword();\n }", "private void clearPassword() {\n \n password_ = getDefaultInstance().getPassword();\n }", "public void clearPass...
[ "0.7807023", "0.7724014", "0.7724014", "0.7474212", "0.7349754", "0.7307844", "0.7307844", "0.726463", "0.7254223", "0.7229523", "0.721388", "0.7179509", "0.7159924", "0.7159924", "0.7159924", "0.7143144", "0.70253193", "0.6982907", "0.6981588", "0.68861187", "0.6819178", "...
0.8783485
0
Disables OK button if the password input field is empty.
public void keyReleased(KeyEvent event) { JPasswordField source = (JPasswordField) event.getSource(); if (currentPasswdField.equals(source)) { String password = new String(currentPasswdField.getPassword()); okButton.setEnabled(password.length() > 0); passw...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean validatePassword() {\r\n\t\tif (txtPassword.getValue() == null || txtPassword.getValue().length() == 0 || !txtPassword.getValue().equals(txtRetypePassword.getValue()))\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "public void showPasswordPrompt();", "private void validatePasswordField() {...
[ "0.6924749", "0.6808536", "0.68004906", "0.6762109", "0.66462076", "0.66153467", "0.6612078", "0.655869", "0.6450365", "0.63724303", "0.6333926", "0.63201106", "0.63171524", "0.63071555", "0.6303194", "0.6293386", "0.62890303", "0.6284021", "0.6270456", "0.6251021", "0.624928...
0.60526794
44
Creates the icon component to show on the left of this dialog.
private static Component createIconComponent() { JPanel wrapIconPanel = new TransparentPanel(new BorderLayout()); JLabel iconLabel = new JLabel(); iconLabel.setIcon(DesktopUtilActivator.getResources() .getImage("service.gui.icons.AUTHORIZATION_ICON")); wrapIconPanel.ad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Icon createIcon();", "private void addLeftDrawable() {\n\n// mBusinessTitle.setCompoundDrawables(getDrawable(R.drawable.ic_assignment_black_24dp), null, null, null );\n//\n// mBusinessPhone.setCompoundDrawables(getDrawable(R.drawable.ic_settings_phone_black_24dp), null, null, null );\n//\n// ...
[ "0.6049935", "0.6049614", "0.5846608", "0.5711566", "0.5557573", "0.5547622", "0.54376596", "0.54019827", "0.54004604", "0.5385306", "0.53660786", "0.5349998", "0.5334201", "0.5325924", "0.53168154", "0.5315743", "0.5282528", "0.5273268", "0.5272801", "0.5253091", "0.52349776...
0.63510543
0
Close the connection when an exception is raised.
@Override public void exceptionCaught( ChannelHandlerContext ctx, ExceptionEvent e) { logger.log( Level.WARNING, "Unexpected exception from downstream.", e.getCause()); e.getChannel().close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void close() throws Exception {\r\n if (connection != null){\r\n connection.close();\r\n }\r\n }", "@Override\r\n\tpublic void close()\r\n {\r\n\t\ttry\r\n {\r\n\t connection.close();\r\n }\r\n\t\tcatch (final SQLException e)\r\n ...
[ "0.7704999", "0.76463586", "0.73903507", "0.73521256", "0.7350661", "0.7295211", "0.7225442", "0.7179988", "0.71199733", "0.7105953", "0.708345", "0.7079227", "0.70501345", "0.70449096", "0.7011599", "0.70075023", "0.7004892", "0.6974568", "0.6963415", "0.69564366", "0.695279...
0.0
-1
startActivityForResult(new Intent(this, SignUpActivity.class), Constants.LOGIN_REQUEST_CODE); // startActivityForResult(new Intent(this, SignUpAnimActivity.class), CustomConstants.LOGIN_REQUEST_CODE); overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
@Override public void onSignUpBtnClick() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), SignupActivity.class);\n startActivityForResult(intent, REQUEST_SIGNUP);\n finish();\n //overridePendingTransition(R.anim.push_left_in, R.anim.push_...
[ "0.79529136", "0.7719733", "0.7719733", "0.7719733", "0.76908135", "0.7679662", "0.7678577", "0.7563611", "0.7482957", "0.7482957", "0.74801135", "0.7474714", "0.7474714", "0.7400814", "0.71848977", "0.6920363", "0.67243576", "0.6713769", "0.6620932", "0.66197264", "0.6605415...
0.0
-1
method to do Default Twitter Login
public void customLoginTwitter() { //check if user is already authenticated or not if (getTwitterSession() == null) { //if user is not authenticated start authenticating client.authorize(this, new Callback<TwitterSession>() { @Override public void...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loginToTwitter() \n\t{\n\t\t// Check if already logged in\n\t\tif (!isTwitterLoggedInAlready())\n\t\t{\n\t\t\tConfigurationBuilder builder = new ConfigurationBuilder();\n\t\t\tbuilder.setOAuthConsumerKey(TWITTER_CONSUMER_KEY);\n\t\t\tbuilder.setOAuthConsumerSecret(TWITTER_CONSUMER_SECRET);\n\t\t\tConf...
[ "0.81358784", "0.7981332", "0.75590086", "0.6899625", "0.6775129", "0.6770102", "0.6629314", "0.6487787", "0.6479826", "0.62615293", "0.61992764", "0.6182109", "0.616705", "0.61626846", "0.6131995", "0.61079437", "0.608493", "0.60632753", "0.6054289", "0.60511017", "0.6047653...
0.76584274
2
Do something with result, which provides a TwitterSession for making API calls
@Override public void success(Result<TwitterSession> result) { TwitterSession twitterSession = result.data; fetchTwitterEmail(twitterSession); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void success(Result<TwitterSession> result) {\n TwitterSession twitterSession = result.data;\n fetchTwitterAccount();\n dismiss();\n }", "@Override\n public void success(Result<TwitterSession> res...
[ "0.74701095", "0.7051076", "0.6891637", "0.67282504", "0.6688561", "0.6449489", "0.6331767", "0.6219302", "0.5916956", "0.57969034", "0.5781216", "0.5776666", "0.56855464", "0.56745154", "0.560139", "0.5585477", "0.55712485", "0.5554317", "0.5554317", "0.5554016", "0.5546272"...
0.7393259
1
Do something on failure
@Override public void failure(TwitterException e) { Toast.makeText(SignInActivity.this, "Failed to authenticate. Please try again.", Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\tpublic void doFail() {\n\t\t\t\t}", "@Override\n\t\t\tpublic void onFail(int code) {\n\t\t\t\t\n\t\t\t}", "public void onFailure();", "void failed (Exception e);", "@Override\r\n\tpublic void onFail() {\n\t\tif(bSendStatus)\r\n\t\t\tnativeadstatus(E_ONFAIL);\r\n\t}", "@Override\n\t\t\t...
[ "0.797733", "0.7426651", "0.741109", "0.7362279", "0.73250866", "0.7318276", "0.724924", "0.7134308", "0.71182775", "0.7116118", "0.7116118", "0.7116118", "0.70874393", "0.699894", "0.6984025", "0.69831604", "0.6969433", "0.6962387", "0.6928869", "0.69030887", "0.68835557", ...
0.0
-1
get authenticates user session
private TwitterSession getTwitterSession() { TwitterSession session = TwitterCore.getInstance().getSessionManager().getActiveSession(); return session; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "AuthenticationSessionModel getAuthenticationSession();", "public User getSession(){\n\t\treturn this.session;\n\t}", "@Override\n\tpublic UtenteBase getSessionUser() {\n\t\tUtenteBase user = (UtenteBase) getThreadLocalRequest().getSession().getAttribute(\"user\");\n\t\treturn user;\n\t}", "public PSUserSessi...
[ "0.77115107", "0.6974206", "0.6960993", "0.6919943", "0.6838701", "0.67474264", "0.6736425", "0.66870296", "0.6655697", "0.6655697", "0.65911233", "0.65285915", "0.6470589", "0.64701897", "0.6452095", "0.644481", "0.6437737", "0.64318836", "0.6407925", "0.63847536", "0.638262...
0.0
-1
here it will give u only email and rest of other information u can get from TwitterSession
@Override public void success(Result<String> result) { Log.e("User Id : ", twitterSession.getUserName() + ""); Log.e("data", "User Id : " + twitterSession.getUserId() + "\nScreen Name : " + twitterSession.getUserName() + "\nEmail Id : " + result.data); twitter...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getUserMail();", "java.lang.String getUserEmail();", "private void getUserData() {\n TwitterApiClient twitterApiClient = TwitterCore.getInstance().getApiClient();\n AccountService statusesService = twitterApiClient.getAccountService();\n Call<User> call = statusesService.verifyCrede...
[ "0.6424152", "0.6304413", "0.6223149", "0.62183535", "0.61959827", "0.6082992", "0.6082992", "0.6082992", "0.6082992", "0.6082992", "0.6082992", "0.6031432", "0.5957002", "0.5922208", "0.5922208", "0.5922208", "0.5922208", "0.5922208", "0.59164214", "0.5888849", "0.57918775",...
0.54749984
62
Constructs a new ToolBarIO utility based on the given container
public ToolBarIO(ToolBarContainer container) { this.container = container; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JMTToolBar createToolbar() {\r\n \t\tJMTToolBar toolbar = new JMTToolBar(JMTImageLoader.getImageLoader());\r\n \t\t// Builds an array with all actions to be put in the toolbar\r\n \t\tAbstractJmodelAction[] actions = new AbstractJmodelAction[] { newModel, openModel, saveModel, null,\r\n \t\t\t\t// editUndo,...
[ "0.6068602", "0.5909185", "0.5901344", "0.58474976", "0.5808736", "0.57406527", "0.5714742", "0.5701048", "0.56454235", "0.55854714", "0.55522984", "0.5506214", "0.5501391", "0.54640144", "0.5431828", "0.5419608", "0.5401972", "0.5370422", "0.5360069", "0.53326607", "0.532056...
0.76790756
0
Saves the current toolbar configuration into an XML stream. The stream is not closed at the end of the operation.
public void writeXML(OutputStream stream) throws IOException { PrintWriter out = new PrintWriter(stream); out.println("<?xml version=\"1.0\"?>"); out.println("<VLToolBars version=\"1.0\">"); xmlWriteContainer(out); out.println("</VLToolBars>"); out.flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void saveConfig() {\r\n\t\ttry {\r\n\t\t\tPrintWriter out = new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(\"open-ig-mapeditor-config.xml\"), 64 * 1024), \"UTF-8\"));\r\n\t\t\ttry {\r\n\t\t\t\tout.printf(\"<?xml version='1.0' encoding='UTF-8'?>%n\");\r\n\t\t\t\tout.printf(\"<m...
[ "0.62331134", "0.5725623", "0.5666499", "0.5529024", "0.5498629", "0.548621", "0.5481827", "0.54687315", "0.5400398", "0.53972733", "0.536529", "0.5347742", "0.5317737", "0.52561086", "0.52415985", "0.5238229", "0.52382207", "0.5217738", "0.5196471", "0.5189623", "0.5155646",...
0.6636509
0
public void authBTBULK(WebDriver wd,String OrderId)
public void authBTBULK(WebDriver wd) { try{ Thread.sleep(4000); wd.findElement(By.id("userMenu")).click(); wd.manage().timeouts().implicitlyWait(7, TimeUnit.SECONDS); System.out.println("menu clicked"); Thread.sleep(2000); wd.findElement(By.xpath("//a[@title='...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void myorders() {\r\n\t\t\tdriver.findElement(orders).click();\r\n\t\t\t\r\n\t\t\t}", "public void myorders() {\n\t\t\t\r\n\t\t\t\r\n\t\tBy my=By.xpath(\"//a[@href='/my/orders/create?form']\");\r\n\t\tWebElement We_my=wt.ElementToBeClickable(my, 20);\r\n\t\tWe_my.click();\r\n\t\t}", "public void clickO...
[ "0.59302807", "0.5645778", "0.5641207", "0.55712885", "0.54250765", "0.52076966", "0.5202752", "0.51874906", "0.51667035", "0.51647395", "0.5152615", "0.5147477", "0.5120998", "0.50839615", "0.5078475", "0.5074156", "0.50508916", "0.5047318", "0.50368166", "0.502012", "0.5019...
0.75211257
0
Constructs ThresholdEventRule object for the given parameters
public ThresholdEventRule(String name, String name_lt, String name_gt, String d_lt, String d_gt, String sensorName, int val, boolean hideFromFeed, int timeout){ super(name, hideFromFeed, timeout); this.name_lt = name_lt; this.name_gt = name_gt; this.description_lt = d_lt; this.de...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void create(Rule event);", "Rule createRule();", "Rule createRule();", "Rule createRule();", "public EvelThresholdCross( String evname,String evid,\r\n\t\t\t String tcriticality,\r\n\t String tname,\r\n\t String tthresholdCrossed,...
[ "0.6097776", "0.5650052", "0.5650052", "0.5650052", "0.55581427", "0.5233215", "0.516055", "0.5137203", "0.5090275", "0.50501305", "0.50406665", "0.49859107", "0.49728283", "0.48947805", "0.48910952", "0.48375967", "0.48016554", "0.4787663", "0.47627822", "0.4759298", "0.4738...
0.64199424
0
A threshold test doesn't make sense for digital inputs
public Event testEvent(InputChangeEvent ie, boolean override) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "float getThreshold();", "@Test\n public void testThreshold() {\n final ThresholdCircuitBreaker circuit = new ThresholdCircuitBreaker(threshold);\n circuit.incrementAndCheckState(9L);\n assertFalse(\"Circuit opened before reaching the threshold\", circuit.incrementAndCheckState(1L));\n ...
[ "0.72092164", "0.7065629", "0.67947656", "0.67416745", "0.6661507", "0.66388506", "0.6609002", "0.6606454", "0.65807164", "0.65761447", "0.6571461", "0.64482975", "0.6435993", "0.6408817", "0.6379987", "0.6377688", "0.6366689", "0.636141", "0.6359453", "0.6342381", "0.6326043...
0.0
-1
Tests whether a given SensorChangeEvent corresponds to this EventRules sensor
public Event testEvent(SensorChangeEvent se, boolean override) throws PhidgetException { Sensor eventSensor; eventSensor = sensorController.getSensor(se.getIndex(), Sensor.sensorType.ANALOG, se.getSource()); if(eventSensor != null && eventSensor.getName().equals(sensorName)){ int cu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasChangeEvent();", "public boolean check(EventType event);", "private static boolean atSensor(SensorEvent e, int x, int y) {\n return e.getXpos() == x && e.getYpos() == y;\n }", "public abstract boolean isBefore(SoSensor s);", "public static boolean checkSensorState()\n\t{\n\t\tboolean s...
[ "0.6444825", "0.61602986", "0.571948", "0.5616343", "0.55727583", "0.5530366", "0.55258024", "0.5445177", "0.5422443", "0.54131895", "0.5409794", "0.5344064", "0.5330093", "0.5329738", "0.53249425", "0.5315179", "0.5296776", "0.52737457", "0.52445334", "0.52015305", "0.519183...
0.5262373
18
Test the current state of the ThresholdEventRule
@Override public Event testEvent() throws PhidgetException { if((sensorController.getVal(sensorName) > threshold)){ return new Event(name_gt,description_gt, hideFromFeed); } else { return new Event(name_lt,description_lt, hideFromFeed); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testThreshold() {\n final ThresholdCircuitBreaker circuit = new ThresholdCircuitBreaker(threshold);\n circuit.incrementAndCheckState(9L);\n assertFalse(\"Circuit opened before reaching the threshold\", circuit.incrementAndCheckState(1L));\n }", "public interface ITh...
[ "0.63079584", "0.59760714", "0.5790021", "0.567573", "0.5516128", "0.54145485", "0.53749484", "0.5369953", "0.5369917", "0.5363285", "0.5362855", "0.53594697", "0.53254426", "0.5241489", "0.52351004", "0.52264893", "0.5198643", "0.5198115", "0.5184706", "0.5172335", "0.51535"...
0.6060534
1
Tests whether an event name corresponds to this event rule
@Override public boolean isCorrespondingTo(String eventName) { return eventName.equals(name) || eventName.equals(name_lt) || eventName.equals(name_gt) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean isCorrespondingTo(Event event){\n String n = event.getName();\n return n.equals(name) || n.equals(name_lt) || n.equals(name_gt);\n }", "public boolean isEvent(String eventName) {\r\n\t\tboolean result = false;\r\n\t\tfor (Event e : events) {\r\n\t\t\tif (e.getName()...
[ "0.68328637", "0.648308", "0.63196445", "0.6228689", "0.619435", "0.6056454", "0.60493004", "0.593311", "0.5872691", "0.58708686", "0.5833317", "0.5785219", "0.5736995", "0.5736995", "0.5736995", "0.5736995", "0.5736995", "0.5736995", "0.5736995", "0.5736995", "0.5736995", ...
0.66499686
1
Tests whether an Event corresponds to this event rule
@Override public boolean isCorrespondingTo(Event event){ String n = event.getName(); return n.equals(name) || n.equals(name_lt) || n.equals(name_gt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean check(EventType event);", "boolean handlesEventsOfType(RuleEventType type);", "public boolean match(Event e);", "boolean hasEvent();", "@objid (\"0480e45a-6886-42c0-b13c-78b8ab8f713d\")\n boolean isIsEvent();", "boolean isSetEvent();", "public boolean isSameEvent(Event event) {\n ...
[ "0.69599336", "0.68395746", "0.6762504", "0.6713724", "0.6645588", "0.6459451", "0.6245893", "0.62118596", "0.6199168", "0.6185918", "0.6168351", "0.6151681", "0.5946153", "0.5931738", "0.59119475", "0.589026", "0.58753824", "0.5853012", "0.58364505", "0.579822", "0.57539827"...
0.6419129
6
for any class that implements interface the interface wants the class to use this interface and implement that method
public void fly() { System.out.println("Sparrow flying high..."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void implements_(JDefinedClass cls) {\n\n\t}", "@Override\n public boolean isInterface() { return false; }", "@Override\n\tpublic void setInterface(Class<T> interfaceClass) {\n\t\t\n\t}", "public interface zzo\n extends IInterface\n{\n\n public abstract void zze(AdRequestParcel a...
[ "0.7212551", "0.6865493", "0.6646974", "0.663472", "0.6582853", "0.6582853", "0.6514299", "0.6496444", "0.6420433", "0.64144474", "0.64109594", "0.6406529", "0.63685805", "0.6330072", "0.63278526", "0.6315444", "0.63143003", "0.631357", "0.6313091", "0.62769324", "0.62453896"...
0.0
-1
This method makes an initial entry into RBT_MONITORING table with trace result as null
public String startMonitor(String msisdn, String traceType) { synchronized (_monitorSubMap) { StringBuffer reason = new StringBuffer(); if (!canMonitor(msisdn, traceType, reason)) return reason.toString(); _monitorSubMap.put(msisdn, traceType); _dbManager.insertMonitor(msisdn, null, traceType, MONITOR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract AbstractMonitorTrace createMonitorTrace();", "protected abstract void trace_pre_updates();", "@Override\n\tpublic EntryMessage traceEntry() {\n\t\treturn null;\n\t}", "private void main_flow() throws SQLException {\n start_operation_complete_monitoring(this);\r\n BuffDBWriter...
[ "0.5493768", "0.5214974", "0.5165327", "0.5124356", "0.50806504", "0.50223494", "0.49738538", "0.49691033", "0.49228194", "0.4903861", "0.48995653", "0.48724335", "0.48534685", "0.48483092", "0.48104534", "0.47889665", "0.47828358", "0.4737218", "0.47017166", "0.46811014", "0...
0.0
-1
This method updates the trace entry in RBT_MONITORING to trace completed state
public String endMonitor(String msisdn) { synchronized (_monitorSubMap) { if (_monitorSubMap.containsKey(msisdn)) { notifyWaitingThread(msisdn); return RESPONSE_SUCCESS; } else return RESPONSE_NO_ACTIVE_MONITOR; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void done() {\n\t\t//close the monitor \n\t\tprogressMonitorReporter.closeMonitor();\n\t\t\n\t\t//Inform application that operation isn't being in progress. \n\t\tapplicationInteractor.setOperationInProgress(false);\n\t}", "public void handleSimStatusCompleted() {\n }", "public void s...
[ "0.5461959", "0.5370526", "0.5293653", "0.5272235", "0.5256873", "0.52481294", "0.52050453", "0.516602", "0.5163003", "0.5154772", "0.51432073", "0.5109479", "0.51033115", "0.50916266", "0.50914145", "0.5078604", "0.50604457", "0.5046195", "0.5028395", "0.5026941", "0.5023865...
0.0
-1
This method makes/updates entry in RBT_MONITORING table
public void endNode(String msisdn, RBTNode node) { if (_monitorNodeMap.containsKey(msisdn)) { updateMonitor(msisdn, node); deregisterSubNode(msisdn); boolean endMonitor = false; boolean successResponse = node.getNodeRespone().equals(RBTNode.RESPONSE_SUCCESS); if (node.getNodeRespone() != null && !succe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int updateByPrimaryKey(BasicInfoAnodeBurningLossRate record);", "@Override\n\tpublic void updateEntries(Reservation reservation) {\n\t\tresTable.save(reservation);\n\t\t\n\t}", "int updateByPrimaryKey(HrHBscCpuQos record);", "public boolean putMonitor(Hardware monitor) {\n if (monitors.size() < Workin...
[ "0.56163144", "0.5438994", "0.5426346", "0.5425503", "0.53670454", "0.53453135", "0.53026253", "0.52880543", "0.5284425", "0.5276252", "0.5235994", "0.51840276", "0.5174057", "0.5171656", "0.5164549", "0.51640457", "0.51557773", "0.5153044", "0.5133838", "0.50944537", "0.5088...
0.0
-1
This method checks of monitoring can happen for this number/node
public boolean canMonitor(String msisdn, String traceType, StringBuffer reason) { // checking the configuration if can monitor for this number String numbersList = CacheManagerUtil.getParametersCacheManager().getParameter(MONITOR, "MONITOR_NUMBERS", "").getValue(); StringTokenizer stk = new StringTokenizer(nu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isMonitoringEnabled();", "boolean isMonitoring();", "boolean isMonitoring();", "public static boolean isMonitoring(){\n\t\treturn ZMonitorManager.getInstance().getMonitorLifecycle().isMonitorStarted();\n\t}", "protected boolean hasMonitoringPermissions() {\r\n\t\tfinal Jenkins jenkins = Jenkins.get...
[ "0.7352734", "0.7197518", "0.7197518", "0.6690785", "0.6491473", "0.6460803", "0.63179415", "0.62685347", "0.6099622", "0.6074146", "0.6058055", "0.59777313", "0.58776724", "0.5877234", "0.58520997", "0.58062506", "0.57929623", "0.5752425", "0.5720218", "0.5706002", "0.569366...
0.57801557
17
This method stores the subscriber as key & node as value in hashmap indicating trace is on for the sub
protected void registerSubNode(String msisdn, RBTNode node) { synchronized (_monitorNodeMap) { if (!_monitorNodeMap.containsKey(msisdn)) { node.setNodeStartTime(new Date()); _monitorNodeMap.put(msisdn, node); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object visitMapOfReferences(MapOfReferencesNode node, Object state);", "public void sinkCounterMap(){\n for(int i=1; i<(sinkCounter+1); i++){\n sinkCounterMap.put(i,1); //sink is included in basin count;\n \n }\n }", "public Map<String, SmsHandy> getSubscriber() {\n\t\tre...
[ "0.55333245", "0.51128644", "0.5109088", "0.50135326", "0.4924413", "0.4840653", "0.48261833", "0.48118067", "0.47924998", "0.4791846", "0.4754216", "0.4744032", "0.47393793", "0.47278866", "0.47265318", "0.47094598", "0.47035965", "0.46610937", "0.46491274", "0.46340632", "0...
0.50518024
3
Initiates the copy monitoring request
public String processCopyMonitor(HashMap<String, String> map) { String cCode = map.get(param_ccode); String vCode = map.get(param_vcode); Clip clip = null; if (cCode != null) clip = getClipByPromoID(cCode); else if (vCode != null) clip = getClipByVCode(vCode); if (clip == null) { _logger.warn("RBT:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCopyRequestId(long copyRequestId);", "private void startASpaceCopyProcess(final RemoteDBConnectDialogLight sourceRCD, final String sourceTitle,\n final int sourceUrlIndex) {\n Thread performer = new Thread(new Runnable() {\n public void run(...
[ "0.5747704", "0.5710498", "0.56593937", "0.5376758", "0.53588355", "0.5188794", "0.51712066", "0.51499104", "0.51414067", "0.5128834", "0.50980526", "0.5062987", "0.5062969", "0.50479776", "0.5015568", "0.5007338", "0.49836034", "0.4977858", "0.4974786", "0.4971459", "0.49656...
0.5346962
5
TODO Autogenerated method stub
public String processThirdPartyMonitor(HashMap<String, String> map) { String traceType = map.get(param_tracetype); String msisdn = map.get(param_msisdn); String url = Utility.getBaseURLForSubscriber(msisdn); if (traceType.equals(TRACE_TYPE_AUTODIAL)) url += "/autodial.jsp?"; else if (traceType.equals(TRACE...
{ "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 function is to assert Staff page heading.
public void assertStaffPageHeading() { waitForElement(xpathHeading); String actualHeading = assertAndGetText(xpathHeading); logger.info("# Staff page header: " + actualHeading); assertEquals(actualHeading, HEADING, "Actual heading '" + actualHeading + "' should be same as exp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Then(\"^check the heading of the page$\")\r\n\tpublic void check_the_heading_of_the_page() throws Exception {\n\t\tString heading=driver.findElement(By.xpath(\".//*[@id='mainCnt']/div[1]/div[1]/h1\")).getText();\r\n\t\tif(heading.contentEquals(\"Hotel Booking Application\")) {\r\n\t\t\tSystem.out.println(\"conten...
[ "0.69463724", "0.68656355", "0.6847113", "0.6746404", "0.66615796", "0.6576038", "0.6552036", "0.6550421", "0.6532739", "0.6491938", "0.6470482", "0.6447524", "0.6446351", "0.639351", "0.63921344", "0.6373771", "0.63736874", "0.63681054", "0.63410217", "0.6320604", "0.6284755...
0.86504006
0
This function is to create new staff with staff name & branch name.
public int createNewStaff(String name, String branch) { clickOnBtn(ActionsEnum.Create.name()); fillCreateOrEditForm(name, branch); clickOnBtn(ActionsEnum.Save.name()); waitForElementInvisibility(xpathBtn.replace("*btn*", ActionsEnum.Save.name())); int id = getMaxId(); log...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int createNewStaff(String name, int branchId) {\n clickOnBtn(ActionsEnum.Create.name());\n fillCreateOrEditForm(name, branchId);\n clickOnBtn(ActionsEnum.Save.name());\n waitForElementInvisibility(xpathBtn.replace(\"*btn*\", ActionsEnum.Save.name()));\n int id = getMaxId()...
[ "0.7519248", "0.6802246", "0.6643687", "0.6593604", "0.64376247", "0.6268547", "0.6255431", "0.6228949", "0.6207386", "0.6102436", "0.6076676", "0.6060557", "0.6023377", "0.5958735", "0.59425795", "0.5873306", "0.57865775", "0.576511", "0.5681106", "0.565167", "0.5613755", ...
0.76708704
0
This is to create new staff with staff name & branch id.
public int createNewStaff(String name, int branchId) { clickOnBtn(ActionsEnum.Create.name()); fillCreateOrEditForm(name, branchId); clickOnBtn(ActionsEnum.Save.name()); waitForElementInvisibility(xpathBtn.replace("*btn*", ActionsEnum.Save.name())); int id = getMaxId(); lo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int createNewStaff(String name, String branch) {\n clickOnBtn(ActionsEnum.Create.name());\n fillCreateOrEditForm(name, branch);\n clickOnBtn(ActionsEnum.Save.name());\n waitForElementInvisibility(xpathBtn.replace(\"*btn*\", ActionsEnum.Save.name()));\n int id = getMaxId();...
[ "0.7860095", "0.6970212", "0.67890483", "0.67050683", "0.65583205", "0.65309095", "0.645054", "0.63883275", "0.6387148", "0.6273906", "0.62178844", "0.6178063", "0.6172199", "0.6155939", "0.6116637", "0.60930824", "0.5927283", "0.58306473", "0.57966703", "0.57875276", "0.5749...
0.77924186
1
This function is to update Staff's details.
public void updateStaffDetails(String action, String name, String branch) { fillCreateOrEditForm(name, branch); clickOnBtn(action); waitForElementInvisibility(xpathBtn.replace("*btn*", action)); logger.info("# Updated staff details"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic int updateStaff(int staff_id) throws Exception {\n\t\treturn dao.update(staff_id);\n\t}", "public boolean updateStaff(Staff staff) {\n\t\treturn false;\n\t}", "@PutMapping(\"/updateStaff\")\n\tpublic Staff updateStaff(@RequestBody Staff staff) {\n\t\treturn staffService.updateStaff(staff);\...
[ "0.73178273", "0.7219777", "0.7108861", "0.7038735", "0.6925801", "0.6757835", "0.67238355", "0.66878957", "0.6647443", "0.6592112", "0.6262261", "0.62309253", "0.6193259", "0.6172353", "0.61344886", "0.6120151", "0.6115328", "0.60451484", "0.60423297", "0.6021205", "0.598561...
0.67809486
5
This is function is to create or cancel staff.
public int createAndCancel(String name, String branch) { clickOnBtn(ActionsEnum.Create.name()); fillCreateOrEditForm(name, branch); clickOnBtn(ActionsEnum.Cancel.name()); waitForElementInvisibility(xpathBtn.replace("*btn*", ActionsEnum.Cancel.name())); return getMaxId(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int createNewStaff(String name, String branch) {\n clickOnBtn(ActionsEnum.Create.name());\n fillCreateOrEditForm(name, branch);\n clickOnBtn(ActionsEnum.Save.name());\n waitForElementInvisibility(xpathBtn.replace(\"*btn*\", ActionsEnum.Save.name()));\n int id = getMaxId();...
[ "0.5862157", "0.5846986", "0.5705904", "0.56990993", "0.56407934", "0.56160736", "0.56064194", "0.5577184", "0.55709654", "0.54971975", "0.54637945", "0.5433525", "0.5394933", "0.5276706", "0.5260797", "0.5255054", "0.5213853", "0.52110094", "0.51800257", "0.5155408", "0.5148...
0.0
-1
This function is to assert staff by id, name & branch.
public void assertStaffRowBy(int id, String name, String branch) { mapStaff = getStaffRowById(id); assertEquals(mapStaff.get("ID"), String.valueOf(id), "Actual ID " + mapStaff.get("ID") + "should be same as expected " + id); assertEquals(mapStaff.get("Name"), name, "Actua...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void assertDetailsOnEditForm(int id, String name, String branch) {\n \twaitForElementVisibility(xpathFormHeading);\n String actualId = assertAndGetAttributeValue(xpathIdTF, \"value\");\n String actualName = assertAndGetAttributeValue(xpathNameTF, \"value\");\n String actualBranch = g...
[ "0.6507917", "0.62897754", "0.5909511", "0.58960694", "0.5890232", "0.5789678", "0.5784295", "0.56374526", "0.56366134", "0.5622519", "0.5514065", "0.54769003", "0.54676646", "0.5459703", "0.54280055", "0.5342056", "0.53285736", "0.53015816", "0.52999586", "0.5282803", "0.527...
0.77924794
0
This function is to navigate to Staff's Details Page corresponding to given staff's id.
public void navigateToStaffDetailPageById(int id) { String rowIndex = String.valueOf(getRowIndexById(id)); String xpathIdLink = xpathTableCell.replace("*row*", rowIndex).replace("*col*", "1"); xpathIdLink = xpathIdLink + "//a"; assertAndClick(xpathIdLink); logger.info("# Clicked ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/{staffId}\")\n\tpublic ResponseEntity<?> viewStaff(@PathVariable(\"staffId\") int sid) {\n\t\tUniversityStaffMember staff = universityService.viewStaff(sid);\n\t\tif (staff == null)\n\t\t\tthrow new DataNotFoundException(\"Request\", \"Staff with id \" + sid + \" not found\");\n\t\telse\n\t\t\tretur...
[ "0.6412144", "0.6299987", "0.62883854", "0.6139518", "0.59513164", "0.59265286", "0.58844626", "0.5837285", "0.5804313", "0.57790685", "0.57584435", "0.57316613", "0.573164", "0.5726486", "0.5672381", "0.56644285", "0.5648798", "0.56238353", "0.5607486", "0.5588148", "0.55390...
0.8495822
0
This function is to click on actions(View, Edit, Delete) button corresponding to staff's id.
public void clickOnActionCorrespondingToId(String action, int id) { String rowIndex = String.valueOf(getRowIndexById(id)); String xpathRowView = xpathRowAction.replace("*row*", rowIndex); xpathRowView = xpathRowView.replace("*btn*", action); assertAndClick(xpathRowView); logger.i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clickEditButton(){\r\n\t\t\r\n\t\tMcsElement.getElementByXpath(driver, \"//div[contains(@class,'x-tab-panel-noborder') and not(contains(@class,'x-hide-display'))]//button[contains(@class,'icon-ov-edit')]\").click();\r\n\t\t\r\n\t}", "public void clickEdit() {\r\n\t\tEdit.click();\r\n\t}", "public v...
[ "0.6816067", "0.6674824", "0.6592661", "0.6569482", "0.6473347", "0.6469729", "0.6332489", "0.6319479", "0.61191654", "0.6021792", "0.59804666", "0.59752524", "0.5949495", "0.59427756", "0.59208715", "0.5867518", "0.5779524", "0.5777191", "0.5748007", "0.573556", "0.5732393",...
0.629889
8
This function is to assert details on Staff's Edit Form corresponding to staff's id.
public void assertDetailsOnEditForm(int id, String name, String branch) { waitForElementVisibility(xpathFormHeading); String actualId = assertAndGetAttributeValue(xpathIdTF, "value"); String actualName = assertAndGetAttributeValue(xpathNameTF, "value"); String actualBranch = getSelectTextBy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void validEditTest() {\n\t\tadminUserEdit.clickAdminLink();\r\n\t\tadminUserEdit.clickUserListLink();\r\n\t\tadminUserEdit.clickEditUserLink();\r\n\t\t\r\n\t\t// Assertion\r\n\t\tString Actual = adminUserEdit.Assertion();\r\n\t\tString Expected = \"Hari\";\r\n\t\tassertEquals(Actual, Expected);\r...
[ "0.6520432", "0.65013784", "0.64034545", "0.6351799", "0.6268184", "0.62460077", "0.61787903", "0.6173032", "0.6169989", "0.60546964", "0.6050475", "0.6036361", "0.59823066", "0.5974722", "0.58323973", "0.583164", "0.58286524", "0.57956004", "0.57928807", "0.57874554", "0.576...
0.70564103
0
This function is to assert Confirmation modal corresponding to staff's id.
public void assertDeleteConfirmationModalForStaff(int id) { waitForElementVisibility(xpathDeleteConfMsg); String actualMsg = assertAndGetAttributeValue(xpathDeleteConfMsg, "innerText"); logger.info("# Delete confirmation modal: " + actualMsg); String expetedMsg = CONFIRMATION_MSG.replace...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Then(\"^He should get a ticket confirmation$\")\n\tpublic void heShouldGetATicketConfirmation() throws Exception {\n\t\tdante.should(seeThat(FlySearchResult.displayed(),\n\t\t\t\thasItem(\"(Clic para ver el adjunto)\")));\n\t}", "public void testShowModalDialog() {\n System.out.println(\"showModalDialog\...
[ "0.5892561", "0.58862364", "0.57559484", "0.57202315", "0.570488", "0.5661978", "0.5612681", "0.55196", "0.55013096", "0.54961073", "0.5485267", "0.5439774", "0.5370626", "0.53497165", "0.53493077", "0.5332318", "0.53285134", "0.53279287", "0.5311669", "0.5237866", "0.5226979...
0.7904595
0
This function is to click on the Delete button on the Delete Confirmation modal.
public void deleteStaff(String action) { assertAndClick(xpathDeleteFormBtn.replace("*btn*", action)); waitForElementInvisibility(xpathDeleteFormBtn.replace("*btn*", action)); logger.info("# Clicked on '" + action + "' button on Delete confirmation modal"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clickOnDeleteButton() {\r\n\t\tsafeClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-btn.ant-btn-danger.ant-btn-circle\"), MEDIUMWAIT);\r\n\t}", "public void clickConfirmDeleteButton() {\n // GeneralUtilities.waitSomeSeconds(1);\n ...
[ "0.8201773", "0.7983248", "0.77470535", "0.75036794", "0.7374992", "0.7298952", "0.7263668", "0.70193607", "0.6998378", "0.69800675", "0.6893328", "0.6829489", "0.66862315", "0.6673335", "0.661929", "0.6599424", "0.65989363", "0.65970474", "0.6573842", "0.6553292", "0.6553081...
0.64011663
28
This function is to assert validation message for Staff's name field on Create or Edit form.
public void assertValidationMsg(String txt, String msg) { clickOnBtn(ActionsEnum.Create.name()); waitForElementVisibility(xpathFormHeading); String actual = assertAndGetAttributeValue(xpathFormHeading, "innerText"); assertEquals(actual, FORM_HEADING, "Actual heading '" + actu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testNameValid() {\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\"JANE\"));\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\"John\"));\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\"Mary\"));\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\" Kurisu\"));\r\n\t\tassertTrue(Activity5Query....
[ "0.66263485", "0.65617085", "0.6404713", "0.63903224", "0.63641125", "0.62437564", "0.62060153", "0.61909354", "0.6164648", "0.6161921", "0.61610657", "0.61590874", "0.61462104", "0.6143911", "0.6132892", "0.61027735", "0.60880446", "0.60830224", "0.60609704", "0.60583556", "...
0.6374701
4
This function is to get the staff row corresponding to given staff's id.
public Map<String, String> getStaffRowById(int id) { String rowIndex = String.valueOf(getRowIndexById(id)); String xpathRow = xpathTableCell.replace("*row*", rowIndex); mapStaff = new HashMap<String, String>(); mapStaff.put("ID", assertAndGetText(xpathRow.replace("*col*", "1"))); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Staff selectByPrimaryKey(Integer id) {\n\t\treturn staffMapper.selectByPrimaryKey(id);\n\t}", "private Staff findById(String id) throws Exception{\n if(StringUtils.isBlank(id) || StringUtils.equalsIgnoreCase(id, \"0\"))\n throw new Exception(\"Invalid staff id\");\n\n ...
[ "0.7639758", "0.71796715", "0.7084527", "0.7058009", "0.6740907", "0.6589868", "0.65558755", "0.6472172", "0.63806283", "0.6349593", "0.6314046", "0.6285282", "0.62512445", "0.62438935", "0.6224949", "0.619099", "0.61538464", "0.6110964", "0.6062434", "0.60245323", "0.5978591...
0.76929563
0
This function is to get the row index corresponding to staff's id.
public int getRowIndexById(int id) { String xpathRowsWithIdCell = xpathTableCell.replace("*col*", "1"); int rowIndex = 1; String xpath = xpathRowsWithIdCell.replace("*row*", String.valueOf(rowIndex)); while (isElementPresent(xpath)) { if (assertAndGetText(xpath).equals(Strin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getRowIndex(T obj) {\r\n\t\tlogger.trace(\"Enter getRowIndex\");\r\n\t\tlogger.trace(\"Exit getRowIndex\");\r\n\t\treturn data.indexOf(obj);\r\n\t}", "public int getIndexNumber(){\n return id;\r\n }", "int getRowId();", "int getRowId();", "int getRowId();", "int getRowId();", "int getRow...
[ "0.67887443", "0.6562203", "0.65397197", "0.65397197", "0.65397197", "0.65397197", "0.65397197", "0.64976305", "0.6486875", "0.645352", "0.6268333", "0.62600136", "0.61874455", "0.6169001", "0.616459", "0.61612755", "0.61524564", "0.61419815", "0.61015546", "0.60587317", "0.6...
0.6777741
1
This function is to fill the details on the Create or Edit Staff Form.
private void fillCreateOrEditForm(String name, String branch) { waitForElementVisibility(xpathFormHeading); String actual = assertAndGetAttributeValue(xpathFormHeading, "innerText"); assertEquals(actual, FORM_HEADING, "Actual heading '" + actual + "' should be same as expected headin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void fillCreateOrEditForm(String name, int branchId) {\n waitForElementVisibility(xpathFormHeading);\n String actual = assertAndGetAttributeValue(xpathFormHeading, \"innerText\");\n assertEquals(actual, FORM_HEADING,\n \"Actual heading '\" + actual + \"' should be same as ex...
[ "0.6525524", "0.65046424", "0.6333074", "0.6302612", "0.6243908", "0.60953456", "0.6085076", "0.60785246", "0.59988546", "0.59431404", "0.5934198", "0.5924593", "0.58925164", "0.58882296", "0.5876743", "0.5873368", "0.585362", "0.58328927", "0.58265644", "0.5807625", "0.58029...
0.64485884
2
This function is to fill the details on the Create or Edit Staff Form.
private void fillCreateOrEditForm(String name, int branchId) { waitForElementVisibility(xpathFormHeading); String actual = assertAndGetAttributeValue(xpathFormHeading, "innerText"); assertEquals(actual, FORM_HEADING, "Actual heading '" + actual + "' should be same as expected heading...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addContactDetails() {\n firstNameField.setText(contact.getFirstName());\n middleNameField.setText(contact.getMiddleName());\n lastNameField.setText(contact.getLastName());\n\n homePhoneField.setText(contact.getHomePhone());\n workPhoneField.setText(contact.getWorkPhon...
[ "0.65046424", "0.64485884", "0.6333074", "0.6302612", "0.6243908", "0.60953456", "0.6085076", "0.60785246", "0.59988546", "0.59431404", "0.5934198", "0.5924593", "0.58925164", "0.58882296", "0.5876743", "0.5873368", "0.585362", "0.58328927", "0.58265644", "0.5807625", "0.5802...
0.6525524
0
This function is to get the max Id on the Staff page.
public int getMaxId() { int count = driver.findElements(By.xpath(xpathTableRows)).size(); int maxID = -1; if (count > 0) { maxID = Integer.parseInt(assertAndGetText(xpathTableRows + "[" + count + "]//td[1]")); } return maxID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int getLastID() {\n\t\t\n\t\tArrayList<Integer> domandeIdList = new ArrayList<>();\n\t\tdomandeIdList.add(0);\n\t\tDB db = getDB();\n\t\tMap<Long, Domanda> domande = db.getTreeMap(\"domande\");\n\t\t\n\t\tfor(Map.Entry<Long, Domanda> domanda : domande.entrySet())\n\t\t\tif(domanda.getValue() instanceof Dom...
[ "0.70883423", "0.7047765", "0.69316536", "0.67871505", "0.66897035", "0.6602659", "0.6481553", "0.64153564", "0.6387265", "0.6362319", "0.6362085", "0.631231", "0.62269497", "0.62211", "0.61813766", "0.61376363", "0.6134027", "0.611131", "0.60939217", "0.6088839", "0.608476",...
0.67253935
4
This function is to click on the button based on button text.
private void clickOnBtn(String btnTxt) { waitForElementClickable(xpathBtn.replace("*btn*", btnTxt)); assertAndClick(xpathBtn.replace("*btn*", btnTxt)); logger.info("# Clicked on '" + btnTxt + "' button"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clickOnText(String text);", "public void clickOnSearchButton() {\n elementControl.clickElement(searchButton);\n }", "@And (\"^I click on \\\"([^\\\"]*)\\\"$\")\n\tpublic void click_on(String object){\n\t\tString result = selenium.clickButton(object);\n\t\tAssert.assertEquals(selenium.resu...
[ "0.71568173", "0.71494454", "0.70674926", "0.70347166", "0.6969011", "0.69350123", "0.6834227", "0.6833055", "0.68169415", "0.67661965", "0.67558086", "0.6745273", "0.672664", "0.6726343", "0.66963315", "0.66855526", "0.6639536", "0.66015196", "0.65924007", "0.65888965", "0.6...
0.7100262
2
This function is to assert that save button should be disabled.
public void assertSaveBtnDisable() { assertTrue(isElementPresent(xpathDisabledSaveBtn), "Save button should be disabled."); logger.info("# 'Save' button is disabled."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void enableSaveButton()\n {\n boilerplate.getSaveButton().setDisable(false);\n }", "@Test\n public void testifyBtn() throws InterruptedException {\n onView(withId(R.id.SaveButton)).check(matches(isDisplayed()));\n\n }", "void setSaveButtonEnabled(boolean isEnabled);", "public...
[ "0.691821", "0.666445", "0.6642705", "0.6615878", "0.65137464", "0.6484277", "0.64431536", "0.6439775", "0.6407644", "0.63424414", "0.63143706", "0.63054657", "0.6271561", "0.62560564", "0.624779", "0.6237211", "0.61363983", "0.61272144", "0.6101737", "0.60831934", "0.6079994...
0.8706264
0
This function is to search staffs on the Staff page.
public void searchStaff(String searchTxt) { assertAndType(xpathSearchTF, searchTxt); clickOnBtn(SEARCH_A_STAFF); logger.info("# Performed staff search for '" + searchTxt + "'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<StaffPojo> staffSearchByName(String sname) {\n\t\treturn staffDao.staffSearchByName(sname);\n\t}", "private static void searchStaffByName(){\n\t\tshowMessage(\"type the name you are looking for: \\n\");\n\t\tString name = getUserTextTyped();\n\t\tToScreen.listEmployee(EmployeeSearch.employee(employee...
[ "0.7275795", "0.6922622", "0.6900557", "0.6633207", "0.64860743", "0.6334683", "0.62601477", "0.6258119", "0.6217497", "0.6157502", "0.6151007", "0.6149501", "0.61415327", "0.6074678", "0.60650086", "0.6058798", "0.60269254", "0.6022068", "0.5996625", "0.5927888", "0.5910713"...
0.7108881
1
This function is to return list of all rows present on Staff page.
private List<List<String>> getAllRows() { List<List<String>> rowLst = new ArrayList<List<String>>(); int rowIndex = 1; String xpathRow = xpathTableRow.replace("*row*", String.valueOf(rowIndex)); while (isElementPresent(xpathRow) && isElementVisible(xpathRow)) { List<String> r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<StaffPojo> viewAllStaff() {\n\t\treturn staffDao.viewAllStaff();\n\t}", "@Override\n\tpublic List<Staff> FindAll() {\n\t\treturn sessionFactory.getCurrentSession()\n\t\t\t\t.createQuery(\"from Staff\")\n\t\t\t\t.list();\n\t}", "@GetMapping\n\tpublic List<UniversityStaffMember> viewAllStaffs() {\n\t...
[ "0.7224744", "0.7007723", "0.6970695", "0.6891952", "0.6700388", "0.663982", "0.6609283", "0.65989435", "0.6563515", "0.65630823", "0.6459788", "0.63388675", "0.632897", "0.62467533", "0.61869466", "0.61750895", "0.5983324", "0.59765637", "0.59378093", "0.5853829", "0.5848226...
0.0
-1
This function is to assert that search text or searched keyword is present in searched result.
public void assertSearchResult(String searchKeyword) { List<List<String>> rowLst = getAllRows(); assertTrue(rowLst.size() > 0, "Search is not performed."); boolean isPresent; for (List<String> row : rowLst) { isPresent = false; for (String col : row) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void VerifyTheSearchResult() {\n\t\tString searchString = \"The Choice\";\n\t\thomePage.search(searchString);\n\t\tString searchTitle = resultPage.getSearchResultTitle();\n\t\tAssert.assertTrue(searchTitle.contains(searchString));\n\t}", "@Test\n public void keywordSearchTest() throws Interrup...
[ "0.7470331", "0.7360747", "0.72711694", "0.7134648", "0.7106943", "0.69926393", "0.68057066", "0.66127527", "0.6535635", "0.6523841", "0.6480688", "0.64557934", "0.64218205", "0.6407722", "0.6348752", "0.6247387", "0.6207014", "0.61936283", "0.61476505", "0.614511", "0.613323...
0.74479926
1
This function is to assert that searched text is not present in the search result. Negation keyword search
public void assertSearchResultShouldNotContain(String searchKeyword) { List<List<String>> rowLst = getAllRows(); for (List<String> row : rowLst) { boolean isPresent = false; for (String col : row) { if (col.toLowerCase().contains(searchKeyword.toLowerCase())) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void assertTextNotPresent ( final String text ) {\r\n try {\r\n assertFalse( driver.getPageSource().contains( text ) );\r\n }\r\n catch ( final Exception e ) {\r\n fail();\r\n }\r\n }", "@Test \r\n public void shouldNotFindWordIntoTheDictionary() {\r\n...
[ "0.70002365", "0.6900305", "0.68370914", "0.6790943", "0.6693215", "0.6675539", "0.66210437", "0.6553022", "0.64277464", "0.64177686", "0.6299225", "0.6291308", "0.6163955", "0.6121244", "0.598097", "0.5972084", "0.58661246", "0.5814235", "0.57962763", "0.5750946", "0.5748914...
0.7153169
0
This function is to assert that searched keyword should be present atleast in one of the searched staffs
public void assertAtleatOneResultFound(String searchKeyword) { List<List<String>> rowLst = getAllRows(); boolean isPresent = false; for (List<String> row : rowLst) { for (String col : row) { if (col.toLowerCase().contains(searchKeyword.toLowerCase())) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void userExist() {\n String username = argument.substring(0, 15);\n boolean found = false;\n\n for(int i = 0; i<users.size(); i++){\n if(users.get(i).substring(0, 15).trim().toLowerCase().contains(username.trim().toLowerCase())){\n found = true;\n ...
[ "0.58702546", "0.58563906", "0.5830665", "0.5825671", "0.57707185", "0.5770509", "0.57471114", "0.5735521", "0.569609", "0.568474", "0.5640544", "0.5629266", "0.56222147", "0.5580717", "0.5569716", "0.54741675", "0.5441089", "0.543694", "0.5414147", "0.54104006", "0.54038346"...
0.56673425
10
Se genera el constructor de la clase e inicializa la variable _target
public ClickButtonAction() { _target = new TargetComponent(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TargetClass() {\n super();\n }", "protected ForContainerCreation(Class<?> target) {\n this.target = target;\n }", "public ConstructedObjectInput(AppContext c,Class<T> target){\n \tthis(c,target,c.getClassMap(target));\n }", "public Target()\n\t{\n\t\tx = 2.0;\...
[ "0.8060281", "0.74505204", "0.72758156", "0.6936934", "0.67218137", "0.67218137", "0.66944426", "0.63604206", "0.6332866", "0.6308902", "0.62424994", "0.62336993", "0.6208373", "0.61978346", "0.6162484", "0.6134538", "0.6125266", "0.6091297", "0.60903096", "0.6087108", "0.608...
0.60948825
17
Se genera el metodo encargado de ejecutar la tarea dar click
@Override public Task Execute(IParam params) { GeneralParams param = (GeneralParams)params; return Task.where(param.where, Click.on(_target.Execute(params))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"vai ficar clikando ai a toa? PATETA\");\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void EjecutaGui() {\n\t\tSystem.out.println(\"Ejecucion en ventana del ejercicio 2 del grupo 3\");\n\t}", "@Override\n\tprotected void OnClic...
[ "0.6472971", "0.6217208", "0.618606", "0.6125002", "0.61079127", "0.6085084", "0.60850537", "0.60807776", "0.6079841", "0.60478574", "0.6042949", "0.6038992", "0.6034965", "0.6014732", "0.601445", "0.6003733", "0.5994961", "0.5993557", "0.5968081", "0.59655136", "0.596237", ...
0.0
-1
Create an entity for this test. This is a static method, as tests for other entities might also need it, if they test an entity which requires the current entity.
public static SalesJaniCalc createEntity(EntityManager em) { SalesJaniCalc salesJaniCalc = new SalesJaniCalc() .mablaghJani(DEFAULT_MABLAGH_JANI) .mablaghMaliEjbari(DEFAULT_MABLAGH_MALI_EJBARI) .tedadRooz(DEFAULT_TEDAD_ROOZ) .tarikhShoroFaaliat(DEFAULT_TARIKH_SHOR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Entity createEntity();", "T createEntity();", "protected abstract ENTITY createEntity();", "void create(E entity);", "void create(T entity);", "E create(E entity);", "E create(E entity);", "protected abstract EntityBase createEntity() throws Exception;", "TestEntity buildEntity () {\n TestEn...
[ "0.77237844", "0.75048935", "0.7488585", "0.736279", "0.73147863", "0.71573627", "0.71573627", "0.715141", "0.7148617", "0.7077601", "0.7016931", "0.6804163", "0.6752578", "0.6741185", "0.6741185", "0.6711834", "0.6682166", "0.6668473", "0.66409945", "0.6625449", "0.66251147"...
0.0
-1
Executes the search, and checks that the default entity is returned
private void defaultSalesJaniCalcShouldBeFound(String filter) throws Exception { restSalesJaniCalcMockMvc.perform(get("/api/sales-jani-calcs?sort=id,desc&" + filter)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public boolean performSearch();", "private void executeSearch() {\n if (!view.getSearchContent().getText().isEmpty()) {\n SearchModuleDataHolder filter = SearchModuleDataHolder.getSearchModuleDataHolder();\n //set search content text for full text search\n filter....
[ "0.62747425", "0.62287664", "0.602412", "0.59602237", "0.58934677", "0.5878962", "0.583616", "0.58002096", "0.5778839", "0.5778574", "0.5762508", "0.5760238", "0.574392", "0.5743293", "0.57001936", "0.56943953", "0.56920964", "0.5657031", "0.5645491", "0.5643414", "0.56392866...
0.0
-1
Executes the search, and checks that the default entity is not returned
private void defaultSalesJaniCalcShouldNotBeFound(String filter) throws Exception { restSalesJaniCalcMockMvc.perform(get("/api/sales-jani-calcs?sort=id,desc&" + filter)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public boolean performSearch();", "private void executeSearch() {\n if (!view.getSearchContent().getText().isEmpty()) {\n SearchModuleDataHolder filter = SearchModuleDataHolder.getSearchModuleDataHolder();\n //set search content text for full text search\n filter....
[ "0.62589395", "0.6218506", "0.6082156", "0.5994531", "0.59762806", "0.59283507", "0.59174293", "0.58518654", "0.5797316", "0.5794766", "0.5779155", "0.57745475", "0.5763264", "0.5742193", "0.57290816", "0.5713039", "0.56897426", "0.5649169", "0.56415546", "0.55876696", "0.557...
0.0
-1
TODO Autogenerated method stub
public static void addActionListener(Compile compile) { }
{ "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
byte[] bytes = getClass().getResourceAsStream("/fifa18.png").readAllBytes();
public byte[] getImage(String file) throws Exception{ byte[] bytes = getClass().getResourceAsStream(file).readAllBytes(); return bytes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static byte[] readResource(String name) throws IOException {\n byte[] buf = new byte[1024];\n\n InputStream in = Main.class.getResourceAsStream(name);\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n int n;\n while ((n = in.read(buf)) > 0) {\n bout.write(buf, 0, n);\n ...
[ "0.74399567", "0.66437507", "0.6337318", "0.6259473", "0.6207971", "0.6157633", "0.61526364", "0.61414284", "0.61145484", "0.6085173", "0.6080399", "0.6080254", "0.6064101", "0.60600996", "0.6016598", "0.6002317", "0.5992501", "0.5989434", "0.59884495", "0.5905609", "0.590498...
0.7301524
1
Listener per icone del NavigationView
private void setNavigationViewActionListener() { navigationView.setNavigationItemSelectedListener( item -> { Runnable r = HomeController.getHomeControllerInstance().getNavigationViewOnOptionsItemSelected(this, item.getItemId()); try { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onNaviViewLoaded() {\n\t\t\n\t}", "private void implementListener() {\n binding.nvView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) ...
[ "0.7721537", "0.74908024", "0.68085223", "0.67793614", "0.6751021", "0.6692963", "0.6604967", "0.6576125", "0.6570137", "0.65465826", "0.64870995", "0.6480047", "0.6475948", "0.6475948", "0.6467237", "0.64194983", "0.6386278", "0.63761544", "0.63709", "0.6347544", "0.6347276"...
0.72590876
2
Listener per icone della toolbar
@Override public boolean onOptionsItemSelected(@NonNull MenuItem item) { Runnable onOptionsItemSelected = settingsController.getOnOptionsItemSelected(item.getItemId()); try { onOptionsItemSelected.run(); return false; }catch(NullPointerException e) { Utili...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface OnToolBarListener {\n\n public void onToolBarActionStart();\n\n public void onToolBarStateChanged(boolean visible);\n\n public void onToolBarActionEnd();\n}", "@Override\n public void setToolbar(MToolBar arg0)\n {\n \n }", "public void toolbarImplementacionIsmael() {\n...
[ "0.7827643", "0.7529672", "0.7496069", "0.72174966", "0.7105174", "0.6880561", "0.6815782", "0.67450327", "0.6727445", "0.6722214", "0.6672408", "0.6645781", "0.66390055", "0.66367334", "0.6607724", "0.65997875", "0.6541169", "0.65286225", "0.65272313", "0.65074235", "0.65021...
0.0
-1
Before using and getting results from vision, we need to start the visionControl. It is possible to leave the vision control operating continuously if wanted, or to make it run only at specific times. This choice would depend on several things, but regardless it's important to make sure vision control is running.
@Override public void initialize(ActionControl control) { mVisionControl.start(); // We can set different options to vision control, which allow to configure the operation // of vision. It is possible that the actual code which is running the vision will completely ignore // the opt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void start() {\r\n vcr().start();\t\r\n }", "public void startTracking()\n\t{\t\n\t\tProcessBuilder starterProcess = new ProcessBuilder(\"ssh\", \n\t\t\t\t\t\t\t\t\t\t\"pi@\" + RASPBERRY_PI_LOCATION,\n\t\t\t\t\t\t\t\t\t\t\"\\\"sudo /home/pi/code/stop_vision.sh && /home/pi/code/start_vision.sh \" + \n\...
[ "0.6492931", "0.6388566", "0.6266141", "0.62302756", "0.62110585", "0.62046826", "0.6175667", "0.6168639", "0.615682", "0.6139256", "0.61206806", "0.61167276", "0.6106159", "0.60845953", "0.6045557", "0.60438555", "0.6039404", "0.6031625", "0.60122716", "0.5995333", "0.599413...
0.593637
29
Now that the vision is running and configured, we can query it for results. However, the vision code could take some time to analyze results, and thus we may not always have results. In addition, we might want to use each result only once, which is way we clear the result using the parameter, which means an additional ...
@Override public void execute(ActionControl control) { Optional<VisionResult> optional = mVisionControl.getLatestResult(true); // We need to handle two cases now: we have a new result, or we don't. if (optional.isPresent()) { // if we have a new result, we can get an Analysis obj...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<GameResult> getAllResults();", "SearchResult getBestResult(List<SearchResult> results, SearchQuery query);", "@Test\n\tvoid getResultsTest() {\n\t\tassertEquals(22, utilities.getResults(-21));\n\t\tassertEquals(20, utilities.getResults(-20));\n\t\tassertEquals(40, utilities.getResults(-19));\n\t\tassertEq...
[ "0.59206736", "0.5784467", "0.56334877", "0.5631158", "0.55077255", "0.5479337", "0.54742837", "0.54712194", "0.54636234", "0.5414579", "0.54108346", "0.5294776", "0.5290727", "0.5272359", "0.5263507", "0.5255377", "0.5233431", "0.518487", "0.51839834", "0.51832926", "0.51715...
0.5266232
14
in here we need to determine when to stop the action. This usually depends on the vision, and is up to the specific situation.
@Override public boolean isFinished() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void finalAction(){\n Robot.stop();\n requestOpModeStop();\n }", "boolean shouldStop();", "StopAction createStopAction();", "public void stop(boolean returnAction) {\n if(threadSound != null)threadSound.interrupt();\n selectedWord = null;\n if (!dataGame.isTrai...
[ "0.7191204", "0.6772933", "0.654733", "0.6449016", "0.639687", "0.6387902", "0.63260245", "0.6305087", "0.6251389", "0.6242758", "0.62226367", "0.6217687", "0.6180873", "0.6173065", "0.61652696", "0.6163463", "0.6162337", "0.61463803", "0.6144429", "0.61434937", "0.6138687", ...
0.0
-1
since we started the vision in initialize, we need to stop it here. we can also modify the options as a deinitialization.
@Override public void end(FinishReason reason) { mVisionControl.stop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void initialize() {\n \tRobot.conveyor.stop();\n }", "protected void initialize() {\n \tthis.running= false;\n }", "@Override\n protected void initialize() {\n arm.getElbow().enableCoastMode();\n arm.getElbow().stop();\n arm.getWrist().enableCoastMode();\n arm.getWrist().stop...
[ "0.6270502", "0.61714774", "0.606971", "0.5971248", "0.5955609", "0.5869331", "0.58129275", "0.5762662", "0.5724607", "0.5723435", "0.57144284", "0.57127553", "0.5675303", "0.56351185", "0.56283754", "0.5605567", "0.5586696", "0.5566056", "0.55602056", "0.5558152", "0.5557020...
0.54573154
35
///////////////////////////////////////////////////////////////// // public methods ////
public static void main(String args[]) throws DuplicateNMRRequestException { // Constants... final String vendor = "xilinx"; final String family = "virtex2"; final String part = "XC2V8000FF1517"; // *** Comment out the above name and // use the following part if you ...
{ "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\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public v...
[ "0.65948933", "0.6475392", "0.63615495", "0.632693", "0.62893796", "0.62046444", "0.6188225", "0.6075393", "0.6058208", "0.6040633", "0.6040633", "0.60404086", "0.60386187", "0.60386187", "0.6020168", "0.60170305", "0.6006618", "0.6004605", "0.59884095", "0.59869736", "0.5976...
0.0
-1
///////////////////////////////////////////////////////////////// // protected methods ////
protected void _init(EdifCell cell, int maxLUTs, int maxFFs, int maxBlockRAMs, int maxMult, int maxDCM, int maxIO) throws OverutilizationEstimatedStopException, OverutilizationHardStopException, IllegalArgumentException { // !!! Ordering matters, the super call to _init should be last !!! ad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override...
[ "0.68144447", "0.6787026", "0.67088044", "0.6616515", "0.65669245", "0.65584975", "0.64969265", "0.642418", "0.6404177", "0.63160753", "0.62508935", "0.6239731", "0.62272894", "0.6196991", "0.6192827", "0.6192827", "0.61916935", "0.6190131", "0.61769617", "0.6166845", "0.6166...
0.0
-1
If only use onNext(), could use Consumer to replace the completed implementation of FlowableSubscriber
@Test public void simplifiedFlowableDemo() { StringBuilder sb = new StringBuilder(); Flowable<String> flowable = Flowable.create(new FlowableOnSubscribe<String>() { @Override public void subscribe(FlowableEmitter<String> flowableEmitter) throws Exception { fl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Flow.Subscriber<T> subscriber();", "public abstract void onNext();", "public interface SubscriberOnNextListener<T> {\n void onNext(T t);\n}", "@Override\n public void onNext(final T value) {\n innerHandler.onNext(value);\n idlenessSource.check();\n }", "@Override\n public void...
[ "0.6538536", "0.64861494", "0.6426278", "0.62150997", "0.6209898", "0.6100831", "0.5992279", "0.59386677", "0.5854315", "0.57946813", "0.5777331", "0.57459426", "0.5737318", "0.57123536", "0.57104194", "0.57006466", "0.56958014", "0.56809044", "0.56804836", "0.5678352", "0.56...
0.56888694
17
Constructor for the class
public Parser( String fileName, Hash<String> movieTable, Hash<String> reviewerTable, SparseMatrix matrix) { this.inputFile = fileName; this.movieTable = movieTable; this.reviewerTable = reviewerTable; this.matrix = matrix; }
{ "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 }", "public PSRelation()\n {\n }", "public _355() {\n\n }", "public Pitonyak_09_02() {\r\n }", "private Instantiation(){}", "public Chick() {\n\t}", "public CSSTidier() {\n\t}", "public Chauf...
[ "0.8684979", "0.83157516", "0.7531155", "0.7512286", "0.7384737", "0.7306363", "0.72895694", "0.7229921", "0.71888965", "0.7186963", "0.7162534", "0.7162355", "0.71531713", "0.71493727", "0.7139213", "0.7135244", "0.71339834", "0.713029", "0.7116769", "0.70741767", "0.7068038...
0.0
-1
parses the file and decides which method to call to store the information in the hash tables and/or sparse matrix
public void parseFile() { File file = new File(inputFile); try { Scanner scan = new Scanner(file); while (scan.hasNextLine()) { String line = scan.nextLine(); line = line.replaceAll("\\s+", " ").trim(); if (line.isEmpty()) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws IOException{\n\r\n\t\tjava.io.FileReader fr = new FileReader(args[0]);\r\n\t\tBufferedReader reader = new BufferedReader(fr);\r\n\t\tString method = \"arg1\";\r\n\t\tString method2 = \"arg2\";\r\n\t\t\r\n\t\t//read method\r\n\t\tif(args.length >2){\r\n\t\t\tmethod = ar...
[ "0.58024013", "0.5726659", "0.5581044", "0.55556613", "0.5521982", "0.55085397", "0.5488091", "0.54857934", "0.5457352", "0.5454117", "0.5451734", "0.54082817", "0.5392376", "0.53864604", "0.5376953", "0.5338905", "0.5335901", "0.5331296", "0.5322104", "0.5320802", "0.5289665...
0.5322572
18
This decides where to add the fields
public void add(String[] fields) { // 0->reviewer, 1->Movie, 2->rating if (Integer.parseInt(fields[2]) < 1 || Integer.parseInt( fields[2]) > 10) { System.out.println("Bad score |" + fields[2] + "|. Scores must be between 1 and 10."); return; }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setupFields()\n {\n FieldInfo field = null;\n field = new FieldInfo(this, \"ID\", Constants.DEFAULT_FIELD_LENGTH, null, null);\n field.setDataClass(Integer.class);\n field.setHidden(true);\n field = new FieldInfo(this, \"LastChanged\", Constants.DEFAULT_FIELD_LENGT...
[ "0.67543054", "0.6711566", "0.64935386", "0.64738524", "0.64183533", "0.6272493", "0.6248808", "0.6194286", "0.61548483", "0.61099136", "0.6101098", "0.6062876", "0.60038304", "0.5963505", "0.5961629", "0.59362155", "0.59164476", "0.5830117", "0.5798028", "0.5787094", "0.5779...
0.0
-1
This chooses which table and matrix to delete from
public void delete(String tableName, String name) { boolean delete; if (tableName.equals("reviewer")) { tableName = tableName.substring(0, 1).toUpperCase() + tableName .substring(1); delete = reviewerTable.delete(name, tableName); if (delete) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void toDelete() {\n if(toCount()==0)\n {\n JOptionPane.showMessageDialog(rootPane,\"No paint detail has been currently added\");\n }\n else\n {\n String[] choices={\"Delete First Row\",\"Delete Last Row\",\"Delete With Index\"};\n int opti...
[ "0.63384265", "0.6193763", "0.61930186", "0.61404", "0.61068726", "0.6017905", "0.5983335", "0.59827137", "0.5942993", "0.5932235", "0.5908093", "0.5879147", "0.58290035", "0.58157885", "0.5814763", "0.5780957", "0.57685554", "0.5765194", "0.57641244", "0.5753603", "0.5751438...
0.62205815
1
This chooses which table to print
public void print(String tableName, String name) { if (name.equals("reviewer")) { System.out.println("Reviewers:"); reviewerTable.printTable(); } else { // then it is the movie System.out.println("Movies:"); movieTable.printTable(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void printTable(String type){\n\t\tSystem.out.println(\"\\n\\t\\t\\t\\t \" + type + \" Probing Analysis (Table size = \" + tableSize + \")\");\n\t\tSystem.out.println(\"\\t\\t ----- Inserts ------ ----------- Probes ---------- --------- Clusters ---------\");\n\t\tSystem.out.printf(\"%5s %10s %10s ...
[ "0.7095318", "0.70271736", "0.7003852", "0.69064003", "0.6876714", "0.6847819", "0.6826254", "0.6755751", "0.67500705", "0.6680367", "0.66717166", "0.66628754", "0.6650262", "0.663988", "0.66234386", "0.65732545", "0.6551911", "0.6538181", "0.65064335", "0.6489565", "0.648233...
0.7202132
0
Prints the ratings that are in the sparse matrix
public void printRatings() { // print the ratings // get the sparse matrix class // get the movie singly linked list // to string on each entry of the lists // Print out the reviewers and their count first ReviewerList rL = matrix.getReviewers(); MSLList mL = matr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printSparse(){\n\t\tint NonZero=0;\n\t\tfor(int i=0;i<row;i++) {\n\t\t\tfor(int j=0;j<col;j++) {\n\t\t\t\tSystem.out.print(matrix[i][j]+\"\\t\");\n\t\t\t\tif(matrix[i][j]!=0) {\n\t\t\t\t\tNonZero++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tnumNonZero=NonZero;\n\t}", "public...
[ "0.72182035", "0.67134315", "0.6674304", "0.63318765", "0.6320872", "0.60553336", "0.6017062", "0.6007887", "0.5919233", "0.5884451", "0.5878987", "0.58359605", "0.58145934", "0.5752901", "0.5703727", "0.56973714", "0.5581071", "0.55805665", "0.55769086", "0.55730575", "0.556...
0.74298435
0
This chooses which table to list the movies or reviews from
public void list(String tableName, String name) { if (tableName.equals("reviewer")) { // make sure the name exists in the table // if the return is null or a tombstone then it does not exist int val = reviewerTable.search(name); if (reviewerTable.getHashTable()[va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print(String tableName, String name) {\n if (name.equals(\"reviewer\")) {\n System.out.println(\"Reviewers:\");\n reviewerTable.printTable();\n }\n else { // then it is the movie\n System.out.println(\"Movies:\");\n movieTable.printTable(...
[ "0.605967", "0.5475531", "0.54391354", "0.5394254", "0.5380521", "0.5357537", "0.5340776", "0.53122735", "0.52724046", "0.524262", "0.5225694", "0.5194167", "0.5183032", "0.5154712", "0.51298714", "0.51173115", "0.51103526", "0.50918615", "0.50826925", "0.5079184", "0.5065384...
0.6096436
0
This chooses which table to list closest movie or reviewer similar
public void similar(String tableName, String name) { String simName = null; float score = 11; float val = 0; int simCount = 0; if (tableName.equals("reviewer")) { if (matrix.getReviewers().contains(name) != null) { // Node with the reference to the lis...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void list(String tableName, String name) {\n if (tableName.equals(\"reviewer\")) {\n // make sure the name exists in the table\n // if the return is null or a tombstone then it does not exist\n int val = reviewerTable.search(name);\n if (reviewerTable.getHa...
[ "0.5684668", "0.5664923", "0.56049794", "0.51965714", "0.5116956", "0.5104782", "0.5082653", "0.50704175", "0.5066733", "0.5025459", "0.4986848", "0.49379414", "0.48770547", "0.4830466", "0.48287237", "0.4804085", "0.47794166", "0.47758785", "0.4769953", "0.47666648", "0.4747...
0.6754435
0
Splits the string without the command into a String Array
public String[] split(String lineWithoutCmd) { String[] fields = new String[2]; // position of the first space int pos = lineWithoutCmd.indexOf(" "); // The name of the hashTable String tableName = lineWithoutCmd.substring(0, pos); // The name of the movie or reviewer ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String[] splitCommand(String command) {\n java.util.List<String> matchList = new java.util.ArrayList<>();\n\n Pattern regex = Pattern.compile(\"[^\\\\s\\\"']+|\\\"([^\\\"]*)\\\"|'([^']*)'\");\n Matcher regexMatcher = regex.matcher(command);\n while (regexMatcher.find()) {\...
[ "0.6883944", "0.6641889", "0.64672613", "0.6359679", "0.63135886", "0.6294272", "0.6251741", "0.6208367", "0.61419463", "0.61151403", "0.61027604", "0.610249", "0.610146", "0.609363", "0.6084161", "0.60604835", "0.60521305", "0.6013222", "0.5995275", "0.5908122", "0.59068274"...
0.56939125
37
Question 1: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. Note: A leaf is a node with no children. <a href="
public static int maxDepth(TreeNode root) { if (root == null) { return 0; } return 1 + Math.max(maxDepth(root.left), maxDepth(root.right)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int maxDepth();", "int getMax_depth();", "@Override\n\tpublic int height() {\n\t\tif (this.valCount == 0) { // if empty leaf\n\t\t\treturn 0;\n\t\t}\n\t\tint max = 1; \n\t\tfor (int i = 0; i < childCount; ++i) { // finds longest route among children\n\t\t\tmax = Math.max(max, children[i].height() + 1);\n\t\t}\...
[ "0.796388", "0.7664488", "0.71615696", "0.7150787", "0.71318793", "0.710841", "0.70947117", "0.7031649", "0.69854254", "0.6963577", "0.6947917", "0.69309366", "0.69153076", "0.6903907", "0.688269", "0.6876561", "0.68259704", "0.6796992", "0.67957324", "0.6795363", "0.67901003...
0.65179664
49
Question 2: Given a binary tree, determine if it is heightbalanced. For this problem, a heightbalanced binary tree is defined as: a binary tree in which the depth of the two subtrees of every node never differ by more than 1. <a href = " Method 1 of Question 2: [I am using the maxDepth method above]
public boolean isBalanced(TreeNode root) { //base case: if (root == null) { return true; } else if (Math.abs(maxDepth(root.right) - maxDepth(root.left)) > 1) { return false; } return isBalanced(root.left) && isBalanced(root.right); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int checkHeight(Node root){\n\t\tif(root == null)\n\t\t\treturn 0;\n\t\tif(root.left == null && root.right == null)\n\t\t\treturn 1;\n\t\tint leftH = checkHeight(root.left);\n\t\tif(leftH == Integer.MIN_VALUE) //left subtree not balanced\n\t\t\treturn Integer.MIN_VALUE;\n\t\tint rightH = checkHeight(root.ri...
[ "0.70995593", "0.70922", "0.68579704", "0.68021286", "0.67899114", "0.6730185", "0.67245555", "0.67049927", "0.66818273", "0.6610974", "0.65776616", "0.6577211", "0.6556271", "0.65562654", "0.6548483", "0.65431505", "0.65399647", "0.6539095", "0.65381056", "0.6503218", "0.646...
0.617392
43
Method 2 of Question 2: [from bottom to up, if a node satisfy the requirement, then simply "disappear" it and consider it's parent] ^^^ Important: there is a super hard to think case in this implementation, which corresponds to tree2 and tree3, which we should consider to always return 1 when left == 1 || right == 1
public boolean isBalanced2(TreeNode root) { return checkBalance(root) != -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private IAVLNode findSuccessor(IAVLNode node) \r\n\t {\r\n\t\t if(node.getRight().getHeight() != -1) \r\n\t\t\t return minPointer(node.getRight());\r\n\t\t IAVLNode parent = node.getParent();\r\n\t\t while(parent.getHeight() != -1 && node == parent.getRight())\r\n\t\t {\r\n\t\t\t node = parent;\r\n\t...
[ "0.60396385", "0.60282964", "0.59549886", "0.59470344", "0.5929041", "0.5881228", "0.58704805", "0.5831419", "0.58075243", "0.58030146", "0.57874364", "0.57837915", "0.5773333", "0.57644385", "0.57363176", "0.567833", "0.56563234", "0.5635917", "0.56310904", "0.56310904", "0....
0.0
-1
Question 3: Diameter of Binary Tree Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the root. Example: TREE = [1, 2, 3, 4, 5] Return 3, which is the len...
public int diameter(TreeNode root) { if (root == null) { return 0; } diameter(root.left); diameter(root.right); int leftH = maxDepth(root.left); int rightH = maxDepth(root.right); cacheD = Math.max(cacheD, leftH + rightH); return cacheD; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int[] diameterOfBinaryTree(Node node) {\n\n if (node.left == null && node.right == null) {\n return new int[]{1, 1};\n }\n\n int[] left = {0, 0};\n int[] right = {0, 0};\n\n if (node.left != null)\n left = diameterOfBinaryTree(node.left);\n\n ...
[ "0.6939645", "0.6825121", "0.6787434", "0.6785547", "0.6697764", "0.6617622", "0.6600313", "0.65899205", "0.6559915", "0.6532196", "0.6423342", "0.64022285", "0.639164", "0.63834673", "0.6380965", "0.63644403", "0.6362598", "0.6360202", "0.635288", "0.63322145", "0.63317895",...
0.7320134
0
BEGIN: Added by zhanghongxing at 20130109 for full preview
public static String initialVideoQuality(Context context, int currentCameraId) { int backCameraId = CameraHolder.instance().getBackCameraId(); String defaultStr = null; if (currentCameraId == backCameraId) { // defaultStr = context.getString(R.string.pref_back_video_quality_default); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void show4() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true;...
[ "0.5810648", "0.5795296", "0.57892185", "0.57589626", "0.57398736", "0.56720537", "0.5667089", "0.5651319", "0.5626834", "0.5626373", "0.5596035", "0.55824715", "0.5577117", "0.55719155", "0.55716455", "0.55661833", "0.55661833", "0.55661833", "0.55661833", "0.55661833", "0.5...
0.0
-1
END: Added by zhanghongxing at 20130109 BEGIN: Added by zhanghongxing at 20130410
public String initialVideoQuality() { int backCameraId = CameraHolder.instance().getBackCameraId(); String defaultStr = null; if (mCameraId == backCameraId) { // defaultStr = mContext.getString(R.string.pref_back_video_quality_default); defaultStr = SystemProperties.get(BA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "private void kk12() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "public void mo38117a() {\n }", "private void m50366E() {\n }", "public void method_4270() {}", "public void mo4359a() {\n }", "public final voi...
[ "0.60856426", "0.6040467", "0.5917225", "0.5910467", "0.5860383", "0.5854304", "0.5828831", "0.5789919", "0.57702047", "0.5723163", "0.56806046", "0.56771356", "0.56692713", "0.56692713", "0.56692713", "0.56692713", "0.56692713", "0.56692713", "0.56692713", "0.56631166", "0.5...
0.0
-1
END: Added by zhanghongxing at 20130410
public static void initialCameraPictureSize( Context context, Parameters parameters, int currentCameraId) { // When launching the camera app first time, we will set the picture // size to the first one in the list defined in "arrays.xml" and is also // supported by the driver. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private void kk12() {\n\n\t}", "private void strin() {\n\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "protected boolean func_70814_o(...
[ "0.6020223", "0.59031326", "0.58782667", "0.5822086", "0.5766079", "0.57604635", "0.5733331", "0.57191753", "0.5669558", "0.56587505", "0.56453997", "0.56349295", "0.56270885", "0.56269544", "0.56269544", "0.5623402", "0.5601934", "0.5601235", "0.5596461", "0.55774516", "0.55...
0.0
-1