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
There is actually a bit more logic in the call stack from EchoBean4_nh7k_EchoRemoteImpl.echo() to EchoBean4_nh7k_Intf.echo()
public String echo1(String s) { return "intf1<" + intf1.echo(s) + ">"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic String echo() throws RemoteException {\n\t\treturn \"Hola\";\r\n\t}", "protected void echo(String msg){\n\tSystem.out.println(\"*ECHO*: \" + msg);\n }", "@Override\n\tpublic String echo(String s) throws RemoteException {\n\t\tSystem.out.println(\"Replied to some client saying ’\" + s +...
[ "0.665768", "0.6296855", "0.6012944", "0.59328425", "0.5793197", "0.57263964", "0.569711", "0.5660602", "0.5655251", "0.5652374", "0.56112176", "0.5589723", "0.55848855", "0.5544976", "0.5528993", "0.55181473", "0.5516831", "0.5507122", "0.5503503", "0.5502521", "0.5499119", ...
0.5618884
10
Created by yilei on 2015/9/23.
public interface ICardService { /** * 查询帖子 * @param params {"bbsid": 1, "housename": "test"} * @return * @throws Exception */ String search(String params) throws Exception; /** * 创建帖子 * @param params {'bbsId':1,'customerId':1,'content':'test','lon':'1.1','lat':...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r...
[ "0.6239814", "0.6140246", "0.6107143", "0.60851586", "0.60480684", "0.60480684", "0.600316", "0.60022765", "0.59850746", "0.5950542", "0.5930202", "0.5892679", "0.5889285", "0.58643305", "0.5859562", "0.5821791", "0.5821791", "0.581955", "0.5818806", "0.5807187", "0.5798472",...
0.0
-1
Visit your dashboard button
public WebElement profileSetUpTab() { return getElementfluent(By.xpath("//menuitem[contains(text(),'Profile')]")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clickDashboardLink() {\n this.action.click(this.dashboardLink);\n }", "public void click_dashboardMenu_button() {\n\t\tdashboardMenu.click();\n\t}", "@Given(\"^user launch on dashboard page$\")\r\n\tpublic void user_launch_on_dashboard_page() {\r\n\t\tdashboarpage.validatelandedondashboar...
[ "0.70393556", "0.68169373", "0.6717565", "0.65754086", "0.6525168", "0.63881475", "0.6377315", "0.6305948", "0.6294007", "0.6267224", "0.6260201", "0.6187375", "0.6170563", "0.6153785", "0.6152076", "0.6150922", "0.6135911", "0.61311257", "0.612712", "0.6115183", "0.61143684"...
0.0
-1
Email Prefrences Name Tab
public WebElement prEmailPrefrencesTab() { return getElementfluent(By.xpath("//menuitem[@ui-sref='practitioner-page.settings.notification']")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String changeEmailTitle() {\n return \"Changing email\";\n }", "public String getLoginNameLabel(){\n\t \treturn \"Email\";\n\t }", "protected String getSubflowName() {\n\t\treturn(\"ExtratoEmail\");\n\t}", "private void displayEmailFields() {\n FieldRelatedLabel emailLabel = new...
[ "0.7037473", "0.67023146", "0.62078506", "0.59554803", "0.5946091", "0.5894431", "0.5828474", "0.5786491", "0.578157", "0.5775662", "0.5734068", "0.5734068", "0.5734068", "0.5734068", "0.5734068", "0.5734068", "0.572067", "0.5683154", "0.5683154", "0.5683154", "0.5683154", ...
0.67228943
1
Used for starting the appium server
@BeforeClass public static void startApp() throws MalformedURLException { DesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability("platformName", "Android"); caps.setCapability("platformVersion", "5.0.1"); //Replace this with your Android version caps.setCapability("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void appiumStart() throws IOException, InterruptedException {\n // Execute command string to start appium server.\n p = Runtime.getRuntime().exec(cmd);\n // Provide wait time of 10 mins to start appium server properly.\n // If face any error(Could not start a new session...) then Increase\n // this tim...
[ "0.8269493", "0.7974706", "0.7836668", "0.75946224", "0.7484762", "0.73977244", "0.73634607", "0.70939416", "0.6969183", "0.6858095", "0.6782031", "0.6732976", "0.66703475", "0.6655076", "0.65852344", "0.6569516", "0.655524", "0.65018994", "0.64302653", "0.64261657", "0.63971...
0.6821128
10
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); checkCameraHardware(this); // Create an instance of Camera mCamera = getCameraInstance(); // Create our Preview view and set it as the content...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n\tpublic void onActivit...
[ "0.79177165", "0.77268666", "0.7693204", "0.7693204", "0.7693204", "0.7693204", "0.7693204", "0.7693204", "0.7637164", "0.7637164", "0.76318395", "0.7618896", "0.7618896", "0.75437796", "0.7539822", "0.7539822", "0.7539348", "0.75277805", "0.751581", "0.7510227", "0.7501691",...
0.0
-1
Check if this device has a camera
private boolean checkCameraHardware(Context context) { if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){ // this device has a camera Log.d(TAG, "this device has a camera"); return true; } else { // no camera on this device Log.d(TAG,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasCamera() {\n return mCamera != null;\n }", "private boolean hasCamera(){\n return getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY);\n }", "public boolean isCameraAvailable() {\n PackageManager pm = getPackageManager();\n return pm.hasSy...
[ "0.8600112", "0.8326611", "0.8325459", "0.8288591", "0.8220694", "0.81377023", "0.8099893", "0.80980945", "0.808999", "0.808999", "0.808999", "0.80879354", "0.80879354", "0.79174197", "0.7877548", "0.77367604", "0.7659969", "0.7573261", "0.7494029", "0.73202467", "0.73148435"...
0.7963538
13
A safe way to get an instance of the Camera object.
public static Camera getCameraInstance(){ Camera c = null; try { Log.d(TAG, "not null"); c = Camera.open(); // attempt to get a Camera instance } catch (Exception e){ // Camera is not available (in use or does not exist) } return c; // returns null if camera is unav...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Camera getCameraInstance() {\n Camera c = null;\n try {\n c = Camera.open();\n } catch (Exception e) {\n }\n return c;\n }", "public static Camera getCameraInstance(){\n Camera c = null;\n try {\n c = Camera.open(); // attemp...
[ "0.85450673", "0.8514192", "0.8514192", "0.83277494", "0.8294624", "0.81536394", "0.8127338", "0.8080977", "0.79592746", "0.7865764", "0.7843701", "0.77520376", "0.7748867", "0.7747095", "0.76896906", "0.7609955", "0.75838536", "0.74856555", "0.7423294", "0.7361571", "0.73578...
0.8601536
0
Create a file Uri for saving an image or video
private static Uri getOutputMediaFileUri(int type){ return Uri.fromFile(getOutputMediaFile(type)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Uri createImageUri() {\n \t\tUri imageFileUri;\n \t\tString folder = Environment.getExternalStorageDirectory()\n \t\t\t\t.getAbsolutePath() + \"/tmp\";\n \t\tFile folderF = new File(folder);\n \t\tif (!folderF.exists()) {\n \t\t\tfolderF.mkdir();\n \t\t}\n \n \t\tString imageFilePath = folder + \"/\"...
[ "0.6863646", "0.66082895", "0.6574555", "0.64999187", "0.6478926", "0.64553034", "0.6448055", "0.6433404", "0.6424142", "0.64230204", "0.64230204", "0.6409097", "0.6409097", "0.6379156", "0.6376752", "0.6368758", "0.6366034", "0.6294037", "0.6234776", "0.6149264", "0.6139793"...
0.6387726
13
Create a File for saving an image or video
private static File getOutputMediaFile(int type){ // To be safe, you should check that the SDCard is mounted // using Environment.getExternalStorageState() before doing this. File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), "MyCameraApp"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private File createVideoFile() throws IOException {\n Date d = new Date();\n String nameDate = new SimpleDateFormat(\"ddMMyyyy_HHmmss\").format(d);\n this.date = new SimpleDateFormat(\"dd/MM/yyyy\").format(d);\n this.time = nameDate.substring(9,13);\n String videoFileName = \"MP4...
[ "0.72691524", "0.7100188", "0.6833453", "0.67907023", "0.6690861", "0.66370183", "0.66152924", "0.65899026", "0.65316594", "0.6524017", "0.65235376", "0.65209776", "0.6515639", "0.65092367", "0.64999855", "0.64991194", "0.64974487", "0.6490886", "0.6488152", "0.64877635", "0....
0.0
-1
Once you get a value, you must cast according to its type.
public Object getValue() { Object o = null; if (type == "string") { o = svalue; } if (type == "int" ) { o = ivalue; } return o; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkType(V value) {\n valueClass.cast(value);\n }", "Object getConvertedValue() throws ConversionException;", "protected static Object getObjectFromValue(Value value)\n {\n switch (value.getDataType())\n {\n case Boolean:\n return value.getBool...
[ "0.729279", "0.7227671", "0.716856", "0.6913159", "0.6880405", "0.6880405", "0.6880405", "0.6880405", "0.6880405", "0.6880405", "0.6880405", "0.687034", "0.6853095", "0.6835196", "0.6787815", "0.6783976", "0.6771586", "0.6771586", "0.6771586", "0.6764844", "0.6764844", "0.6...
0.7369529
0
0: Ok 1: Variable ya declarada del mismo tipo 2: Variable declarada de distinto tipo
public int addVar(String name, Value value) { for (int i = 0; i < table.size(); i++) { if (table.get(i).getName().compareTo(name) == 0 && table.get(i).getType().equals(value.getType())) return 1; if (table.get(i).getName().compareTo(name) ==...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public TipoBase check(TipoBase tipo) throws Exception {\n Clase c = analizadorsintactico.AnalizadorSintactico.getTs().getClase(tipo.getNombre());\n String nombreVar = id.getLexema();\n VarInstancia v;\n\n if (tipo.getNombre().equals(\"int\") || tipo.getNombre().equals(\"b...
[ "0.62536234", "0.5822014", "0.5643082", "0.5639624", "0.56117123", "0.55991733", "0.55619746", "0.5546099", "0.552371", "0.5518136", "0.54768467", "0.5455371", "0.54482114", "0.5434205", "0.5430613", "0.5427975", "0.542338", "0.5389042", "0.5387107", "0.5369898", "0.5366866",...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.information_view, container, false); mFillContentCallback.invoke(view); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6740675", "0.6725193", "0.67224836", "0.6699259", "0.6691596", "0.668896", "0.6687658", "0.66861755", "0.667755", "0.66756433", "0.6667425", "0.66667783", "0.6665166", "0.66614723", "0.66549766", "0.665031", "0.6643759", "0.6639389", "0.66378653", "0.66345453", "0.6626348"...
0.0
-1
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args) throws IOException { BufferedReader file = new BufferedReader(new FileReader(args[0])); // bufferedReader.close(); Map<String, Double> map = new TreeMap<String, Double>(); String str = file.readLine(); while (str != null) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MyInputStream()\n {\n in = new BufferedReader\n (new InputStreamReader(System.in));\n }", "OutputStream getStdin();", "public String Get_Input()throws IOException{\r\n\t\tString input=\"\";\r\n\t\tInputStreamReader converter = new InputStreamReader(System.in);\r\n\t\tBufferedReade...
[ "0.76611555", "0.7147348", "0.70271873", "0.69710845", "0.69072133", "0.68069106", "0.66859674", "0.6632048", "0.66029596", "0.65959066", "0.65581274", "0.65374255", "0.6360502", "0.6321289", "0.63028914", "0.63015115", "0.629297", "0.6292733", "0.62872094", "0.6233161", "0.6...
0.0
-1
Constructors Create a detached ServiceOrderRecord
public ServiceOrderRecord() { super(ServiceOrder.SERVICE_ORDER); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ServiceOrderRecord(Integer orderId, Integer storeId, String orderSn, Integer userId, Byte orderStatus, String orderStatusName, String subscriber, String mobile, Integer serviceId, Integer technicianId, String technicianName, String serviceDate, String servicePeriod, String addMessage, String adminMessage, S...
[ "0.7206498", "0.6534806", "0.63389105", "0.6236075", "0.6232758", "0.6192375", "0.61440223", "0.6121575", "0.6117131", "0.60784674", "0.6034556", "0.59895253", "0.5953442", "0.5891796", "0.5843763", "0.5781666", "0.57265115", "0.57065344", "0.5683994", "0.5681999", "0.5679006...
0.7602935
0
Create a detached, initialised ServiceOrderRecord
public ServiceOrderRecord(Integer orderId, Integer storeId, String orderSn, Integer userId, Byte orderStatus, String orderStatusName, String subscriber, String mobile, Integer serviceId, Integer technicianId, String technicianName, String serviceDate, String servicePeriod, String addMessage, String adminMessage, String...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ServiceOrderRecord() {\n super(ServiceOrder.SERVICE_ORDER);\n }", "void create(Order order);", "OrderDTO create(OrderDTO orderDTO);", "public CreateOrderRequest() {\n\t\t_pcs = new PropertyChangeSupport(this);\n\t}", "@Override\n public Order create(Order order) {\n this.orders.a...
[ "0.7162693", "0.6372069", "0.62393767", "0.59560925", "0.59199256", "0.58355933", "0.58095443", "0.57960016", "0.5790778", "0.57895553", "0.57858485", "0.5729088", "0.5706709", "0.5704234", "0.56465596", "0.56328875", "0.56309277", "0.5603425", "0.55626744", "0.5529844", "0.5...
0.66995776
1
private final String tabelaViagem = "viagem"; private final String tabelaPassagem = "passagem";
public OnibusDAO() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getTabela();", "public void setTable(TableCaracteristique tab) {\n this.table = tab;\n }", "public void limparTabela(String tabela){\n \n if(tabela.equals(\"hora\")){\n modHT.setRowCount(0);\n modMF.setRowCount(0);\n txtEntrada_Horario.requestFocus();\n...
[ "0.68905866", "0.64408976", "0.6221305", "0.6119263", "0.6104343", "0.60559785", "0.60194564", "0.60086656", "0.5994515", "0.5985101", "0.59825", "0.5966533", "0.5949518", "0.5917139", "0.5898619", "0.5861334", "0.5848811", "0.58002585", "0.57604045", "0.5750638", "0.5735348"...
0.0
-1
TODO Autogenerated method stub
@Override public String getQueryDeExiste(Onibus entidade) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Getter and Setter ...
public SelectorType getType() { return type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "@Override\n public void get() {}", "public void get() {\n }", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "protected abstract Set method_1559();", "Stri...
[ "0.68083626", "0.6800042", "0.67520213", "0.67117226", "0.66788065", "0.66788065", "0.6601424", "0.65980583", "0.64219415", "0.642182", "0.64092326", "0.63693196", "0.6324252", "0.63241404", "0.6317272", "0.63074464", "0.6224437", "0.6215214", "0.6199678", "0.6185622", "0.615...
0.0
-1
Instantiates a new basic authentication credential.
public BasicAuthenticationCredentials(String userName, String password) { this.userName = userName; this.password = password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "AbstractCredentialModel createBasicCredential(String username, String password);", "public static CredentialsProvider basicAuthentication(String userName,String password) {\r\n\r\n\r\n\r\n\t\tCredentialsProvider provider = new BasicCredentialsProvider();\r\n\r\n\t\tUsernamePasswordCredentials credentials= new Us...
[ "0.8156229", "0.6726458", "0.6226436", "0.6220893", "0.61392236", "0.6112525", "0.6089058", "0.6080057", "0.6021232", "0.6020238", "0.5970875", "0.5930668", "0.58766645", "0.58445394", "0.5840804", "0.5763283", "0.5752779", "0.5718015", "0.57053083", "0.56865674", "0.5619745"...
0.68971014
1
TODO handle case when no annotation etc... noinspection unchecked
private <T> Constructor<? extends T> findConstructorForInjection(Class<? extends T> impl) { return (Constructor<? extends T>) Arrays.stream(impl.getConstructors()) .filter(con -> con.getAnnotation(Inject.class) != null) .findFirst() .orElseThrow(ConstructorNotFoun...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic Annotation annotate() {\n\t\treturn null;\r\n\t}", "public Framework_annotation<T> build_annotation();", "public abstract Annotations mo30682c();", "private AnnotatedTypes() { throw new AssertionError(\"Class AnnotatedTypes cannot be instantiated.\");}", "public Framework_annotation<T...
[ "0.6620859", "0.64500594", "0.64455175", "0.63965356", "0.63665223", "0.6346742", "0.6194344", "0.6178605", "0.613707", "0.6132545", "0.6132545", "0.6115529", "0.604834", "0.6017503", "0.5984221", "0.5963383", "0.5962587", "0.59547085", "0.5953102", "0.5928612", "0.5901805", ...
0.0
-1
TODO: Objective 6, implement the RK4 integration method see also efficient memory management suggestion in provided code for the Midpoint method.
@Override public void step(double[] p, int n, double t, double h, double[] pout, Function derivs) { if ( tmp == null || tmp.length != n ) { tmp = new double[n]; } //state: p.x,p.y,v.x,v.y Vector2d v1 = new Vector2d(); Vector2d x1 = new Vector2d(); Vector2d a = new Vector2d(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public XYSeriesCollection rk4(double t0, double tF, double stepSize,\n ArrayList<Argument> argumentList, ArrayList<Argument> variableArgList,\n ArrayList<StockObject> stockArrayList, ArrayList<FlowObject> flowArrayList, ArrayList<VariableObject> variableArrayList) {\n Argument[] aVarLi...
[ "0.55298924", "0.5447081", "0.5442409", "0.53877395", "0.53726804", "0.52856994", "0.52612966", "0.5214296", "0.520789", "0.5185911", "0.5157791", "0.5135526", "0.5112768", "0.50768876", "0.50663674", "0.5062693", "0.50519836", "0.5023854", "0.5006446", "0.50051963", "0.49931...
0.5021439
18
TODO Autogenerated method stub
@Override public String getElectionId() { if (current == null) return null; return current.electionID; }
{ "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
cast a vote based on what I know (my ID) and where the message has traveled. This is not a pretty piece of code, nor is the problem as we cannot ensure consistent behavior.
private Management castVote(Management mgmt, boolean isNew) { if (!mgmt.hasElection()) return null; LeaderElection req = mgmt.getElection(); if (req.getExpires() <= System.currentTimeMillis()) { logger.info("Node " + this.nodeId + " says election expired - not voting"); return null; } // DANGER! If...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void castVote(Peer candidate) {\n votedFor = candidate;\n }", "void handle(VoteMessage vote);", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t\tdoVote(getIntent().getStringExtra(\"aid\"), getIntent().getStringExtra(\"id\"));\n\t\t\t\t\t\n\t\t\t\t}", "public static void doVote() {...
[ "0.7113528", "0.59796685", "0.56171805", "0.54753244", "0.54192764", "0.5332472", "0.53311694", "0.53042966", "0.5193986", "0.5144047", "0.512245", "0.50888634", "0.50700027", "0.50627977", "0.5045399", "0.50312907", "0.5007095", "0.5002404", "0.49972466", "0.49956253", "0.49...
0.5521175
3
Building declare winner message
public Management getDeclareWinnerMessage(){ LeaderElection.Builder elb = LeaderElection.newBuilder(); elb.setCandidateId(conf.getServer().getNodeId()); elb.setElectId(String.valueOf(Integer.parseInt(conf.getServer().getProperty("port.mgmt"))%100)); elb.setDesc("Leader's declaration"); elb.setA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void decideWinner() {\n String winnerAnnouncement;\n if(player1Choice.equalsIgnoreCase(\"rock\") && player2Choice.equalsIgnoreCase(\"scissors\")) {\n winnerAnnouncement = \"Player: ROCK vs Computer: SCISSORS ----- PLAYER WINS\";\n } else if(player1Choice.equalsIgnoreCase(\"s...
[ "0.66245323", "0.65324205", "0.6440141", "0.63676584", "0.63559514", "0.633442", "0.6316427", "0.62869257", "0.6250647", "0.6202615", "0.62014633", "0.6197921", "0.619445", "0.61637545", "0.61428714", "0.6142686", "0.6127393", "0.61125124", "0.6082407", "0.60194033", "0.60163...
0.672016
0
Watch out with the added properties here. The convenience variables don't get automatically updated as do the main attributes of these classes do.
public TopologyLib() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void updateProperties() {\n }", "@Override\n public void updateProperties() {\n // unneeded\n }", "public void setupProperties() {\n // left empty for subclass to override\n }", "protected void afterPropertiesSetInternal() {\n\t\t// override this method\n\t}...
[ "0.65111107", "0.64706755", "0.6119967", "0.6006674", "0.5982734", "0.5765774", "0.57408184", "0.5739519", "0.5725404", "0.5701896", "0.56918347", "0.5662985", "0.5656729", "0.5646947", "0.55878204", "0.5578727", "0.55282545", "0.55035204", "0.54795057", "0.54795057", "0.5479...
0.0
-1
Fetch filial by id.
public InternalResultsResponse<Filial> fetchFilialById(FilialRequest filialRequest);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public InternalResultsResponse<Funcionario> fetchFuncionarioById(FetchByIdRequest request);", "@GetMapping(\"/fretes/{id}\")\n\tpublic ResponseEntity<?> findById(@PathVariable(\"id\") Integer id) {\n\t\treturn freteRepo.findById(id).map(record -> ResponseEntity.ok().body(record))\n\t\t\t\t.orElse(ResponseEntity....
[ "0.72946316", "0.7014045", "0.6928484", "0.6926681", "0.6865186", "0.6824509", "0.68204904", "0.680964", "0.6783074", "0.6761476", "0.67548835", "0.67392045", "0.66999435", "0.66975975", "0.6591484", "0.6589746", "0.65623504", "0.65479654", "0.6546197", "0.6449379", "0.644170...
0.73395723
0
Fetch all filial types.
public FilialResponse fetchAllFilialTypes(Request request);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<FoodType> FindAllType() {\n\t\treturn ftb.FindAllType();\n\t}", "public List<Type> getAll();", "public List<SecTyp> getAllTypes();", "List<Type> getAllTypeList();", "@GetMapping(\"/types\")\n\t@Timed\n\tpublic List<TypesDTO> getAllTypes() {\n\t\tthis.log.debug(\"REST request to get...
[ "0.7680212", "0.7322662", "0.6736693", "0.6729339", "0.66830784", "0.66095823", "0.65214837", "0.64881444", "0.63602054", "0.63316023", "0.6287066", "0.6282106", "0.62624097", "0.6262358", "0.62217873", "0.6185707", "0.61780167", "0.6088432", "0.60704046", "0.60679424", "0.60...
0.80687225
0
Fetch all filial filial.
public FilialResponse fetchAllFilialFilial(Request request);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/familles\")\n public List<FamilleDTO> getAllFamilles() {\n log.debug(\"REST request to get all Familles\");\n return familleService.findAll();\n }", "public FilialResponse fetchAllFilialTypes(Request request);", "public List<Factura> getAllFacturas(){\n return facturaF...
[ "0.7160096", "0.7005614", "0.67666227", "0.67005616", "0.6630934", "0.65497786", "0.65342295", "0.6509355", "0.648352", "0.64814436", "0.6460067", "0.6394737", "0.63938355", "0.63869196", "0.63771105", "0.6357738", "0.63573974", "0.63471574", "0.63401544", "0.6308529", "0.629...
0.79688454
0
Initializes an input stream from standard input
public In(){ scanner=new Scanner(new BufferedInputStream(System.in),CHARSET_NAME); scanner.useLocale(LOCALE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MyInputStream()\n {\n in = new BufferedReader\n (new InputStreamReader(System.in));\n }", "public StreamReader(InputStream input) throws IOException {\r\n\t\tthis.setInput(input);\r\n\t}", "static void init(InputStream input) {\n reader = new BufferedReader(\n ...
[ "0.7492599", "0.6962369", "0.6777618", "0.673736", "0.673736", "0.673736", "0.673736", "0.6722564", "0.6714456", "0.6677938", "0.6677858", "0.6677858", "0.6673655", "0.6654935", "0.6632256", "0.6530296", "0.65296793", "0.64888275", "0.6470671", "0.6460572", "0.64429516", "0...
0.61420405
35
Initializes an input stream from a file
public In(File file) throws Exception { if (file==null) throw new NoSuchElementException("file argument is null"); try{ FileInputStream fis=new FileInputStream(file); scanner=new Scanner(new BufferedInputStream(fis),CHARSET_NAME); scanner.useLocale(LOCALE); }catch (IOException ioe){ throw new IOExc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public InputReader(File file){\n try {\n inputStream = new Scanner(file);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n instantiate();\n assert(invariant());\n }", "public MyInputStream(String fileName)\n {\n try\n {\n ...
[ "0.7441038", "0.71619594", "0.7040354", "0.7029389", "0.6771645", "0.67700785", "0.6738763", "0.67171764", "0.6682221", "0.6643828", "0.6578591", "0.6553948", "0.6533965", "0.6488375", "0.64305586", "0.6365352", "0.62891364", "0.6286661", "0.62666416", "0.62489784", "0.624130...
0.0
-1
read and returns the next line in this input stream
public String readLine(){ String line; try{ line=scanner.nextLine(); }catch (NoSuchElementException e){ line=null; } return line; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String readNextLine() {\n StringBuilder sb = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n sb.append(br.readLine());\n } catch (IOException e) {\n e.fillInStackTrace();\n }\n\n re...
[ "0.81387174", "0.78811264", "0.78492427", "0.78158015", "0.7752266", "0.7725714", "0.770441", "0.73714733", "0.7316544", "0.7150186", "0.70829743", "0.704842", "0.70319116", "0.6924007", "0.6911438", "0.6841594", "0.67823714", "0.67727005", "0.6735828", "0.67139906", "0.66899...
0.67734325
17
read and returns the next character in this input stream
public char readChar(){ scanner.useDelimiter(EMPTY_PATTERN); try { String ch=scanner.next(); assert ch.length()==1:"In.readChar() error"; scanner.useDelimiter(WHITESPACE_PATTERN); return ch.charAt(0); }catch (NoSuchElementException e){ throw new NoSuchElementException("noSuchElement"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public char readChar() {\n return readNextLine().charAt(0);\n }", "void readNextChar() throws ReaderException;", "public char read() {\n char ch = this.peek();\n this.index++;\n return ch;\n }", "protected void readNextChar() throws IOException {\n nextChar = inpu...
[ "0.8100948", "0.799976", "0.79316", "0.7853621", "0.77925265", "0.7692597", "0.76216936", "0.7611813", "0.75964725", "0.7589062", "0.7498106", "0.74607205", "0.73984337", "0.73856175", "0.73795694", "0.73256963", "0.7244087", "0.72205", "0.7207686", "0.71828336", "0.71593046"...
0.69991845
24
reads the next token from this input stream and returns it
public String readString(){ try{ return scanner.next(); }catch (NoSuchElementException e){ throw new NoSuchElementException("NoSuchEle"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Token nextToken() throws IOException {\n // Si hay lexemas en el buffer, leemos de ahi\n if (!bufferLocal.esVacia()) {\n return bufferLocal.extraer();\n }\n // Si no, leemos del Stream\n String lexemaActual = \"\";\n do {\n int lexema = tokens...
[ "0.7622178", "0.7547264", "0.7482326", "0.7476903", "0.7347075", "0.72733986", "0.7254225", "0.72485745", "0.7235403", "0.7214095", "0.7193324", "0.7173664", "0.71589136", "0.7145269", "0.7124993", "0.710799", "0.70949185", "0.7062067", "0.7059417", "0.7059417", "0.7059417", ...
0.0
-1
reads the next token from this input stream
public int readInt(){ try{ return scanner.nextInt(); }catch (InputMismatchException e){ String token=scanner.next(); throw new InputMismatchException("the next token is\""+token+"\""); } catch (NoSuchElementException e){ throw new NoSuchElementException("no more tokens are available"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Token nextToken() throws IOException {\n // Si hay lexemas en el buffer, leemos de ahi\n if (!bufferLocal.esVacia()) {\n return bufferLocal.extraer();\n }\n // Si no, leemos del Stream\n String lexemaActual = \"\";\n do {\n int lexema = tokens...
[ "0.7577117", "0.75209093", "0.7224696", "0.7193446", "0.7165451", "0.7047538", "0.7010796", "0.6891776", "0.6879177", "0.68589807", "0.6812332", "0.6812332", "0.6812332", "0.6812332", "0.68057597", "0.6798045", "0.6773842", "0.6758089", "0.674603", "0.6737948", "0.67363733", ...
0.63390595
64
Reads all remaining token from this input stream and returns them as array of strings
public String[] readAllStrings(){ String[] tokens=WHITESPACE_PATTERN.split(readAll()); if (tokens.length==0||tokens[0].length()>0) return tokens; String[] decapitokens=new String[tokens.length-1]; for (int i=0;i<tokens.length-1;i++){ decapitokens[i]=tokens[i+1]; } return decapitokens; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] readNext() {\n\t\treturn null;\n\t}", "public static String[] readAllStrings() {\n // we could use readAll.trim().split(), but that's not consistent\n // because trim() uses characters 0x00..0x20 as whitespace\n String[] tokens = WHITESPACE_PATTERN.split(readAll());\n ...
[ "0.65876377", "0.64611256", "0.64575005", "0.61337286", "0.60084873", "0.60070276", "0.58847487", "0.58550376", "0.56545323", "0.5644685", "0.56313497", "0.56054306", "0.5589925", "0.5581369", "0.5562186", "0.5537813", "0.55153626", "0.55016315", "0.54856193", "0.54835063", "...
0.66310585
0
reads all remaining lines from this input stream and returns them as array of strings
public String[] readAllLines(){ ArrayList<String> lines=new ArrayList<>(); while (hasNestLine()) lines.add(readLine()); return lines.toArray(new String[lines.size()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String[] readAllLines() {\n ArrayList<String> lines = new ArrayList<String>();\n while (hasNextLine()) {\n lines.add(readLine());\n }\n return lines.toArray(new String[lines.size()]);\n }", "private static String[] readLines(InputStream f) throws IOEx...
[ "0.7227531", "0.69394785", "0.65993714", "0.65579814", "0.64941466", "0.64783704", "0.6450658", "0.63777524", "0.6288699", "0.62438905", "0.62312675", "0.6216247", "0.61659515", "0.6133528", "0.6129626", "0.6112474", "0.6110741", "0.6108165", "0.61009353", "0.6086608", "0.606...
0.75251716
0
reads all remaining tokens from this input stream,parses them as integers;and returns them as an array of integers
public int[] readAllInts(){ String[] fields=readAllStrings(); int[] vals=new int[fields.length]; for (int i=0;i<fields.length;i++){ vals[i]=Integer.parseInt(fields[i]); } return vals; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Integer> fromScannerInput() throws IOException {\n\t\tfinal List<Integer> array = new ArrayList<>();\n\t\twhile (scanner.hasNext()) {\n\t\t\tarray.add(\n\t\t\t\t\tInteger.parseInt(\n\t\t\t\t\t\t\tscanner.next()));\n\t\t}\n\t\treturn array;\n\t}", "public List<Integer> readLineAsIntegers() throws IOException...
[ "0.68014985", "0.67679125", "0.6669761", "0.6342634", "0.63096786", "0.63068247", "0.61943924", "0.61289674", "0.6091682", "0.60867584", "0.6077276", "0.6073901", "0.60361546", "0.59812534", "0.59354764", "0.58336884", "0.5823126", "0.57795143", "0.5778575", "0.5703867", "0.5...
0.703488
0
closes this input stream
public void close(){ scanner.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void close() throws IOException {\n input.close();\n }", "public void close() {\n\t\ttry {\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void close(){\n\t\tin.close();\n\t}", "public void closeStream() {\n out...
[ "0.7760971", "0.7498473", "0.7322935", "0.7259575", "0.7170345", "0.7142959", "0.7087437", "0.6934735", "0.6917586", "0.6876669", "0.6833771", "0.6804652", "0.678245", "0.67577267", "0.67560387", "0.67418426", "0.6735048", "0.6723644", "0.6720559", "0.6699568", "0.66924024", ...
0.63544476
53
Match up an explanatory comment
@Override public void endVisit(CssIf x, Context ctx) { out.indentOut(); out.printOpt("/* } */"); out.newlineOpt(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void commentMatch() {\n comment.match(\"//hier steht text\\n\");\n assertEquals(comment.getClass(), comment.getToken().getClass());\n }", "@Test\n public void wrongCommentMatch() {\n comment.match(\"jhadj //kasf \");\n assertEquals(null, comment.getToken());\n ...
[ "0.7682289", "0.7447918", "0.72401154", "0.70248663", "0.6777402", "0.66935146", "0.64872855", "0.6466363", "0.642483", "0.6421671", "0.63867337", "0.63439775", "0.63325477", "0.6300027", "0.6276185", "0.6231622", "0.612744", "0.610894", "0.6106605", "0.61041886", "0.606419",...
0.0
-1
These are not valid CSS
@Override public boolean visit(CssDef x, Context ctx) { out.printOpt("/* CssDef */"); out.newlineOpt(); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validateRpd2s6()\n {\n // CSS Validation errors are checked by CSSValidator.\n }", "@org.junit.Test\n public void css()\n {\n assertEquals(\"empty\", \"\", Encodings.toCSSString(\"\"));\n assertEquals(\"simple\", \"simple\", Encodings.toCSSString(\"simple\"));\n asse...
[ "0.5973445", "0.57924896", "0.5707429", "0.56147325", "0.5371038", "0.53400475", "0.53336716", "0.5310589", "0.52341753", "0.521552", "0.5170459", "0.5143138", "0.5118289", "0.51159304", "0.51095194", "0.50751805", "0.5003203", "0.49782643", "0.4964525", "0.49439517", "0.4921...
0.52381855
8
These are not valid CSS
@Override public boolean visit(CssEval x, Context ctx) { out.printOpt("/* CssEval */"); out.newlineOpt(); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validateRpd2s6()\n {\n // CSS Validation errors are checked by CSSValidator.\n }", "@org.junit.Test\n public void css()\n {\n assertEquals(\"empty\", \"\", Encodings.toCSSString(\"\"));\n assertEquals(\"simple\", \"simple\", Encodings.toCSSString(\"simple\"));\n asse...
[ "0.5973912", "0.5794228", "0.57078785", "0.5615098", "0.5370872", "0.5340339", "0.5335011", "0.531088", "0.52385175", "0.5234265", "0.521601", "0.5170423", "0.5143826", "0.5118981", "0.51159275", "0.51103413", "0.507524", "0.5003789", "0.497901", "0.49647295", "0.4944563", ...
0.48574498
28
These are not valid CSS
@Override public boolean visit(CssExternalSelectors x, Context ctx) { out.printOpt("/* @external"); for (String className : x.getClasses()) { out.printOpt(" "); out.printOpt(className); } out.printOpt("; */"); out.newlineOpt(); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validateRpd2s6()\n {\n // CSS Validation errors are checked by CSSValidator.\n }", "@org.junit.Test\n public void css()\n {\n assertEquals(\"empty\", \"\", Encodings.toCSSString(\"\"));\n assertEquals(\"simple\", \"simple\", Encodings.toCSSString(\"simple\"));\n asse...
[ "0.5973445", "0.57924896", "0.5707429", "0.56147325", "0.5371038", "0.53400475", "0.53336716", "0.5310589", "0.52381855", "0.521552", "0.5170459", "0.5143138", "0.5118289", "0.51159304", "0.51095194", "0.50751805", "0.5003203", "0.49782643", "0.4964525", "0.49439517", "0.4921...
0.52341753
9
Record where the contents of the if block should be inserted
@Override public boolean visit(CssIf x, Context ctx) { StringBuilder expr = new StringBuilder("/* @if "); if (x.getExpression() != null) { expr.append(x.getExpression()).append(" "); } else { expr.append(x.getPropertyName()).append(" "); for (String v : x.getPropertyValues()) { e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void insertJumpAtEndOfCondition(){\n\t\tCode.loadConst(0);\n\t\tCode.put(Code.jcc + Code.eq);\n\t\t\n\t\t// save current pc and store it as jmp address\n\t\tjmpNotThen.push(Code.pc);\n\t\tCode.put2(0);\n\t\t\n\t}", "@Override\n\tpublic String visitIfstatement(IfstatementContext ctx) {\n\t\t\n\t\tfor(int ...
[ "0.6139885", "0.5760615", "0.5736141", "0.56263554", "0.5602519", "0.55998915", "0.5598551", "0.55700856", "0.55668324", "0.5497826", "0.54830164", "0.5475257", "0.540224", "0.5390882", "0.5335104", "0.53338975", "0.5304184", "0.528943", "0.5274445", "0.5272762", "0.5263085",...
0.50762874
33
These are not valid CSS
@Override public boolean visit(CssSprite x, Context ctx) { out.printOpt("/* CssSprite */"); out.newlineOpt(); addSubstitition(x); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validateRpd2s6()\n {\n // CSS Validation errors are checked by CSSValidator.\n }", "@org.junit.Test\n public void css()\n {\n assertEquals(\"empty\", \"\", Encodings.toCSSString(\"\"));\n assertEquals(\"simple\", \"simple\", Encodings.toCSSString(\"simple\"));\n asse...
[ "0.5973445", "0.57924896", "0.5707429", "0.56147325", "0.5371038", "0.53400475", "0.53336716", "0.5310589", "0.52381855", "0.52341753", "0.521552", "0.5170459", "0.5143138", "0.5118289", "0.51159304", "0.51095194", "0.50751805", "0.5003203", "0.49782643", "0.4964525", "0.4943...
0.0
-1
These are not valid CSS
@Override public boolean visit(CssUrl x, Context ctx) { out.printOpt("/* CssUrl */"); out.newlineOpt(); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validateRpd2s6()\n {\n // CSS Validation errors are checked by CSSValidator.\n }", "@org.junit.Test\n public void css()\n {\n assertEquals(\"empty\", \"\", Encodings.toCSSString(\"\"));\n assertEquals(\"simple\", \"simple\", Encodings.toCSSString(\"simple\"));\n asse...
[ "0.5973912", "0.5794228", "0.57078785", "0.5615098", "0.5370872", "0.5340339", "0.5335011", "0.531088", "0.52385175", "0.5234265", "0.521601", "0.5170423", "0.5143826", "0.5118981", "0.51159275", "0.51103413", "0.507524", "0.497901", "0.49647295", "0.4944563", "0.49213776", ...
0.5003789
17
TODO Autogenerated method stub
@Override public void run() { MimeMessage msg=javaMailSender.createMimeMessage(); MimeMessageHelper helper=null; try { helper = new MimeMessageHelper(msg,true,"utf-8"); } catch (MessagingException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } try { helpe...
{ "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
Communication abstraction for writing data stream
public interface WriteOnlyChannel { /** * Write message packet * @param data message packet * @return True if success ele False */ boolean write(byte[] data ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void writeToStream(DataOutputStream dataOutputStream);", "public abstract void write(DataOutput out) throws IOException;", "public abstract void writeData(DataOutput dout) throws IOException;", "public interface StreamReceiver{\r\n\t/**\r\n\t * Writes an array of bytes to the object holding o...
[ "0.7459129", "0.73183465", "0.725648", "0.72015345", "0.71079195", "0.709727", "0.7057771", "0.6996505", "0.69439685", "0.6677554", "0.6668438", "0.6651484", "0.6611916", "0.6567557", "0.6566653", "0.65660733", "0.65152276", "0.6512818", "0.65064543", "0.6498987", "0.64874357...
0.70096153
7
Destination if super peer network is complete graph
int getNextHopPort(Message next) { if (next instanceof ExchangeMessage) { Exchange destinationExchange = ((ExchangeMessage)next).getDestination(); return getExchangeNextPort(destinationExchange); } else { Continent destinationContinent = ((SuperPeerMessage) next).getDestination(); if (destinationConti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasDestination();", "boolean hasDestination();", "public boolean hasDestination() {\n return result.hasDestination();\n }", "public boolean get_destination() {\r\n return (final_destination);\r\n }", "public boolean hasDestination() {\n return destination_ !...
[ "0.68056655", "0.68056655", "0.67859805", "0.65452594", "0.64842176", "0.6359753", "0.6305807", "0.6258821", "0.62287104", "0.6188288", "0.6141103", "0.6010745", "0.6001916", "0.5970328", "0.5927852", "0.58891195", "0.58823013", "0.58717155", "0.58693045", "0.5844953", "0.584...
0.0
-1
If managed by another super peer
int getExchangeNextPort(Exchange destinationExchange) { if (destinationExchange.continent() != myExchange.continent()) return destinationExchange.continent().portNum(); // If managed by this super peer else return destinationExchange.portNum(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract P getAsPeer() throws DataException;", "Uuid getActivePeer() throws RemoteException, NotBoundException;", "private void connectingPeer() {\n for (int index = 0; index < this.peers.size(); index++) {\n String peerUrl = urlAdderP2PNodeName((String) this.peers.get(index));\n ...
[ "0.60303426", "0.5993176", "0.588819", "0.57969815", "0.5782097", "0.57497543", "0.57394135", "0.56609446", "0.5638646", "0.5570255", "0.55648893", "0.5545788", "0.54917055", "0.54855824", "0.5481312", "0.5439556", "0.5423415", "0.5422636", "0.54157466", "0.541572", "0.540458...
0.0
-1
Performs authorization on given DatagramPacket.
protected int authorizeProbeRequest(DatagramPacket packet) throws Exception { int offset = 0; ByteArrayInputStream bis = new ByteArrayInputStream(packet.getData()); DataInputStream in = new DataInputStream(bis); long t1 = in.readLong(); double q1 = in.readDouble(); int le...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void manageDeniedPacket(MeetingPacket packet) {\n Console.comment(\"=> Denied packet from \" + packet.getSourceAddress()) ;\n\n if(this.callbackOnDenied != null) {\n this.callbackOnDenied.denied() ;\n }\n }", "public void doAuthorize() {\n authorizeBehavior.autho...
[ "0.57649076", "0.575914", "0.5664304", "0.55496037", "0.5496955", "0.54357165", "0.5266186", "0.5136592", "0.5108895", "0.5072046", "0.506507", "0.504859", "0.50130594", "0.5012161", "0.49993733", "0.4957722", "0.4942805", "0.49035406", "0.4902781", "0.49001288", "0.4893326",...
0.61064327
0
Handles a probe. For each key that is handled, the key and its result should be in the returned map.
Map<String,String> handleProbe(String... keys);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract Map<String, Serializable> getEventKeyAndIdMap();", "@Test\n public void mapKeys() {\n check(MAPKEYS);\n query(\"for $i in \" + MAPKEYS.args(\n MAPNEW.args(\" for $i in 1 to 3 return \" +\n MAPENTRY.args(\"$i\", \"$i+1\"))) + \" order by $i return $i\", \"1 2 3\");\n que...
[ "0.5208409", "0.51307195", "0.5094214", "0.497805", "0.48507345", "0.4822445", "0.48088157", "0.47971117", "0.4776938", "0.47719628", "0.47570637", "0.47412628", "0.47248417", "0.47244775", "0.4705883", "0.4692584", "0.46747306", "0.46436495", "0.46232322", "0.46109688", "0.4...
0.7572158
0
Returns a list of supported keys
String[] supportedKeys();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract List<String> getAllKeys();", "List<String> getKeys();", "ApiKeys listKeys();", "StringList keys();", "public List<K> keys();", "@Override\n List<String> keys();", "public KeySet getKeys();", "public List<String> keys()\n {\n return new ArrayList<String>(keys);\n }", ...
[ "0.76228404", "0.75808704", "0.7300495", "0.70509917", "0.69880027", "0.6930967", "0.6887215", "0.6841824", "0.6753614", "0.6743327", "0.6719763", "0.6694221", "0.66929454", "0.66109455", "0.6608897", "0.6602957", "0.6578649", "0.6576632", "0.6565148", "0.6561529", "0.6531948...
0.90807533
0
TODO Autogenerated method stub
@Override public String popupSearch(String criteria) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
the first iterator should be the initial results
@Override protected Iterator<? extends Map<String, AttributeValue>> nextIterator(final int count) { if (count == 1) { return currentResult.getItems().iterator(); } // subsequent chained iterators will be obtained from dynamoDB // pagination if ((currentResult.getLastEvaluatedKey() == null) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Iterator iterator () {\n return new MyIterator (first);\n }", "public RunIterator iterator() {\n // Replace the following line with your solution.\n return new RunIterator(runs.getFirst());\n // You'll want to construct a new RunIterator, but first you'll need to\n // write a constr...
[ "0.69654363", "0.68909234", "0.66740113", "0.6621274", "0.6526146", "0.651893", "0.6443589", "0.6375632", "0.6369007", "0.6230805", "0.62198424", "0.62057513", "0.61757976", "0.61628336", "0.6146952", "0.6139478", "0.61265576", "0.612571", "0.6113114", "0.6105997", "0.6087346...
0.6267054
9
This method can be called before End Of DoInBackground an here you can even manipulate the response Main usage is to use the background thread to save some data from response or parse.It will be called only if there is no error. If you want to chain calls here you can also save call next request.
void inTheEndOfDoInBackground(NetworkResponse networkResponse);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected Response<JSONArray> parseNetworkResponse (NetworkResponse response){\n// This thread is on background thread\n// Handle parsing logic here?\n try {\n String jsonString =\n new String(\n ...
[ "0.68671584", "0.6799056", "0.67134106", "0.65297973", "0.6515256", "0.6501733", "0.64625525", "0.64483565", "0.640729", "0.64049333", "0.6390008", "0.6328438", "0.6282712", "0.6278639", "0.62621474", "0.62494504", "0.6220453", "0.6210496", "0.61833483", "0.61785096", "0.6171...
0.74437445
0
Action for linking to the unconfirmed POs page
public String openShowUnconfirmed(){ return SUCCESS; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"/confirm\", method = RequestMethod.GET)\n\t public String confirm(ModelMap map, javax.servlet.http.HttpServletRequest request) \n\t {\n\t\t HttpSession session = request.getSession();\n\t\t if (session.getAttribute(\"user\") == null) {\n\t\t\t map.addAttribute(\"error\", \"Error,...
[ "0.53972524", "0.5357304", "0.5337827", "0.52822155", "0.5280365", "0.52706385", "0.52315557", "0.5172084", "0.5156449", "0.51471156", "0.5140357", "0.5126218", "0.5125702", "0.5125321", "0.50870353", "0.5064774", "0.5061478", "0.5056874", "0.5055508", "0.5055508", "0.5055508...
0.5407733
0
Use getter method to query database
public ArrayList<Unconfirmed> getUnconfirmedList() { unconfirmedList=new ArrayList<Unconfirmed>(); Connection conn = null; CallableStatement coll = null; try { //query database for the information conn = dataSource.getConnection(); //calling the stored procedure which returns a cursor to the...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Statement queryToRetrieveData();", "protected String getRetrievalQuery()\n {\n return immutableGetRetrievalQuery();\n }", "Query query();", "public Query getQuery ()\n {\n\n\treturn this.q;\n\n }", "public void Query() {\n }", "public DatabaseQuery getQuery() {\n ...
[ "0.7154065", "0.68586844", "0.677319", "0.6693695", "0.668159", "0.6567042", "0.65376145", "0.6448092", "0.6374059", "0.63704044", "0.635585", "0.6336171", "0.6303989", "0.62502754", "0.623499", "0.6222621", "0.6151698", "0.61268795", "0.6114705", "0.60500896", "0.6048086", ...
0.0
-1
Created by Clariones on 6/8/2016.
public interface OnProgressChangedListener { void onProgressChanged(RoundSeekBar roundSeekBar, float progress); void onStartTrackingTouch(RoundSeekBar roundSeekBar); void onStopTrackingTouch(RoundSeekBar roundSeekBar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r...
[ "0.6180507", "0.60019314", "0.5956347", "0.59269506", "0.58972836", "0.58972836", "0.58885384", "0.58487445", "0.5839412", "0.58074665", "0.579705", "0.5776885", "0.5760034", "0.5717962", "0.5663572", "0.5656878", "0.5651625", "0.564859", "0.5632363", "0.5614433", "0.56062406...
0.0
-1
Creation of testreport.html in the specified path
private BufferedWriter createWriter(String filePath, String fileName) throws IOException { String fullPath = filePath + "/" + fileName; File file = new File(fullPath); boolean exists = new File(filePath).exists(); if (!exists) { file.mkdir(); } FileWriter writer = new FileWriter(file); Buff...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void generateReport()\n\t{\n\t\tlong time=System.currentTimeMillis();\n\t\tString reportPath=System.getProperty(\"user.dir\")+\"//automationReport//Report\"+time+\".html\";\n\t\t\n\t\thtmlreporter=new ExtentHtmlReporter(reportPath);\n\t\textent=new ExtentReports();\n\t\textent.attachReporter(htmlrepo...
[ "0.72767955", "0.71278775", "0.70800376", "0.68805534", "0.6586752", "0.6577133", "0.65279883", "0.64211804", "0.6374791", "0.6253028", "0.62437934", "0.6234215", "0.6227239", "0.61922926", "0.61661816", "0.616595", "0.6134314", "0.60609686", "0.6042792", "0.60250694", "0.600...
0.0
-1
Used to create the HTML
private void createHTML(BufferedWriter writer) throws IOException { String startHead = "<html><head>" // I have used roberto font,Please // link the appropriate font + "<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>" + "<link href='https://fonts.googleapis.com/ico...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "HTML createHTML();", "@Override\n\tpublic String generateHTML() {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tString level = \"\\t\";\n\t\tstringBuilder.append(level.repeat(levelCount)+\"<div>\\n\");\n\t\tlevelCount++;\n\t\tfor (HTMLGenerator htmlGenerator : tags) {\n\t\t\tstringBuilder.append(l...
[ "0.77029985", "0.7597029", "0.7174825", "0.67939687", "0.6660979", "0.66118747", "0.65626425", "0.6535208", "0.64895177", "0.64866114", "0.63923806", "0.6374149", "0.63368577", "0.63082355", "0.63055325", "0.6268277", "0.6239669", "0.6147816", "0.6143532", "0.61104035", "0.61...
0.64603704
10
CSS file for the table
private String cssFileForHtml() { return "<style>table, td, th {" + "border: 1px solid #ddd;" + "text-align: left;}" + "table {" + "border-collapse: collapse;" + "width: 100%;}" + "th, td {" + "padding: 10px;" + "color:#000000;" + "font-family: 'Roboto', sans-serif;}td{" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getTableCSS() {\n return \"k-data-table\";\n }", "@Override\n @Source({CellTable.Style.DEFAULT_CSS, \"../exercise/ScoresCellTableStyleSheet.css\"})\n TableResources.TableStyle cellTableStyle();", "public static String getCSS()\n {\n \treturn \"table.relations...
[ "0.7615267", "0.71239954", "0.698854", "0.61612904", "0.6047937", "0.6028834", "0.5983246", "0.5920456", "0.5865872", "0.5858108", "0.584289", "0.58401966", "0.58355975", "0.5765366", "0.5727499", "0.5699916", "0.56432307", "0.5642302", "0.5629317", "0.56112856", "0.56102115"...
0.75674707
1
Used to finish the HTML
private void endHTML(BufferedWriter writer) throws IOException { String startHead = "</body></html>"; writer.write(startHead); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void onFinish() {\r\n\t\t//used for create end html tags\r\n\t\tendHtmlPage(fout);\r\n\r\n\t\t//used for write every thing in html file\r\n\t\tfout.flush();\r\n\t\tfout.close();\r\n\t\t\r\n\t}", "void doAfterEndTag() {\r\n }", "private ConfigurationHTMLPrinter epilogue() {\n return endTable().dec...
[ "0.7486674", "0.6360721", "0.62351084", "0.62213385", "0.6202414", "0.62020206", "0.6181606", "0.6087693", "0.60756195", "0.6033457", "0.60160786", "0.5945805", "0.59310764", "0.5910174", "0.5909636", "0.5861734", "0.5840931", "0.57960147", "0.5791981", "0.5789775", "0.578312...
0.67236596
1
writes the title area which contain the name
private void createTitleContent(BufferedWriter writer) throws IOException { String title = data.getSuiteName(); String titleTag = "<div style='height: 50px; width: inherit; box-shadow: 1px 1px 1px #888888;background-color: #616161;'>"; String label = "<label style='font-weight: bold;position: absolute;paddi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addTitle() {\n\t\tJXPanel titlePanel = new JXPanel();\n\t\ttitlePanel.setLayout(null);\n\t\ttitlePanel.setSize(180, 60);\n\t\ttitlePanel.setLocation(60, 10);\n\t\ttitlePanel.setToolTipText(\"www.i.hsr.ch\");\n\t\ttitlePanel.setBorder(new DropShadowBorder(new Color(0, 0, 0), 7, 0.5f, 12, true, true, tr...
[ "0.77259374", "0.7406076", "0.73762506", "0.7072767", "0.69870585", "0.69742095", "0.6967268", "0.6927267", "0.6919898", "0.690527", "0.68823665", "0.6880833", "0.6869453", "0.68519795", "0.68468356", "0.6840883", "0.6822386", "0.68170834", "0.68072206", "0.6781503", "0.67796...
0.7516708
1
Parent function for creating container and number of test tag and test methods
private void createTotalTest(BufferedWriter writer) throws IOException { // Creates the layout String layout = "<div style ='height: 100px;width: inherit;'>"; // Creates the child div String displayTotalTestLayout = "<div style='width: 260px;background-color: #FFFFFF;box-shadow: 1px 1px 1px #888888;height: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TestContainer createTestContainer();", "T createContainer();", "Container createContainer();", "@Test\n public void test() throws IOException, InterruptedException {\n CountDownLatch latch = new CountDownLatch(1);\n\n try (\n GenericContainer<?> container = new GenericContainer<>(...
[ "0.7049684", "0.60375047", "0.60198504", "0.57963365", "0.57901925", "0.57009244", "0.5679445", "0.5628712", "0.5600697", "0.55818605", "0.55360043", "0.54559356", "0.5448229", "0.5448229", "0.5448229", "0.5442585", "0.54381496", "0.5391781", "0.53827745", "0.5372731", "0.536...
0.54267067
17
Writes the number of test tags present in the result
private void createTotalTestCase(BufferedWriter writer) throws IOException { String parent = "<label style='margin-top: 8px;position: absolute;'>"; String content = "<span style='display: inline;color: #000000;margin-left: 8px;font-weight: bold;font-family: Roboto, sans-serif;'>Total TestCases</span>"; String ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getTagCount();", "private void createTotalTest(BufferedWriter writer) throws IOException {\r\n\t\t// Creates the layout\r\n\t\tString layout = \"<div style ='height: 100px;width: inherit;'>\";\r\n\t\t// Creates the child div\r\n\t\tString displayTotalTestLayout = \"<div style='width: 260px;background-color: ...
[ "0.64137185", "0.6076882", "0.59360975", "0.5895079", "0.5895079", "0.589139", "0.5879491", "0.58425087", "0.5821475", "0.58209896", "0.58142275", "0.5798486", "0.5740122", "0.57028025", "0.56978196", "0.566094", "0.5660648", "0.5660648", "0.5660648", "0.5660648", "0.5660648"...
0.6722355
0
Writes the total number of test methods present
private void createTotalTestMethod(BufferedWriter writer) throws IOException { String parent = "<label style='position: inherit;top: 57px;'>"; String content = "<span style='color: #000000;font-weight: bold;padding-left: 8px;font-family: Roboto, sans-serif;'>Total TestMethod</span>"; String total = "<span ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int getTotalTestCase() {\n\t\treturn passedtests.size() + failedtests.size() + skippedtests.size();\n\t}", "public int getTestMethodCount() {\r\n Method[] methods = this.getClass().getMethods();\r\n int count = 0;\r\n for (int i = 0; i < methods.length; i++) {\r\n if (meth...
[ "0.7015256", "0.70057595", "0.6865361", "0.68290806", "0.6711967", "0.6680549", "0.66531944", "0.66397035", "0.6500015", "0.64717484", "0.64684707", "0.63966084", "0.63091314", "0.6290859", "0.62888175", "0.6280821", "0.6248653", "0.62234753", "0.61962074", "0.61962074", "0.6...
0.7070574
0
Creates the total time spent for the test to get finished
private void createTotalTime(BufferedWriter writer) throws IOException { Map<String, String> dataMap = data.getTotalTime(); String parent = "<div style='width: 260px;background-color: #FFFFFF;box-shadow: 1px 1px 1px #888888;height: 85px;position: absolute;top: 67px;left: 281px;'>"; String subChild = "<label st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int totalTime()\n\t{\n\t\t//i'm using this varaible enough that I should write a separate method for it\n\t\tint totalTime = 0;\n\t\tfor(int i = 0; i < saveData.size(); i++)//for each index of saveData\n\t\t{\n\t\t\t//get the start time\n\t\t\tString startTime = saveData.get(i).get(\"startTime\");\n\t\t\t/...
[ "0.6401252", "0.6314534", "0.63071066", "0.6282415", "0.62772757", "0.6246136", "0.6238247", "0.6210263", "0.619057", "0.61849916", "0.6151384", "0.61501586", "0.6113842", "0.60913396", "0.6020052", "0.60033", "0.6000083", "0.5957959", "0.5946031", "0.59365433", "0.5904115", ...
0.0
-1
JavaScript function for creating barchart
private String generateChart() { int passedTestCount = data.getNumberofTestPassed(); int skippedTestCount = data.getNumberofTestSkipped(); int failedTestCount = data.getNumberofTestFailed(); String script = "<script>var svg = d3.select('svg')," + "margin = {top: 30, right: 20, bottom: 20, left: 50},"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initBarChart() {\n\t\tBarChart<String, Number> chartLinguagens = new BarChart<String, Number>(new CategoryAxis(), new NumberAxis());\n\t\t// define o espaçamento entre as barras.\n\t\tchartLinguagens.setCategoryGap(30);\n\t\t// inserindo o title do grafico\n\t\tchartLinguagens.setTitle(\"Ranking de Li...
[ "0.72888404", "0.6890042", "0.68212146", "0.6759424", "0.66809595", "0.6607822", "0.6590629", "0.65559506", "0.6419748", "0.639181", "0.6284878", "0.6248159", "0.6245647", "0.62393105", "0.6230054", "0.6225162", "0.6218282", "0.61721087", "0.61629236", "0.6155867", "0.6135782...
0.5945126
28
Creates the table for writing individual test result
private void createTable(BufferedWriter writer, ResultTable tableData) throws IOException { int height = (37 * tableData.getDataCount()) + 56 + (tableData.getExpectionMessageData().size() * 4); String container = "<div style='width: 766px;background-color: #FFFFFF;box-shadow: 1px 1px 1px #888888;;height:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void writeTableContents(BufferedWriter writer, ISuite suite,\r\n\t\t\tResultTable table) throws IOException {\r\n\r\n\t\tMap<String, ResultVo> dataMap = table.getResultData();\r\n\t\tString closer = \"</tbody></table></div>\";\r\n\t\tdataMap.forEach((key, value) -> {\r\n\t\t\tString datagenerator = \"\";\r...
[ "0.6828514", "0.6703705", "0.667444", "0.66656023", "0.6605279", "0.6580757", "0.65010434", "0.63868105", "0.63551503", "0.6345023", "0.63424236", "0.6320532", "0.6306808", "0.62933105", "0.628145", "0.62417716", "0.62350935", "0.6206074", "0.6134093", "0.61173934", "0.605667...
0.72318166
0
Writes the Tables contents which has individual test results
private void writeTableContents(BufferedWriter writer, ISuite suite, ResultTable table) throws IOException { Map<String, ResultVo> dataMap = table.getResultData(); String closer = "</tbody></table></div>"; dataMap.forEach((key, value) -> { String datagenerator = ""; String message = value.getExpe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void writeResults() {\n\t\t//Sort hashMap before sending to file\n\t\tTreeSet<Word> mySet = new TreeSet<>(hm.values());\n\n\t\t//Create result.txt file and write treeMap out to it\n\t\tWriter writer = null;\n\t\ttry {\n\t\t\t//System.out.println(\"Here\");\n\t\t\twriter = new BufferedWriter(new Outp...
[ "0.66862273", "0.6609117", "0.6558603", "0.65200853", "0.64827245", "0.64182705", "0.6329516", "0.6317114", "0.62767094", "0.62642384", "0.62100685", "0.6180135", "0.6103318", "0.6085099", "0.6031636", "0.6024378", "0.60028833", "0.5988324", "0.5987067", "0.5959152", "0.59159...
0.73933667
0
Writes the class with exception test method with type of exception thrown
private void createExpectionalClassDiv(BufferedWriter writer, ResultTable table) throws IOException { Map<String, String> data = table.getExpectionMessageData(); int size = table.getExpectionMessageData().size(); if (size != 0) { int height = ((size - 1) * 77) + 120; String container = "<div styl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test075() throws Throwable {\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter((-4015));\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n MethodWriter methodWri...
[ "0.6716855", "0.66757256", "0.65256363", "0.64357257", "0.63761914", "0.6318617", "0.63160616", "0.6302777", "0.6285498", "0.6267788", "0.6256094", "0.6238078", "0.6235659", "0.6233495", "0.6229683", "0.6216009", "0.62150574", "0.6209174", "0.6196621", "0.61876", "0.6182865",...
0.0
-1
TODO Autogenerated method stub
public int getWidth() { return width; }
{ "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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
TODO Autogenerated method stub
public int getHeight() { return height; }
{ "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
Created by alleyz on 2017/5/20 0020.
@Projection(name = "IdTeacher", types = TblTeacher.class) public interface Teacher { int getId(); String getUserCode(); String getLoginCode(); String getName(); String getSex(); String getDep(); String getBirthday(); String getEdu(); String getEntryTime(); Strin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "public void mo38117a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private void m503...
[ "0.5876914", "0.58446646", "0.5814295", "0.571806", "0.56330365", "0.56203175", "0.5619264", "0.5598179", "0.55643654", "0.55643654", "0.5535871", "0.5532638", "0.55072284", "0.5501122", "0.54911387", "0.5487997", "0.5487997", "0.5487997", "0.5487997", "0.5487997", "0.5487997...
0.0
-1
Array that stores the main menu
public static void main(String[] args) { String [] mainMenu = {"Main Menu", "Search", "Stats", "Spells", "Bag", "Quests", "Shop", "Test", "Exit"}; //Array that stores the shop menu String [] shopMenu = {"Shop Menu", "Buy", "Sell", "Exit"}; //Array that stores the battle menu ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private JMenuBar getMenuLista() {\n\t\tif (menuLista == null) {\n\t\t\tmenuLista = new JMenuBar();\n\t\t\tmenuLista.add(getFileMenu());\n\t\t\tmenuLista.add(getHelpMenu());\n\t\t}\n\t\treturn menuLista;\n\t}", "IMenu getMainMenu();", "String getMenus(MmtConfig cfg);", "private FlowPane setMainMenu() {\n ...
[ "0.66354907", "0.6571153", "0.6566472", "0.6493848", "0.64624745", "0.64410436", "0.6408587", "0.64080626", "0.6387247", "0.63797665", "0.6362269", "0.63349396", "0.631108", "0.63108397", "0.6307529", "0.62980455", "0.6294168", "0.62893736", "0.6282488", "0.62808555", "0.6275...
0.57650995
94
Function that prints the designated menu from the array and gets the user response
private static String getUserName(){ Scanner in = new Scanner(System.in); System.out.print("What is your character's name?"); return in.nextLine(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String getUserChoice(String[] menu){\r\n System.out.println(\"\");\r\n for(int i = 0; i < menu.length; i++){\r\n if(i == 0){\r\n System.out.println(\"\\t--\" + menu[i] + \"--\"); \r\n }\r\n else{\r\n System.out.println(\"...
[ "0.73732364", "0.7139803", "0.708755", "0.70795655", "0.70733273", "0.7057461", "0.7019892", "0.69607294", "0.6954283", "0.69096076", "0.69074833", "0.6905256", "0.68914926", "0.68769926", "0.68746823", "0.6860502", "0.68484515", "0.6842767", "0.68419844", "0.6841047", "0.682...
0.0
-1
Function that displays the menu and gets the users choice
private static String getUserChoice(String[] menu){ System.out.println(""); for(int i = 0; i < menu.length; i++){ if(i == 0){ System.out.println("\t--" + menu[i] + "--"); } else{ System.out.println("\t" + i + ") " + menu[i]); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showMenu() {\n\t\tSystem.out.println(\"Please, choose one option!\");\n\t\tSystem.out.println(\"[ 1 ] - Highest Company Capital\");\n\t\tSystem.out.println(\"[ 2 ] - Lowest Company Capital\");\n\t\tSystem.out.println(\"[ 3 ] - Best Investor of the Day\");\n\t\tSystem.out.println(\"[ 4 ] - Worst Investo...
[ "0.78617454", "0.77888733", "0.77836734", "0.77352965", "0.7731113", "0.772126", "0.7709751", "0.76850486", "0.7680551", "0.7660485", "0.7637709", "0.7635825", "0.7628438", "0.76157004", "0.755664", "0.7519815", "0.75177294", "0.7496024", "0.7495756", "0.74836737", "0.7454604...
0.72782326
32
Function to get user input
private static String getUserInput(String prompt){ Scanner in = new Scanner(System.in); System.out.print(prompt); return in.nextLine(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getUserInput();", "String getInput();", "String userInput(String question);", "String consoleInput();", "public String userInputString() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "String userInputFromTextArea();", "public static String getS...
[ "0.8718835", "0.82819515", "0.8056384", "0.7663325", "0.75341755", "0.74915034", "0.74326366", "0.74206245", "0.7382846", "0.73447585", "0.73234546", "0.730421", "0.72910964", "0.7277181", "0.72570086", "0.7253877", "0.7188444", "0.71350056", "0.71322817", "0.7125921", "0.711...
0.76561403
4
Function that displays the player stats
private static void displayPlayerStats(Object[] stats, String[] helmetSlot, String[] chestSlot, String[] weaponSlot, String[] glovesSlot, String[] bootsSlot){ System.out.println("Name: " + stats[0]); System.out.println("Level: " + stats[1]); System.out.println("Experience: " + sta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printPlayerStat(Player player);", "public static String printStats() {\n return \"Your Statistics:\" + \"\\n\" +\n \"Total Time in Game (Seconds): \" + timeElapsedSeconds + \"\\n\" +\n \"Total Points: \" + totalScore + \"\\n\" +\n \"Total Number of ...
[ "0.7909215", "0.7468867", "0.7467505", "0.74241173", "0.7412339", "0.73851997", "0.7372903", "0.73521924", "0.7301853", "0.7285959", "0.72152823", "0.70316935", "0.7016295", "0.7011012", "0.697491", "0.69130516", "0.6873648", "0.6869748", "0.685704", "0.6840065", "0.68116295"...
0.7650954
1
Function that increases max health using vitality
private static int maxHealth(int health){ int mHealth = 0; mHealth = health + 5; return mHealth; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeMaxHealth(int i) {\n \t\tmaxHealthModifier += i;\n \t\tif (getMaxHealth() < 1 ){\n \t\t\thealth = 0;\n \t\t\talive = false;\n \t\t}\n \t\tif (getMaxHealth() < health) {\n \t\t\thealth = getMaxHealth();\n \t\t}\n \t}", "public int getMaxHealth();", "public void setMaxHealth() {\n\t\tthis.maxHe...
[ "0.73422796", "0.72144467", "0.7025217", "0.6905525", "0.6824539", "0.6770928", "0.6738792", "0.67284244", "0.66661495", "0.6645168", "0.6619308", "0.6614566", "0.6581197", "0.6560061", "0.65552324", "0.65036005", "0.65013236", "0.64961433", "0.6495051", "0.6472821", "0.64652...
0.76884514
0
Function that adds stat points upon level up
private static int gainStatPoints(int statPoints){ statPoints++; System.out.println("You have " + statPoints + " stat points available."); return statPoints; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addHealthLevel(int points)\n {\n healthLevel = healthLevel + points;\n showHealthLevel();\n if (healthLevel < 0) \n {\n Greenfoot.playSound(\"game-over.wav\");\n Greenfoot.stop();\n }\n }", "private void addPoint(){\n\n userList.ad...
[ "0.6856258", "0.6720957", "0.66850346", "0.6542143", "0.64650285", "0.6368769", "0.6318849", "0.6287606", "0.62656575", "0.62453866", "0.61945343", "0.61897445", "0.6159424", "0.5967858", "0.5961442", "0.5957745", "0.59382224", "0.5910268", "0.5892342", "0.58286554", "0.57983...
0.69790107
0
Function that increases max mp using intelligence
private static int maxMp(int mp){ int mMP = 0; mMP = mp + 5; return mMP; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getM...
[ "0.76063997", "0.76063997", "0.76063997", "0.76063997", "0.76063997", "0.76063997", "0.6836161", "0.6836161", "0.6836161", "0.6836078", "0.6835222", "0.6835222", "0.6727591", "0.6727591", "0.6727591", "0.67275023", "0.67275023", "0.67275023", "0.66164416", "0.64352286", "0.63...
0.7518062
6
Function that removes stat points upon allocation
private static int removeStatPoints(int statPoints){ statPoints--; return statPoints; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetPoints() {\n points = 0;\n }", "void removeDrawDetail(Pool pool);", "public void clearAllPoints() {\n\t\tpoints.clear();\n\t\tnotifyListeners();\n\t}", "public void remove_transfered_points(int points) {\n\t\tthis.balance = this.balance - points;\n\t\tif(this.balance < 10000) this....
[ "0.62976223", "0.6227691", "0.61364275", "0.5961799", "0.5956207", "0.594796", "0.5941497", "0.5935331", "0.5935331", "0.5935331", "0.5857869", "0.5815182", "0.5800203", "0.5781261", "0.57502955", "0.570051", "0.56906486", "0.5651193", "0.56353295", "0.5613955", "0.55684805",...
0.7451827
0
Function that increases strength
private static int gainStrength(int strength){ strength++; System.out.println("You gain 1 strength"); return strength; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void increaseStrength(int f) {\r\n\t\tstrength += f;\r\n\t}", "@Override\n\tpublic int strength() {\n\t\treturn 1;\n\t}", "void increaseStrength() {\n if (this.strokeStrength + 0.25 <= 6) {\n this.strokeStrength += 0.25;\n }\n this.updateAcc();\n this.updateStick()...
[ "0.7923475", "0.7801807", "0.7671741", "0.7669957", "0.75321835", "0.7515813", "0.7515813", "0.74835104", "0.73328567", "0.7262434", "0.7171296", "0.70593184", "0.6777663", "0.6730944", "0.6702353", "0.6701526", "0.6701069", "0.6644019", "0.6619944", "0.6619944", "0.6582349",...
0.8389786
0
Function that increases intelligence
private static int gainIntelligence(int intelligence){ intelligence++; System.out.println("You gain 1 intelligence"); return intelligence; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeIntelligence(int i) {\n \t\tif (intelligence + i < 1){\n \t\t\tintelligence = 0;\n \t\t\talive = false;\n \t\t}\n \t\tintelligence += i;\n \t}", "private boolean learning()\r\n\t{\r\n\t\tint temp = (int) (Math.random() * 100);\t\t//generate a random int between 0-100\r\n\t\tif(temp<=intelligenc...
[ "0.71703935", "0.6463602", "0.64558953", "0.6401493", "0.6272593", "0.6244366", "0.62207335", "0.6209427", "0.6204978", "0.61548156", "0.6105754", "0.6086862", "0.6074113", "0.6039964", "0.6018052", "0.6016263", "0.60046715", "0.60046715", "0.59858906", "0.59606946", "0.59444...
0.7667333
0
Function that increases vitality
private static int gainVitality(int vitality){ vitality++; System.out.println("You gain 1 vitality"); return vitality; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int viability() {\n int[] newStats = getNewStats();\n return newStats[0] * newStats[1];\n }", "public int increaseDefense () {\n return 3;\n }", "public abstract void increaseThis();", "void incUsage() {\n incUsage(1);\n }", "@Override\n\tpublic void sac...
[ "0.6451013", "0.64455664", "0.63149726", "0.62197655", "0.62046933", "0.6082239", "0.60372657", "0.60372657", "0.60323095", "0.6020194", "0.6004418", "0.5977341", "0.5942669", "0.59151596", "0.59137166", "0.5912226", "0.59083164", "0.5893903", "0.5879739", "0.5759566", "0.575...
0.66474956
0
Function that manages the encounter list
private static String encounter(int playerLevel){ String encounterType; int number = 0; Random rand = new Random(); if(playerLevel > 6){ number = rand.nextInt(4); }else if(playerLevel > 4){ number = rand.nextInt(3); }else{ numb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void enemyEncounter()\n {\n currentEnemies = currentRoom.getEnemies();\n \n if(currentEnemies.size() > 0)\n {\n for(Enemy e : currentEnemies)\n {\n System.out.println(\"\\n\" + \"A \" + e.getName() + \" stares menacingly!\" + \"\\n\");\n ...
[ "0.6342934", "0.5895433", "0.5410037", "0.5398187", "0.5392557", "0.52659875", "0.5256961", "0.5236045", "0.5214831", "0.51769507", "0.5125427", "0.5069855", "0.50614095", "0.50593114", "0.5055731", "0.5036822", "0.50127536", "0.50014704", "0.49550942", "0.49434677", "0.49172...
0.0
-1
Function that determines which item is dropped when the enemy is killed and returns that item
private static String itemDrop(int number){ String itemDropped; switch(number){ case 1: itemDropped = "Short Sword"; break; case 2: itemDropped = "Leather Helmet"; break; case 3: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t/**\r\n\t * Each enemy has a unique drop\r\n\t */\r\n\tpublic String enemyDrop() {\n\t\treturn null;\r\n\t}", "public org.bukkit.inventory.ItemStack getBossDrop(String killer) {\n\t\tint number = random.nextInt(100);\r\n\t\tfor(Entry<SpecialItem, Integer> item: drops.entrySet()) {\r\n\t\t\tLog.inf...
[ "0.7280982", "0.7056459", "0.69670784", "0.69194937", "0.6884856", "0.6821026", "0.67644596", "0.6748016", "0.6712519", "0.6699234", "0.6692962", "0.6687284", "0.66081756", "0.6604667", "0.66027814", "0.65990067", "0.65765715", "0.65658516", "0.65618765", "0.65599936", "0.655...
0.6120101
52
Function that calculates the players total defense
private static int playerTotalDefense(String [] helmetEquip, String [] chestPlateEquip, String [] bootsEquip, String [] glovesEquip, int playerDefense){ int totalDefense; int bootsDefense = 0; int chestDefense = 0; int glovesDefense = 0; int helmetDefense = 0; leath...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int playerDamageDealt(int playerAttack, int monsterDefense){\r\n int playerDamageDealt;\r\n playerDamageDealt = (playerAttack - monsterDefense);\r\n return playerDamageDealt;\r\n }", "private static int monsterDamageDealt(int monsterAttack, int playerDefense){\r\n in...
[ "0.73267794", "0.71914893", "0.7172896", "0.7127819", "0.7127819", "0.7127819", "0.7127819", "0.7127819", "0.7127819", "0.70302224", "0.69976", "0.69908506", "0.6950466", "0.68217796", "0.6776136", "0.6776136", "0.6776063", "0.6776063", "0.6776063", "0.6775979", "0.67608243",...
0.6505169
33
Function that calculates the players total attack
private static int playerTotalAttack(String [] weaponEquip, int playerAttack, int strength){ int totalAttack = 0; int shortSwordAttack; int greatSwordAttack; int longSwordAttack; int hongerAttack; shortSword ShortSword = new shortSword(); longSword LongSwor...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int calculateAttack() {\n int attack = 0;\n for (Weapon w : equippedWeapons) {\n attack += w.getType().getDamage();\n }\n return attack;\n }", "public int getTotalWins() {\n int sum = 0;\n for (int i = 0; i < 13; i++) {\n sum += i * this.s...
[ "0.7492802", "0.6908303", "0.6830985", "0.68233633", "0.6814374", "0.67548716", "0.6729765", "0.6720718", "0.6712733", "0.6647967", "0.6584289", "0.6564181", "0.6550779", "0.6544359", "0.6537918", "0.6526043", "0.6523464", "0.6519914", "0.64917123", "0.6482068", "0.64733607",...
0.6612327
10
Function that calculates the damage dealt by the player to the monster
private static int playerDamageDealt(int playerAttack, int monsterDefense){ int playerDamageDealt; playerDamageDealt = (playerAttack - monsterDefense); return playerDamageDealt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int monsterDamageDealt(int monsterAttack, int playerDefense){\r\n int monsterDamageDealt;\r\n monsterDamageDealt = (monsterAttack - playerDefense);\r\n if(monsterDamageDealt < 0){\r\n monsterDamageDealt = 0;\r\n return monsterDamageDealt;\r\n }else{\...
[ "0.8033791", "0.75416774", "0.75278026", "0.7497036", "0.739567", "0.7356574", "0.7348996", "0.7348996", "0.7348996", "0.7348996", "0.7348996", "0.73362625", "0.7331226", "0.730835", "0.730568", "0.72791", "0.7271019", "0.7258118", "0.72460866", "0.7242688", "0.7239158", "0...
0.84113944
0
Function that calculates the damage the monster dealt to the player
private static int monsterDamageDealt(int monsterAttack, int playerDefense){ int monsterDamageDealt; monsterDamageDealt = (monsterAttack - playerDefense); if(monsterDamageDealt < 0){ monsterDamageDealt = 0; return monsterDamageDealt; }else{ retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int playerDamageDealt(int playerAttack, int monsterDefense){\r\n int playerDamageDealt;\r\n playerDamageDealt = (playerAttack - monsterDefense);\r\n return playerDamageDealt;\r\n }", "public double damageCalculation(NPC mob, Player player) {\r\n double weapon = mob.g...
[ "0.83176595", "0.76631033", "0.7474629", "0.7437654", "0.7380156", "0.7380156", "0.7380156", "0.7380156", "0.7380156", "0.733466", "0.73265356", "0.73163676", "0.72715473", "0.7254559", "0.72182614", "0.72085905", "0.7208576", "0.7198559", "0.7185789", "0.71655697", "0.715335...
0.7940183
1
Function that displays the bag
private static void displayBag(String[] bag){ for(int i=0; i<bag.length; i++){ //Checks to see if slots 4, 8, or 12 are empty if((i == 4 || i == 8 || i == 12) && bag[i].equals("")){ System.out.print("\n| "); System.out.print("-"); Sy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void display() {\n\t\tif (bag.getSize() == 0) {\n\t\t\tSystem.out.println(\"The bag is empty!\");\n\t\t} else {\n\t\t\tSystem.out.println(\"**You have \" + bag.getSize() + \" items in the bag.\");\n\t\t\tbag.print();\n\t\t\tSystem.out.println(\"**End of list\");\n\t\t}\n\t}", "private static void display...
[ "0.8040091", "0.7637124", "0.7192126", "0.68268794", "0.68129283", "0.65289915", "0.64324206", "0.6429002", "0.63659084", "0.634411", "0.6154141", "0.60817695", "0.60799384", "0.60558665", "0.6048198", "0.6026887", "0.5981751", "0.59793556", "0.5972744", "0.5963235", "0.59369...
0.7273459
2
Function to place an item in the user's inventory
private static String[] placeInBag(String item, String[] inventory){ for(int i=0; i<inventory.length; i++){ if(inventory[i].equals("")){ inventory[i] = item; break; } } return inventory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addToInventory(Item item) {\n inventory.put(item.getName(), item);\n }", "public void addItemInventory(Item item){\n playerItem.add(item);\n System.out.println(item.getDescription() + \" was taken \");\n System.out.println(item.getDescription() + \" was removed from th...
[ "0.7320933", "0.71620244", "0.7157282", "0.7062102", "0.7037915", "0.7015474", "0.6780208", "0.6764384", "0.6747448", "0.6723954", "0.6708554", "0.6708288", "0.6620306", "0.661642", "0.660742", "0.66013885", "0.6555061", "0.6550532", "0.6493438", "0.6479966", "0.6474427", "...
0.6631779
12
Function to display items to be equipped from the inventory and select which item is to be equipped
private static String displayItemFromBag(String[] inventory, String option){ String itemToDoAction; int counter = 1; if(option.equals("Equip")){ for(int i = 0; i < inventory.length; i++){ if(inventory[i].equals("Short Sword") || inventory[i].equals("Leather Helme...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showInventory()\n\t{\n\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t+ \"__________________\\n\\n\");\n\t\tSystem.out.print(\"\\t\\t\\t\\tInventory\");\n\t\t\n\t\tfor (String s: inventory)\n\t\t{\n\t\t\tSystem.out.print(\"\\n\" + s);\n\t\t}\n\t\t\n\t\tSystem.ou...
[ "0.7255849", "0.71219486", "0.7113664", "0.6985533", "0.68550587", "0.6833291", "0.6820143", "0.6819692", "0.6804967", "0.6703203", "0.6673018", "0.6672361", "0.66684693", "0.6655479", "0.6617641", "0.6596505", "0.6592343", "0.6577353", "0.6546487", "0.65435416", "0.6536856",...
0.7655545
0
Function to remove said item from inventory
private static String[] removeFromBag(String[] inventory, String item){ for(int i=0; i<inventory.length; i++){ if(inventory[i].equals(item)){ inventory[i] = ""; break; } } return inventory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeItemInventory(Item item){\r\n playerItem.remove(item);\r\n System.out.println(item.getName() + \" was removed from your inventory\");\r\n }", "public void removeItemInventory(Item item){\n playerItem.remove(item);\n System.out.println(item.getName() + \" was remov...
[ "0.80365086", "0.8015905", "0.7943136", "0.7620472", "0.7597028", "0.744281", "0.743913", "0.7423332", "0.7357906", "0.7321511", "0.7315207", "0.7275073", "0.72735274", "0.7236741", "0.7189508", "0.71748877", "0.71660113", "0.71461934", "0.7143037", "0.7105226", "0.7085855", ...
0.6649395
60
Function that tallies the experience of the player
private static int experienceTally(int playerExperience, int monsterExperience){ int totalExperience; totalExperience = playerExperience + monsterExperience; return totalExperience; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void experience(){\n PlayerStats.currentEXP += (12*AC + 8*totalHP);\n System.out.println(\"You gained \" +(12*AC + 8*totalHP)+ \" experience!\");\n }", "public abstract double experience();", "public void gainExperience(Combatant opponent) { }", "void givePlayerExp(BPlayer bPla...
[ "0.8009939", "0.74111843", "0.7237203", "0.7160193", "0.6878726", "0.67711294", "0.67286366", "0.6710273", "0.669834", "0.66965055", "0.6682695", "0.6649829", "0.6609966", "0.66034585", "0.658175", "0.656068", "0.65412587", "0.65305555", "0.65077126", "0.6492598", "0.6481023"...
0.7507049
1
Function that Levels the player up
private static int levelUp(int playerLevel){ int level = playerLevel + 1; System.out.println("You have leveled up!"); //Tells the user what level they are System.out.println("You are now level " + level + "!"); return level; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void levelUp(){\r\n\t\tthis.level = this.level+1;\r\n\t\tint prevMaxHp = this.getHitPoints();\r\n\t\tint prevAtk = this.getAttackRating();\r\n\t\tint prevDef = this.getDefenseRating();\r\n\r\n\t\tif(level>=2 && level<=9){\r\n\t\t\tthis.maxHitPoints += 7;\r\n\t\t\tthis.attackRating += 3;\r\n\t\t\tthis.def...
[ "0.7656274", "0.7569953", "0.73913324", "0.7334215", "0.7247383", "0.7051739", "0.7025645", "0.6993564", "0.69557387", "0.69543594", "0.6800638", "0.67977864", "0.6779938", "0.6715834", "0.6715628", "0.66835356", "0.66427064", "0.6641239", "0.6592065", "0.6590293", "0.6564047...
0.7641462
1
Function to populate the shop keepers inventory with items
private static String[] populateShopKeeperInventory(String[] shopKeeperInventory){ shopKeeperInventory[0] = "Healing Potion"; shopKeeperInventory[1] = "Greater Healing Potion"; shopKeeperInventory[2] = "Long Sword"; shopKeeperInventory[3] = "Great Sword"; return shopKeeperIn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fillInventory(TheGroceryStore g);", "private void loadStartingInventory(){\n this.shelfList = floor.getShelf();\n Iterator<String> i = items.iterator();\n for (Shelf s : shelfList){\n while (s.hasFreeSpace()){\n s.addItem(i.next(), 1);\n }\n ...
[ "0.744282", "0.7011291", "0.67073375", "0.66449505", "0.6639128", "0.663618", "0.66004694", "0.65814245", "0.6471732", "0.64591986", "0.6430404", "0.6347005", "0.6324385", "0.63202554", "0.6319593", "0.6300687", "0.62879497", "0.62808853", "0.62717557", "0.622275", "0.6173845...
0.62570757
19