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 |
|---|---|---|---|---|---|---|
Helper method to write the given data on the TCP/IP socket. A Toast is created on the android screen if the socket is connected. | private void sendData(String data) {
if (!socket.isConnected() || socket.isClosed()) {
Toast.makeText(getApplicationContext(), "Joystick is disconnected...",
Toast.LENGTH_LONG).show();
return;
}
try {
OutputStream outputStream = socket.getOutputStream();
byte [] arr = data.getBytes();
byte [] cpy = ByteBuffer.allocate(arr.length+1).array();
for (int i = 0; i < arr.length; i++) {
cpy[i] = arr[i];
}
//Terminating the string with null character
cpy[arr.length] = 0;
outputStream.write(cpy);
outputStream.flush();
Log.d(TAG, "Sending data " + data);
} catch (IOException e) {
Log.e(TAG, "IOException while sending data "
+ e.getMessage());
e.printStackTrace();
} catch (NullPointerException e) {
Log.e(TAG, "NullPointerException while sending data "
+ e.getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void writeData(String data) {\n try {\n outStream = btSocket.getOutputStream();\n } catch (IOException e) {\n }\n\n String message = data;\n byte[] msgBuffer = message.getBytes();\n\n try {\n outStream.write(msgBuffer);\n } catch (IOExc... | [
"0.70797616",
"0.69754004",
"0.6967548",
"0.66313213",
"0.65681875",
"0.65092057",
"0.64658403",
"0.6435264",
"0.6419903",
"0.6264211",
"0.6238523",
"0.62113297",
"0.6209073",
"0.6207585",
"0.61862296",
"0.61682034",
"0.6147115",
"0.6144125",
"0.6133161",
"0.6089435",
"0.6086... | 0.69119763 | 3 |
Crea el Panel con fondo del radio. Tambien se encarga de responder ante el tipo de objeto que se cree, pudiendo asi mostrar en pantalla el formato actual del radio. | public Panel_fondo(Image fondo){
/** INICIALIZAR PROPIEDADES DE PANTALLA Y GUI */
this.fondo_panel = fondo;
Dimension tamano = new Dimension(fondo_panel.getWidth(null),fondo_panel.getHeight(null));
setPreferredSize(tamano);
pantalla.setFont(font);
setLayout(null);
car_radio = new Radio();
//*************************Creo mis botones con su respectiva IMAGEN y NOMBRE ***************************
for(int a=0;a< mis_botoncitos.length ;a++){
if(System.getProperty("os.name").toLowerCase().startsWith("windows"))
mis_botoncitos[a] = new myBotones(new ImageIcon(".\\imagenes\\botones\\"+a+".jpg"),a);
else
mis_botoncitos[a] = new myBotones(new ImageIcon("./imagenes/botones/"+a+".jpg"),a);
mis_botoncitos[a].addActionListener(this);
add(mis_botoncitos[a]);
}
//*************************Coloco todos mis Botones en Forma ELEGANTE ***************************
for(int x=0;x<4;x++){
for(int y=0;y<4;y++){
mis_botoncitos[counter].setBounds(286+y*54,150+x*54,55,55);
counter +=1;
}// Tamaño de Imagenes 83*75 , 54*119 , 79*75 , 88*62, 340*58
}
//Colocar Mis Botones en Lugares Especificos, sinningun LAYOUT
mis_botoncitos[0].setBounds(125,125,83,75);
mis_botoncitos[13].setBounds(125,360,54,119);
mis_botoncitos[14].setBounds(605,360,79,75);
mis_botoncitos[15].setBounds(330,365,88,62);
mis_botoncitos[16].setBounds(418,365,88,62);
//Establecer ToolTips para ayuda
mis_botoncitos[0].setToolTipText("On / Off");
mis_botoncitos[14].setToolTipText("Presiona 'Store', y luego El numero de Memoria");
pantalla.setBounds(270,70,340,58);
add(pantalla);
// ******************************************************************************************************
//@verriding para pintar el fondo del panel
//con la imagen inicialmente enviada
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private JPanel criarPainelNorte() {\n\n JPanel pNorte = new JPanel(new BorderLayout());\n\n pNorte.setBorder(PADDING_BORDER);\n\n JLabel lbl = new JLabel(\"Selecione o tipo de Utilizador:\", JLabel.CENTER);\n\n btnFae = criarRadioBtnFae();\n btnOrg = criarRadioBtnOrg();\n ... | [
"0.6571653",
"0.63084733",
"0.61239713",
"0.59769404",
"0.5919328",
"0.5915748",
"0.5905855",
"0.5883822",
"0.58586293",
"0.58278674",
"0.5823427",
"0.5808127",
"0.57540476",
"0.5753459",
"0.5746603",
"0.57239854",
"0.57226455",
"0.572122",
"0.57026947",
"0.56475616",
"0.5644... | 0.62925225 | 2 |
Interface that handles edited messages received from a bot. | @FunctionalInterface
public interface MessageEditHandler extends UpdateHandler {
/**
* Handles an incoming message edit.
*
* @param message new incoming edit
* @param editDate the date of the edit
* @throws Throwable if a throwable is thrown
*/
void onMessageEdit(Message message, long editDate) throws Throwable;
@Override
default void onUpdate(Update update) throws Throwable {
if (update instanceof EditedMessageUpdate) {
Message message = ((EditedMessageUpdate) update).getMessage();
onMessageEdit(message, message.getEditDate().getAsLong());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onMessageEdit(Message message, long editDate) throws Throwable;",
"boolean editMessage(int roomId, long messageId, String updatedMessage) throws RoomNotFoundException, RoomPermissionException, IOException;",
"public abstract void update(Message message);",
"public void sendEditTest( MessageReceivedEvent... | [
"0.71790266",
"0.655698",
"0.6079811",
"0.60527563",
"0.5984171",
"0.59487253",
"0.5914935",
"0.591089",
"0.5883321",
"0.5844047",
"0.5838295",
"0.5824034",
"0.5805945",
"0.5786835",
"0.5781655",
"0.57716864",
"0.57687384",
"0.57609653",
"0.57560635",
"0.5733018",
"0.5724299"... | 0.6954491 | 1 |
Handles an incoming message edit. | void onMessageEdit(Message message, long editDate) throws Throwable; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean editMessage(int roomId, long messageId, String updatedMessage) throws RoomNotFoundException, RoomPermissionException, IOException;",
"public void sendEditTest( MessageReceivedEvent event ) {\n\n final StringBuilder message = new StringBuilder();\n message.append( \"!poll edit 00000 text tes... | [
"0.68066525",
"0.6261563",
"0.61987394",
"0.6184851",
"0.61760026",
"0.6157877",
"0.6155064",
"0.61408126",
"0.61182326",
"0.6089238",
"0.60614836",
"0.6048066",
"0.6034191",
"0.6023785",
"0.59937006",
"0.5978547",
"0.5973314",
"0.5972721",
"0.59569687",
"0.5929211",
"0.59283... | 0.7216815 | 0 |
initialisation des varibles modele et controleur | @Before
public void initial() {
modele = new FractaleModele();
controleur = new FractaleControler(modele);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void init()\n\t{\n\t\tsetModel(new Model(Id.model, this, null));\n\t\tsetEnviroment(new Enviroment(Id.enviroment, this, model()));\n\t\tsetVaccinationCenter(new VaccinationCenter(Id.vaccinationCenter, this, model()));\n\t\tsetCanteen(new Canteen(Id.canteen, this, vaccinationCenter()));\n\t\tsetRegistration... | [
"0.7691702",
"0.7108476",
"0.7020334",
"0.69539857",
"0.6927436",
"0.68137294",
"0.6748749",
"0.67306215",
"0.66915524",
"0.6577933",
"0.65677446",
"0.65566593",
"0.6536825",
"0.6508342",
"0.64838123",
"0.6467426",
"0.64606535",
"0.6444089",
"0.6430845",
"0.64030814",
"0.6394... | 0.692997 | 4 |
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. | @Override
public ResultSet getByID(String id) throws SQLException {
return db.getConnection().createStatement().executeQuery("select * from comic where idcomic="+id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void habilitar() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}... | [
"0.7744652",
"0.73749053",
"0.6966527",
"0.6909395",
"0.67964953",
"0.6773559",
"0.6771067",
"0.6654384",
"0.66389716",
"0.6624263",
"0.6609339",
"0.6609339",
"0.65914184",
"0.6586954",
"0.6555998",
"0.6499744",
"0.6462636",
"0.64495736",
"0.64296776",
"0.6419897",
"0.6382666... | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.profilemenu, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
} else if (id == R.id.pieProfile) {
startActivity(new Intent(this, ActivityInfo.class));
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ... | [
"0.79043454",
"0.7805307",
"0.7766523",
"0.7726966",
"0.76315224",
"0.7621912",
"0.758477",
"0.75306976",
"0.74880254",
"0.74575543",
"0.74575543",
"0.7438532",
"0.7421883",
"0.7402763",
"0.73917615",
"0.7386916",
"0.7379295",
"0.7370095",
"0.7362524",
"0.7355668",
"0.7345373... | 0.0 | -1 |
END Google Play Services connection callbacks section // | public void toEvents(View v) {
startActivity(new Intent(this, EventswipeActivity.class));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(\"MainActivity\", \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onConnectionFai... | [
"0.68801343",
"0.670071",
"0.66782266",
"0.66782266",
"0.66782266",
"0.66782266",
"0.66782266",
"0.66782266",
"0.66782266",
"0.66749936",
"0.65705717",
"0.6482301",
"0.6447309",
"0.64388514",
"0.6392222",
"0.63670284",
"0.63640827",
"0.6352089",
"0.6352089",
"0.6352089",
"0.6... | 0.0 | -1 |
Test that the profile of a user created with UserManagementcreateUser can be updated | @Test
public void testUpdateUserProfileOfCreatedUser() throws Exception {
UserVO user = new UserVO();
user.setAlias(UUID.randomUUID().toString());
user.setFirstName(UUID.randomUUID().toString());
user.setLastName(UUID.randomUUID().toString());
user.setEmail(UUID.randomUUID().toString() + "@" + UUID.randomUUID().toString());
user.setLanguage(Locale.ENGLISH);
user.setRoles(new UserRole[] { UserRole.ROLE_KENMEI_USER });
user.setPassword(UUID.randomUUID().toString());
User dbUser = ServiceLocator.instance().getService(UserManagement.class)
.createUser(user, false, false);
UserProfileVO userProfile = new UserProfileVO();
ServiceLocator.instance().getService(UserProfileManagement.class)
.updateUserProfile(dbUser.getId(), userProfile);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void test_update_user_success(){\n\t\tUser user = new User(null, \"fengt\", \"fengt2@itiaoling.com\", \"12345678\");\n\t\ttemplate.put(REST_SERVICE_URI + \"/20\" + ACCESS_TOKEN + token, user);\n\t}",
"@Test\n public void updateUser() {\n userDAO.createUser(new User(\"dummy\", \"dummy\",... | [
"0.7207893",
"0.7076503",
"0.6993102",
"0.6915705",
"0.68231666",
"0.67948735",
"0.67520463",
"0.6751899",
"0.6736847",
"0.6736512",
"0.6728615",
"0.6719467",
"0.67130697",
"0.67032844",
"0.66803926",
"0.66734743",
"0.66206384",
"0.659449",
"0.6577463",
"0.6576063",
"0.657037... | 0.8534561 | 0 |
end method Perform attack | @Override
public String performAttack(Entity target)
{
if(Math.random() <= this.accuracy)
{
Random rand = new Random();
Attack atk = new Attack();
atk.addDamage(new Damage(20+rand.nextInt(6), true, "bludgeon"));
atk.addDamage(new Damage(5+rand.nextInt(6), true, "slash"));
atk.applyPower(this.power);
return target.takeDamage(atk);
}
else
{
return ("The attack failed!");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void attack() {\n\n\t}",
"@Override\n\tpublic void attack() {\n\t\t\n\t}",
"@Override\n public void attack() {\n\n }",
"@Override\n\tvoid attack() {\n\n\t}",
"public void attack() {\n\n }",
"@Override\n\tpublic void attack() {\n\t}",
"public void attack();",
"@Override\n ... | [
"0.77667993",
"0.7720959",
"0.7716578",
"0.76569724",
"0.7636351",
"0.7622139",
"0.7588255",
"0.7538915",
"0.7347675",
"0.7323356",
"0.7282911",
"0.72606903",
"0.71541697",
"0.71519715",
"0.69749576",
"0.6972866",
"0.6754855",
"0.67223364",
"0.67030084",
"0.66559213",
"0.6645... | 0.56115514 | 87 |
end method Zombie spits up stomach acid | @Override
public String specialMove(Entity target)
{
if(Math.random() <= this.accuracy-0.1)
{
Random rand = new Random();
Attack atk = new Attack();
atk.addDamage(new Damage(rand.nextInt(10), true, "slash"));
CorrosiveAcid acidEffect = new CorrosiveAcid();
atk.addStatus(acidEffect);
atk.applyPower(this.power);
return target.takeDamage(atk);
}
else
{
return ("The attack failed!");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void endLife();",
"@Override\n\tpublic void despawn() {\n\t\t\n\t}",
"public void killed(){\n System.out.println(\"The zombie takes one step closer toward you then falls over.\");\n }",
"public void act() \n {\n moveAround();\n die();\n }",
"public void die()\n\t{\n\t\talive =... | [
"0.6910392",
"0.6835228",
"0.68162835",
"0.6793281",
"0.656096",
"0.6524518",
"0.65024567",
"0.64912754",
"0.64624727",
"0.64620346",
"0.64611083",
"0.64594525",
"0.6458225",
"0.64455265",
"0.6444414",
"0.64206606",
"0.640636",
"0.6404705",
"0.6394477",
"0.6371731",
"0.635138... | 0.0 | -1 |
Get auth token from header | @Override
public void filter(final ContainerRequestContext requestContext) throws IOException {
final String authToken = requestContext.getHeaders().getFirst("authToken");
if (StringUtils.isBlank(authToken)) {
throw unauthorizedWebException();
}
try {
// authenticate using token to get principle
final Optional<P> principal = authenticator.authenticate(authToken);
// set security context on request
if (principal.isPresent()) {
setSecurityContextOnRequest(requestContext, principal);
return;
}
} catch (AuthenticationException e) {
LOGGER.warn("Error authenticating credentials", e);
throw unauthorizedWebException();
}
throw unauthorizedWebException();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getToken(HttpServletRequest request){\n String header = request.getHeader(\"Authorization\");\n if(header != null && header.startsWith(\"Bearer\"))\n \t// Sacamos al bearer del token\n return header.replace(\"Bearer \", \"\");\n return null;\n }",
"Authent... | [
"0.77352816",
"0.76943856",
"0.73471385",
"0.7331064",
"0.72894806",
"0.6959657",
"0.6901381",
"0.68630546",
"0.6812894",
"0.67714435",
"0.67690796",
"0.6745212",
"0.67378855",
"0.6727949",
"0.67056996",
"0.66927433",
"0.66925704",
"0.66556025",
"0.6648153",
"0.6631135",
"0.6... | 0.0 | -1 |
Entry point of main. | public static void main(String[] args) throws Exception {
// 決定作品數量及演進世代
int POP_SIZE = 100;
int SELECTED_SIZE = 0;
int GENERATION = 300;
Main main = new Main(
POP_SIZE,
SELECTED_SIZE,
GENERATION,
LogState.DISABLED);
main.composer.draw(Composer.DRAWTYPE_COMBINEDCHART);
System.out.println(header("Persisting Conservatory"));
main.composer.persistAll();
var chart = new LineChart_AWT("Composer " + main.composer.getId());
var gsc = new GoldenSectionClimax(UnaccompaniedCello.RANGE.keySet());
main.composer.getConservatory().keySet().stream()
.sorted((o1, o2) -> o1.getId().compareTo(o2.getId()))
.peek(gsc::updateClimaxIndexes)
.forEach(c
-> IntStream.range(0, c.getSize())
.forEach(i
-> chart.addData(gsc.getClimaxIndexes().get(i), c.getId_prefix(), "" + i)
));
try {
var max = main.composer.getConservatory().keySet().stream()
.max(gsc::compareToPeak)
.orElseThrow();
IntStream.range(0, max.getSize())
.forEach(i -> {
chart.addData(gsc.getStandard(max, i), "standard", "" + i);
});
} catch (NoSuchElementException e) {
System.out.println("Sorry, the Conservatory is empty. Please try again.");
}
chart.createLineChart("SketchNode Rating Chart",
"SketchNode", "Intensity Index", 560, 367, true);
chart.showChartWindow();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main() {\n \n }",
"public static void main()\n\t{\n\t}",
"public static void main(){\n\t}",
"public static void main(String[] args) {}",
"public static void main(String[] args) {}",
"public static void main(String[] args)\r\t{",
"public static void main() {\n }",
"publ... | [
"0.7879628",
"0.78502923",
"0.7789284",
"0.77032006",
"0.77032006",
"0.7682624",
"0.7662147",
"0.7659671",
"0.76560014",
"0.7641896",
"0.7633076",
"0.75970733",
"0.75970733",
"0.758431",
"0.75776064",
"0.7562565",
"0.75586325",
"0.75586325",
"0.75586325",
"0.75539726",
"0.755... | 0.0 | -1 |
Custom collector to collect single element | public static <T> Collector<T, ?, T> toSingleton() {
return Collectors.collectingAndThen(Collectors.toList(), list -> {
if (list.size() != 1) {
// if more than one or no element is present then it should return null
return null;
}
return list.get(0);
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void collect(T elem) {\n value = elem;\n }",
"List<T> collect();",
"T collect(V source);",
"@Override\n\tvoid collect() {\n\t\t\n\t}",
"protected final void collect(T row) {\n collector.collect(row);\n }",
"@Test\n void testCollect() {\n List<Integer> numbers = Strea... | [
"0.68907875",
"0.60195667",
"0.5752954",
"0.56567687",
"0.5539371",
"0.54686517",
"0.54567474",
"0.54567474",
"0.54166543",
"0.53608716",
"0.53302914",
"0.524375",
"0.5224106",
"0.51935685",
"0.51786536",
"0.51478255",
"0.5137471",
"0.5102935",
"0.5096648",
"0.50583535",
"0.5... | 0.683108 | 1 |
Play the given audio effect if it exists | public void play(String s, Location location)
{
if(contains(s))
{
get(s).play(location);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void playEffect(Clip effect) {\n\n\t\tif (GameFrame.settingsPanel.effectsOn() && effect != null) {\n\t\t\teffect.start();\n\t\t\teffect.setFramePosition(0);\n\t\t}\n\n\t}",
"public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}",
"private void ... | [
"0.7238583",
"0.70819986",
"0.6631349",
"0.66185176",
"0.6603952",
"0.6567662",
"0.65216416",
"0.6515953",
"0.64328516",
"0.638066",
"0.63596475",
"0.63451314",
"0.6332295",
"0.63035524",
"0.6286881",
"0.6271095",
"0.62643814",
"0.6202227",
"0.61985594",
"0.6186964",
"0.61747... | 0.0 | -1 |
Play the given audio effect if it exists | public void play(String s, Player p)
{
if(contains(s))
{
get(s).play(p);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void playEffect(Clip effect) {\n\n\t\tif (GameFrame.settingsPanel.effectsOn() && effect != null) {\n\t\t\teffect.start();\n\t\t\teffect.setFramePosition(0);\n\t\t}\n\n\t}",
"public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}",
"private void ... | [
"0.7238583",
"0.70819986",
"0.6631349",
"0.66185176",
"0.6603952",
"0.6567662",
"0.65216416",
"0.6515953",
"0.64328516",
"0.638066",
"0.63596475",
"0.63451314",
"0.6332295",
"0.63035524",
"0.6286881",
"0.6271095",
"0.62643814",
"0.6202227",
"0.61985594",
"0.6186964",
"0.61747... | 0.0 | -1 |
Play the audio effect if it exists | public void play(String s, Player p, Location l)
{
if(contains(s))
{
get(s).play(p);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}",
"private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }",
"private void playAudi... | [
"0.7579138",
"0.7362153",
"0.732951",
"0.7225495",
"0.72129375",
"0.70360875",
"0.6951773",
"0.6925792",
"0.6842204",
"0.68367046",
"0.6762017",
"0.67590326",
"0.6758912",
"0.67352474",
"0.67181236",
"0.6702829",
"0.664913",
"0.6644454",
"0.66394156",
"0.663603",
"0.66353685"... | 0.0 | -1 |
TODO: Return the communication channel to the service. | @Override
public IBinder onBind(Intent intent) {
throw new UnsupportedOperationException("Not yet implemented");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Channel channel() {\n return channel;\n }",
"public IChannel getChannel() {\n\t\treturn message.getChannel();\n\t}",
"SocketChannel getChannel();",
"EzyChannel getChannel();",
"public Channel getChannel()\n {\n return channel;\n }",
"java.lang.String getChannel();",
"protected Channel getC... | [
"0.7437254",
"0.73157257",
"0.7183302",
"0.7135984",
"0.7129005",
"0.71285546",
"0.7090409",
"0.7070889",
"0.7067624",
"0.7038997",
"0.6988283",
"0.6917885",
"0.68884337",
"0.67946744",
"0.67914945",
"0.67852235",
"0.677885",
"0.674656",
"0.67354923",
"0.6681876",
"0.66714543... | 0.0 | -1 |
/ Used to build and start foreground service. | private void startForegroundService() {
Log.d(TAG_FOREGROUND_SERVICE, "Start foreground service.");
// Create notification default intent.
Intent intent = new Intent(getApplicationContext(), MainActivity.class);
// Intent intent = new Intent();
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
// NotificationCompat.Builder mBuilder =
// (NotificationCompat.Builder) new NotificationCompat.Builder(this)
// .setSmallIcon(R.drawable.ic_launcher_background)
// .setContentTitle("My notification")
// .setContentText("Hello World!");
// Create notification builder.
NotificationCompat.Builder builder = (NotificationCompat.Builder) new NotificationCompat.Builder(this).setSmallIcon(R.drawable.ic_launcher_background)
.setContentTitle("Music player implemented by foreground service.")
.setContentText("Android foreground service is a android service which can run in foreground always, it can be controlled by user via notification.");
// Make notification show big text.
// NotificationCompat.BigTextStyle bigTextStyle = new NotificationCompat.BigTextStyle();
// bigTextStyle.setBigContentTitle("Music player implemented by foreground service.");
// bigTextStyle.bigText("Android foreground service is a android service which can run in foreground always, it can be controlled by user via notification.");
// // Set big text style.
// builder.setStyle(bigTextStyle);
builder.setWhen(System.currentTimeMillis());
builder.setSmallIcon(R.mipmap.ic_launcher);
Bitmap largeIconBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.ic_menu_camera);
builder.setLargeIcon(largeIconBitmap);
// Make the notification max priority.
builder.setPriority(Notification.PRIORITY_MAX);
// Make head-up notification.
builder.setFullScreenIntent(pendingIntent, true);
// Add Play button intent in notification.
Intent playIntent = new Intent(this, MyForeGroundService.class);
playIntent.setAction(ACTION_PLAY);
PendingIntent pendingPlayIntent = PendingIntent.getService(this, 0, playIntent, 0);
NotificationCompat.Action playAction = new NotificationCompat.Action(android.R.drawable.ic_media_play, "Play", pendingPlayIntent);
builder.addAction(playAction);
// Add Pause button intent in notification.
Intent pauseIntent = new Intent(this, MyForeGroundService.class);
pauseIntent.setAction(ACTION_PAUSE);
PendingIntent pendingPrevIntent = PendingIntent.getService(this, 0, pauseIntent, 0);
NotificationCompat.Action prevAction = new NotificationCompat.Action(android.R.drawable.ic_media_pause, "Pause", pendingPrevIntent);
builder.addAction(prevAction);
// Build the notification.
Notification notification = builder.build();
// Start foreground service.
startForeground(1, notification);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void startForegroundService()\n {\n Log.d(\"TAG\", \"Start foreground service.\");\n\n // Create notification default intent.\n Intent intent = new Intent();\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);\n\n // Create notification build... | [
"0.67079717",
"0.6680476",
"0.6663489",
"0.66346496",
"0.66127986",
"0.658612",
"0.65664154",
"0.65516657",
"0.6543066",
"0.6542147",
"0.6529322",
"0.65265626",
"0.65042984",
"0.6478326",
"0.6475135",
"0.6417515",
"0.6338734",
"0.630138",
"0.62367135",
"0.6200521",
"0.6188358... | 0.67089266 | 0 |
Processes requests for both HTTP GET and POST methods. | protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
ip = request.getLocalAddr();
try {
Timestamp dataNow = GetNow();
Timestamp dataPrec = GetDate(request.getParameter("email"),response.getWriter());
long differenza = (dataNow.getTime()-dataPrec.getTime())/1000;
response.getWriter().println(differenza+"<br>");
if(differenza>90){
response.sendRedirect("LinkScaduto.html");
}
else{
char[] p = generatePswd(8, 12, 1, 1, 1);
String password = String.valueOf(p, 0, p.length) ;
String email = request.getParameter("email");
String ip = request.getLocalAddr();
UpdatePassword(email,password);
String ogget = "Confirm change password";
String testo = "Dear " + email
+ "\n This is your new password:"
+ "\n\n "+password;
Email send = new Email();
send.Send(email,ogget,testo);
response.sendRedirect("LinkValido.html");
}
} catch(IOException e) {}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_... | [
"0.7004024",
"0.66585696",
"0.66031146",
"0.6510023",
"0.6447109",
"0.64421695",
"0.64405906",
"0.64321136",
"0.6428049",
"0.6424289",
"0.6424289",
"0.6419742",
"0.6419742",
"0.6419742",
"0.6418235",
"0.64143145",
"0.64143145",
"0.6400266",
"0.63939095",
"0.63939095",
"0.6392... | 0.0 | -1 |
manca id o email | private Timestamp GetDate(String email, PrintWriter out){
Timestamp date = null;
//select che ritorna data creazione link
DBConnect db = new DBConnect(ip);
try {
PreparedStatement ps = db.conn.prepareStatement("SELECT countdown FROM users WHERE email = ?");
ps.setString(1, email);
ResultSet rs = db.Query(ps);
rs.next();
String datevalue = rs.getString("countdown");
date = Timestamp.valueOf(datevalue);
} catch (SQLException e) {
}
db.DBClose();
return date;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setEmail(String p) { this.idcorreo = p; }",
"String getUserMail();",
"public String adcionarEmail() {\n\t\tpessoa.adicionaEmail(email);\n\t\tthis.email = new Email();\n\t\treturn null;\n\t}",
"@AutoEscape\n\tpublic String getEmailId();",
"java.lang.String getEmail();",
"java.lang.String getEm... | [
"0.7251164",
"0.6940838",
"0.6798809",
"0.67861235",
"0.6744842",
"0.6744842",
"0.6744842",
"0.6744842",
"0.6744842",
"0.6744842",
"0.67119193",
"0.6665658",
"0.6614046",
"0.6614046",
"0.6614046",
"0.6614046",
"0.6614046",
"0.661305",
"0.65777284",
"0.6556428",
"0.6522004",
... | 0.0 | -1 |
Handles the HTTP GET method. | @Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void doGet( )\n {\n \n }",
"@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}",
"@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) thro... | [
"0.7589609",
"0.71665615",
"0.71148175",
"0.705623",
"0.7030174",
"0.70291144",
"0.6995984",
"0.697576",
"0.68883485",
"0.6873811",
"0.6853569",
"0.6843572",
"0.6843572",
"0.6835363",
"0.6835363",
"0.6835363",
"0.68195957",
"0.6817864",
"0.6797789",
"0.67810035",
"0.6761234",... | 0.0 | -1 |
Handles the HTTP POST method. | @Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }",
"public void doPost( )\n {\n \n }",
"@Override\n public String getMethod() {\n return \"POST\";\n ... | [
"0.73289514",
"0.71383566",
"0.7116213",
"0.7105215",
"0.7100045",
"0.70236707",
"0.7016248",
"0.6964149",
"0.6889435",
"0.6784954",
"0.67733276",
"0.67482096",
"0.66677034",
"0.6558593",
"0.65582114",
"0.6525548",
"0.652552",
"0.652552",
"0.652552",
"0.65229493",
"0.6520197"... | 0.0 | -1 |
Returns a short description of the servlet. | @Override
public String getServletInfo() {
return "Short description";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getServletInfo()\n {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short d... | [
"0.87634975",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8531295",
"0.8531295",
"0.85282224",
"0.85282224",
... | 0.0 | -1 |
transverse graph using bfs | static void bfs(int[][] G){
Queue<Integer> q = new LinkedList<Integer>();
for (int ver_start = 0; ver_start < N; ver_start ++){
if (visited[ver_start]) continue;
q.add(ver_start);
visited[ver_start] = true;
while(!q.isEmpty()){
int vertex = q.remove();
System.out.print((vertex+1) + " ");
for (int i=0; i<N; i++){
if (G[vertex][i] == 1 && !visited[i]){
// find neigbor of current vertex and not visited
// add into the queue
q.add(i);
visited[i] = true;
}
}
}
System.out.println("--");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void bfs() {\n\t\tQueue<Node> q = new ArrayDeque<>();\n\t\tq.add(treeNodes.get(0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tNode curr = q.poll();\n\t\t\t\ttime += curr.informTime;\n\t\t\t\tSet<Node> nextNodes = curr.nextNodes;\n\t\t\t\tif (ne... | [
"0.6401563",
"0.6372221",
"0.6241536",
"0.6241152",
"0.6167306",
"0.61387205",
"0.6063156",
"0.6027268",
"0.601698",
"0.6012635",
"0.59979945",
"0.5988858",
"0.5958736",
"0.59543806",
"0.5949613",
"0.5949177",
"0.59076506",
"0.5887444",
"0.5883528",
"0.58728534",
"0.58658004"... | 0.63311964 | 2 |
transverse graph using dfs | static void dfs(int[][] G){
Stack<Integer> s = new Stack<Integer>();
for (int ver_start=0; ver_start<N; ver_start++){
if (visited[ver_start]) continue;
s.push(ver_start);
visited[ver_start] = true;
while(!s.isEmpty()){
int vertex = s.pop();
System.out.print((vertex+1) + " ");
for (int i=0; i<N; i++){
if (G[vertex][i] == 1 && !visited[i]){
// find neigbor of current vertex and not visited
// add into the stack
s.push(i);
visited[i] = true;
}
}
}
System.out.println();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void dfs() {\n\t\tfor (Vertice v : vertices) {\n\t\t\tv.setVisited(false);\n\t\t}\n\t\tfor (Vertice v : vertices) {\n\t\t\tif (!v.getVisited()) {\n\t\t\t\tVisitar(v, -1);\n\t\t\t}\n\t\t}\n\t}",
"void graph2() {\n\t\tconnect(\"1\", \"7\");\n\t\tconnect(\"1\", \"8\");\n\t\tconnect(\"1\", \"9\");\n\t\tconnec... | [
"0.6376489",
"0.61228496",
"0.61034006",
"0.60403985",
"0.5880599",
"0.58292747",
"0.58237004",
"0.5719574",
"0.56614107",
"0.56604034",
"0.564279",
"0.5639879",
"0.56386477",
"0.55782753",
"0.5569513",
"0.5548388",
"0.5526129",
"0.5522277",
"0.55196863",
"0.543082",
"0.54084... | 0.514109 | 55 |
/ Main method Contains the "game" loop | public static void main(String[] args) {
//Instantiate all variables
Random rand = new Random();
scan = new Scanner(System.in);
type = new String[]{"Modus Ponens", "Modus Tollens", "Process of Elimination", "Chain Rule", "Affirming the Consequent", "Denying the Antecedent", "Begging the Question"};
premise = new String[]{"I study hard", "you have a current password", "it is raining", "it is after 10PM", "the weather is nice", "the dog is barking", "the house is on fire", "you work hard", "you stay inside all day", "you participate in the race", "you take the new position"};
conclusion = new String[]{"I will get an A", "you can log on to the network", "the road will get wet", "the store will be closed", "Joe will take a walk", "the neighbors will get mad", "everything is ruined", "you will pass the test", "you will get the job", "long distance space travel is possibe", "the stock market will crash"};
auth = new String[]{"The boss says", "My father told me that", "According to the news", "According to the internet", "Scientists agree that", "Elon Musk assures us that", "It has been proven that"};
while(running) { // Main loop
try {
mode = "";
menu();
System.out.print("\nSelect argument: ");
String selection = scan.next();
System.out.print("\033[H\033[2J");
System.out.flush(); // clear the console
if(Integer.parseInt(selection) < 1 || Integer.parseInt(selection) > 8)
{
System.err.println("\nSelection must be within range\n");
}
else if(Integer.parseInt(selection) >= 1 && Integer.parseInt(selection) <= 7){
while(mode == ""){ // inner loop to ensure that proper input was entered
System.out.println("\nYou have selected: "+type[Integer.parseInt(selection)-1]);
System.out.print("\n1. Automatic:\n2. User input:\n\nSelect mode: ");
mode = scan.next();
if(Integer.parseInt(mode) != 1 && Integer.parseInt(mode) != 2) {
System.err.println("\nSelection must be within range\n");
mode = "";
end();
continue;
}
}
scan.nextLine(); // Clear the scanner for next input
}
else if(Integer.parseInt(selection) == 8) { // Quit
System.out.println("Goodbye");
System.exit(1);
}
else
System.err.println("You entered invalid input, please try again");
String autho = auth[rand.nextInt(auth.length)];
if(Integer.parseInt(mode) == 1)
auto = true;
else
auto = false;
if(Integer.parseInt(selection) == 1) { // Modus Ponens
String prem = "";
String conc = "";
if(auto){ // if Auto was selected
prem = premise[rand.nextInt(premise.length)];
conc = conclusion[rand.nextInt(conclusion.length)];
}else{ // if Manual was selected
System.out.print("\nEnter a premise: ");
prem = scan.nextLine();
System.out.print("\nEnter a conclusion: ");
conc = scan.nextLine();
}
System.out.println("\nGenerated argument: ");
System.out.println("\n\""+auth[rand.nextInt(auth.length)]+", if "+prem+", then "+conc+". " +prem+", therefore, "+conc+".\"");
end();
}
if(Integer.parseInt(selection) == 2){ // Modus Tollens
String prem = "";
String conc = "";
if(auto){ // if Auto was selected
prem = premise[rand.nextInt(premise.length)];
conc = conclusion[rand.nextInt(conclusion.length)];
}else{ // if Manual was selected
System.out.print("\nEnter a premise: ");
prem = scan.nextLine();
System.out.print("\nEnter a conclusion: ");
conc = scan.nextLine();
}
System.out.println("\nGenerated argument: ");
System.out.println("\n\""+auth[rand.nextInt(auth.length)]+", if "+prem+", then "+conc+". It is not the case that " +prem+", therefore, it is not the case that "+conc+".\"");
end();
}
if(Integer.parseInt(selection) == 3){ // Process of Elimination
int prem1int = rand.nextInt(premise.length);
int prem2int = rand.nextInt(premise.length);
String prem = "";
String prem2 = "";
if(auto){ // if Auto was selected
while(prem1int == prem2int){
prem2int = rand.nextInt(premise.length);
}
prem = premise[prem1int];
prem2 = premise[prem2int];
}else{ // if Manual was selected
System.out.print("\nEnter a premise: ");
prem = scan.nextLine();
System.out.print("\nEnter another premise: ");
prem2 = scan.nextLine();
}
System.out.println("\nGenerated argument: ");
int flip = rand.nextInt(2);
if(flip == 1){
System.out.println("\n\""+auth[rand.nextInt(auth.length)]+", it is either the case that "+prem+" or, "+prem2+". It is not the case that " +prem+", therefore, "+prem2+".\"");
}
else{
System.out.println("\"\n"+auth[rand.nextInt(auth.length)]+", it is either the case that "+prem+" or, "+prem2+". It is not the case that " +prem2+", therefore, "+prem+".\"");
}
end();
}
if(Integer.parseInt(selection) == 4){ // Chain rule
int prem1int = rand.nextInt(premise.length);
int prem2int = rand.nextInt(premise.length);
int prem3int = rand.nextInt(premise.length);
String prem = "";
String prem2 = "";
String prem3 = "";
if(auto){ // if Auto was selected
while(prem1int == prem3int){
prem2int = rand.nextInt(premise.length);
prem3int = rand.nextInt(premise.length);
}
prem = premise[prem1int];
prem2 = conclusion[prem2int];
prem3 = premise[prem3int];
}else{ // if Manual was selected
System.out.print("\nEnter a premise: ");
prem = scan.nextLine();
System.out.print("\nEnter another premise: ");
prem2 = scan.nextLine();
System.out.print("\nEnter one more premise: ");
prem3 = scan.nextLine();
}
System.out.println("\nGenerated argument: ");
System.out.println("\n\""+auth[rand.nextInt(auth.length)]+", if "+prem+", then "+prem2+". If "+prem2+", then "+prem3+". "+prem+", therefore, "+prem3+".\"");
end();
}
if(Integer.parseInt(selection) == 5){ // Affirming the Consequent
String prem = "";
String conc = "";
if(auto){ // if Auto was selected
prem = premise[rand.nextInt(premise.length)];
conc = conclusion[rand.nextInt(conclusion.length)];
}else{ // if Manual was selected
System.out.print("\nEnter a premise: ");
prem = scan.nextLine();
System.out.print("\nEnter a conclusion: ");
conc = scan.nextLine();
}
System.out.println("\nGenerated argument: ");
System.out.println("\n\""+auth[rand.nextInt(auth.length)]+", if "+prem+", then "+conc+". " +conc+", therefore, "+prem+".\"");
end();
}
if(Integer.parseInt(selection) == 6){ //Denying the Antecedent
String prem = "";
String conc = "";
if(auto){ // if Auto was selected
prem = premise[rand.nextInt(premise.length)];
conc = conclusion[rand.nextInt(conclusion.length)];
}else{ // if Manual was selected
System.out.print("\nEnter a premise: ");
prem = scan.nextLine();
System.out.print("\nEnter a conclusion: ");
conc = scan.nextLine();
}
System.out.println("\nGenerated argument: ");
System.out.println("\n\""+auth[rand.nextInt(auth.length)]+", if "+prem+", then "+conc+". It is not the case that " +conc+", therefore, it is not the case that "+prem+".\"");
end();
}
if(Integer.parseInt(selection) == 7){ // Begging the Question
String prem = "";
if(auto){ // if Auto was selected
prem = premise[rand.nextInt(premise.length)];
}else{ // if Manual was selected
System.out.print("\nEnter a premise: ");
prem = scan.nextLine();
}
System.out.println("\nGenerated argument: ");
System.out.println("\n\""+prem+", therefore, "+prem+".\"");
end();
}
}catch(Exception e) { // Handle any input errors here
System.err.println("\nPlease select a valid argument\n" + e.getMessage());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void run() {\n \twhile(true) {\n \t \tsetupGame();\n \tplayGame();\n \t}\n }",
"public static void main(String[] args) {\n boolean stillPlaying = true;\r\n // the boolean above passes through the while function, which will start \r\n // the method newGame()\r\n ... | [
"0.7917146",
"0.7864303",
"0.78050405",
"0.78039455",
"0.76873326",
"0.76036185",
"0.7584336",
"0.7540097",
"0.7520956",
"0.7505399",
"0.7488428",
"0.74806863",
"0.74791926",
"0.7476421",
"0.74729323",
"0.74605864",
"0.74292094",
"0.7410888",
"0.73619556",
"0.7359243",
"0.734... | 0.0 | -1 |
/ Menu method Print the menu to the console | public static void menu() {
System.out.println("\nPlease select which type of argument to generate by entering the associated number.\n");
for(int i = 0; i < type.length; i++) {
System.out.println((i+1)+". "+type[i]);
}
System.out.println("8. Quit");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\")... | [
"0.86882275",
"0.85470366",
"0.84972185",
"0.84526",
"0.8390276",
"0.8374118",
"0.8352562",
"0.8322411",
"0.83131933",
"0.829817",
"0.8286219",
"0.8241524",
"0.81893176",
"0.8133979",
"0.8124869",
"0.8089662",
"0.80655783",
"0.80531454",
"0.80264413",
"0.80055016",
"0.7971632... | 0.72964877 | 75 |
/ End method After an argument is generated, this method is called to / prompt the user to continue and clears the console | public static void end(){
try{
System.out.println("\nPress Enter key to continue: ");
System.in.read();
System.out.print("\033[H\033[2J");
System.out.flush();
}catch(Exception e){
System.err.println(e.getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void prompt() {\n\t\tSystem.out.printf(\"\\n입력 > \");\n\t}",
"public static void pause(){\n System.out.print(\"Enter anything to continue: \"); // prompts the user to enter anything\n input.nextLine(); // receiving the user's input, but not storing it\n ... | [
"0.66717386",
"0.66354203",
"0.65872335",
"0.65611535",
"0.649163",
"0.6445129",
"0.63853914",
"0.63498795",
"0.6277094",
"0.6271038",
"0.6271038",
"0.62173176",
"0.6197558",
"0.6180479",
"0.6158957",
"0.6137462",
"0.6136642",
"0.6118448",
"0.60774267",
"0.6066539",
"0.604934... | 0.66592044 | 1 |
End of variables declaration//GENEND:variables | public String getPath() {
return path;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}",
"private void assignment() {\n\n\t\t\t}",
"private void kk12() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n pu... | [
"0.6359434",
"0.6280371",
"0.61868024",
"0.6094568",
"0.60925734",
"0.6071678",
"0.6052686",
"0.60522056",
"0.6003249",
"0.59887564",
"0.59705925",
"0.59680873",
"0.5967989",
"0.5965816",
"0.5962006",
"0.5942372",
"0.5909877",
"0.5896588",
"0.5891321",
"0.5882983",
"0.5881482... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method returns the value of the database column teacher.teacher_id | public Integer getTeacherId() {
return teacherId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getTeacherid() {\r\n return teacherid;\r\n }",
"public String getTeacherId() {\n return teacherId;\n }",
"public Teacher findTeacherId(Integer t_id) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tTeacher teacher = courtyardMap... | [
"0.7534777",
"0.75004137",
"0.690674",
"0.6805785",
"0.6805785",
"0.6718325",
"0.66733813",
"0.6659815",
"0.66307",
"0.6591227",
"0.655723",
"0.6484694",
"0.63732356",
"0.6286159",
"0.601184",
"0.5974315",
"0.58983946",
"0.5782713",
"0.5775636",
"0.5772214",
"0.5761795",
"0... | 0.77564216 | 1 |
This method was generated by MyBatis Generator. This method sets the value of the database column teacher.teacher_id | public void setTeacherId(Integer teacherId) {
this.teacherId = teacherId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTeacherId(String teacherId) {\n this.teacherId = teacherId;\n }",
"public boolean updateTeacherT_id(Teacher teacher) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tcourtyardMapper.updateTeacherT_id(teacher);\n\t\tSystem.out.println(\"... | [
"0.73193806",
"0.7189143",
"0.7072661",
"0.7072661",
"0.6996694",
"0.6939194",
"0.66379535",
"0.6618233",
"0.660545",
"0.6595657",
"0.6361133",
"0.6341879",
"0.6341029",
"0.62816155",
"0.6253609",
"0.6102831",
"0.6095222",
"0.6075483",
"0.6074467",
"0.60227746",
"0.5968314",
... | 0.76624566 | 1 |
This method was generated by MyBatis Generator. This method returns the value of the database column teacher.teacher_name | public String getTeacherName() {
return teacherName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getTeacherName() {\n/* 31 */ return this.teacherName;\n/* */ }",
"@Override\n\tpublic List<Teacher> getTeaNameAndID() {\n\t\treturn teacherDAO.getTeaNameAndID();\n\t}",
"public String getTeacherId() {\n return teacherId;\n }",
"public String getResearchteachername() {\r\n\t\t... | [
"0.72106576",
"0.68483907",
"0.65781116",
"0.64816505",
"0.64760566",
"0.6436863",
"0.6408479",
"0.6369911",
"0.6369911",
"0.62737614",
"0.6158612",
"0.6142891",
"0.5963735",
"0.5930171",
"0.5784053",
"0.5752387",
"0.56980366",
"0.5672939",
"0.56082976",
"0.5602028",
"0.56015... | 0.7283587 | 0 |
This method was generated by MyBatis Generator. This method sets the value of the database column teacher.teacher_name | public void setTeacherName(String teacherName) {
this.teacherName = teacherName == null ? null : teacherName.trim();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getTeacherName() {\n/* 31 */ return this.teacherName;\n/* */ }",
"public String getTeacherName() {\n return teacherName;\n }",
"public void setTeacherId(String teacherId) {\n this.teacherId = teacherId;\n }",
"public void setTeacherId(Integer teacherId) {\n t... | [
"0.6601437",
"0.6558226",
"0.63347685",
"0.6332015",
"0.6332015",
"0.6323958",
"0.6302152",
"0.6249584",
"0.62431836",
"0.6230599",
"0.6181034",
"0.6098393",
"0.60832536",
"0.6056146",
"0.6010105",
"0.5973544",
"0.5966243",
"0.59371173",
"0.5933781",
"0.5933781",
"0.5921356",... | 0.6854988 | 0 |
Aurre: Post: Zerrendan Pelikula dagoen ala ez adierazten du, badago true bueltatzen du, bestela false | public boolean badago(Pelikula pPelikula) {
return this.lista.contains(pPelikula);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean aufnehmen (T posten)\n {\n // Pruefen, ob der Posten mit Bezeichnung und Ausfuehrung schon vorhanden ist\n int index = istVerfuegbar ( posten.getBezeichnung()\n , posten.getAusfuehrung()\n , posten.getAnzahl()); \n\n // I... | [
"0.6048058",
"0.60097516",
"0.5702379",
"0.5682133",
"0.566487",
"0.56309193",
"0.55695426",
"0.5536383",
"0.5454943",
"0.5402307",
"0.5393558",
"0.5388139",
"0.53329736",
"0.53143007",
"0.531324",
"0.530609",
"0.52823985",
"0.5271532",
"0.52614087",
"0.5245751",
"0.5238265",... | 0.5431134 | 9 |
Aurre: Post: Pelikula ez badago zerrendan gehitzen du | public void pelikulaGehitu(Pelikula pPelikula) {
if(!this.badago(pPelikula)) {
this.lista.add(pPelikula);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tvoid post() {\n\t\t\n\t}",
"void post(Post post) {\n if (post instanceof Video) {\n vd.compressVideo((Video) post);\n } else if (post instanceof Image) {\n id.decorateImage((Image) post);\n } else if (post instanceof Text) {\n tg.checkGrammar((Te... | [
"0.62329626",
"0.6198642",
"0.615937",
"0.6029979",
"0.60000294",
"0.5980642",
"0.593548",
"0.58893573",
"0.58622015",
"0.5860673",
"0.5843358",
"0.5839577",
"0.58395684",
"0.5834957",
"0.58128744",
"0.5805627",
"0.57977337",
"0.5772264",
"0.57645434",
"0.5759086",
"0.5725933... | 0.0 | -1 |
creating a new table is succesfull | @Test
public void createHighScoreTableTest() {
assertTrue(database.createHighScoreTable(testTable));
database.clearTable(testTable);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void doCreateTable();",
"public void createTable() throws LRException\n\t{\n\t\tgetBackground();\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\t// Create a new (empty) record\n\t\tcreate(new Hashtable(),myData);\n\t\tif (myData.record==null) throw new LRException(DataRMessages.nullRecord(get... | [
"0.7243775",
"0.7212518",
"0.72069085",
"0.7190101",
"0.7020233",
"0.6980642",
"0.6965329",
"0.6957643",
"0.69421786",
"0.69291776",
"0.69079477",
"0.6884791",
"0.68707246",
"0.68263257",
"0.6818833",
"0.68048304",
"0.67668694",
"0.6690184",
"0.6681176",
"0.66605633",
"0.6648... | 0.6428222 | 39 |
add operation to database is successfull | @Test
public void addHighScoreTest() {
database.createHighScoreTable(testTable);
assertTrue(database.addHighScore(100, testTable));
database.clearTable(testTable);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\r\n\tpublic void addToDb() {\r\n\t\tservice.save(opinion);\r\n\t\tassertNotEquals(opinion.getId(), 0);\r\n\t\tassertTrue(service.exists(opinion.getId()));\r\n\t}",
"private void addInsertOp() {\n\n if (!mIsNewAlert) {\n mValues.put(AlertContentProvider.KEY_ALERT_ID, mRawAlertId);\n ... | [
"0.6598795",
"0.6344492",
"0.62685716",
"0.6253047",
"0.62175745",
"0.61813533",
"0.6179057",
"0.6179057",
"0.61710864",
"0.6162583",
"0.6122956",
"0.6121409",
"0.61101234",
"0.61088395",
"0.6105025",
"0.6090418",
"0.6087294",
"0.6087294",
"0.6084198",
"0.6082972",
"0.6074627... | 0.0 | -1 |
missing scores are 0 | @Test
public void missingHighScoresTest() {
database.createHighScoreTable(testTable);
database.addHighScore(110, testTable);
database.addHighScore(140, testTable);
int[] scores = database.loadHighScores(testTable);
assertEquals(0, scores[4]);
assertEquals(0, scores[3]);
assertEquals(0, scores[2]);
assertEquals(110, scores[1]);
assertEquals(140, scores[0]);
database.clearTable(testTable);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int totalScore() {\n return 0;\n }",
"private static double getEmtpyScore(Game2048Board board) {\n double empty = 0;\n if (board.getEmptyTiles().size() < 4) {\n empty = (4 - board.getEmptyTiles().size());\n }\n return empty;\n }",
"@Test(timeout = 4000)\n public void test069... | [
"0.66731334",
"0.6670957",
"0.66270846",
"0.6616965",
"0.6611152",
"0.6575503",
"0.65392286",
"0.64749557",
"0.64398664",
"0.64398664",
"0.639565",
"0.63714916",
"0.63599014",
"0.633727",
"0.63334066",
"0.6307189",
"0.6293517",
"0.6285696",
"0.6283849",
"0.6277888",
"0.622336... | 0.6532794 | 7 |
Makes sure Android Studio has focus, useful when running with a window manager | @NotNull
public static ThemeEditorFixture openThemeEditor(@NotNull IdeFrameFixture projectFrame) {
projectFrame.focus();
EditorFixture editor = projectFrame.getEditor();
editor.open("app/src/main/res/values/styles.xml", EditorFixture.Tab.EDITOR);
EditorNotificationPanelFixture notificationPanel =
projectFrame.requireEditorNotification("Edit all themes in the project in the theme editor.");
notificationPanel.performAction("Open editor");
ThemeEditorFixture themeEditor = editor.getThemeEditor();
themeEditor.getThemePreviewPanel().getPreviewPanel().waitForRender();
return themeEditor;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void tryLockFocus() {\n }",
"public void requestFocus() {\n // Not supported for MenuComponents\n }",
"public void setFocus();",
"@Override\n public void onWindowFocusChanged(boolean hasFocus) {\n }",
"public void focus() {}",
"void setFocus();",
"public void setFocus(... | [
"0.6522322",
"0.62414724",
"0.62296784",
"0.621226",
"0.6184285",
"0.6162104",
"0.6140059",
"0.61249155",
"0.61040366",
"0.6048719",
"0.6042208",
"0.60165614",
"0.60123974",
"0.59962076",
"0.59962076",
"0.5990056",
"0.5985494",
"0.5970097",
"0.59595484",
"0.59496975",
"0.5945... | 0.0 | -1 |
Returns the attributes that were defined in the theme itself and not its parents. | public static Collection<EditedStyleItem> getStyleLocalValues(@NotNull final ThemeEditorStyle style) {
final Set<String> localAttributes = Sets.newHashSet();
for (ConfiguredElement<ItemResourceValue> value : style.getConfiguredValues()) {
localAttributes.add(ResolutionUtils.getQualifiedItemName(value.getElement()));
}
final ThemeResolver resolver = new ThemeResolver(style.getConfiguration());
return Collections2.filter(ThemeEditorUtils.resolveAllAttributes(style, resolver), new Predicate<EditedStyleItem>() {
@Override
public boolean apply(@javax.annotation.Nullable EditedStyleItem input) {
assert input != null;
return localAttributes.contains(input.getQualifiedName());
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getAttributes() {\n\t\treturn getProperty(\"attributes\");\n\t}",
"public AttributeSet getAttributes() {\n return null;\n }",
"public Attributes getAttributes() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic AttributeSet getAttributes() {\n\t\treturn null;\n\t}",
"@Overri... | [
"0.73643756",
"0.73128235",
"0.7168854",
"0.711308",
"0.70116526",
"0.6998417",
"0.6974214",
"0.69489104",
"0.694293",
"0.6913628",
"0.6907515",
"0.68615",
"0.6850575",
"0.68477786",
"0.68477064",
"0.67881405",
"0.67856634",
"0.67841834",
"0.6780823",
"0.67738855",
"0.6767790... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void addGoal(Goal g) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void removeGoal(Goal g) {
} | {
"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 |
konstruktor sa parametrom tipa Circle | public Circle(Circle c){
this(c.radius,c.p);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Circle(double radius){ // 2 constructor\n this.radius = radius;\n this.color = DEFAULT_COLOR;\n }",
"public Circle(double r)\n {\n setRad(r);\n\n }",
"public Circle() {\n radius = 1.0;\n color = \"red\";\n }",
"public Circle() {\n radius = 1.0;\n ... | [
"0.7040504",
"0.7020324",
"0.7004306",
"0.6943818",
"0.6931311",
"0.690308",
"0.68994147",
"0.6871874",
"0.684333",
"0.6829841",
"0.6768523",
"0.67182744",
"0.671134",
"0.6681213",
"0.6674229",
"0.6672717",
"0.6642316",
"0.6636729",
"0.66310215",
"0.65935725",
"0.65919393",
... | 0.0 | -1 |
Interface for recording a taskthread simulation event. | public interface TaskEventCallable {
/**
* Interface to allow task threads to be manipulated during task-thread
* processing.
* This allows some operations used by the implementation to occur
* while synchronizing on particular objects used internally by
* TaskThread methods. The event returned may not be the event
* passed as an argument (e.g., the return value may be an event
* that is stored on a TaskQueue, not the simulation's event queue).
* @param event the event used to schedule a task
* @return the simulation event scheduled or stored; null if the
* the scheduling or storing is not possible
* @see org.bzdev.devqsim.TaskThread
*/
SimulationEvent call(TaskThreadSimEvent event);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"SimulationEvent call(TaskThreadSimEvent event);",
"void notifyTrace(RecorderTraceEvent event);",
"void eventOccurred(AbstractTaskEvent event);",
"public interface EventListener {\n\n\t/**\n\t * Called when a task event has occurred.\n\t * \n\t * @param event\n\t * the task event which has occurred\n\t... | [
"0.69528776",
"0.6028204",
"0.59205836",
"0.5897507",
"0.58092564",
"0.56080675",
"0.5519129",
"0.54280853",
"0.5410363",
"0.5360904",
"0.5358038",
"0.5326738",
"0.5282469",
"0.52708536",
"0.5209534",
"0.5203896",
"0.51722425",
"0.51558745",
"0.51328325",
"0.51328325",
"0.513... | 0.6476898 | 1 |
Interface to allow task threads to be manipulated during taskthread processing. This allows some operations used by the implementation to occur while synchronizing on particular objects used internally by TaskThread methods. The event returned may not be the event passed as an argument (e.g., the return value may be an event that is stored on a TaskQueue, not the simulation's event queue). | SimulationEvent call(TaskThreadSimEvent event); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface TaskEventCallable {\n /**\n * Interface to allow task threads to be manipulated during task-thread\n * processing.\n * This allows some operations used by the implementation to occur\n * while synchronizing on particular objects used internally by\n * TaskThread methods. Th... | [
"0.80695754",
"0.68367505",
"0.6808263",
"0.6764364",
"0.6375329",
"0.6069569",
"0.6064956",
"0.596026",
"0.59134424",
"0.5828498",
"0.5801284",
"0.5769365",
"0.5740701",
"0.5689113",
"0.56597424",
"0.5654406",
"0.56493413",
"0.56155765",
"0.5578815",
"0.55769163",
"0.5546149... | 0.6708032 | 4 |
determines which runway will be used based upon the direction of the wind | public void RunwaySystem()
{
// if the wind direction is between 136 and 225
if(wind_direction >= 136 && wind_direction <= 225)
{
System.out.println("Wind direction is " + wind_direction + "° blowing North to South");
runway_number = 18;
runway_direction = " facing South to North.";
}
// if the wind direction is between 1 and 45 and between 316 and 360
else if((wind_direction >= 1 && wind_direction <= 45) ||
(wind_direction >= 316 && wind_direction <= 360))
{
System.out.println("Wind direction is " + wind_direction + "° blowing South to North");
runway_number = 36;
runway_direction = " facing North to South.";
}
else if(wind_direction >= 46 && wind_direction <= 135)
{
System.out.println("Wind direction is " + wind_direction + "° blowing West to East");
runway_number = 9;
runway_direction = " facing East to West.";
}
// if the wind direction is between 226 and 315
else if(wind_direction >= 226 && wind_direction <= 315)
{
System.out.println("Wind direction is " + wind_direction + "° blowing East to West");
runway_number = 27;
runway_direction = " facing West to East.";
}
else
{
System.out.println("Not a valid wind direction");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getWindDir() {\n float windDire = 0;\n String windDir = \" \";\n if (readings.size() > 0) {\n windDire = readings.get(readings.size() - 1).windDirection;\n\n if (windDire >= 348.75 || windDire <= 11.25) {\n windDir += windDir + \" N \";\n ... | [
"0.62478566",
"0.6235476",
"0.61531407",
"0.6059963",
"0.60450804",
"0.59114236",
"0.5881909",
"0.58556443",
"0.58459884",
"0.5777113",
"0.5716171",
"0.5698487",
"0.5693425",
"0.56732494",
"0.5662952",
"0.5661156",
"0.5647018",
"0.5634294",
"0.5618417",
"0.55890167",
"0.55731... | 0.76116157 | 0 |
TODO switch to commons multipart | @Bean
public StandardServletMultipartResolver multipartResolver() {
return new StandardServletMultipartResolver();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MultiPart(){}",
"boolean isMultiPart();",
"private File processMultipartForm() {\n\n File storeDirectory = Configuration\n .getParameterValueAsFile(PENDING_DIR);\n\n int fileSizeLimit = Configuration\n .getParameterValueAsInt(METADATA_MAX_BYTES);\n\n Di... | [
"0.74838966",
"0.7357458",
"0.6928009",
"0.68318826",
"0.6754781",
"0.6579704",
"0.648612",
"0.6464326",
"0.6426494",
"0.642022",
"0.6388248",
"0.63131857",
"0.62985677",
"0.6297212",
"0.6205985",
"0.6115935",
"0.611421",
"0.6101262",
"0.6087497",
"0.6087427",
"0.6059258",
... | 0.6123232 | 15 |
reads file generates alerts if something goes wrong | public void readFile(File file){
try{
scan = new Scanner(file);
while(scan.hasNextLine()){
String line = scan.nextLine();
if(line.startsWith("//")){
continue;
}
process(line);
}
}catch(IOException e){
Alert alert = new Alert(AlertType.INFORMATION);
alert.setTitle("");
alert.setHeaderText(null);
alert.setContentText("Oops the input was not read properly");
alert.showAndWait();
e.printStackTrace();
}catch(NullPointerException e){
Alert alert = new Alert(AlertType.INFORMATION);
alert.setTitle("");
alert.setHeaderText(null);
alert.setContentText("Oops the input was not read properly");
alert.showAndWait();
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void checkFile() {\n \ttry {\n \t\tdata = new BufferedReader(\n \t\t\t\t new FileReader(textFile));\n \t\t\n \t}\n \tcatch(FileNotFoundException e)\n \t{\n \t\tSystem.out.println(\"The mentioned File is not found.\");\n System.out.println(\"\");\n\t\t\tSystem.exit(1... | [
"0.7254047",
"0.6574342",
"0.61771804",
"0.6152975",
"0.611319",
"0.6086633",
"0.60675424",
"0.5970891",
"0.59445083",
"0.59218025",
"0.5850923",
"0.5816189",
"0.57945347",
"0.5792632",
"0.5774386",
"0.57550275",
"0.574023",
"0.5736046",
"0.572663",
"0.5726569",
"0.57261103",... | 0.6617738 | 1 |
end of readFile() initializes objects using switch | public void process (String st) {
Scanner sc = new Scanner (st);
if (!sc.hasNext()){
return;
}else{
switch (sc.next()){
case "port": addPort(sc);
break;
case "dock": addDock(sc, portMap);
break;
case "pship": addPassengerShip(sc);
break;
case "cship": addCargoShip(sc);
break;
case "person": addPerson(sc);
break;
case "job": addJob(shipMap,dockMap,portMap,sc, this.jobsBox);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void init()\r\n {\n readFile(inputFile);\r\n writeInfoFile();\r\n }",
"public void initCases(){\n\t\ttry {\n // This creates an object from which you can read input lines.\n BufferedReader reader = new BufferedReader(new FileReader(filename));\n \n ... | [
"0.67005867",
"0.64866555",
"0.6441349",
"0.64351374",
"0.6334809",
"0.6334809",
"0.6334809",
"0.6334809",
"0.6334809",
"0.6334809",
"0.6334809",
"0.6334809",
"0.6334809",
"0.6334809",
"0.63115525",
"0.6278503",
"0.6276174",
"0.6249878",
"0.62273407",
"0.6212856",
"0.61983114... | 0.0 | -1 |
Helper method to start jobs for ports add port to port list and everything list | public void addPort(Scanner sc){
currentPort = new SeaPort(sc);
ports.add(currentPort);
hashMap.put(currentPort.getIndex(), currentPort);
portMap.put(currentPort.getIndex(), currentPort);
everything.add(currentPort);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void start(int port);",
"public void addPorts(){\n\t\t\n\t}",
"private void initPortSettings() {\n\n\t\tList<PortSpecification> portSpecification = XMLConfigUtil.INSTANCE.getComponent(componentName)\n\t\t\t\t.getPort().getPortSpecification();\n\n\t\tportDetails = new ArrayList<PortDetails>();\n\t\tports... | [
"0.63843524",
"0.63810086",
"0.63696575",
"0.6145438",
"0.5899023",
"0.58474624",
"0.58210224",
"0.5816329",
"0.57776827",
"0.5745183",
"0.57059544",
"0.56399184",
"0.56399184",
"0.5638688",
"0.56329376",
"0.5563544",
"0.55567014",
"0.5552541",
"0.5544901",
"0.55278695",
"0.5... | 0.50305873 | 83 |
adds dock to everything and port | public void addDock(Scanner sc, HashMap portMap){
Dock dock = new Dock(sc, portMap);
currentPort = (SeaPort) hashMap.get(dock.getParent());
currentPort.setDock(dock);
hashMap.put(dock.getIndex(), dock);
dockMap.put(dock.getIndex(), dock);
everything.add(dock);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addPorts(){\n\t\t\n\t}",
"public void dock() {\n if (getSpeed() == 0) {\n inDock = true;\n }\n }",
"private static void assembleDockLayoutPanel() {\n dockLayoutPanel.addNorth(headerPanel, 3);\n dockLayoutPanel.addSouth(footerPanel, 3);\n dockLayoutPa... | [
"0.640483",
"0.57402474",
"0.54301894",
"0.5402018",
"0.5360037",
"0.5315916",
"0.5281006",
"0.52435213",
"0.5213991",
"0.52051085",
"0.5205048",
"0.5190669",
"0.5177519",
"0.5166925",
"0.5157946",
"0.51083595",
"0.5107284",
"0.5098897",
"0.5064859",
"0.50298333",
"0.5025944"... | 0.65487725 | 0 |
adds passenger ship to port and everything list | public void addPassengerShip(Scanner sc){
PassengerShip pShip = new PassengerShip(sc, portMap, shipMap, dockMap);
if(hashMap.containsKey(pShip.getParent())){
if(hashMap.get(pShip.getParent()).getIndex()>=10000 && hashMap.get(pShip.getParent()).getIndex() < 20000){
currentPort = (SeaPort) hashMap.get(pShip.getParent());
currentPort.setShips(pShip);
currentPort.setAllShips(pShip);
}
else{
currentDock = (Dock) hashMap.get(pShip.getParent());
currentDock.addShip(pShip);
currentPort = (SeaPort) hashMap.get(currentDock.getParent());
currentPort.setAllShips(pShip);
}
}
hashMap.put(pShip.getIndex(), pShip);
shipMap.put(pShip.getIndex(), pShip);
everything.add(pShip);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onboard(String passenger) {\n \t\r\n \tthis.passengers.add(passenger);\r\n }",
"public void addPorts(){\n\t\t\n\t}",
"public void arrive(Port port) {\n ShipArrived event = new ShipArrived(\"id\", port, new Date());\n // apply change du to the event\n // it should requi... | [
"0.6479862",
"0.6364688",
"0.6066931",
"0.6051686",
"0.599072",
"0.5966306",
"0.5870015",
"0.56873846",
"0.5483131",
"0.5466287",
"0.54479176",
"0.5402649",
"0.5389245",
"0.5322392",
"0.53141356",
"0.52896607",
"0.5283065",
"0.5267363",
"0.5266804",
"0.52641594",
"0.5225381",... | 0.67817396 | 0 |
adds cargoship to port and everything list | public void addCargoShip(Scanner sc){
CargoShip cShip = new CargoShip(sc, portMap, shipMap, dockMap);
if(hashMap.containsKey(cShip.getParent())){
if(hashMap.get(cShip.getParent()).getIndex()>=10000 && hashMap.get(cShip.getParent()).getIndex() < 20000){
currentPort = (SeaPort) hashMap.get(cShip.getParent());
currentPort.setShips(cShip);
currentPort.setAllShips(cShip);
}
else{
currentDock = (Dock) hashMap.get(cShip.getParent());
currentDock.addShip(cShip);
currentPort = (SeaPort) hashMap.get(currentDock.getParent());
currentPort.setAllShips(cShip);
}
}
hashMap.put(cShip.getIndex(), cShip);
shipMap.put(cShip.getIndex(), cShip);
everything.add(cShip);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addPorts(){\n\t\t\n\t}",
"public void addPort(Scanner sc){\n currentPort = new SeaPort(sc);\n ports.add(currentPort);\n hashMap.put(currentPort.getIndex(), currentPort);\n portMap.put(currentPort.getIndex(), currentPort);\n everything.add(currentPort);\n \n ... | [
"0.7038958",
"0.5919409",
"0.5809509",
"0.57174087",
"0.5497338",
"0.54647803",
"0.5454128",
"0.5454128",
"0.5453832",
"0.54434323",
"0.5406851",
"0.5365936",
"0.5353842",
"0.5347094",
"0.53185016",
"0.5304139",
"0.52499276",
"0.5219771",
"0.5212445",
"0.52022547",
"0.5196665... | 0.50196654 | 39 |
adds person to port & everything arraylist | public void addPerson(Scanner sc){
Person person = new Person(sc);
currentPort = (SeaPort) hashMap.get(person.getParent());
currentPort.setPerson(person);
hashMap.put(person.getIndex(), person);
everything.add(person);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addPorts(){\n\t\t\n\t}",
"public void addPerson(String name){\n Person newPerson = new Person(name,this.x1,this.x2);\n for(Person p : personList){\n if(p.equals(newPerson)){\n System.out.println(\"Error! The person already exists.\");\n }\n }\... | [
"0.6532808",
"0.6422302",
"0.6194661",
"0.61361784",
"0.6052884",
"0.59877867",
"0.58501446",
"0.58365834",
"0.5815942",
"0.5777246",
"0.5775156",
"0.5766658",
"0.5751029",
"0.5734211",
"0.57143235",
"0.56754214",
"0.5649251",
"0.5608337",
"0.5591703",
"0.55185777",
"0.551063... | 0.6573178 | 0 |
performs search by index | public String searchByIndex(int index){
if(hashMap.containsKey(index))
return hashMap.get(index).toString();
else
return "Cannot Find index given";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void searchIndex(Directory index) throws Exception{\n\t\tString searchString = getSearchString();\n\t\t\n\t\tSystem.out.println(\"Searching for '\" + searchString + \"'\");\n\n\t\tIndexReader indexReader = DirectoryReader.open(index);\n\t\tIndexSearcher indexSearcher = new IndexSearcher(indexReader);\n\n\t\... | [
"0.6816465",
"0.6741389",
"0.6634489",
"0.652847",
"0.6265293",
"0.62350297",
"0.62144226",
"0.62144226",
"0.61266434",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0... | 0.6105234 | 22 |
performs search by name | public String searchByName(String name){
for(Thing things: everything){
if(things.getName().equalsIgnoreCase(name)){
return things.toString();
}
}
return "Cannot Find given Name";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void searchByName() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClini... | [
"0.75640273",
"0.72418076",
"0.72114253",
"0.72078055",
"0.72078055",
"0.7206149",
"0.70669556",
"0.7045107",
"0.7013235",
"0.69441694",
"0.68992275",
"0.6888627",
"0.68873686",
"0.68384075",
"0.6824488",
"0.6806368",
"0.67288435",
"0.67167294",
"0.6703564",
"0.6701509",
"0.6... | 0.72095424 | 3 |
TODO Autogenerated method stub | @Override
public void init() throws RemoteException {
try {
File f5 = new File("TxtData/warein.txt");
FileWriter fw5 = new FileWriter(f5);
BufferedWriter bw1 = new BufferedWriter(fw5);
bw1.write("");
} catch (Exception e) {
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void insert(WareInListPO po) throws RemoteException {
File Arrivalfile = new File("TxtData/warein.txt");
if (po == null) {
System.out.println("WAREINLIST IS NOTHING");
}
if (po != null) {
try {
OutputStreamWriter itemWriter = new OutputStreamWriter(new FileOutputStream(Arrivalfile, true),
"UTF-8");
itemWriter.write(po.getId() + "");
itemWriter.write(":");
itemWriter.write(po.getTime() + "");
itemWriter.write(":");
itemWriter.write(po.getDestination().toString());
itemWriter.write(":");
itemWriter.write(po.getPlace().getQu() + "");
itemWriter.write("-");
itemWriter.write(po.getPlace().getPai() + "");
itemWriter.write("-");
itemWriter.write(po.getPlace().getJia() + "");
itemWriter.write("-");
itemWriter.write(po.getPlace().getWei() + "");
itemWriter.write(":");
itemWriter.write(po.getState().toString());
itemWriter.write(":");
itemWriter.write(po.getTranscenterid() + "");
itemWriter.write(":");
itemWriter.write(po.getVehicle().toString());
itemWriter.write("\r\n");
itemWriter.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public ArrayList<GarageBodyPO> findWareIn(TimePO start, TimePO end, long centerid)
throws RemoteException, IOException {
ArrayList<GarageBodyPO> list = new ArrayList<GarageBodyPO>();
FileReader fr = null;
try {
fr = new FileReader("TxtData/warein.txt");
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
BufferedReader br = null;
br = new BufferedReader(fr);
String Line = null;
try {
Line = br.readLine();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
while (Line != null) {
String output[] = Line.split(":");
String t[] = output[3].split("-");
TimePO a = TimePO.toTime(output[1]);
if (output[5].equals(String.valueOf(centerid)) && a.biggerthan(start) && end.biggerthan(a)) {
garageitem item = new garageitem(TimePO.toTime(output[1]), Long.parseLong(output[0]));
GaragePlacePO place = new GaragePlacePO(Integer.parseInt(t[0]), Integer.parseInt(t[1]),
Integer.parseInt(t[2]), Integer.parseInt(t[3]));
GarageBodyPO body = new GarageBodyPO(place, item);
list.add(body);
}
Line = br.readLine();
if (Line == null) {
System.out.println("WAREIN NOT EXIST!");
}
}
return list;
} | {
"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 |
We want to allow support for the creator of a domain to supply a id. However, once it's been created and the id has been set, we cannot change it. | public void setId(String id) {
if (this.id == null) {
this.id = id;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object prepareDomainObjectDynamicallyUsingIdAndClassNameWithPkg(String domain, Long id)\n\t\t\tthrows ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException,\n\t\t\tSecurityException, IllegalArgumentException, InvocationTargetException {\n\n\t\tString className = domai... | [
"0.6509967",
"0.6266134",
"0.62198395",
"0.61809725",
"0.6122927",
"0.6108735",
"0.60587084",
"0.6022959",
"0.6005224",
"0.6004882",
"0.6004882",
"0.5988899",
"0.59153146",
"0.581962",
"0.58006734",
"0.57987714",
"0.5783943",
"0.5774503",
"0.5743632",
"0.5743632",
"0.5738245"... | 0.0 | -1 |
Make sure id exists before insert | @PrePersist
public void generateId() {
if (this.id == null) {
this.id = UUID.randomUUID().toString();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasInsertOrUpdate();",
"@Override\n\tpublic boolean existId(String id) {\n\t\treturn false;\n\t}",
"int insertSelective(SysId record);",
"@Test\n @Transactional\n void createLessonTimetableWithExistingId() throws Exception {\n lessonTimetable.setId(1L);\n\n int databaseSizeBeforeC... | [
"0.6543713",
"0.64457756",
"0.64101434",
"0.63665205",
"0.6357992",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
... | 0.0 | -1 |
Created by Liuchangling on 2017/6/20. | public interface TransferHospitalService extends ReadOnlyBaseService<HospitalReadOnly> {
/**
* 获取用户医院数据
* @param hosId
* @return
* @throws InvocationTargetException
* @throws IntrospectionException
* @throws InstantiationException
* @throws IllegalAccessException
*/
HospitalReadOnly getHospital(Long hosId)throws InvocationTargetException, IntrospectionException, InstantiationException, IllegalAccessException ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\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.60440266",
"0.5909011",
"0.5719379",
"0.5661475",
"0.5623027",
"0.5623027",
"0.5605628",
"0.553874",
"0.5510621",
"0.54964304",
"0.5495387",
"0.5492798",
"0.54888153",
"0.5487672",
"0.5469895",
"0.54676473",
"0.54516876",
"0.5448687",
"0.54343224",
"0.54319143",
"0.5428163... | 0.0 | -1 |
This method returns the Direct Message (DM) that will be sent to the owner of the server the bot connects to | private static EmbedBuilder JoinDM (){
Color color = new Color(238,119,0);
return new EmbedBuilder()
.setColor(color)
.setTitle("FyreBot")
.setDescription("Hey, I'm FyreBot! Thanks for inviting me to your server!\n\n" +
"My prefix is `!` for example `!command`\n\n" +
"To get started use `!help` to list all my commands!\n\n" +
"I'm developed by `Drix#8197` so if you have any questions about me you should ask him.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getDM() {\r\n return localDM;\r\n }",
"public String getDm() {\n return dm;\n }",
"private static PluginMessageRecipient getThroughWhomSendMessage() {\n\t\treturn Remain.getOnlinePlayers().isEmpty() ? Bukkit.getServer() : Remain.getOnlinePlayers().iterator().next()... | [
"0.65641624",
"0.59785026",
"0.5682652",
"0.54103595",
"0.5384686",
"0.536002",
"0.5345899",
"0.5345899",
"0.5345899",
"0.5345899",
"0.5345899",
"0.5345899",
"0.5326209",
"0.52837527",
"0.52237785",
"0.52122843",
"0.52008516",
"0.5191222",
"0.51768523",
"0.517666",
"0.5168822... | 0.55233186 | 3 |
GeoData objects are used in a large number of places throught GeoTools. The role of a GeoData object is to associate id values with data values. Examples of use include matching feature ids to data values for thematic mapping, Storing tool tip texts for displaying with features and for providing data to be graphed or otherwise ploted. GeoData objects can store both text and numeric data, this was done to provide a single interface to columns of data. getText on a numeric GeoData will correctly return a string of that value, getValue on a text geoData however will fail. In theory, as GeoData is quite a simple interface it should be posible to implement classes that link back to databases through JDBC for example. The ids stored in the GeoData must match those found in the features to which the data relates, therefor any class that provides for loading spatial data with associated data should provide a method to retreve prebuilt GeoData objects. For example, the ShapeFileReader class provides the following: public GeoData readData(int col) Provides a GeoData for specified column number public GeoData readData(String colName) As above, but looks for the column by name. GeoData[] readData() Provides an array of GeoDatas for the entrire shapefile | public interface GeoData{
/**
* Most geodata sets contain features for which there is no data, or the data is missing.<br>
* In these cases a specific value is often used to represent these special cases.<p>
* The static final value MISSING is the default value used by GeoDatas to represent
* these cases.
* @see #setMissingValueCode
* @see #getMissingValueCode
*/
public static final double MISSING = Double.NaN;
/**
* All geodata have a type - this is particularly important when
* interfacing with other data sources/formats.
* @see #setDataType
* @see #getDataType
*/
public static final int CHARACTER = 0;
public static final int INTEGER = 1;
public static final int FLOATING = 2;
/**
* All GeoData objects can have a name associated with them.<br>
* Typicaly the name will match the Column heading from which the data came from.<br>
* Names can be important when the GeoData is used in thematic maps as this is the
* name that will be placed in the key by default.<br>
* @author James Macgill JM
* @return String The name associated with this GeoData.
*/
String getName();
/**
* All GeoData objects can have a name associated with them.<br>
* Typicaly the name will match the Column heading from which the data came from.<br>
* Names can be important when the GeoData is used in thematic maps as this is the
* name that will be placed in the key by default.<br>
*
* @author James Macgill JM
* @param name_ The name to be associated with this GeoData.
*/
void setName(String name_);
/**
* looks up and matches a value to the specifed feature id.<br>
* Used for example by shaders to obtain vaules for thematic mapping.<br>
*
* @author James Macgill JM
* @param id An int specifying the feature id to retreve a value for.
* @return double The value for the specified id, if no id matches the one given then the value specifed by setMissingValue should be returned.
* @see #setMissingValue
*/
double getValue(int id);
/**
* Looks up and retreves a string for the specifed feature id.<br>
* Used for example by the ToolTip feature in Themes to provide tool tip text for each feature.
*
* @author James Macgill JM
* @param id An int specifying the feature to retreve the text for.
* @return String A piece of text for the chosen feature id. If no id matches then an empty string should be returned " "
*/
String getText(int id);
/**
* In order to allow systems to iterate through all of the data contained within the GeoData object this
* method provides a list of all of the IDs which have associated values stored.
*
* @author James Macgill JM
* @return Enumeration An enumeration of all of the IDs which can then be iterated through.
*/
Enumeration getIds();
/**
* Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is
* not stored a special value is returned to signify that a value for this id is missing.<br>
* By default that value is set to MISSING, however this behavoir can be changed by calling this method with a new value.<br>
*
* @see #getMissingValueCode
* @author James Macgill JM
* @param mv A double containing the new value to represent missing data.
*/
public void setMissingValueCode(double mv);
/**
* Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is
* not stored a special value is returned to signify that a value for this id is missing.<br>
* A call to this method will return the current code in use to represent that situation.<br>
*
* @see #setMissingValueCode
* @author James Macgill JM
* @return double The current value representing missing data.
*/
public double getMissingValueCode();
/**
* A quick statistic relating to the values stored in the GeoData object.<br>
*
* @author James Macgill JM
* @return double The largest value currently stored in this GeoData. The missingValueCode is not included in this test.
*/
double getMax();
/**
* A quick statistic relating to the values stored in the GeoData object.<br>
*
* @author James Macgill JM
* @return double The smallest value currently stored in this GeoData. The missingValueCode is not included in this test.
*/
double getMin();
/**
* The total number of stored id/value pairs stored in this GeoData.
* @author James Macgill JM
* @return int The number of values stored in this GeoData.
*/
int getSize();
/**
* The total number of stored values stored in this GeoData which equal the missing value code.
* @author James Macgill JM
* @return int The number of missing values stored in this GeoData.
*/
int getMissingCount();
/**
* Gets the type of data stored in the geodata<br>
* <ul><li>String - GeoData.CHARACTER</li>
* <li>Integer - GeoData.INTEGER</li>
* <li>Double - GeoData.FLOATING</li></ul>
*/
int getDataType();
/**
* Sets the type of data stored in the geodata<br>
* <ul><li>String - GeoData.character</li>
* <li>Integer - GeoData.integer</li>
* <li>Double - GeoData.float</li></ul>
*/
void setDataType(int type );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public ArrayList<GeoDataRecordObj> getAllGeoData() {\n if(allGeoData == null) {\n this.reloadData();\n }\n return allGeoData;\n }",
"Collection getData();",
"protected abstract Object[] getData();",
"Object getData();",
"Object getData();",
"public Geomin... | [
"0.6221778",
"0.5981774",
"0.5791854",
"0.57725346",
"0.57725346",
"0.57670254",
"0.56897575",
"0.5665618",
"0.5623609",
"0.5604349",
"0.5591982",
"0.55417603",
"0.5466635",
"0.54616004",
"0.5453532",
"0.5432769",
"0.54129934",
"0.54124117",
"0.5412059",
"0.5406762",
"0.53669... | 0.7883338 | 0 |
All GeoData objects can have a name associated with them. Typicaly the name will match the Column heading from which the data came from. Names can be important when the GeoData is used in thematic maps as this is the name that will be placed in the key by default. | String getName(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public String getName() {\n return columnInfo.getName();\n }",
"protected abstract String getFeatureName(Map<String, Object> data);",
"@Override\n public String getName() {\n return _data.getName();\n }",
"@Override\n\tpublic java.lang.String getName() {\n\t\treturn _expando... | [
"0.65625423",
"0.61026454",
"0.6085372",
"0.6069313",
"0.60091364",
"0.5779927",
"0.5702116",
"0.5680943",
"0.5575533",
"0.5525552",
"0.54979515",
"0.54969025",
"0.54521805",
"0.5445865",
"0.5422591",
"0.5422591",
"0.5415594",
"0.5411835",
"0.5409289",
"0.5407246",
"0.5391333... | 0.0 | -1 |
All GeoData objects can have a name associated with them. Typicaly the name will match the Column heading from which the data came from. Names can be important when the GeoData is used in thematic maps as this is the name that will be placed in the key by default. | void setName(String name_); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public String getName() {\n return columnInfo.getName();\n }",
"protected abstract String getFeatureName(Map<String, Object> data);",
"@Override\n public String getName() {\n return _data.getName();\n }",
"@Override\n\tpublic java.lang.String getName() {\n\t\treturn _expando... | [
"0.65622216",
"0.61022663",
"0.6084556",
"0.60694784",
"0.600996",
"0.57810557",
"0.5703204",
"0.5680221",
"0.5576961",
"0.5525666",
"0.5497971",
"0.54953647",
"0.5450838",
"0.54452896",
"0.54213995",
"0.54213995",
"0.5414811",
"0.541148",
"0.5408062",
"0.540788",
"0.53920436... | 0.0 | -1 |
looks up and matches a value to the specifed feature id. Used for example by shaders to obtain vaules for thematic mapping. | double getValue(int id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateFeatue(Long id, FeatureLookup feature) {\n\r\n\t}",
"int getFeatureValue();",
"FeatureId getFeatureId();",
"int indexOfFeature(Feature feature);",
"Feature loadFeature(Integer id);",
"public void SelectValueByName(String Id, String Value) {\n\t\t\r\n\t}",
"public void setFeature(Strin... | [
"0.55370456",
"0.5530313",
"0.55161464",
"0.5377745",
"0.53570974",
"0.5337714",
"0.5322709",
"0.52719235",
"0.51746917",
"0.5120483",
"0.50607544",
"0.50473416",
"0.50468826",
"0.5032567",
"0.49662215",
"0.4964888",
"0.49325523",
"0.49311644",
"0.49262014",
"0.4920673",
"0.4... | 0.4649729 | 35 |
Looks up and retreves a string for the specifed feature id. Used for example by the ToolTip feature in Themes to provide tool tip text for each feature. | String getText(int id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"FeatureId getFeatureId();",
"private String labelFeature(int feature) {\r\n\t\treturn label[feature];\r\n\t}",
"java.lang.String getFortId();",
"String getFeature();",
"String getFeature();",
"public String getIdentifierString();",
"java.lang.String getIdentifier();",
"private String getFeatureFieldN... | [
"0.7083136",
"0.67455935",
"0.6257814",
"0.6225954",
"0.6225954",
"0.612577",
"0.6125751",
"0.6034759",
"0.59948087",
"0.59948087",
"0.59948087",
"0.59948087",
"0.59948087",
"0.59948087",
"0.59948087",
"0.59724927",
"0.59367555",
"0.59096354",
"0.59096354",
"0.59096354",
"0.5... | 0.0 | -1 |
In order to allow systems to iterate through all of the data contained within the GeoData object this method provides a list of all of the IDs which have associated values stored. | Enumeration getIds(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Collection<?> idValues();",
"public Map<String, Object> getIds() {\n return ids;\n }",
"public Set<String> getDataObjectIds() {\n\t\treturn dataObjectIds;\n\t}",
"public List<DataNodeId> getDataNodeIds();",
"public java.util.List<java.lang.String> getGeneIds() {\n return geneIds;\n }",
"public ja... | [
"0.69092995",
"0.65028197",
"0.6462982",
"0.6427615",
"0.6345989",
"0.6321608",
"0.6299977",
"0.62922925",
"0.6277267",
"0.6262702",
"0.62179846",
"0.61903995",
"0.6181215",
"0.6132173",
"0.6106961",
"0.60750467",
"0.6067522",
"0.6027023",
"0.60256183",
"0.6011107",
"0.597403... | 0.55286 | 82 |
Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is not stored a special value is returned to signify that a value for this id is missing. By default that value is set to MISSING, however this behavoir can be changed by calling this method with a new value. | public void setMissingValueCode(double mv); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public int intValue(int numId) {\n return 0;\n }",
"boolean getValueLanguageIdNull();",
"String getValueId();",
"@Override\r\n\tpublic Integer getValue() {\n\t\treturn null;\r\n\t}",
"public Integer getValueId() {\n return valueId;\n }",
"public double getMissingValueCo... | [
"0.5800275",
"0.576958",
"0.5707962",
"0.5652982",
"0.55976737",
"0.55221826",
"0.55095017",
"0.5466593",
"0.5425186",
"0.5418258",
"0.53892684",
"0.53387225",
"0.52999365",
"0.5281467",
"0.5278302",
"0.52733535",
"0.52534884",
"0.52396643",
"0.523531",
"0.523531",
"0.5229639... | 0.0 | -1 |
Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is not stored a special value is returned to signify that a value for this id is missing. A call to this method will return the current code in use to represent that situation. | public double getMissingValueCode(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getValueId();",
"public Integer getValueId() {\n return valueId;\n }",
"@java.lang.Override\n public long getCodeId() {\n return codeId_;\n }",
"@java.lang.Override\n public long getCodeId() {\n return codeId_;\n }",
"@java.lang.Override\n public long getCodeId() {... | [
"0.62848586",
"0.5889217",
"0.5876777",
"0.5876777",
"0.5876777",
"0.58745545",
"0.5843371",
"0.5843371",
"0.5843371",
"0.5833687",
"0.5772872",
"0.57491094",
"0.57491094",
"0.57491094",
"0.57364345",
"0.5730354",
"0.56587213",
"0.56290257",
"0.5623419",
"0.5585037",
"0.55850... | 0.6389085 | 0 |
A quick statistic relating to the values stored in the GeoData object. | double getMax(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface GeoData{\r\n /**\r\n * Most geodata sets contain features for which there is no data, or the data is missing.<br>\r\n * In these cases a specific value is often used to represent these special cases.<p>\r\n * The static final value MISSING is the default value used by GeoDatas to re... | [
"0.6189141",
"0.617789",
"0.5876402",
"0.5844644",
"0.5824578",
"0.5820447",
"0.5783202",
"0.5775424",
"0.574471",
"0.5700324",
"0.5651897",
"0.556801",
"0.5567175",
"0.5555531",
"0.55264294",
"0.5482506",
"0.5457636",
"0.5451798",
"0.54389673",
"0.54233974",
"0.54070836",
... | 0.0 | -1 |
A quick statistic relating to the values stored in the GeoData object. | double getMin(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface GeoData{\r\n /**\r\n * Most geodata sets contain features for which there is no data, or the data is missing.<br>\r\n * In these cases a specific value is often used to represent these special cases.<p>\r\n * The static final value MISSING is the default value used by GeoDatas to re... | [
"0.618802",
"0.6178157",
"0.58758193",
"0.5845057",
"0.5825189",
"0.5820847",
"0.57837474",
"0.5775629",
"0.57447237",
"0.57016987",
"0.5651863",
"0.55685264",
"0.55676293",
"0.5555589",
"0.5526791",
"0.5483547",
"0.54577714",
"0.5452705",
"0.5440667",
"0.5423935",
"0.5407677... | 0.0 | -1 |
The total number of stored id/value pairs stored in this GeoData. | int getSize(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getValueCount() {\n return value_.size();\n }",
"public int getValueCount() {\n return value_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return d... | [
"0.7402797",
"0.73793364",
"0.72882736",
"0.72882736",
"0.72882736",
"0.72882736",
"0.72882736",
"0.72764766",
"0.72764766",
"0.7254566",
"0.7159262",
"0.70804507",
"0.70044476",
"0.6966972",
"0.6963076",
"0.6950522",
"0.6941721",
"0.692792",
"0.6890099",
"0.68787533",
"0.687... | 0.0 | -1 |
The total number of stored values stored in this GeoData which equal the missing value code. | int getMissingCount(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getValueCount() {\n return value_.size();\n }",
"public int getValueCount() {\n return value_.size();\n }",
"public long getMissingCount() {\n return nullCount + nanCount + infinityCount;\n }",
"@Override\n\tpublic int numValues() {\n\t\t// TODO Auto-generated method stub\n\t... | [
"0.72976613",
"0.7271109",
"0.6986253",
"0.69480234",
"0.69277567",
"0.69080883",
"0.6750242",
"0.6740785",
"0.6673481",
"0.6661056",
"0.661491",
"0.6613729",
"0.6568739",
"0.65244263",
"0.65229154",
"0.65229154",
"0.65229154",
"0.65229154",
"0.65229154",
"0.6507481",
"0.6500... | 0.6929411 | 4 |
Gets the type of data stored in the geodata String GeoData.CHARACTER Integer GeoData.INTEGER Double GeoData.FLOATING | int getDataType(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getDataType();",
"public String getDataType() {\n\t\t\t\t\n\t\t//for contributed grid, need to find the units from the ESRIShapefile object\n\t\tfor (LayerPanel layerPanel : ((MapApp)map.getApp()).layerManager.getLayerPanels()) {\n\t\t\tif (layerPanel.layer instanceof ESRIShapefile && ((ESRIShap... | [
"0.7158191",
"0.7133301",
"0.7031324",
"0.68896174",
"0.6643037",
"0.66194403",
"0.65592456",
"0.65205693",
"0.65079665",
"0.64946574",
"0.6368145",
"0.63200426",
"0.63168544",
"0.628527",
"0.6182194",
"0.61266756",
"0.6124032",
"0.605681",
"0.6045273",
"0.6018928",
"0.599283... | 0.64661455 | 10 |
Sets the type of data stored in the geodata String GeoData.character Integer GeoData.integer Double GeoData.float | void setDataType(int type ); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setDataType(String dataType) {\r\n this.dataType = dataType;\r\n }",
"public void setDataType(String dataType) {\n this.dataType = dataType;\n }",
"public void setType(String t) {\n\t\tgfType = t;\n\t}",
"public void setDataType(DataType dataType) {\n this.dataType = da... | [
"0.6424494",
"0.6390863",
"0.6369914",
"0.63006824",
"0.6192137",
"0.6183594",
"0.6158458",
"0.6154374",
"0.61171204",
"0.60758245",
"0.6043769",
"0.60432655",
"0.60154456",
"0.6014479",
"0.59837586",
"0.5970371",
"0.5932251",
"0.5917933",
"0.5917933",
"0.5917933",
"0.5874489... | 0.67675316 | 0 |
Creates a blank team | public Team() {
this(null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void create(Team team);",
"Team createTeam();",
"public static void createNewLeague()\n\t{\n\t\t//put code to get input from end-user here.\n\t\t//generateFixtures(leagueName, teamAmount, homeAndAway, winPoints, drawPoints, lossPoints, teamNames);\n\t}",
"public void newTeam(Team team);",
"public void crea... | [
"0.7923078",
"0.7878826",
"0.6980763",
"0.69702923",
"0.6909981",
"0.69037527",
"0.6873015",
"0.6698313",
"0.657886",
"0.6574964",
"0.6525671",
"0.6513037",
"0.6445183",
"0.6419433",
"0.63427323",
"0.63180625",
"0.63083535",
"0.6290294",
"0.6279189",
"0.6234055",
"0.62101054"... | 0.6871555 | 7 |
Creates a team with a name, and a default color | public Team(String name) {
this(name, Color.BLACK);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Team(String name, Color color) {\n\t\tthis.teamName = name;\n\t\tthis.color = color;\n\t}",
"void create(Team team);",
"Team createTeam();",
"public Team(String name) {\n this.name = name;\n }",
"public static ProjectTeam createSampleProjectTeam() {\n ProjectTeam team = new ProjectT... | [
"0.7490625",
"0.72642773",
"0.7058986",
"0.6984186",
"0.66727364",
"0.65721",
"0.65710586",
"0.6554844",
"0.6213525",
"0.61685824",
"0.61628",
"0.60962343",
"0.60522485",
"0.604511",
"0.5983157",
"0.59569687",
"0.5897576",
"0.5870346",
"0.58448833",
"0.57439303",
"0.5691362",... | 0.7365262 | 1 |
Creates a team with a name and color | public Team(String name, Color color) {
this.teamName = name;
this.color = color;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void create(Team team);",
"Team createTeam();",
"public Team(String name) {\n\t\tthis(name, Color.BLACK);\n\t}",
"public Team(String name) {\n this.name = name;\n }",
"public void newTeam(Team team);",
"public static ProjectTeam createSampleProjectTeam() {\n ProjectTeam team = new Projec... | [
"0.7591166",
"0.7242474",
"0.69612455",
"0.6785018",
"0.6616401",
"0.6581198",
"0.6478893",
"0.64241004",
"0.64240766",
"0.6407426",
"0.63108456",
"0.6298865",
"0.61317444",
"0.5996048",
"0.59915",
"0.59426117",
"0.5928294",
"0.59228975",
"0.59163004",
"0.5897742",
"0.5883958... | 0.7495077 | 1 |
Gets the team's name | public String getTeamName() {
return teamName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getName() {\r\n\t\treturn \"[\" + teamNo + \"] \" + name;\r\n\t}",
"public String getTeamName() {\r\n return teamName;\r\n }",
"@Override\n\tpublic String toString() {\n\t\treturn teamName;\n\t}",
"public String getProjectTeamName(){\n return \"The name of the project of this r... | [
"0.84061635",
"0.81925493",
"0.7717628",
"0.763882",
"0.7595244",
"0.7595244",
"0.74175906",
"0.73594075",
"0.73283607",
"0.7296518",
"0.7270186",
"0.72448367",
"0.72308874",
"0.72107154",
"0.72044116",
"0.7160812",
"0.71530926",
"0.71231693",
"0.7089302",
"0.70527935",
"0.70... | 0.7935125 | 3 |
Sets the team's name | public void setTeamName(String teamName) {
this.teamName = teamName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTeamName(String name) {\n\t\tteamName = name;\n\t}",
"public void setName(String name){\n\t\tthis.tournamentName = name;\n\t}",
"public void setTeamName(String teamName) {\r\n this.teamName = teamName;\r\n }",
"public void setName(String name)\r\n\t{\r\n\t\tthis.playerName = name;\r\... | [
"0.80779296",
"0.79355365",
"0.78349257",
"0.75922453",
"0.75531214",
"0.75011456",
"0.74731946",
"0.7363628",
"0.7208016",
"0.7189511",
"0.7169494",
"0.71648324",
"0.71079713",
"0.7099635",
"0.7096363",
"0.70870733",
"0.7072908",
"0.7051283",
"0.70421433",
"0.7041438",
"0.70... | 0.7349116 | 8 |
Gets the team's color | public Color getColor() {
return color;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Color getColor()\n {\n return mTeam.getColor();\n }",
"public GameColor getColor();",
"Color getColor();",
"Color getColor();",
"Color getColor();",
"Color getColor();",
"Color getColor();",
"public static Color getColor() {\n return myColor;\n }",
"public String ge... | [
"0.86473626",
"0.7929981",
"0.7570635",
"0.7570635",
"0.7570635",
"0.7570635",
"0.7570635",
"0.73489624",
"0.7347872",
"0.7346726",
"0.7346726",
"0.7339389",
"0.73253334",
"0.73174196",
"0.73117155",
"0.7304594",
"0.7303564",
"0.7303374",
"0.7303374",
"0.7303374",
"0.7303374"... | 0.7094949 | 87 |
Sets the team's color | public void setColor(Color color) {
this.color = color;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void setBlue() {\r\n playerTeam.setColor(blue);\r\n updateMessage(\"Seu time agora é azul\");\r\n }",
"void setColor(){\n this.objectColour = new Color(rValue,gValue,bValue,timeToLive).brighter();\n }",
"public void setColor(Color color);",
"public Color getColor()\n ... | [
"0.765805",
"0.7237587",
"0.71818566",
"0.7135025",
"0.7132911",
"0.71324325",
"0.7056756",
"0.7056756",
"0.7028583",
"0.7000041",
"0.69747406",
"0.6968311",
"0.6935176",
"0.69312215",
"0.68851405",
"0.6825809",
"0.6800597",
"0.6794039",
"0.6793964",
"0.6767296",
"0.6759309",... | 0.6267019 | 78 |
Overrides the Object toString method. This is primarily used for the JComboBox | @Override
public String toString() {
return teamName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override String toString();",
"@Override\r\n String toString();",
"@Override public String toString();",
"@Override\r\n\t\tpublic String toString() {\n\t\t\treturn super.toString();\r\n\t\t}",
"@Override\r\n public String toString() {\r\n return super.toString();\r\n }",
"@Override\r\n ... | [
"0.77866435",
"0.76728666",
"0.7672776",
"0.7617908",
"0.76068556",
"0.76068556",
"0.75958216",
"0.755719",
"0.7555202",
"0.75482666",
"0.75482666",
"0.75482666",
"0.75482666",
"0.75482666",
"0.75482666",
"0.75424814",
"0.7515147",
"0.7515147",
"0.7498968",
"0.74916035",
"0.7... | 0.0 | -1 |
Calls the Object class's toString() method | public String superToString() {
return super.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toString() ;",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"publ... | [
"0.7998202",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void run(ImageProcessor ip) {
} | {
"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 |
private final Logger logger = Logger.getLogger(this.getClass()); | @Test
public void run() throws InterruptedException {
/* Player player = new Player(3);
player.start();
logger.debug("Called player.start");
Thread.sleep(2000);
player.skip();
logger.debug("Called player.skip");
Thread.sleep(2000);
player.skip();
logger.debug("Called player.skip");
Thread.sleep(2000);
player.previous();
logger.debug("Called player.previous");
Thread.sleep(2000);
player.stop();
logger.debug("Called player.stop"); */
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected Logger getLogger() {\n return LOGGER;\n }",
"public Logger getLogger() {\n\treturn _logger;\n }",
"private Logger getLogger() {\n return LoggingUtils.getLogger();\n }",
"public Logger getLogger()\n/* */ {\n/* 77 */ if (this.logger == null) {\n/* 78 ... | [
"0.7692025",
"0.75768375",
"0.7568827",
"0.7555943",
"0.75519454",
"0.7541186",
"0.74538857",
"0.7436452",
"0.74185663",
"0.74121857",
"0.74008405",
"0.7375905",
"0.73448235",
"0.7303857",
"0.729659",
"0.72564477",
"0.7255693",
"0.72537327",
"0.72333604",
"0.72313005",
"0.721... | 0.0 | -1 |
quadrant Method specifications as in textbook Chapter 4 Exercise 19 Calculates what quadrant a certain point is in. The book says to return a point on an axis as 0, but thats too easy so I created a self check which requires the user to input non zero values for x and y, code can be cound in main. | public static int quadrant(double x, double y) {
int quadrant = 0; // variable quadrant is initialized
if (x > 0 && y > 0){ // code for quadrant 1
quadrant = 1;
} else if (x < 0 && y < 0){ //code for quadrant 3
quadrant = 3;
} else if (x < 0 && y > 0){ //code for quadrant 2
quadrant = 2;
} else { // defaulted to quadrant 4
quadrant = 4;
}
return quadrant;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private QuadTree<Point> quadrant(double x, double y) {\n int quad = quadrant(x, y, _nodeOrigin[0], _nodeOrigin[1]);\n switch (quad) {\n case 1:\n return _northEast;\n case 2:\n return _northWest;\n case 3:\n return _southWest;\n default:\n ... | [
"0.66398513",
"0.6219524",
"0.61894506",
"0.6079798",
"0.59658664",
"0.5886561",
"0.57320803",
"0.566896",
"0.56424373",
"0.56344956",
"0.5618516",
"0.5550516",
"0.5534944",
"0.55231696",
"0.54646957",
"0.5448102",
"0.5438543",
"0.5395924",
"0.5334208",
"0.5322046",
"0.526142... | 0.724272 | 0 |
singleTax Use current year 1040 tax instructions ( 1040 form ( Input: taxable income (Line 43 of 1040 form) Returns: the proper tax for single filing status (Line 44 of 1040 form) To determine tax: Use Tax Table or Tax Computation as appropriate. Round tax to nearest penny. Return 0 if taxable income is negative | public static double singleTax(double income) {
//all values and calculations based off of 1040 form.
double tax; //initializing tax, will be returned in the end.
if (income < 0){ //determine whether income is negative.
tax = 0;
} else if (income > 0 && income <= 9275){
tax = income * 0.1; //decimal is the tax rate for associated income
} else if (income > 9275 && income <= 37650){
tax = income * 0.15;
} else if (income > 37650 && income <= 91150){
tax = income * 0.25;
} else if (income > 91150 && income <= 190150){
tax = income * 0.28 - 6963.25; //incorperates reimbursment at higher incomes
} else if (income > 190150 && income <= 413350){
tax = income * 0.33 - 16470.75;
} else if (income > 413350 && income <= 415050){
tax = income * 0.35 - 24737.75;
} else {
tax = income * 0.396 - 43830.05;
}
tax = Math.round(tax * 100.0)/100.0; //rounds tax to nearest cent.
return tax; //returns tax as value to main
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double taxPaying() {\r\n double tax;\r\n if (profit == true) {\r\n tax = revenue / 10.00;\r\n }\r\n\r\n else\r\n tax = revenue / 2.00;\r\n return tax;\r\n }",
"public double calculateTax(double amount){\n return (amount*TAX_4_1000)... | [
"0.7080377",
"0.7077584",
"0.6816037",
"0.6784472",
"0.6742573",
"0.67075545",
"0.6694451",
"0.6644856",
"0.66263735",
"0.66104627",
"0.6606332",
"0.6604429",
"0.6502707",
"0.648714",
"0.6474421",
"0.6453979",
"0.6435485",
"0.64229244",
"0.63911885",
"0.63849396",
"0.6337733"... | 0.80162495 | 0 |
secondsAfterMidnight Input: String that represents time of day Returns: integer number of seconds after midnight (return 1 if String is not valid time of day) General time of day format HH:MM:SS Examples: Input StringReturn Value "12:34:09AM"2049 "12:00:00PM" 43200 (common noon) "12:00:02am"2 (AM/PM case insensitive) "3:03:03Pm" 54183 (two digit MM and SS required) "7:11:03A"1 "7:11:3AM"1 "7:91:73PM"1 "23:45:12"1 (do not allow 24 hour clock format) | public static int secondsAfterMidnight(String t) {
int seconds; //initializing seconds, will be returned to main.
t.toLowerCase(); //setting all input to lowercase so it is easier to handle.
if (t.length() == 10){ //if input is 10 characters
// if statement below checks whether each character is appropriate before continuing.
if((t.startsWith("0") || t.startsWith("1"))&& Character.isDigit(t.charAt(1))&&
t.charAt(2) == ':' && Character.isDigit(t.charAt(3))&& Character.isDigit(t.charAt(4))&&
t.charAt(5) == ':' && Character.isDigit(t.charAt(6))&& Character.isDigit(t.charAt(7))&&
(t.endsWith("am") || t.endsWith("pm"))){
// Characters converted to numeric values and hours, minutes, and seconds are
// calculated below.
int hours = Character.getNumericValue(t.charAt(0))*10
+ Character.getNumericValue(t.charAt(1));
//if hours is equal to 12 such as 12:35, switched to 0:35, for easier calc.
if(hours == 12){
hours = 0;
}
int minutes = Character.getNumericValue(t.charAt(3))*10
+ Character.getNumericValue(t.charAt(4));
seconds = Character.getNumericValue(t.charAt(6))*10
+ Character.getNumericValue(t.charAt(7));
if(minutes < 60 && seconds < 60){//checks whether minute and second input is below 60.
if(t.endsWith("pm")){ //adding 43200 (12 hours in seconds) if time is pm.
seconds = hours*3600 + minutes*60 + seconds + 43200;
}else{
seconds = hours*3600 + minutes*60 + seconds;
}
}else{
seconds = -1; //if proper input is not given, seconds set to -1.
}
} else {
seconds = -1; //improper input leads to seconds set to -1.
}
//below is for input that has 9 characters, such as 9:12:23am, instead of 09:12:23am. The code below
// is very similar to to code for 10 characters above.
}else if (t.length() == 9){
if(Character.isDigit(t.charAt(0))&& t.charAt(1) == ':' && Character.isDigit(t.charAt(2))
&& Character.isDigit(t.charAt(3))&& t.charAt(4) == ':' && Character.isDigit(t.charAt(5))
&& Character.isDigit(t.charAt(6))&&(t.endsWith("am") || t.endsWith("pm"))){
int hours = Character.getNumericValue(t.charAt(0));
int minutes = Character.getNumericValue(t.charAt(2))*10
+ Character.getNumericValue(t.charAt(3));
seconds = Character.getNumericValue(t.charAt(5))*10
+ Character.getNumericValue(t.charAt(6));
if(minutes < 60 && seconds < 60){
if(t.endsWith("pm")){
seconds = hours*3600 + minutes*60 + seconds + 43200;
}else{
seconds = hours*3600 + minutes*60 + seconds;
}
}else{
seconds = -1;
}
} else {
seconds = -1;
}
}else{ // if input has neither 10 or 9 characters, input not proper.
seconds = -1;
}
return seconds; //seconds is returned to main.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String minChangeDayHourMinS(String time) {\n long mss;\n if (!\"\".equals(time) && time != null) {\n mss = Integer.parseInt(time) * 60;\n } else {\n return \"\";\n }\n String DateTimes = null;\n long days = mss / (60 * 60 * 24);\n ... | [
"0.60182196",
"0.5966318",
"0.59530705",
"0.5796412",
"0.57909256",
"0.57785404",
"0.5679145",
"0.5644399",
"0.5627994",
"0.56199574",
"0.5614542",
"0.549614",
"0.5490301",
"0.54032767",
"0.53760636",
"0.536063",
"0.53455836",
"0.5344091",
"0.53347844",
"0.5288512",
"0.526451... | 0.81961715 | 0 |
secondsDifference Input: two time of day Strings Returns: integer number of seconds difference between time of day inputs (Returns 99999 if either time of day inputs invalid) General time of day format HH:MM:SS Examples: start end Return Value "12:34:09AM""12:00:00PM" 41151 "3:03:03PM""12:00:02am"54181 "6:34:52PM""6:34:52PM"0 "3:03:03PM" "7:91:73PM"99999 "Nice""Day"99999 | public static int secondsDifference(String start, String end) {
int difference; //difference is initialized,and will be returned at the end.
//firstsec is the amount of seconds past midnight in the start time, and
//secondsec is the amount of seconds past midnight in the end time. In order to
//calculate this, secondsAfterMidnight() method was called for start and end.
int firstsec = secondsAfterMidnight(start);
int secondsec = secondsAfterMidnight(end);
//If start or end returns -1 through secondsAfterMidnight(), then the input was
//not proper, so difference is set to -99999.
if (firstsec == -1 || secondsec == -1){
difference = -99999;
}else { //if both inputs are proper, then proceed to calculating difference.
difference = secondsec - firstsec;
}
return difference; //difference is returned to main.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long dayDiffCalculator(String a, String b){\n\n long dateDiff = 0;\n\n Date d1 = null;\n Date d2 = null;\n\n try{\n d1 = sdf.parse(a);\n d2 = sdf.parse(b);\n\n long diff = d2.getTime() - d1.getTime();\n\n long diffSeconds = diff / 1000 ... | [
"0.65252537",
"0.62559664",
"0.6249057",
"0.6232178",
"0.62288773",
"0.61888766",
"0.61700493",
"0.6111941",
"0.60853785",
"0.60269713",
"0.6008384",
"0.59769094",
"0.5971002",
"0.59500265",
"0.5926573",
"0.58950436",
"0.5889798",
"0.5873575",
"0.58291626",
"0.57934755",
"0.5... | 0.74308014 | 0 |
TODO Autogenerated method stub | public static void main(String[] args) {
DataWsImpleService factory=new DataWsImpleService();
DataWs dataws= factory.getDataWsImplePort();
/* System.out.println("ok1");
//添加请求的客户端对象
Client client= ClientProxy.getClient(dataws);
//添加输出拦截器
System.out.println("ok1");
List<Interceptor<? extends Message>> OutInterceptors =client.getOutInterceptors();
OutInterceptors.add(new LoggingOutInterceptor());
System.out.println("ok1");
//添加输入拦截器
List<Interceptor<? extends Message>> InInterceptors =client.getInInterceptors();
InInterceptors.add(new LoggingInInterceptor());
*/
// System.out.println("ok2");
dataws.getStudentbyId(1);
System.out.println("succeed");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
////////////////////////////////////////////////////////////// constructor Creates a new NearAction | public NearAction(String name, int direction) {
this(name, direction, 1, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public NearAction(String name, int direction, int magnitude) {\r\n this(name, direction, magnitude, false);\r\n }",
"public NearAction(String name, Icon icon, int direction, int magnitude) {\r\n this(name, icon, direction, magnitude, false);\r\n }",
"public NearAction(String name, int direc... | [
"0.6943622",
"0.6467439",
"0.6439669",
"0.63288534",
"0.62589985",
"0.6150077",
"0.5995462",
"0.5807783",
"0.57914716",
"0.5788717",
"0.5657526",
"0.55941176",
"0.5587642",
"0.5581686",
"0.5579516",
"0.55710423",
"0.55695623",
"0.55695623",
"0.55695623",
"0.5540912",
"0.55220... | 0.7100962 | 0 |
Creates a new NearAction | public NearAction(String name, int direction, int magnitude) {
this(name, direction, magnitude, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public NearAction(String name, int direction) {\r\n this(name, direction, 1, false);\r\n }",
"public NearAction(String name, int direction, boolean localize) {\r\n this(name, direction, 1, localize);\r\n }",
"Action createAction();",
"Action createAction();",
"Action createAction();",
... | [
"0.67906517",
"0.6129316",
"0.6085668",
"0.6085668",
"0.6085668",
"0.60802734",
"0.60486925",
"0.5966385",
"0.5815725",
"0.5695938",
"0.5693334",
"0.5376089",
"0.53672296",
"0.527376",
"0.52572304",
"0.5240696",
"0.5210045",
"0.51803356",
"0.5179967",
"0.5153246",
"0.5138728"... | 0.6518271 | 1 |
Creates a new NearAction | public NearAction(String name, Icon icon, int direction) {
this(name, icon, direction, 1, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public NearAction(String name, int direction) {\r\n this(name, direction, 1, false);\r\n }",
"public NearAction(String name, int direction, int magnitude) {\r\n this(name, direction, magnitude, false);\r\n }",
"public NearAction(String name, int direction, boolean localize) {\r\n thi... | [
"0.67906517",
"0.6518271",
"0.6129316",
"0.6085668",
"0.6085668",
"0.6085668",
"0.60802734",
"0.5966385",
"0.5815725",
"0.5695938",
"0.5693334",
"0.5376089",
"0.53672296",
"0.527376",
"0.52572304",
"0.5240696",
"0.5210045",
"0.51803356",
"0.5179967",
"0.5153246",
"0.5138728",... | 0.60486925 | 7 |
Creates a new NearAction | public NearAction(String name, Icon icon, int direction, int magnitude) {
this(name, icon, direction, magnitude, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public NearAction(String name, int direction) {\r\n this(name, direction, 1, false);\r\n }",
"public NearAction(String name, int direction, int magnitude) {\r\n this(name, direction, magnitude, false);\r\n }",
"public NearAction(String name, int direction, boolean localize) {\r\n thi... | [
"0.67906517",
"0.6518271",
"0.6129316",
"0.6085668",
"0.6085668",
"0.6085668",
"0.60486925",
"0.5966385",
"0.5815725",
"0.5695938",
"0.5693334",
"0.5376089",
"0.53672296",
"0.527376",
"0.52572304",
"0.5240696",
"0.5210045",
"0.51803356",
"0.5179967",
"0.5153246",
"0.5138728",... | 0.60802734 | 6 |
Creates a new NearAction | public NearAction(String name, int direction, boolean localize) {
this(name, direction, 1, localize);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public NearAction(String name, int direction) {\r\n this(name, direction, 1, false);\r\n }",
"public NearAction(String name, int direction, int magnitude) {\r\n this(name, direction, magnitude, false);\r\n }",
"Action createAction();",
"Action createAction();",
"Action createAction();",... | [
"0.67906517",
"0.6518271",
"0.6085668",
"0.6085668",
"0.6085668",
"0.60802734",
"0.60486925",
"0.5966385",
"0.5815725",
"0.5695938",
"0.5693334",
"0.5376089",
"0.53672296",
"0.527376",
"0.52572304",
"0.5240696",
"0.5210045",
"0.51803356",
"0.5179967",
"0.5153246",
"0.5138728"... | 0.6129316 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.