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 |
|---|---|---|---|---|---|---|
/ ARRANGE Nothing to arrange here. / ACT & ASSERT | @Test
public void extractAffectedResource_null_throwIllegalArgumentException() {
assertThrows(IllegalArgumentException.class, () -> MessageUtils.extractAffectedResource(null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void ensureBufferSpace(int expectedAdditions)\n {\n\t\tthrow new UnsupportedOperationException(lengthChangeError);\n }",
"@Override\n void invokeOperation() {\n\n AcquiredAccount from, to;\n if (fromIndex < toIndex) {\n from = acquire(fromIndex, this);\... | [
"0.53128356",
"0.5308249",
"0.5263747",
"0.5259811",
"0.5229742",
"0.52246207",
"0.5223271",
"0.51910686",
"0.51841396",
"0.51608735",
"0.5118354",
"0.5108905",
"0.50974333",
"0.5078029",
"0.50705206",
"0.5068644",
"0.50570077",
"0.5036555",
"0.50261843",
"0.50253534",
"0.501... | 0.0 | -1 |
/ ARRANGE Nothing to arrange here. / ACT & ASSERT | @Test
public void extractIssuerConnector_null_throwIllegalArgumentException() {
assertThrows(IllegalArgumentException.class, () -> MessageUtils.extractIssuerConnector(null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void ensureBufferSpace(int expectedAdditions)\n {\n\t\tthrow new UnsupportedOperationException(lengthChangeError);\n }",
"@Override\n void invokeOperation() {\n\n AcquiredAccount from, to;\n if (fromIndex < toIndex) {\n from = acquire(fromIndex, this);\... | [
"0.5310607",
"0.5306089",
"0.52628917",
"0.52598757",
"0.5228672",
"0.5226012",
"0.5221519",
"0.5190882",
"0.5182993",
"0.51598305",
"0.5115175",
"0.5107411",
"0.5097164",
"0.50773436",
"0.5071172",
"0.5068732",
"0.50578123",
"0.50355816",
"0.5025367",
"0.50249267",
"0.501624... | 0.0 | -1 |
/ ARRANGE Nothing to arrange here. / ACT & ASSERT | @Test
public void extractMessageId_null_throwIllegalArgumentException() {
assertThrows(IllegalArgumentException.class, () -> MessageUtils.extractMessageId(null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void ensureBufferSpace(int expectedAdditions)\n {\n\t\tthrow new UnsupportedOperationException(lengthChangeError);\n }",
"@Override\n void invokeOperation() {\n\n AcquiredAccount from, to;\n if (fromIndex < toIndex) {\n from = acquire(fromIndex, this);\... | [
"0.5310402",
"0.5307975",
"0.5265414",
"0.5261048",
"0.5227728",
"0.52238125",
"0.52219373",
"0.51905525",
"0.51829267",
"0.5159131",
"0.51160336",
"0.51081",
"0.5097817",
"0.50779533",
"0.5069075",
"0.5068207",
"0.505554",
"0.50348914",
"0.5024662",
"0.5024629",
"0.5014548",... | 0.0 | -1 |
/ ARRANGE Nothing to arrange here. / ACT & ASSERT | @Test
public void extractModelVersion_null_throwIllegalArgumentException() {
assertThrows(IllegalArgumentException.class, () -> MessageUtils.extractModelVersion(null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void ensureBufferSpace(int expectedAdditions)\n {\n\t\tthrow new UnsupportedOperationException(lengthChangeError);\n }",
"@Override\n void invokeOperation() {\n\n AcquiredAccount from, to;\n if (fromIndex < toIndex) {\n from = acquire(fromIndex, this);\... | [
"0.53121024",
"0.5306639",
"0.5264639",
"0.5262026",
"0.522958",
"0.5223873",
"0.52227324",
"0.5191627",
"0.51833826",
"0.51594484",
"0.511816",
"0.5108623",
"0.50976366",
"0.50782937",
"0.50708306",
"0.506787",
"0.5056936",
"0.5036031",
"0.50245416",
"0.50239813",
"0.5015904... | 0.0 | -1 |
/ ARRANGE Nothing to arrange here. / ACT & ASSERT | @Test
public void extractRejectionReason_null_throwIllegalArgumentException() {
assertThrows(IllegalArgumentException.class, () -> MessageUtils.extractRejectionReason(null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void ensureBufferSpace(int expectedAdditions)\n {\n\t\tthrow new UnsupportedOperationException(lengthChangeError);\n }",
"@Override\n void invokeOperation() {\n\n AcquiredAccount from, to;\n if (fromIndex < toIndex) {\n from = acquire(fromIndex, this);\... | [
"0.53128356",
"0.5308249",
"0.5263747",
"0.5259811",
"0.5229742",
"0.52246207",
"0.5223271",
"0.51910686",
"0.51841396",
"0.51608735",
"0.5118354",
"0.5108905",
"0.50974333",
"0.5078029",
"0.50705206",
"0.5068644",
"0.50570077",
"0.5036555",
"0.50261843",
"0.50253534",
"0.501... | 0.0 | -1 |
/ ARRANGE Nothing to arrange here. / ACT & ASSERT | @Test
public void checkForEmptyMessage_null_throwMessageEmptyException() {
assertThrows(MessageEmptyException.class, () -> MessageUtils.checkForEmptyMessage(null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void ensureBufferSpace(int expectedAdditions)\n {\n\t\tthrow new UnsupportedOperationException(lengthChangeError);\n }",
"@Override\n void invokeOperation() {\n\n AcquiredAccount from, to;\n if (fromIndex < toIndex) {\n from = acquire(fromIndex, this);\... | [
"0.5310607",
"0.5306089",
"0.52628917",
"0.52598757",
"0.5228672",
"0.5226012",
"0.5221519",
"0.5190882",
"0.5182993",
"0.51598305",
"0.5115175",
"0.5107411",
"0.5097164",
"0.50773436",
"0.5071172",
"0.5068732",
"0.50578123",
"0.50355816",
"0.5025367",
"0.50249267",
"0.501624... | 0.0 | -1 |
/ ARRANGE Nothing to arrange here. / ACT & ASSERT | @Test
public void extractHeaderFromMultipartMessage_null_throwIllegalArgumentException() {
assertThrows(IllegalArgumentException.class, () -> MessageUtils.extractHeaderFromMultipartMessage(null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void ensureBufferSpace(int expectedAdditions)\n {\n\t\tthrow new UnsupportedOperationException(lengthChangeError);\n }",
"@Override\n void invokeOperation() {\n\n AcquiredAccount from, to;\n if (fromIndex < toIndex) {\n from = acquire(fromIndex, this);\... | [
"0.5310402",
"0.5307975",
"0.5265414",
"0.5261048",
"0.5227728",
"0.52238125",
"0.52219373",
"0.51905525",
"0.51829267",
"0.5159131",
"0.51160336",
"0.51081",
"0.5097817",
"0.50779533",
"0.5069075",
"0.5068207",
"0.505554",
"0.50348914",
"0.5024662",
"0.5024629",
"0.5014548",... | 0.0 | -1 |
/ ARRANGE Nothing to arrange here. / ACT & ASSERT | @Test
public void extractPayloadFromMultipartMessage_null_throwIllegalArgumentException() {
assertThrows(IllegalArgumentException.class, () -> MessageUtils.extractPayloadFromMultipartMessage(null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void ensureBufferSpace(int expectedAdditions)\n {\n\t\tthrow new UnsupportedOperationException(lengthChangeError);\n }",
"@Override\n void invokeOperation() {\n\n AcquiredAccount from, to;\n if (fromIndex < toIndex) {\n from = acquire(fromIndex, this);\... | [
"0.53121024",
"0.5306639",
"0.5264639",
"0.5262026",
"0.522958",
"0.5223873",
"0.52227324",
"0.5191627",
"0.51833826",
"0.51594484",
"0.511816",
"0.5108623",
"0.50976366",
"0.50782937",
"0.50708306",
"0.506787",
"0.5056936",
"0.5036031",
"0.50245416",
"0.50239813",
"0.5015904... | 0.0 | -1 |
To be safe, you should check that the SDCard is mounted using Environment.getExternalStorageState() before doing this. | private File getOutputMediaFile(String s2){
File mediaFile = null;
try {
assert s2 != null;
String fileName = s2.substring(s2.lastIndexOf("/") + 1);
final String stringImageURL = s2.substring(0, fileName.length() - 1);
File mediaStorageDir = new File(Environment.getExternalStorageDirectory()
+ "/Android/data/"
+ activity.getPackageName()
+ "/Files/" + stringImageURL, fileName);
// This location works best if you want the created images to be shared
// between applications and persist after your app has been uninstalled.
// Create the storage directory if it does not exist
if (!mediaStorageDir.exists()) {
if (!mediaStorageDir.mkdirs()) {
return null;
}
}
// Create a media file name
//String timeStamp = new SimpleDateFormat("ddMMyyyy_HHmm").format(new Date());
// String mImageName=s2;
mediaFile = new File(mediaStorageDir.getPath(), fileName);
}catch (Exception e){
}
return mediaFile;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static boolean hasWritableSd(Context context){\n File[] paths = context.getExternalFilesDirs(null);\n if(paths.length > 1){\n String state = Environment.getExternalStorageState(paths[1]);\n return state.equals(Environment.MEDIA_MOUNTED);\n }\n return false;... | [
"0.75061065",
"0.7474231",
"0.72101706",
"0.71801084",
"0.7171102",
"0.71416914",
"0.7133563",
"0.7099311",
"0.6957786",
"0.6790261",
"0.6789546",
"0.6729733",
"0.6722845",
"0.6716172",
"0.6707101",
"0.6668614",
"0.6657392",
"0.6657392",
"0.6657392",
"0.66394967",
"0.6635161"... | 0.0 | -1 |
Creates the GUI for whenever players want to choose a minigame to join | public void createChooseGameUI()
{
HashMap<InventoryRunnable, InventoryItem> inventoryStuff = new HashMap<InventoryRunnable, InventoryItem>();
InventoryRunnable gladiatorJoinRunnable = new GladiatorJoinInventoryRunnable(plugin);
ArrayList<String> gladiatorLore = new ArrayList<String>();
gladiatorLore.add("FIGHT TO THE DEATH AND WIN YOUR FREEDOM");
gladiatorLore.add("GOOD LUCK WARRIOR!");
InventoryItem gladiatorItem = new InventoryItem(plugin, Material.SHIELD, "GLADIATOR", gladiatorLore, 1, true, 1);
inventoryStuff.put(gladiatorJoinRunnable, gladiatorItem);
chooseGameUI = new GUIInventory(plugin, "MINIGAMES", inventoryStuff, 3);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createServerSelectScreen() {\n\t\tserverSelectGroup = new VerticalGroup();\n\t\tserverSelectGroup.setVisible(false);\n\t\t\n\t\tserverSelectGroup.setSize(WIDTH/2, HEIGHT/2);\n\t\tserverSelectGroup.setPosition(WIDTH/2 - serverSelectGroup.getWidth()/2, HEIGHT/2 - serverSelectGroup.getHeight()/2);\n\t\t\... | [
"0.69101393",
"0.68661094",
"0.6775735",
"0.6729791",
"0.66062886",
"0.6476995",
"0.64394265",
"0.63852066",
"0.6371145",
"0.6366913",
"0.63539034",
"0.63336027",
"0.63260955",
"0.63108605",
"0.6269719",
"0.625797",
"0.62571967",
"0.62484574",
"0.6243607",
"0.62256026",
"0.62... | 0.7631576 | 0 |
Attemps to save all maps and data | public void saveAllData()
{
for(String s : games.keySet())
{
Game g = games.get(s);
if(g.saveAllData())
{
System.out.println("Game '" + g.getGameName() + "' saved all data successfully!");
}
else
{
System.out.println("Error when attempting to save data in game '" + g.getGameName() + "'!");
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void save()\n\t{\n writeMap();\n\t}",
"@Override\r\n\tpublic void saveMap() {\n\r\n\t}",
"public void save()\n\t{\n\t\tfor(PlayerData pd : dataMap.values())\n\t\t\tpd.save();\n\t}",
"public void saveMap(){\n dataBase.updateMap(level);\n }",
"public void saveGame(){\n \tsav... | [
"0.8116111",
"0.76294225",
"0.7570869",
"0.7260854",
"0.7076675",
"0.69245017",
"0.68913263",
"0.68592024",
"0.68322265",
"0.6806047",
"0.68003017",
"0.6760851",
"0.66463643",
"0.6628662",
"0.6598203",
"0.6576679",
"0.65506774",
"0.6545188",
"0.6497621",
"0.647351",
"0.644748... | 0.68692076 | 7 |
Evaluates whether or not the game exists | public boolean hasGame(String gameName)
{
return games.containsKey(gameName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void checkGame() {\n\n\t}",
"public boolean gameExist(Game g) {\n if (getGame(g.getName()) != null) return true;\n return false;\n }",
"boolean playerExists() {\n return this.game.h != null;\n }",
"public boolean hasFutureGames() {\n /*\n if (this.games.isEmpty... | [
"0.7291249",
"0.6948101",
"0.6922289",
"0.68261546",
"0.679961",
"0.673915",
"0.6704043",
"0.6703463",
"0.66410273",
"0.6621787",
"0.65920454",
"0.6587358",
"0.65744483",
"0.6495067",
"0.64586234",
"0.6447572",
"0.64454305",
"0.64393073",
"0.64218146",
"0.642096",
"0.642096",... | 0.69300926 | 2 |
FIXME: Change methods to work with new QueueManager FIXME: Figure out whether or not the methods should be here or in game | public Game removeGame(String gameName) {
if(!games.containsKey(gameName))
return null;
return games.remove(gameName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void workOnQueue() {\n }",
"void processQueue();",
"void runQueue();",
"public void onQueue();",
"private Queue(){\r\n\t\tgenerateQueue();\r\n\t}",
"@Override\n\tpublic void addToQueue() {\n\t}",
"protected abstract long waitOnQueue();",
"@Override\n protected String getQueueName() {r... | [
"0.7780871",
"0.72503823",
"0.711198",
"0.7029036",
"0.6898322",
"0.6677631",
"0.6656255",
"0.6654025",
"0.6641998",
"0.6625521",
"0.6612967",
"0.6587934",
"0.6585115",
"0.65518135",
"0.648633",
"0.6484253",
"0.64729404",
"0.6443939",
"0.6442551",
"0.6426943",
"0.640635",
"... | 0.0 | -1 |
Returns a list of all the games | public HashMap<String, Game> getGames() {
return games;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String[] getGamesList() {\n\n\t\tGames games = new Games();\n\n\t\tint maxRecords = games.count();\n\t\tArrayList<Game> records = games.findAll(maxRecords, 0);\n\t\tIterator<Game> it = records.iterator();\n\n\t\tString[] output = new String[maxRecords];\n\t\tint i = 0;\n\n\t\twhile (it.hasNext()) {\n\n\t\t... | [
"0.8081468",
"0.79800564",
"0.796415",
"0.78550243",
"0.7834776",
"0.7817111",
"0.78116417",
"0.7776309",
"0.7763519",
"0.76205266",
"0.75976306",
"0.7566252",
"0.75035906",
"0.75009537",
"0.7290136",
"0.7247665",
"0.72443175",
"0.7211371",
"0.7190766",
"0.71602297",
"0.71460... | 0.7107027 | 24 |
Not supported in Java. | void shouldParseTheJsonPostData() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private NativeSupport() {\n\t}",
"Compatibility compatibility();",
"@Override\n public boolean isSupported() {\n return true;\n }",
"zzafe mo29840Y() throws RemoteException;",
"zzang mo29839S() throws RemoteException;",
"@Override\n public boolean isSupported() {\n return true;\n }",
"p... | [
"0.63892996",
"0.62374026",
"0.61981255",
"0.6188208",
"0.61418337",
"0.61263883",
"0.60269773",
"0.5913623",
"0.58950424",
"0.58495903",
"0.580152",
"0.5682047",
"0.5672312",
"0.56157947",
"0.55747014",
"0.5573356",
"0.55582494",
"0.55381286",
"0.5524473",
"0.55224365",
"0.5... | 0.0 | -1 |
Not supported in Java. | void shouldParseTheDataIfContentTypeIsApplicationXWwwFormUrlencoded() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private NativeSupport() {\n\t}",
"Compatibility compatibility();",
"@Override\n public boolean isSupported() {\n return true;\n }",
"zzafe mo29840Y() throws RemoteException;",
"zzang mo29839S() throws RemoteException;",
"@Override\n public boolean isSupported() {\n return true;\n }",
"p... | [
"0.6389066",
"0.62375104",
"0.61986834",
"0.6187224",
"0.6141473",
"0.612703",
"0.6026945",
"0.5914049",
"0.5894155",
"0.5849663",
"0.580085",
"0.56821537",
"0.5672562",
"0.5614918",
"0.5573728",
"0.5573641",
"0.55585307",
"0.55374926",
"0.5524888",
"0.55218387",
"0.5506651",... | 0.0 | -1 |
1. Setup serversent events on server that immediately sends a message to the client. | @Test
void shouldReturnEventSource() {
server.setRoute("/sse", exchange -> {
exchange.getResponseHeaders().add("Content-Type", "text/event-stream");
exchange.getResponseHeaders().add("Connection", "keep-alive");
exchange.getResponseHeaders().add("Cache-Control", "no-cache");
exchange.sendResponseHeaders(200, 0);
try (OutputStreamWriter writer = new OutputStreamWriter(exchange.getResponseBody())) {
writer.write("data: {\"foo\":\"bar\"}\n\n");
}
});
// 2. Subscribe to page request events.
page.navigate(server.EMPTY_PAGE);
List<Request> requests = new ArrayList<>();
page.onRequest(request -> requests.add(request));
// 3. Connect to EventSource in browser and return first message.
Object result = page.evaluate("() => {\n" +
" const eventSource = new EventSource('/sse');\n" +
" return new Promise(resolve => {\n" +
" eventSource.onmessage = e => resolve(JSON.parse(e.data));\n" +
" });\n" +
"}");
assertEquals(mapOf("foo", "bar"), result);
assertEquals("eventsource", requests.get(0).resourceType());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void processStart(){\n initWorkerQueue();\n DataBean serverArgs = new DataBean();\n serverArgs.setValue(\"mode\",\"server\");\n serverArgs.setValue(\"messagekey\",\"72999\");\n serverArgs.setValue(\"user\",\"auth\");\n serverArgs.setValue(\"messagechannel\",\"/esb/s... | [
"0.6575944",
"0.6502219",
"0.6478186",
"0.64359367",
"0.63312775",
"0.62929213",
"0.6288809",
"0.628719",
"0.6284728",
"0.625002",
"0.62411594",
"0.6197802",
"0.6161838",
"0.61338425",
"0.6129636",
"0.6107189",
"0.6085851",
"0.60775936",
"0.6075824",
"0.6068382",
"0.60602784"... | 0.0 | -1 |
TODO Autogenerated method stub | public void process(WatchedEvent event) {
System.out.println("receive ZooKeeper state : "+event.getState()+",Type: "+event.getType());
if(KeeperState.SyncConnected==event.getState()){
semaphore.countDown();
}
} | {
"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 |
Creates new form AadharBarcodeFieldsPanel | public AadharBarcodeFieldsPanel() {
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@SuppressWarnings({ \"unused\", \"unchecked\", \"rawtypes\" })\r\n\tprivate void buildPanel() {\r\n\t\tageField = new JComboBox(ageRanges);\r\n\t\tfNameField = new JTextField(20);\r\n\t\tGhostText fNameGhost = new GhostText(fNameField, \"First Name\");\r\n\t\tlNameField = new JTextField(20);\r\n\t\tGhostText lName... | [
"0.62282026",
"0.6137346",
"0.6106066",
"0.59880495",
"0.59278977",
"0.58628863",
"0.58561003",
"0.58414483",
"0.5836753",
"0.5830938",
"0.5828928",
"0.58281267",
"0.5822974",
"0.5800065",
"0.5777712",
"0.5771416",
"0.5769239",
"0.5757494",
"0.5751441",
"0.57503426",
"0.57424... | 0.83618665 | 0 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jTextField4 = new javax.swing.JTextField();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
nametf = new javax.swing.JTextField();
gendertf = new javax.swing.JTextField();
uidtf = new javax.swing.JTextField();
lmtf = new javax.swing.JTextField();
jScrollPane1 = new javax.swing.JScrollPane();
addresstf = new javax.swing.JTextArea();
vtctf = new javax.swing.JTextField();
disttf = new javax.swing.JTextField();
statetf = new javax.swing.JTextField();
pincodetf = new javax.swing.JTextField();
yobtf = new javax.swing.JTextField();
jTextField4.setText("jTextField1");
jLabel1.setBackground(new java.awt.Color(255, 255, 255));
jLabel1.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
jLabel1.setText("UID");
jLabel2.setBackground(new java.awt.Color(255, 255, 255));
jLabel2.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N
jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
jLabel2.setText("NAME");
jLabel3.setBackground(new java.awt.Color(255, 255, 255));
jLabel3.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N
jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
jLabel3.setText("GENDER");
jLabel4.setBackground(new java.awt.Color(255, 255, 255));
jLabel4.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N
jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
jLabel4.setText("YOB");
jLabel5.setBackground(new java.awt.Color(255, 255, 255));
jLabel5.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N
jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
jLabel5.setText("LAND MARK");
jLabel6.setBackground(new java.awt.Color(255, 255, 255));
jLabel6.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N
jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
jLabel6.setText("ADDRESS");
jLabel7.setBackground(new java.awt.Color(255, 255, 255));
jLabel7.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N
jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
jLabel7.setText("VTC");
jLabel8.setBackground(new java.awt.Color(255, 255, 255));
jLabel8.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N
jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
jLabel8.setText("DIST");
jLabel9.setBackground(new java.awt.Color(255, 255, 255));
jLabel9.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N
jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
jLabel9.setText("STATE");
jLabel10.setBackground(new java.awt.Color(255, 255, 255));
jLabel10.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N
jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
jLabel10.setText("PINCODE");
uidtf.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
uidtfActionPerformed(evt);
}
});
addresstf.setColumns(20);
addresstf.setRows(5);
jScrollPane1.setViewportView(addresstf);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(nametf, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(gendertf, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(yobtf, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(lmtf, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jScrollPane1))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(vtctf, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(disttf, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(statetf, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(pincodetf, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(uidtf, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(uidtf, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(10, 10, 10)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(2, 2, 2)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(nametf, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(10, 10, 10)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(2, 2, 2)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(gendertf, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(12, 12, 12)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createSequentialGroup()
.addGap(2, 2, 2)
.addComponent(yobtf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(12, 12, 12)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lmtf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(12, 12, 12)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
.addGap(9, 9, 9)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createSequentialGroup()
.addGap(2, 2, 2)
.addComponent(vtctf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(7, 7, 7)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createSequentialGroup()
.addGap(2, 2, 2)
.addComponent(disttf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(12, 12, 12)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(statetf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(12, 12, 12)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(pincodetf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n ... | [
"0.73197734",
"0.72908777",
"0.72908777",
"0.72908777",
"0.72870827",
"0.7248368",
"0.7213462",
"0.7208004",
"0.7195763",
"0.7189973",
"0.7184436",
"0.7159332",
"0.71478266",
"0.709268",
"0.7080727",
"0.7057287",
"0.6986775",
"0.6977119",
"0.69554067",
"0.69548035",
"0.694574... | 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View myFragmentView = inflater.inflate(R.layout.fragment_symptom_search, container, false);
initSearchField(myFragmentView);
initButton(myFragmentView, this);
symptomEntities = SymptomController.getAllSymptom();
setUpDataOnView();
setTitle();
return myFragmentView;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.66251... | 0.0 | -1 |
Creates new form Login | public Login() {
initComponents();
this.setTitle("学生成绩管理系统-登录");
this.setResizable(false);
this.setLocationRelativeTo(null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public loginForm() {\n initComponents();\n \n }",
"public static Result login(){\n String username= Form.form().bindFromRequest().get(\"username\");\n String password= Form.form().bindFromRequest().get(\"password\");\n String new_user= Form.form().bindFromRequest().get(\"n... | [
"0.7087889",
"0.69521654",
"0.68040574",
"0.6786566",
"0.6757266",
"0.67409855",
"0.6692699",
"0.66887593",
"0.66297597",
"0.66144294",
"0.6594864",
"0.6585462",
"0.6571206",
"0.652989",
"0.6512904",
"0.6512904",
"0.6512904",
"0.6512904",
"0.6512904",
"0.6512904",
"0.6512904"... | 0.63357174 | 45 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. GENBEGIN:initComponents | private void initComponents() {
buttonGroup1 = new javax.swing.ButtonGroup();
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jLabel3 = new javax.swing.JLabel();
jPasswordField1 = new javax.swing.JPasswordField();
jRadioButton1 = new javax.swing.JRadioButton();
jRadioButton2 = new javax.swing.JRadioButton();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jRadioButton3 = new javax.swing.JRadioButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setFont(new java.awt.Font("华文行楷", 0, 20));
jLabel1.setForeground(new java.awt.Color(255, 51, 51));
jLabel1
.setText("\u6b22\u8fce\u6765\u5230\u5b66\u751f\u6210\u7ee9\u7ba1\u7406\u7cfb\u7edf");
jLabel2.setText("\u7528\u6237\u540d:");
jLabel3.setText("\u5bc6 \u7801:");
buttonGroup1.add(jRadioButton1);
jRadioButton1.setText("\u5b66 \u751f");
jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jRadioButton1ActionPerformed(evt);
}
});
buttonGroup1.add(jRadioButton2);
jRadioButton2.setText("\u6559 \u5e08");
jButton1.setFont(new java.awt.Font("楷体", 0, 14));
jButton1.setText("\u767b\u5f55");
jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseEntered(java.awt.event.MouseEvent evt) {
jButton1MouseEntered(evt);
}
});
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton2.setFont(new java.awt.Font("楷体", 0, 14));
jButton2.setText("\u9000\u51fa");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
buttonGroup1.add(jRadioButton3);
jRadioButton3.setText("\u7ba1\u7406\u5458");
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(
jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout
.setHorizontalGroup(jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
jPanel1Layout
.createSequentialGroup()
.addGap(49, 49, 49)
.addGroup(
jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2)
.addGroup(
jPanel1Layout
.createSequentialGroup()
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(
jLabel3)))
.addGroup(
jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout
.createSequentialGroup()
.addGap(
34,
34,
34)
.addComponent(
jButton1)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED,
58,
Short.MAX_VALUE)
.addComponent(
jButton2)
.addGap(
92,
92,
92))
.addGroup(
jPanel1Layout
.createSequentialGroup()
.addGap(
18,
18,
18)
.addGroup(
jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.TRAILING,
false)
.addGroup(
javax.swing.GroupLayout.Alignment.LEADING,
jPanel1Layout
.createSequentialGroup()
.addComponent(
jRadioButton1)
.addGap(
18,
18,
18)
.addComponent(
jRadioButton2)
.addGap(
18,
18,
18)
.addComponent(
jRadioButton3))
.addComponent(
jTextField1,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE,
238,
Short.MAX_VALUE)
.addComponent(
jPasswordField1,
javax.swing.GroupLayout.Alignment.LEADING))
.addGap(
50,
50,
50))))
.addGroup(
javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addContainerGap(77, Short.MAX_VALUE)
.addComponent(jLabel1).addGap(77, 77,
77)));
jPanel1Layout
.setVerticalGroup(jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
jPanel1Layout
.createSequentialGroup()
.addGap(28, 28, 28)
.addComponent(jLabel1)
.addGap(37, 37, 37)
.addGroup(
jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(
jTextField1,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(29, 29, 29)
.addGroup(
jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
.addComponent(
jPasswordField1,
javax.swing.GroupLayout.PREFERRED_SIZE,
23,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(26, 26, 26)
.addGroup(
jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(
jRadioButton2)
.addComponent(
jRadioButton1)
.addComponent(
jRadioButton3))
.addGap(18, 18, 18)
.addGroup(
jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton2)
.addComponent(jButton1))
.addContainerGap(28, Short.MAX_VALUE)));
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING).addComponent(
jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
layout.setVerticalGroup(layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING).addComponent(
jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public form() {\n ... | [
"0.7705896",
"0.7670027",
"0.7670027",
"0.7670027",
"0.7658872",
"0.7639127",
"0.7623816",
"0.75452554",
"0.7535268",
"0.7508918",
"0.75071955",
"0.7475545",
"0.7459728",
"0.7400068",
"0.73961407",
"0.7391387",
"0.7390907",
"0.73839253",
"0.7383428",
"0.7373016",
"0.7366217",... | 0.0 | -1 |
TODO add your handling code here: | private void jButton1MouseEntered(java.awt.event.MouseEvent evt) {
this.jButton1.setToolTipText("请确定好您的角色!");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void onCancelled(CancelledException arg0) {\n }",
"@Override\n public void onCancelled(CancelledException arg0) {\n ... | [
"0.5557473",
"0.5498902",
"0.5450944",
"0.5450944",
"0.5395783",
"0.5395783",
"0.5366429",
"0.53481",
"0.53102505",
"0.52850616",
"0.52711827",
"0.5249684",
"0.52391154",
"0.5232431",
"0.5208431",
"0.52051324",
"0.5189088",
"0.5181179",
"0.5176057",
"0.51709473",
"0.5162897",... | 0.0 | -1 |
TODO add your handling code here: | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void onCancelled(CancelledException arg0) {\n }",
"@Override\n public void onCancelled(CancelledException arg0) {\n ... | [
"0.5557473",
"0.5498902",
"0.5450944",
"0.5450944",
"0.5395783",
"0.5395783",
"0.5366429",
"0.53481",
"0.53102505",
"0.52850616",
"0.52711827",
"0.5249684",
"0.52391154",
"0.5232431",
"0.5208431",
"0.52051324",
"0.5189088",
"0.5181179",
"0.5176057",
"0.51709473",
"0.5162897",... | 0.0 | -1 |
TODO add your handling code here: | @SuppressWarnings("deprecation")
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
int id = Integer.parseInt(this.jTextField1.getText());
String adId = this.jTextField1.getText();
String pw = this.jPasswordField1.getText();
try {
if(jRadioButton1.isSelected()==false&&jRadioButton2.isSelected()==false&&jRadioButton3.isSelected()==false){
throw new Exception("请选择您的角色!");
}
if (jRadioButton1.isSelected()) {
SLogin stu = ModelFactory.stulogin(id, pw);
if (stu == null)
throw new Exception("用户不存在或密码错误!");
else
new StuMain(stu).setVisible(true);
this.dispose();
}
if (jRadioButton2.isSelected()) {
TLogin tea = ModelFactory.tealogin(id, pw);
if (tea == null)
throw new Exception("用户不存在或密码错误!");
else
new MainFace(tea).setVisible(true);
this.dispose();
}
if (jRadioButton3.isSelected()) {
AdLogin ad = ModelFactory.adLogin(adId, pw);
if (ad == null)
throw new Exception("用户不存在或密码错误!");
else
new Admin(ad).setVisible(true);
this.dispose();
}
} catch (Exception e) {
// TODO Auto-generated catch block
JOptionPane.showMessageDialog(this, e.getMessage());
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void onCancelled(CancelledException arg0) {\n }",
"@Override\n public void onCancelled(CancelledException arg0) {\n ... | [
"0.5558896",
"0.5500396",
"0.5453779",
"0.5453779",
"0.5396192",
"0.5396192",
"0.53674185",
"0.5350922",
"0.531066",
"0.5286347",
"0.52717215",
"0.52510935",
"0.5241023",
"0.52329105",
"0.52096736",
"0.52079827",
"0.5190042",
"0.51831084",
"0.51768965",
"0.5171159",
"0.516342... | 0.0 | -1 |
Connects two given pin by setting the pins connection cable to this Cable. Sets the pins availability to false, so the given pins are not connectable anymore. | protected Cable(Pin p1, Pin p2) {
this.p1 = p1;
this.p2 = p2;
this.p1.setConnectionCable(this);
this.p2.setConnectionCable(this);
this.p1.setAvailability(false);
this.p2.setAvailability(false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPin(int pin);",
"public void SetInputPins(int pins) throws IOException {\n byte value = mDevice.readRegByte( IODIR );\n mDevice.writeRegByte( IODIR, (byte)(value | pins));\n }",
"public void SetOutputPins(int pins ) throws IOException {\n byte value = mDevice.readRegByte(... | [
"0.52817345",
"0.510926",
"0.5066386",
"0.48480943",
"0.47322124",
"0.47322124",
"0.47193745",
"0.4705186",
"0.46545872",
"0.46341768",
"0.46263397",
"0.46189383",
"0.45868653",
"0.4540025",
"0.4530782",
"0.45295134",
"0.44997066",
"0.4484477",
"0.44687095",
"0.44618502",
"0.... | 0.5426157 | 0 |
Returns the pin that is positioned at the other end of the Cable, based on the given pin. If the given pin isn't connected to the Cable, then null will be returned | public Pin getOtherPin(Pin pin) {
if(p1.equals(pin)) {
return p2;
} else if(p2.equals(pin)) {
return p1;
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"InputPin getSecond();",
"InputPin getFirst();",
"public final Optional<Tile> getTile(final GridPoint2D tilePoint) {\n\t if ((tilePoint.getRow() >= 0) && \n\t (tilePoint.getRow() < mLayout.size()) &&\n\t (tilePoint.getColumn() >= 0) && \n\t (tilePoint.getColumn() < mLayout.get(tilePoint.... | [
"0.55438626",
"0.5407586",
"0.5095778",
"0.50852656",
"0.50542223",
"0.503903",
"0.50156754",
"0.49788085",
"0.4933264",
"0.49137783",
"0.49122214",
"0.4910949",
"0.49108684",
"0.4907843",
"0.49056467",
"0.4904831",
"0.4890904",
"0.4876802",
"0.48564816",
"0.48241305",
"0.480... | 0.68392783 | 0 |
Use this factory method to create a new instance of this fragment using the provided parameters. | public static SendFragment newInstance(String param1, String param2) {
SendFragment fragment = new SendFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"protected abstract Fragment createFragment();",
"public void createFragment() {\n\n ... | [
"0.7259014",
"0.723303",
"0.7114183",
"0.69910485",
"0.6990436",
"0.68337613",
"0.6831104",
"0.68134147",
"0.68010914",
"0.6800924",
"0.6765307",
"0.6738984",
"0.6738984",
"0.67268425",
"0.6717233",
"0.670671",
"0.66929424",
"0.6691911",
"0.66875076",
"0.6661989",
"0.6646111"... | 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
mView = inflater.inflate(R.layout.fragment_send, container, false);
EditText editTextFrom = (EditText)mView.findViewById(R.id.editTextFrom);
String strName = BitsharesWalletWraper.getInstance().get_account().name;
editTextFrom.setText(strName);
sha256_object.encoder encoder = new sha256_object.encoder();
encoder.write(strName.getBytes());
WebView webViewFrom = (WebView)mView.findViewById(R.id.webViewAvatarFrom);
loadWebView(webViewFrom, 40, encoder.result().toString());
TextView textView = (TextView)mView.findViewById(R.id.textViewFromId);
String strId = String.format(
Locale.ENGLISH, "#%d",
BitsharesWalletWraper.getInstance().get_account().id.get_instance()
);
textView.setText(strId);
mProcessHud = KProgressHUD.create(getActivity())
.setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)
.setLabel("Please Wait")
.setCancellable(false)
.setAnimationSpeed(2)
.setDimAmount(0.5f);
mView.findViewById(R.id.btn_send).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
processSendClick(mView);
}
});
mEditTextTo = (EditText)mView.findViewById(R.id.editTextTo);
mTextViewId = (TextView)mView.findViewById(R.id.textViewToId);
mEditTextTo.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
final String strText = mEditTextTo.getText().toString();
if (hasFocus == false) {
processGetTransferToId(strText, mTextViewId);
}
}
});
final WebView webViewTo = (WebView)mView.findViewById(R.id.webViewAvatarTo);
mEditTextTo.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
sha256_object.encoder encoder = new sha256_object.encoder();
encoder.write(s.toString().getBytes());
loadWebView(webViewTo, 40, encoder.result().toString());
}
});
mEditTextQuantitiy = (EditText)mView.findViewById(R.id.editTextQuantity) ;
mEditTextQuantitiy.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus == false) {
processCalculateFee();
}
}
});
mSpinner = (Spinner) mView.findViewById(R.id.spinner_unit);
return mView;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6742135",
"0.6726157",
"0.6724717",
"0.67012674",
"0.66944426",
"0.66910595",
"0.66888237",
"0.668751",
"0.66790944",
"0.667782",
"0.66679764",
"0.66676605",
"0.6667572",
"0.6663008",
"0.66553324",
"0.66510403",
"0.6644715",
"0.6641966",
"0.6639501",
"0.66363883",
"0.66273... | 0.0 | -1 |
TODO: Rename method, update argument and hook method into UI event | public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}",
"@... | [
"0.6620318",
"0.65257335",
"0.64745414",
"0.64745414",
"0.64363295",
"0.6323658",
"0.62383187",
"0.619065",
"0.6159927",
"0.6145212",
"0.6123266",
"0.6107672",
"0.60998684",
"0.60942644",
"0.6049143",
"0.6049143",
"0.6045337",
"0.6041169",
"0.6041169",
"0.60083437",
"0.599866... | 0.0 | -1 |
Changing value of variables 02172019 | public static void main(String[] args) {
String name = "John";
String lastName = ("Smith");
char grade = 'A';
// char grade= 'A' : Do not make it this way to change value of variable
System.out.println(grade); //Should print with Grade 'A'
// Use the way bellow to change value of variable
grade = 'B';
System.out.println(grade); // Should print with grade 'B' now because of "Stack Order"
// Example below
String city = "Fairfax";
// Print value
System.out.println(city);
city = "New York";
// Print updated value
System.out.println(city); // Should Show the new city that was updated
// Example
System.out.println(name);
name= "Jason";
System.out.println(name);
//name was change from John to Jason successfully
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mo12202n() {\n this.f10959n = -1;\n }",
"public void mo12203o() {\n this.f10960o = 0;\n }",
"public void mo130017a() {\n this.f109119k = 0;\n mo130020b();\n }",
"public void m50365D() {\n this.f30729a0.mo40012a(this.f30709E0.getBrand(), this... | [
"0.6380083",
"0.6257641",
"0.5834741",
"0.5795222",
"0.5771725",
"0.5727688",
"0.57165015",
"0.5715981",
"0.5654015",
"0.5642299",
"0.5628706",
"0.5620903",
"0.56050265",
"0.55860275",
"0.55776924",
"0.55524206",
"0.55409473",
"0.5535487",
"0.5521932",
"0.55132806",
"0.551317... | 0.0 | -1 |
Construct with an identifier type with the dublin core term | public IdentifierTypeDublinCoreMapping(IdentifierType identifierType, DublinCoreTerm dublinCoreTerm)
{
setIdentifierType(identifierType);
setDublinCoreTerm(dublinCoreTerm);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"IdentifierType createIdentifierType();",
"IdentifiersType createIdentifiersType();",
"IdentifierReferenceQualifier createIdentifierReferenceQualifier();",
"GeneralTerm createGeneralTerm();",
"static Identifier makeTypeCons(final QualifiedName name) {\r\n if (name == null) {\r\n re... | [
"0.7121717",
"0.6557618",
"0.6272673",
"0.6088296",
"0.6064374",
"0.60242337",
"0.59653825",
"0.59241533",
"0.5780099",
"0.5768217",
"0.57216585",
"0.5689221",
"0.56842643",
"0.56735194",
"0.5595362",
"0.55782306",
"0.5522693",
"0.5516026",
"0.551045",
"0.54929304",
"0.547982... | 0.6015977 | 6 |
Construct with an identifier type with the dublin core term and encoding schemen | public IdentifierTypeDublinCoreMapping(IdentifierType identifierType,
DublinCoreTerm dublinCoreTerm,
DublinCoreEncodingScheme dublinCoreEncodingScheme)
{
this(identifierType, dublinCoreTerm);
setDublinCoreEncodingScheme(dublinCoreEncodingScheme);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"IdentifierType createIdentifierType();",
"IdentifiersType createIdentifiersType();",
"public IdentifierTypeDublinCoreMapping(IdentifierType identifierType, DublinCoreTerm dublinCoreTerm)\r\n\t{\r\n\t\tsetIdentifierType(identifierType);\r\n\t\tsetDublinCoreTerm(dublinCoreTerm);\r\n\t}",
"GeneralTerm createGen... | [
"0.6225239",
"0.60929865",
"0.60239387",
"0.59804875",
"0.5758739",
"0.5647199",
"0.5584883",
"0.55670565",
"0.5545953",
"0.5469521",
"0.5438242",
"0.5423145",
"0.5420667",
"0.53733146",
"0.53391653",
"0.52698445",
"0.5252228",
"0.524421",
"0.52121127",
"0.5203525",
"0.518928... | 0.62403995 | 0 |
Get the hash code. | public int hashCode()
{
int hash = 0;
hash += dublinCoreTerm == null ? 0 : dublinCoreTerm.hashCode();
hash += identifierType == null ? 0 : identifierType.hashCode();
hash += dublinCoreEncodingScheme == null ? 0 : dublinCoreEncodingScheme.hashCode();
return hash;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getHash();",
"public int getHash() {\n return hash_;\n }",
"public int getHash() {\n return hash_;\n }",
"public int hashcode();",
"public abstract int getHash();",
"String getHash();",
"String getHash();",
"com.google.protobuf.ByteString getHash();",
"com.google.protobuf.By... | [
"0.81577706",
"0.79575884",
"0.79300934",
"0.7825441",
"0.77903944",
"0.77738637",
"0.77738637",
"0.76827997",
"0.76827997",
"0.7516908",
"0.7430023",
"0.7430023",
"0.7430023",
"0.74254054",
"0.7422006",
"0.73951674",
"0.73935145",
"0.73828715",
"0.7370355",
"0.73382854",
"0.... | 0.0 | -1 |
Connect client to a server. | public void start(String ip, int port) throws IOException {
if (client != null && !client.isClosed()) client.close();
this.ip = ip;
this.port = port;
client = new Socket(ip, port);
runConnectionEvent(new ClientConnectEvent(this, ConnectionType.CLIENT_SERVER_CONNECT));
startInThread();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void connectToServer() {\n\t\ttry {\n\t\t\tsocket = new Socket(InetAddress.getLocalHost(), Server.SERVER_PORT);\n\t\t\tin = new BufferedReader(new InputStreamReader(\n\t\t\tsocket.getInputStream()));\n\t\t\tout = new PrintWriter(socket.getOutputStream());\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.ou... | [
"0.7406049",
"0.73793674",
"0.69674927",
"0.68328065",
"0.67654175",
"0.6741963",
"0.670336",
"0.6638829",
"0.6636101",
"0.66341454",
"0.6612287",
"0.65637773",
"0.6563679",
"0.65608376",
"0.65527225",
"0.6528934",
"0.6493118",
"0.6485379",
"0.6456319",
"0.64476186",
"0.64399... | 0.58383393 | 78 |
Start thread to read input from the server. | private void startInThread() {
final Client fthis = this;
if (in != null && in.isAlive()) in.interrupt();
in = new Thread(() -> {
while (true) {
if (client.isClosed()) break;
try {
InputStream inFromServer = client.getInputStream();
if (inFromServer.available() > 0) {
String l = (char) inFromServer.read() + "";
while (!l.endsWith("\r")) {
l += (char) inFromServer.read() + "";
}
l = l.replace("\r", "");
runPacketEvent(new ClientPacketEvent(fthis, PacketType.CLIENT_RECEIVE, l));
}
} catch (Exception e) {
e.printStackTrace();
break;
}
}
});
in.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void run() {\n readFromClient();\n }",
"@Override\n public void run() {\n try {\n this.in = new BufferedReader(new InputStreamReader(\n clientSocket.getInputStream()));\n this.out = clientSocket.getOutputStream();\n\n\n String str = \... | [
"0.71289563",
"0.7071447",
"0.7011003",
"0.6951314",
"0.68349737",
"0.67789817",
"0.6778219",
"0.6778158",
"0.6704447",
"0.6701568",
"0.67011285",
"0.6656101",
"0.6651552",
"0.66379285",
"0.6606058",
"0.65738016",
"0.65670604",
"0.65568817",
"0.6542135",
"0.65155494",
"0.6495... | 0.71345794 | 0 |
Send a string of text to the server. | public void send(String l) {
try {
if (client == null || client.isClosed() || !client.isConnected()) start(ip, port);
} catch(IOException e) {
e.printStackTrace();
}
runPacketEvent(new ClientPacketEvent(this, PacketType.CLIENT_SEND, l));
try {
OutputStream outToServer = client.getOutputStream();
outToServer.write(("\r" + l + "\r").getBytes(Charset.forName("UTF-8")));
} catch (IOException e) {
e.printStackTrace();
runConnectionEvent(new ClientConnectEvent(this, ConnectionType.CLIENT_SERVER_DISCONNECT));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void sendText(String content);",
"public void sendText(String textToSend) {\n try {\n output.write(textToSend);\n output.newLine();\n output.flush();\n } catch (IOException ioe) {\n \tMain.LOGGER.log(Level.WARNING, \"Unable to send message to server\", ioe);\... | [
"0.83920264",
"0.79588187",
"0.7705126",
"0.7701761",
"0.74589807",
"0.73300445",
"0.72510123",
"0.7156175",
"0.714419",
"0.7092426",
"0.70716405",
"0.70674956",
"0.69765097",
"0.6960431",
"0.69534105",
"0.69379616",
"0.69316846",
"0.6896554",
"0.68718696",
"0.68426955",
"0.6... | 0.6469492 | 28 |
Register a listener class to run code on when an event occurs. | public void addListener(ClientConnectionListener l) {
listeners.add(l);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void addListener(Class<? extends EventListener> listenerClass) {\n\n }",
"void subscribeToEvents(Listener listener);",
"public void addListener(EventListener listener);",
"protected void listener(Listener listener) {\n Bukkit.getServer().getPluginManager().registerEvents(liste... | [
"0.71806264",
"0.70155853",
"0.7004072",
"0.69062483",
"0.6787981",
"0.6714234",
"0.6565203",
"0.6506813",
"0.6489401",
"0.64698625",
"0.6437214",
"0.63411033",
"0.6330467",
"0.632004",
"0.6311925",
"0.63101125",
"0.6307709",
"0.63001627",
"0.62854874",
"0.6246999",
"0.618305... | 0.0 | -1 |
Run a connection event on all registered listeners. | private void runConnectionEvent(ClientConnectEvent l) {
for (ClientConnectionListener l2 : listeners) {
l2.clientConnectEvent(l);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface ConnectionEventListener {\n /** \n * Called on all listeners when a connection is made or broken. \n */\n void connectionActivity(ConnectionEvent ce);\n}",
"private void notifyListeners() {\n for (SerialConnectionReadyListener listener : listeners) {\n listener.SerialCo... | [
"0.66645926",
"0.6392512",
"0.63921314",
"0.63213366",
"0.6315213",
"0.6290094",
"0.62381536",
"0.62320757",
"0.609277",
"0.6037043",
"0.603672",
"0.60264117",
"0.5988345",
"0.59782565",
"0.59502435",
"0.5863045",
"0.5852571",
"0.581413",
"0.57928",
"0.57689375",
"0.57345384"... | 0.7546454 | 0 |
Run a packet event on all registered listeners. | private void runPacketEvent(ClientPacketEvent l) {
for (ClientConnectionListener l2 : listeners) {
l2.clientPacketEvent(l);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void callSendEvent(PacketEvent event) {\n\t\tfor(PacketListener l : PACKET_OUT_LISTENER) \n\t\t\tl.onEvent(event);\n\t}",
"public void callReceiveEvent(PacketEvent event) {\n\t\tfor(PacketListener l : PACKET_IN_LISTENER) \n\t\t\tl.onEvent(event);\n\t}",
"public synchronized void dispatch(IpcEvent event)... | [
"0.6754304",
"0.664926",
"0.63581717",
"0.59894675",
"0.5864453",
"0.5801228",
"0.5784519",
"0.5767322",
"0.56445587",
"0.56339246",
"0.5619674",
"0.5558858",
"0.5548042",
"0.54593587",
"0.5431273",
"0.5429912",
"0.5424023",
"0.54230744",
"0.5411076",
"0.5392487",
"0.53853345... | 0.7668578 | 0 |
get user name from token. | String getUsernameFromToken(String token); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getUsernameFromToken() {\n\t\tHttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();\n\t\tfinal String requestTokenHeader = request.getHeader(AUTH);\n\t\tString jwtToken = requestTokenHeader.substring(BEARER.length());\n\t\treturn getClaimF... | [
"0.7995888",
"0.7921094",
"0.77990794",
"0.77990794",
"0.77869993",
"0.76796085",
"0.7655655",
"0.757896",
"0.757896",
"0.757896",
"0.75413764",
"0.7538918",
"0.7348298",
"0.7348298",
"0.7348298",
"0.7348298",
"0.7348298",
"0.7348298",
"0.7348298",
"0.7348298",
"0.7348298",
... | 0.86354256 | 0 |
TODO Autogenerated method stub | public static void main(String[] args) {
Set<String> exploreMethods = analyze(Explore.class);
Set<String> enumMethods = analyze(Enum.class);
System.out.println("Expolre.containsAll(Enum?)"
+ exploreMethods.contains(enumMethods) );
System.out.print("Expolre.removeAll(Enum):");
exploreMethods.removeAll(enumMethods);
System.out.print(exploreMethods + " ");
} | {
"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.66713095",
"0.6567948",
"0.652319",
"0.648097",
"0.64770466",
"0.64586824",
"0.64132667",
"0.6376419",
"0.62759",
"0.62545097",
"0.62371093",
"0.62237984",
"0.6201738",
"0.619477",
"0.619477",
"0.61924416",
"0.61872935",
"0.6173417",
"0.613289",
"0.6127952",
"0.6080854",
... | 0.0 | -1 |
Get the associated CRS for this GeometryType | public CoordinateReferenceSystem getCoordinateReferenceSystem() {
return CRS;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CoordinateReferenceSystem getCRS(){\n return getCRS(DefaultGeographicCRS.WGS84);\n }",
"public String getType() {\n return getGeometryType();\n }",
"public CoordinateReferenceSystem getCRS(CoordinateReferenceSystem defaultCRS){\n if(crs==null){\n crs = defaultCR... | [
"0.632648",
"0.5643343",
"0.55205333",
"0.5374762",
"0.52757347",
"0.5275387",
"0.50981283",
"0.507501",
"0.5061649",
"0.4948689",
"0.4947344",
"0.49432176",
"0.4933818",
"0.4933304",
"0.49306792",
"0.48440683",
"0.48264802",
"0.482334",
"0.4815786",
"0.4792587",
"0.47738847"... | 0.6799267 | 0 |
EstudosJava Representa uma fabrica abstrata | public interface GuiFactory {
Button createButton();
CheckBox createCheckbox();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Operacion createOperacion();",
"ParqueaderoEntidad agregar(String nombre);",
"public AjusteSaldoAFavorRespuesta() {\n\t}",
"public interface TipoActividadDAO {\n \n /**\n * Funció que engloba les funcións que s'utilitzen per crear tipus d'activitat\n * @param tipoAct\n * @return String\n ... | [
"0.5784052",
"0.5760167",
"0.5720876",
"0.57132465",
"0.57078123",
"0.5704863",
"0.57009417",
"0.5700063",
"0.56983364",
"0.56949127",
"0.5684449",
"0.56839955",
"0.5680257",
"0.56624293",
"0.5650715",
"0.56481785",
"0.563172",
"0.561782",
"0.5597789",
"0.5585951",
"0.5581353... | 0.0 | -1 |
Setup OnClicklisteners on the views | @Override
protected void hookListeners(View rootView) {
rootView.setOnClickListener(v -> {
DepictedItem item = getContent();
item.setSelected(!item.isSelected());
checkedView.setChecked(item.isSelected());
if (listener != null) {
listener.depictsClicked(item);
}
});
checkedView.setOnClickListener(v -> {
DepictedItem item = getContent();
item.setSelected(!item.isSelected());
checkedView.setChecked(item.isSelected());
if (listener != null) {
listener.depictsClicked(item);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setOnClickListeners(){\n mDueDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n pickDate(mDueDateCalendar);\n }\n });\n mDueTime.setOnClickListener(new View.OnClickListener() {\n ... | [
"0.77373165",
"0.7672888",
"0.7625399",
"0.7540486",
"0.7494609",
"0.74251264",
"0.7370216",
"0.7325878",
"0.72449696",
"0.724092",
"0.7238728",
"0.71759063",
"0.7143576",
"0.70966804",
"0.7092628",
"0.7087954",
"0.7023613",
"0.6999291",
"0.69936574",
"0.69930065",
"0.6989409... | 0.6804995 | 35 |
initialise views for every item in the adapter | @Override
public void render() {
DepictedItem item = getContent();
checkedView.setChecked(item.isSelected());
depictsLabel.setText(item.getName());
description.setText(item.getDescription());
final String imageUrl = item.getImageUrl();
if (TextUtils.isEmpty(imageUrl)) {
imageView.setImageURI(UriUtil.getUriForResourceId(R.drawable.ic_wikidata_logo_24dp));
} else {
imageView.setImageURI(Uri.parse(imageUrl));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initViews() {\n removeAllViews();\n this.setOrientation(HORIZONTAL);\n this.setOnTouchListener(this);\n\n TextView textView;\n ImageView imageView;\n for (PickerItem pickerItem : items) {\n if (pickerItem.hasDrawable()) {\n imageView ... | [
"0.73090315",
"0.7257355",
"0.7169727",
"0.7068532",
"0.7068532",
"0.7064198",
"0.7049759",
"0.70474887",
"0.7042629",
"0.7039694",
"0.6974555",
"0.695915",
"0.6943164",
"0.6934378",
"0.6917369",
"0.6903678",
"0.68872035",
"0.6872451",
"0.6850387",
"0.6828449",
"0.68253297",
... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void destroy() {
} | {
"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 doFilter(ServletRequest req, ServletResponse resp,
FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpServletRequest = (HttpServletRequest) req;
HttpServletResponse httpServletResponse = (HttpServletResponse) resp;
String token = httpServletRequest.getParameter("token");
UserInfo userInfo = UserSession.get(token,UserInfo.class);
if(userInfo == null){
httpServletResponse.sendRedirect("login/login");
}else{
chain.doFilter(req, resp);
}
} | {
"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 init(FilterConfig arg0) throws ServletException {
} | {
"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 |
Spring Data Elasticsearch repository for the POIType entity. | public interface POITypeSearchRepository extends ElasticsearchRepository<POIType, Long> {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface OptionTypeSearchRepository extends ElasticsearchRepository<OptionType, Long> {\n}",
"public interface SlideTemplateSearchRepository extends ElasticsearchRepository<SlideTemplate, Long> {\n}",
"public interface Type_structureSearchRepository extends ElasticsearchRepository<Type_structure, Long>... | [
"0.7309443",
"0.73088574",
"0.7182084",
"0.713245",
"0.7068478",
"0.7041048",
"0.7027814",
"0.702322",
"0.7003351",
"0.7002863",
"0.6989004",
"0.6982664",
"0.6978884",
"0.6936178",
"0.6923115",
"0.6896333",
"0.68643296",
"0.68633777",
"0.68614244",
"0.67911816",
"0.6770587",
... | 0.82466394 | 0 |
demoModel = new DemoModel(context); | public void init(Context context) {
EMOptions options = initChatOptions();
//options传null则使用默认的
if (EaseUI.getInstance().init(context, options)) {
appContext = context;
userDao=new UserDao(appContext);
//设为调试模式,打成正式包时,最好设为false,以免消耗额外的资源
EMClient.getInstance().setDebugMode(true);
//get easeui instance
easeUI = EaseUI.getInstance();
//调用easeui的api设置providers
setEaseUIProviders();
//初始化PreferenceManager
// PreferenceManager.init(context);
//初始化用户管理类
// getUserProfileManager().init(context);
//设置全局监听
// setGlobalListeners();
// broadcastManager = LocalBroadcastManager.getInstance(appContext);
// initDbDao();
//注册消息事件监听
registerEventListener();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Build_Model() {\n\n }",
"DataModel createDataModel();",
"public Model() {\n\n }",
"DataModel getDataModel ();",
"DataGenModel()\n {\n }",
"private void initializeModel() {\n\t\t\n\t}",
"private MainModel() {\n jsonManager = new JsonManager(this);\n }",
"public Model() {\n }",
... | [
"0.66670805",
"0.6640686",
"0.6630216",
"0.66230726",
"0.6600541",
"0.65972465",
"0.656395",
"0.654408",
"0.654408",
"0.654408",
"0.6476282",
"0.6476282",
"0.64618075",
"0.6357896",
"0.6357718",
"0.6356519",
"0.6356519",
"0.6356519",
"0.6356519",
"0.6356519",
"0.6356519",
"... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onReceive(Context context, Intent intent) {
Toast.makeText(appContext, intent.getStringExtra("cmd_value"), Toast.LENGTH_SHORT).show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
This class is generated by jOOQ. | @Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.7.2"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public interface ISapphireTowerBlock extends Serializable {
/**
* Getter for <code>nucleus.sapphire_tower_block.tower_id</code>.
*/
public Long getTowerId();
/**
* Getter for <code>nucleus.sapphire_tower_block.x</code>.
*/
public Integer getX();
/**
* Getter for <code>nucleus.sapphire_tower_block.y</code>.
*/
public Integer getY();
/**
* Getter for <code>nucleus.sapphire_tower_block.z</code>.
*/
public Integer getZ();
/**
* Getter for <code>nucleus.sapphire_tower_block.world_uuid</code>.
*/
public UUID getWorldUuid();
/**
* Getter for <code>nucleus.sapphire_tower_block.material</code>.
*/
public Material getMaterial();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T_2698Dao() {\n\t\tsuper(org.jooq.test.jdbc.generatedclasses.tables.T_2698.T_2698, org.jooq.test.jdbc.generatedclasses.tables.pojos.T_2698.class);\n\t}",
"private Builder() {\n super(org.apache.gora.cascading.test.storage.TestRow.SCHEMA$);\n }",
"public ObjectRecord() {\n\t\tsuper(org.jooq.test.... | [
"0.6081675",
"0.60670495",
"0.5997977",
"0.59858495",
"0.5697705",
"0.56749797",
"0.5664652",
"0.5664652",
"0.5664652",
"0.5664652",
"0.5664652",
"0.5664652",
"0.5664652",
"0.5664652",
"0.5664652",
"0.5664652",
"0.5664652",
"0.5664652",
"0.5664652",
"0.5664652",
"0.5664652",
... | 0.0 | -1 |
Continue with delete operation | public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
intent.putExtra("guest_name", guestName);
intent.putExtra("birth_date", date);
setResult(2, intent);
finish();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void delete() {\n\n\t}",
"protected abstract void doDelete();",
"private Delete() {}",
"private Delete() {}",
"@Override\n public CompletableFuture<Void> delete() {\n return delete(false);\n }",
"@Override\r\n\tpublic int delete() throws Exception {\n\t\treturn 0;\r\n\t}",
"protect... | [
"0.7574421",
"0.73039913",
"0.7300528",
"0.7300528",
"0.7236205",
"0.72249603",
"0.7207686",
"0.7186766",
"0.7181829",
"0.714785",
"0.7069496",
"0.69982463",
"0.69950515",
"0.69865125",
"0.6979617",
"0.69742006",
"0.69742006",
"0.6951187",
"0.69349754",
"0.69307965",
"0.69249... | 0.0 | -1 |
Created by youdeyi on 2016/11/2. | public interface IMainView extends MvpView {
void setRecordStatus();
void releaseRecordStatus();
void updateMsgList(MsgBean msgBean);
void showMsg(String msg);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{... | [
"0.6161726",
"0.6002918",
"0.5997921",
"0.5997921",
"0.5989259",
"0.5926819",
"0.5902861",
"0.5880402",
"0.58496827",
"0.58380073",
"0.5833313",
"0.58221203",
"0.5821782",
"0.5810082",
"0.5782317",
"0.57736003",
"0.5772293",
"0.5750494",
"0.567025",
"0.56618434",
"0.5657256",... | 0.0 | -1 |
not true but oh so lazy | public double getPerimiter(){return (2*height +2*width);} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected boolean func_70814_o() { return true; }",
"public boolean method_2453() {\r\n return false;\r\n }",
"public boolean method_2434() {\r\n return false;\r\n }",
"protected boolean func_70041_e_() { return false; }",
"public boolean method_4088() {\n return false;\n }",
"public... | [
"0.71079266",
"0.6732482",
"0.67111343",
"0.65543216",
"0.6498296",
"0.64228565",
"0.6408664",
"0.633836",
"0.63162214",
"0.63078177",
"0.6282571",
"0.6251379",
"0.6202602",
"0.6167126",
"0.614875",
"0.6120154",
"0.61198854",
"0.61081344",
"0.6104692",
"0.6101547",
"0.6100272... | 0.0 | -1 |
TODO Autogenerated method stub | public List findList(InvtCommonDTO invtCommonDTO, User user) {
return invtPrcListDAO.findList(invtCommonDTO, user);
} | {
"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 |
ConnectResule cr = new ConnectResule(); cr.toObject("11111".getBytes()); | public static void main(String args[]) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String objectRead();",
"private AerospikeConverters() {}",
"private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {\n in.defaultReadObject();\n company = in.readUTF();\n // Just for test static member\n company = \"pica8_from_serialization\";\n ... | [
"0.53826314",
"0.53253806",
"0.5247896",
"0.5071723",
"0.5035631",
"0.5030661",
"0.49204472",
"0.4904324",
"0.48843652",
"0.48545778",
"0.48477897",
"0.4841457",
"0.48359796",
"0.48325604",
"0.48270476",
"0.48245087",
"0.4818686",
"0.4817731",
"0.47990325",
"0.4796158",
"0.47... | 0.0 | -1 |
Needs JwtManager, SimpleSymmetricCipher and TokenExpiryInfo | @Inject
public TokenGenerationServiceImpl(JwtManager jwtManager,
SimpleSymmetricCipher simpleSymmetricCipher,
TokenExpiryInfo tokenExpiryInfo) {
this.jwtManager = jwtManager;
this.simpleSymmetricCipher = simpleSymmetricCipher;
this.tokenExpiryInfo = tokenExpiryInfo;
this.objectMapper = new ObjectMapper();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface JwtTokenService {\n /**\n * Create token for user\n *\n * @param user user, that needs a token\n * @return token\n */\n String createToken(User user);\n\n /**\n * Get token life duration\n *\n * @return token duration\n */\n Duration getTokenExpiredI... | [
"0.63779944",
"0.6239657",
"0.6144448",
"0.6069235",
"0.5967388",
"0.58635604",
"0.58563465",
"0.58079726",
"0.5752386",
"0.5669052",
"0.5657233",
"0.5655195",
"0.5634776",
"0.5629783",
"0.5624895",
"0.56102043",
"0.55247724",
"0.5513811",
"0.5486",
"0.53897536",
"0.5371213",... | 0.6646526 | 0 |
Generate a server token | public String generateServerToken(Map<String, String> assertions) {
return this.generateToken(Token.Type.SERVER, assertions.get(Params.CONTEXT.toString()), assertions);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static String generateToken()\n\t{\n\t\treturn UUID.randomUUID().toString();\n\t}",
"private String generateToken () {\n SecureRandom secureRandom = new SecureRandom();\n long longToken;\n String token = \"\";\n for ( int i = 0; i < 3; i++ ) {\n longToken = Math.a... | [
"0.78031486",
"0.7415743",
"0.7207184",
"0.7204968",
"0.7145629",
"0.7109788",
"0.70311785",
"0.6978019",
"0.6890911",
"0.68441486",
"0.6809595",
"0.6785282",
"0.67654115",
"0.67556566",
"0.66671807",
"0.6605513",
"0.6570724",
"0.6570724",
"0.6570724",
"0.65663713",
"0.653910... | 0.63264364 | 53 |
Generate a session token | public String generateSessionToken(Map<String, String> assertions) {
return this.generateToken(Token.Type.SESSION, assertions.get(Params.CONTEXT.toString()), assertions);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static String generateToken()\n\t{\n\t\treturn UUID.randomUUID().toString();\n\t}",
"public String generateToken() {\n Authentication authentication = getAuthentication();\n if(authentication == null) {\n throw new AuthenticationCredentialsNotFoundException(\"No user is current... | [
"0.739608",
"0.71034557",
"0.6949656",
"0.6904259",
"0.68693006",
"0.68326306",
"0.6757572",
"0.6756573",
"0.66025585",
"0.6589162",
"0.6580565",
"0.6577798",
"0.6551958",
"0.65479463",
"0.6493356",
"0.649134",
"0.64902616",
"0.64727205",
"0.64697814",
"0.6456163",
"0.6448507... | 0.61379826 | 43 |
Generate a client token | public String generateClientToken(Map<String, String> assertions) {
return this.generateToken(Token.Type.CLIENT, assertions.get(Params.CONTEXT.toString()), assertions);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static String generateToken()\n\t{\n\t\treturn UUID.randomUUID().toString();\n\t}",
"public String generateToken() {\n Authentication authentication = getAuthentication();\n if(authentication == null) {\n throw new AuthenticationCredentialsNotFoundException(\"No user is current... | [
"0.7491224",
"0.701075",
"0.7004792",
"0.6975239",
"0.6918276",
"0.67877877",
"0.6779649",
"0.67589945",
"0.67224216",
"0.6716935",
"0.67116517",
"0.6694782",
"0.6687652",
"0.6584136",
"0.65691704",
"0.6562139",
"0.6525023",
"0.6515407",
"0.6513398",
"0.6465473",
"0.6465473",... | 0.65308213 | 16 |
Generates a typed token | protected String generateToken(Token.Type type, String context, Map<String, String> assertions) {
Preconditions.checkNotNull(context, "context cannot be null");
Preconditions.checkNotNull(assertions, "secret cannot be null");
assertions.put(Params.CONTEXT.toString(), context);
return jwtManager.generateJwtToken(
new DefaultToken(
convertToJsonAndEncrypt(
encapsulateSecret(
type,
assertions
)
),
tokenExpiryInfo.getTokenTypeTimeoutInMillis(type).longValue()
)
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String generateToken() {\n return new Generex(PatternValidator.TOKEN_PATTERN).random();\n }",
"public interface TokenGenerator {\n\n String generate();\n\n}",
"@Override\r\n\tpublic Token createToken() {\n\t\tToken token = new Token();\r\n\t\treturn token;\r\n\t}",
"public String t... | [
"0.6840459",
"0.6802618",
"0.6683434",
"0.6450687",
"0.64363587",
"0.6358959",
"0.6358959",
"0.6358959",
"0.6358959",
"0.6358959",
"0.6358959",
"0.63435996",
"0.6306119",
"0.630234",
"0.6271971",
"0.6271971",
"0.6271971",
"0.6271971",
"0.6271971",
"0.62681854",
"0.62330586",
... | 0.6389668 | 5 |
wrap or encapsulate secret in internal Type | protected Secret encapsulateSecret(Token.Type type, Map<String, String> assertions) {
switch(type) {
case SESSION:
return new SessionSecret(assertions);
case CLIENT:
return new ClientSecret(assertions);
case SERVER:
return new ServerSecret(assertions);
default:
throw new IllegalArgumentException("not a valid token type");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Secret extends ModelEntity, Buildable<SecretCreateBuilder> {\n\n /**\n * @return algorithm.\n */\n String getAlgorithm();\n\n /**\n * @return bit length of the secret. Must be greater than zero.\n */\n Integer getBitLength();\n\n /**\n * @return content type of t... | [
"0.69376856",
"0.6749856",
"0.6576164",
"0.6385409",
"0.63511926",
"0.60827124",
"0.6047754",
"0.60423994",
"0.60361636",
"0.5933176",
"0.5752779",
"0.57452136",
"0.5682354",
"0.5579917",
"0.5510102",
"0.54295164",
"0.54245734",
"0.5402191",
"0.5374899",
"0.53400946",
"0.5320... | 0.6493282 | 3 |
Invoke the symmetric cipher to encrypt secret | protected <T> String convertToJsonAndEncrypt(T t) {
try {
return simpleSymmetricCipher.encrypt(objectMapper.writeValueAsString(t));
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Encryption encryption();",
"public void encrypt() {\n // JOptionPane.showMessageDialog(null, \"Encrypting ... Action-Type = \" + DES_action_type);\n int[] flipped_last2_cipher_rounds = new int[64];\n for (int i = 0; i < 32; i++) {\n flipped_last2_cipher_rounds[i] = DES_cipher_sequ... | [
"0.7253699",
"0.65968823",
"0.6550616",
"0.6497052",
"0.64650834",
"0.64502275",
"0.63828075",
"0.63205785",
"0.6225559",
"0.6160462",
"0.6152191",
"0.6132924",
"0.6129664",
"0.6118554",
"0.6020526",
"0.6005055",
"0.60042596",
"0.60018003",
"0.5995921",
"0.59829324",
"0.59700... | 0.0 | -1 |
Method that creates the screen once it is running. the Main method | @Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(zunder.ebs.zunderapp.R.layout.activity_profile);
// Link the XMl elements with the code
LinkElements();
//Get authentication from DB (Firebase)
mAuth = FirebaseAuth.getInstance();
myRef = FirebaseDatabase.getInstance().getReference("user");
//Load user Information
loadUserInformation();
//Action listeners for elements
ActionListeners();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Main() {\n\t\tsuper();\n\t\tInitScreen screen = new InitScreen();\n\t\tpushScreen(screen);\n\t\tUiApplication.getUiApplication().repaint();\n\t}",
"public void factoryMainScreen()\n\t{\n\t\t\n\t}",
"public void launchMainScreen() {\n\t\tmainWindow = new MainGameScreen(this);\n\t}",
"@Override\n pub... | [
"0.77806604",
"0.77025115",
"0.76491165",
"0.73538786",
"0.72975844",
"0.72887605",
"0.72520053",
"0.72207123",
"0.7197718",
"0.7189892",
"0.7160788",
"0.7144744",
"0.71349317",
"0.70228344",
"0.7017549",
"0.69734865",
"0.69721556",
"0.6959246",
"0.68936515",
"0.68927884",
"0... | 0.0 | -1 |
Method that generates an action when an element is touched | private void ActionListeners() {
addItem.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(Profile.this, MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
}
});
profilePic.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
showImageChooser();
cancelBtn.setVisibility(View.VISIBLE);
saveBtn.setVisibility(View.VISIBLE);
}
});
tittle.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
setBtitle(true);
setBname(false);
nameInput.setVisibility(View.VISIBLE);
nameInput.setHint("Job role");
scrollView.setVisibility(View.INVISIBLE);
submenu.setVisibility(View.GONE);
cancelBtn.setVisibility(View.VISIBLE);
saveBtn.setVisibility(View.VISIBLE);
}
});
name.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
setBtitle(false);
setBname(true);
nameInput.setVisibility(View.VISIBLE);
scrollView.setVisibility(View.GONE);
submenu.setVisibility(View.GONE);
cancelBtn.setVisibility(View.VISIBLE);
saveBtn.setVisibility(View.VISIBLE);
}
});
saveBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (isBname()) {
saveUserInformation();
}
if (Bimage){
updatePicture(mAuth.getCurrentUser());
}
if (isBtitle()) {
addTitle();
}
saveBtn.setVisibility(View.GONE);
nameInput.setText("");
nameInput.setVisibility(View.GONE);
cancelBtn.setVisibility(View.GONE);
scrollView.setVisibility(View.VISIBLE);
submenu.setVisibility(View.VISIBLE);
}
});
qrButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
createAlert();
}
});
cancelBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
saveBtn.setVisibility(View.GONE);
cancelBtn.setVisibility(View.GONE);
scrollView.setVisibility(View.VISIBLE);
nameInput.setVisibility(View.GONE);
submenu.setVisibility(View.VISIBLE);
}
});
back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Profile.this, MainActivity.class);
startActivity(intent);
overridePendingTransition(zunder.ebs.zunderapp.R.anim.push_right, zunder.ebs.zunderapp.R.anim.push_left);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onHit() {\n //override this to provide extra functionality\n }",
"@Override\n public void touch()\n {\n\n }",
"@Override\n public void clicked(InputEvent e, float x, float y) {\n }",
"@Override\n public void touchAction() {\n if (!isDisab... | [
"0.66322815",
"0.6618426",
"0.6569209",
"0.65545917",
"0.6462722",
"0.6435362",
"0.6381965",
"0.6355895",
"0.6346494",
"0.633826",
"0.6324215",
"0.62961",
"0.6287459",
"0.62793857",
"0.6255212",
"0.6249847",
"0.62362444",
"0.6191486",
"0.6138325",
"0.61170644",
"0.61035687",
... | 0.0 | -1 |
method that ads a job role to the Firebase DB | private void addTitle() {
if (!TextUtils.isEmpty(nameInput.getText().toString())) {
String id = myRef.push().getKey();
User user = new User(name.getText().toString(), nameInput.getText().toString().trim(), id);
myRef.child(id).setValue(user);
Toast.makeText(this, "Job Role updated", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "Type job role", Toast.LENGTH_LONG).show();
;
}
tittle.setText(nameInput.getText().toString());
nameInput.setText("");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void saveJob(View v){\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference mySavedJobsRef = database.getReference(\"Users\").child(currentUser.getUid().toString()).child(\"savedjobs\");\n //Dont save your own jobs\n if(!currentUser.getUid().toString()... | [
"0.6321949",
"0.5925247",
"0.58106095",
"0.57266843",
"0.57120013",
"0.56335014",
"0.5593403",
"0.5591812",
"0.55618066",
"0.5514298",
"0.5493545",
"0.54899526",
"0.54642487",
"0.5417744",
"0.5417744",
"0.53623146",
"0.5355172",
"0.533971",
"0.5339452",
"0.5332863",
"0.531540... | 0.5068015 | 43 |
method that gets the private key | public String getPrivateKey() {
return privateKey;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PrivateKey getPrivateKey();",
"public PrivateKey getKey();",
"public String getPrivateKey();",
"public String getPrivateKey();",
"public PrivateKey getPrivateKey(){\n\t\treturn this.privatekey;\n\t}",
"public PrivateKey getMyPrivateKey() {\n return myKeyPair.getPrivate();\n }",
"public Privat... | [
"0.8676293",
"0.8577487",
"0.85085756",
"0.85085756",
"0.800761",
"0.79754514",
"0.7969967",
"0.7838644",
"0.780729",
"0.7594458",
"0.7592613",
"0.75762105",
"0.75371116",
"0.7527026",
"0.74920666",
"0.74815667",
"0.7378927",
"0.7371758",
"0.7359871",
"0.7320992",
"0.7297176"... | 0.7517829 | 16 |
method that sets a new private key | public void setPrivateKey(String privateKey) {
this.privateKey = privateKey;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Accessor(qualifier = \"privateKey\", type = Accessor.Type.SETTER)\n\tpublic void setPrivateKey(final String value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(PRIVATEKEY, value);\n\t}",
"public ConnectInfo setPrivateKey(final String privateKey) {\n\t\tif(privateKey==null) throw new IllegalArgumentExcepti... | [
"0.6629338",
"0.66147614",
"0.6581137",
"0.6570969",
"0.65174794",
"0.64790666",
"0.6412761",
"0.6393121",
"0.6383535",
"0.63685876",
"0.63348",
"0.6332446",
"0.627315",
"0.6255042",
"0.6192793",
"0.61923474",
"0.61687404",
"0.6144983",
"0.61295277",
"0.61160743",
"0.60992575... | 0.6182782 | 18 |
Method that links the XMl elements from the Layour to the variables instantiated in this Java class | private void LinkElements() {
back = (ImageView) findViewById(zunder.ebs.zunderapp.R.id.arrow);
addItem = (ImageView) findViewById(zunder.ebs.zunderapp.R.id.addItem);
saveBtn = (ImageView) findViewById(zunder.ebs.zunderapp.R.id.saveBtn);
cancelBtn = (ImageView) findViewById(zunder.ebs.zunderapp.R.id.deleteBtn);
nameInput = (EditText) findViewById(zunder.ebs.zunderapp.R.id.nameInput);
name = (TextView) findViewById(zunder.ebs.zunderapp.R.id.ProfileName);
tittle = (TextView) findViewById(zunder.ebs.zunderapp.R.id.ProfileTitle);
tittle = (TextView) findViewById(zunder.ebs.zunderapp.R.id.ProfileTitle);
profilePic = (ImageView) findViewById(zunder.ebs.zunderapp.R.id.profilePic);
qrButton = (ImageView) findViewById(zunder.ebs.zunderapp.R.id.QrButton);
submenu = (LinearLayout) findViewById(zunder.ebs.zunderapp.R.id.subMenu);
scrollView = (ScrollView) findViewById(zunder.ebs.zunderapp.R.id.scrollMenu);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"SSElements createSSElements();",
"private void castLayoutElements() {\n linlaHeaderProgress = (LinearLayout) view.findViewById(R.id.linlaHeaderProgress);\n listPrinters = (RecyclerView) view.findViewById(R.id.listPrinters);\n linlaEmpty = (LinearLayout) view.findViewById(R.id.linlaEmpty);\n ... | [
"0.5676237",
"0.5499028",
"0.541308",
"0.5407779",
"0.5286088",
"0.52706873",
"0.52626497",
"0.52436167",
"0.52306193",
"0.5223465",
"0.51705974",
"0.5168232",
"0.516611",
"0.51551914",
"0.51521266",
"0.51419646",
"0.51238924",
"0.511873",
"0.50991327",
"0.5084952",
"0.507799... | 0.4905213 | 39 |
Method that saves the | private void saveUserInformation() {
name.setText(nameInput.getText().toString());
if (name.getText().toString().isEmpty()) {
name.setError("Name required");
name.requestFocus();
return;
}
FirebaseUser user = mAuth.getCurrentUser();
if (user != null) {
if (isBname()) {
updateName(user);
}
if (isBtitle()) {
updateTitle(user);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void save() {\t\n\t\n\t\n\t}",
"@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}",
"public void save();",
"public void save();",
"public void save();",
"public void save();",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"voi... | [
"0.85434574",
"0.81870806",
"0.8185649",
"0.8185649",
"0.8185649",
"0.8185649",
"0.818141",
"0.818141",
"0.8156029",
"0.8156029",
"0.8156029",
"0.81224453",
"0.8106656",
"0.8092514",
"0.8078279",
"0.8053565",
"0.8053565",
"0.79703885",
"0.77611405",
"0.77075744",
"0.7706703",... | 0.0 | -1 |
method that gets the public key | public String getPublicKey() {
return publicKey;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getPubkey();",
"java.lang.String getPublicEciesKey();",
"java.lang.String getPublicKey();",
"String getPublicKey();",
"public String getPublicKey();",
"OctetString getPublicKey();",
"public PublicKey getPublicKey() {\n return pk;\n }",
"String publicKey();",
"publ... | [
"0.88415325",
"0.8634093",
"0.82954836",
"0.82579684",
"0.823379",
"0.79160154",
"0.781695",
"0.7787616",
"0.7674143",
"0.76265466",
"0.7608698",
"0.75964004",
"0.75842047",
"0.755625",
"0.75181305",
"0.74645555",
"0.74575865",
"0.74385506",
"0.7423861",
"0.7402993",
"0.73829... | 0.73901814 | 20 |
method tha sets a new public key | public void setPublicKey(String publicKey) {
this.publicKey = publicKey;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPublicKey(PublicKey newPublicKey) {\r\n publicKey = newPublicKey;\r\n }",
"public void setPublicKey(PublicKey publicKey) {\n this.publicKey = publicKey;\n }",
"public void setPublicKey(java.security.PublicKey r1) {\n /*\n // Can't load method instructions: Load method excep... | [
"0.7746925",
"0.68871814",
"0.67278755",
"0.6531656",
"0.64340746",
"0.63804805",
"0.6378613",
"0.63777345",
"0.6360116",
"0.6332115",
"0.6322561",
"0.6310357",
"0.62750596",
"0.6223731",
"0.619119",
"0.61670995",
"0.6160336",
"0.6158392",
"0.6132668",
"0.6104417",
"0.6090511... | 0.65955967 | 3 |
method that generates an Alert Dialog containing the QR code from the user wallet address | private void createAlert() {
ImageView image = new ImageView(this);
image.setImageResource(zunder.ebs.zunderapp.R.drawable.qr);
myWallet = new MyWallet();
setPrivateKey(myWallet.searchWallet());
createQR = new CreateQR(700, 700);
try {
KeyPair pair = KeyPair.fromSecretSeed(getPrivateKey());
setPublicKey(pair.getAccountId());
try {
Bitmap bitmap = createQR.encodeAsBitmap(getPublicKey());
image.setImageBitmap(bitmap);
} catch (WriterException e) {
e.printStackTrace();
}
}catch (Exception e){
e.getMessage();
}
AlertDialog.Builder builder =
new AlertDialog.Builder(this).
setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
}).
setView(image);
builder.create().show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void showAlertDialog(String message) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setTitle(\"QR Scanner\")\n .setMessage(message)\n .setPositiveButton(\"OKAY\", (dialog, which) -> {\n dialog.dismiss();\n ... | [
"0.6224411",
"0.62231374",
"0.61659855",
"0.59806234",
"0.58945715",
"0.5870403",
"0.58583385",
"0.5853412",
"0.5844181",
"0.57747704",
"0.5763917",
"0.5703232",
"0.5650962",
"0.5636987",
"0.5599507",
"0.55976593",
"0.55375737",
"0.55257326",
"0.55058163",
"0.5505695",
"0.549... | 0.7364985 | 0 |
method that gets a the boolean ready to save Name | public boolean isBname() {
return Bname;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isSaved() {\n\t\treturn name != null;\n\t}",
"boolean isSetName();",
"public boolean isSetName() {\n return this.Name != null;\n }",
"private boolean isSave() {\n return \"save\".equalsIgnoreCase(data.substring(tokenStart, tokenStart + 4));\n }",
"public boolean isSetName() {\r... | [
"0.7752639",
"0.7111167",
"0.6976456",
"0.6913145",
"0.68712384",
"0.68658084",
"0.68658084",
"0.6836929",
"0.6836929",
"0.6836929",
"0.6836929",
"0.6781911",
"0.67077905",
"0.6617104",
"0.6602657",
"0.6578577",
"0.6540264",
"0.64662313",
"0.644979",
"0.644979",
"0.644979",
... | 0.6357445 | 48 |
method that sets if is ready to save the name | public void setBname(boolean bname) {
this.Bname = bname;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isSaved() {\n\t\treturn name != null;\n\t}",
"public void saveData(){\n String name = editTextName.getText().toString();\n if(!name.isEmpty()){\n DataManager.getInstance().addName(name);\n }\n\n finish();\n }",
"public void setFileName(final String theNa... | [
"0.69544923",
"0.6523806",
"0.64859205",
"0.64591146",
"0.6386675",
"0.63804436",
"0.63333213",
"0.63186246",
"0.63186246",
"0.63186246",
"0.63186246",
"0.6292322",
"0.6283991",
"0.6227448",
"0.6208588",
"0.617951",
"0.61440206",
"0.61440206",
"0.61303926",
"0.61192685",
"0.6... | 0.0 | -1 |
method that gets a the boolean ready to save job role | public boolean isBtitle() {
return Btitle;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Boolean saveRole(Role role) throws Exception {\n if (log.isDebugEnabled()) {\n log.debug(\"RoleService saveRole method calling.\");\n }\n Boolean saveStatus = false;\n if (log.isDebugEnabled()) {\n log.debug(\"RoleService saveRole method save new role to the... | [
"0.6114471",
"0.58445734",
"0.5773089",
"0.5743485",
"0.5731626",
"0.5719318",
"0.5712618",
"0.56800437",
"0.5671385",
"0.5623407",
"0.5583341",
"0.55794597",
"0.5577608",
"0.5551614",
"0.5537913",
"0.5534071",
"0.5527879",
"0.55274284",
"0.5516223",
"0.5509224",
"0.5455181",... | 0.0 | -1 |
method that sets if is ready to save the job role | public void setBtitle(boolean btitle) {
this.Btitle = btitle;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void saveRole(RoleMaster roleMaster) {\n\t\t\r\n\t}",
"public Boolean saveRole(Role role) throws Exception {\n if (log.isDebugEnabled()) {\n log.debug(\"RoleService saveRole method calling.\");\n }\n Boolean saveStatus = false;\n if (log.isDebugEnabled()) {\n ... | [
"0.5706859",
"0.56889844",
"0.55882007",
"0.5523114",
"0.54701793",
"0.5446866",
"0.5410288",
"0.5347552",
"0.5339419",
"0.5337328",
"0.53364253",
"0.5332183",
"0.53313124",
"0.5330959",
"0.52979285",
"0.5258942",
"0.52379775",
"0.5237781",
"0.5232472",
"0.51960546",
"0.51951... | 0.0 | -1 |
method that updates the job role in the UI | private void updateTitle(FirebaseUser user) {
tittle.setText(nameInput.getText().toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRole(String role)\n {\n _role=role;\n }",
"@Override\n\tpublic void editRole(Role role) {\n\t\trd.editRole(role);\n\t}",
"public void setRole(String role) {\r\n this.role = role;\r\n }",
"public void setRole(String role) {\r\n this.role = role;\r\n }",
"public String getRo... | [
"0.6525664",
"0.6470831",
"0.6463187",
"0.64297813",
"0.6399856",
"0.63484377",
"0.631554",
"0.6289295",
"0.62033784",
"0.61670643",
"0.61310166",
"0.60848796",
"0.6078807",
"0.60301167",
"0.5986341",
"0.59710675",
"0.59695584",
"0.5943626",
"0.59277415",
"0.58973765",
"0.588... | 0.0 | -1 |
Method to save the the updated picture | private void updatePicture(FirebaseUser user) {
if (user != null && profileImageUrl != null) {
UserProfileChangeRequest profile = new UserProfileChangeRequest.Builder()
.setPhotoUri(Uri.parse(profileImageUrl))
.build();
user.updateProfile(profile)
.addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if (task.isSuccessful()) {
Toast.makeText(Profile.this, "Profile Updated", Toast.LENGTH_SHORT).show();
}
}
});
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void saveFile() {\r\n\t\tFile file = new File(this.picture.getFileName());\r\n\r\n\t\ttry {\r\n\t\t\tImageIO.write(this.picture.getBufferedImage(),\r\n\t\t\t\t\tthis.picture.getExtension(), file);\r\n\t\t} catch (IOException e) {\r\n\t\t\tJOptionPane.showMessageDialog(this.pictureFrame,\r\n\t\t\t\t \"Co... | [
"0.77112335",
"0.75333387",
"0.74241024",
"0.70407736",
"0.7033818",
"0.7020915",
"0.7013847",
"0.69594383",
"0.69407916",
"0.6933677",
"0.6932125",
"0.6888181",
"0.6740312",
"0.6703869",
"0.6694771",
"0.66934216",
"0.6681289",
"0.6665163",
"0.6653498",
"0.6640489",
"0.661788... | 0.0 | -1 |
method to save the updated Bname | private void updateName(FirebaseUser user) {
UserProfileChangeRequest profile = new UserProfileChangeRequest.Builder()
.setDisplayName(name.getText().toString())
.build();
user.updateProfile(profile)
.addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if (task.isSuccessful()) {
Toast.makeText(Profile.this, "Name Updated", Toast.LENGTH_SHORT).show();
}
}
})
.addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Toast.makeText(Profile.this, e.getMessage(), Toast.LENGTH_LONG).show();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int saveOrUpdateName(Name name) ;",
"private static void saveBb() {\n // if the name field is empty then display a message to the user and return\n if (tf_name.getText().equals(\"\")) {\n lbl_message.setText(\"Billboard must have a name\");\n return;\n }\n // if ... | [
"0.6751763",
"0.6642638",
"0.66035753",
"0.6594199",
"0.63627297",
"0.63554496",
"0.6249269",
"0.6213737",
"0.61965406",
"0.6168911",
"0.6132271",
"0.612393",
"0.61217976",
"0.61117136",
"0.60825694",
"0.6039903",
"0.60343826",
"0.6034336",
"0.6028142",
"0.60262847",
"0.60092... | 0.0 | -1 |
Method that provides an action when an int is requested and provides an operational result in form of intent (new Screen) | @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == CHOOSE_IMAGE && resultCode == RESULT_OK && data != null &&
data.getData() != null) {
uriProfileImage = data.getData();
try {
Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), uriProfileImage);
profilePic.setImageBitmap(bitmap);
uploadImageToFirebaseStorage();
Bimage = true;
} catch (IOException e) {
e.printStackTrace();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void openScreenOverviewSmall() {\n/*Generated! Do not modify!*/ replyDTO.setScreenToOpen(\"overviewSmall\");\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(ReplyActionType.OPEN_SCREEN, \"openScreenOverviewSmall(\");\n/*Generated! ... | [
"0.62323225",
"0.62139547",
"0.61899084",
"0.6052673",
"0.5989837",
"0.594769",
"0.5947614",
"0.58619034",
"0.58569634",
"0.5846548",
"0.57928264",
"0.5770907",
"0.576204",
"0.5751833",
"0.57422227",
"0.5727138",
"0.5708258",
"0.5706218",
"0.57010335",
"0.5695714",
"0.5688134... | 0.0 | -1 |
Method that upload an image to the DB (Firebase) | private void uploadImageToFirebaseStorage() {
StorageReference profileImageRef =
FirebaseStorage.getInstance().getReference("profilepics/" + System.currentTimeMillis() + ".jpg");
if (uriProfileImage != null) {
profileImageRef.putFile(uriProfileImage)
.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
@Override
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
//This is not working because it is null
profileImageUrl = taskSnapshot.getDownloadUrl().toString();
}
})
.addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Toast.makeText(Profile.this, e.getMessage(), Toast.LENGTH_SHORT).show();
}
});
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void uploadFile() {\n // make sure image was selected\n if (mImageUri != null) {\n // set up image file path for firebase storage\n StorageReference fileReference = mStorageRef.child(System.currentTimeMillis()\n + \".\" + getFileExtension(mImageUri));\... | [
"0.74438065",
"0.7344395",
"0.7302036",
"0.7204896",
"0.71870095",
"0.7140367",
"0.7065209",
"0.70113724",
"0.6967099",
"0.69199413",
"0.69146025",
"0.6912664",
"0.68798214",
"0.68796647",
"0.68783",
"0.68662083",
"0.6801679",
"0.6781227",
"0.6771658",
"0.6763427",
"0.6762253... | 0.6061603 | 81 |
This is not working because it is null | @Override
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
profileImageUrl = taskSnapshot.getDownloadUrl().toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void flagNull() {\n\t\t\n\t}",
"boolean getActiveNull();",
"Object firstData() {\n\t\t// por defecto enviamos null\n\t\treturn null;\n\t}",
"@Override\r\n\t\t\tpublic Object getValue() {\n\t\t\t\treturn null;\r\n\t\t\t}",
"public String method_211() {\r\n return null;\r\n }",
"... | [
"0.63287723",
"0.6274652",
"0.61587256",
"0.6151652",
"0.6084285",
"0.60518825",
"0.6018075",
"0.59839374",
"0.5923387",
"0.58598816",
"0.58573735",
"0.584341",
"0.5840081",
"0.5834823",
"0.5832186",
"0.582479",
"0.5788665",
"0.5776408",
"0.5766938",
"0.57641906",
"0.576206",... | 0.0 | -1 |
Method that loads the information from the user DB | private void loadUserInformation() {
FirebaseUser user = mAuth.getCurrentUser();
if (user != null) {
if (user.getPhotoUrl() != null) {
Glide.with(this).load(user.getPhotoUrl().toString()).into(profilePic);
}
if (user.getDisplayName() != null) {
name.setText(user.getDisplayName());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void loadDataFromDB() {\n if(user == null) {\n return;\n }\n decodeImage(user.getProfilePic(), imageView);\n usernameTV.setText(user.getUserID());\n emailTV.setText(user.getEmail());\n followingTV.setText(Integer.toString(user.getFollowingList().size()));... | [
"0.7788502",
"0.74553955",
"0.73058444",
"0.70765555",
"0.7026125",
"0.6937675",
"0.6903043",
"0.6865417",
"0.68370134",
"0.6788254",
"0.67783284",
"0.6744453",
"0.67290276",
"0.6623882",
"0.659759",
"0.6584699",
"0.6574018",
"0.65490663",
"0.6523171",
"0.65113425",
"0.649976... | 0.6934338 | 6 |
Method which is read when the activity is just created | @Override
protected void onStart() {
super.onStart();
if (mAuth.getCurrentUser() == null) {
finish();
startActivity(new Intent(this, Login.class));
}
// DatabaseReference ref = myRef.child("L4h33L1SjOlNQh7ob6R");
// Query phoneQuery = ref.orderByChild("user").equalTo("L4h33L1SjOlNQh7ob6R");
//
// phoneQuery.addListenerForSingleValueEvent(new ValueEventListener() {
// @Override
// public void onDataChange(DataSnapshot dataSnapshot) {
// for (DataSnapshot singleSnapshot : dataSnapshot.getChildren()) {
// User user = singleSnapshot.getValue(User.class);
// user.getTitle();
// }
// }
//
// @Override
// public void onCancelled(DatabaseError databaseError) {
// }
// });
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}",
"@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}",
"@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }",
"@Override\r\n\tpublic void onActivity... | [
"0.745389",
"0.740698",
"0.7400277",
"0.7334317",
"0.7295847",
"0.7295847",
"0.7295847",
"0.7295847",
"0.7295847",
"0.7295847",
"0.72709394",
"0.72709394",
"0.7253013",
"0.7253013",
"0.72173977",
"0.72135323",
"0.72135323",
"0.71803516",
"0.71418554",
"0.70996106",
"0.7062141... | 0.0 | -1 |
Method that displays a native Image Chooser to choose the desired Profile Image | private void showImageChooser() {
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select Profile Image"), CHOOSE_IMAGE);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void mProfileImageSelection() {\n\n final CharSequence[] options = {\"Camera\", \"Gallery\", \"Cancel\"};\n\n AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper\n (ApplicationActivity.this, R.style.AlertDialogCustom));\n\n builder.setIcon(R.m... | [
"0.78666586",
"0.7619654",
"0.72793305",
"0.7278979",
"0.7089098",
"0.6939956",
"0.6857793",
"0.68334895",
"0.68100226",
"0.6798126",
"0.6783806",
"0.67355305",
"0.67175525",
"0.6698883",
"0.6698883",
"0.6653641",
"0.66385084",
"0.6616717",
"0.65772617",
"0.6566461",
"0.65628... | 0.81433266 | 0 |
Create a new instance of the chrome driver | public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.chrome.driver", "src/test/resources/drivers/chromedriver.exe");
WebDriver driver = new ChromeDriver();
// Implicit wait
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
// Launch the application
String url = "https://opensource-demo.orangehrmlive.com/";
driver.get(url);
String titlePage = driver.getTitle();
int titleLength = titlePage.length();
System.out.println("title of the page is" + titlePage);
System.out.println("title of the page is" + titleLength);
String actualUrl = driver.getCurrentUrl();
if (actualUrl.equals(url)) {
System.out.println("Verification succesfull the correct url is opened");
} else {
System.out.println("Verification failed an correct url is opened");
}
System.out.println("Actual URL is: " + actualUrl);
System.out.println("Expected URL is: " + url);
String sourcePage = driver.getPageSource();
int sourcePageLength = sourcePage.length();
System.out.println("Length of source page: " + sourcePageLength);
//driver.quit();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private WebDriver createChromeDriver() {\n\t\tsetDriverPropertyIfRequired(\"webdriver.chrome.driver\", \"chromedriver.exe\");\n\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"disable-plugins\");\n\t\toptions.addArguments(\"disable-extensions\");\n\t\toptions.addArguments(\"test-type\... | [
"0.8215278",
"0.7795399",
"0.7783676",
"0.7772164",
"0.7718684",
"0.7704127",
"0.756316",
"0.7353657",
"0.729492",
"0.72445005",
"0.71298236",
"0.7126167",
"0.7124591",
"0.7121488",
"0.69581467",
"0.69254977",
"0.691376",
"0.68301564",
"0.6822059",
"0.6795783",
"0.6768542",
... | 0.0 | -1 |
This method returns true if the collection is null or is empty. | public boolean isEmpty( Collection<?> collection ){
if( collection == null || collection.isEmpty() ){
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isEmpty() {\n return collection.isEmpty();\n }",
"public boolean isEmpty() {\r\n\t\treturn objectCollection.isEmpty();\r\n\t}",
"public static boolean isEmpty(Collection<?> collection) {\n return collection == null || collection.isEmpty();\n }",
"public static <T> boolean m6262a(... | [
"0.86203146",
"0.84096014",
"0.8089415",
"0.7945139",
"0.7898204",
"0.7861469",
"0.78169763",
"0.7724589",
"0.770791",
"0.76989466",
"0.76860917",
"0.76860917",
"0.7684075",
"0.76510036",
"0.7647344",
"0.76460767",
"0.7627317",
"0.76154965",
"0.76102144",
"0.7592821",
"0.7578... | 0.82392895 | 2 |
This method returns true of the map is null or is empty. | public boolean isEmpty( Map<?, ?> map ){
if( map == null || map.isEmpty() ){
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic boolean isEmpty() \n\t{\n\t\treturn this.map.isEmpty();\n\t}",
"@Override\n\tpublic boolean isEmpty() {\n\t\treturn map.isEmpty();\n\t}",
"public boolean isEmpty() {\n return map.isEmpty();\n }",
"public boolean isEmpty() {\r\n return this.map.isEmpty();\r\n }",
"public bo... | [
"0.88104564",
"0.8733403",
"0.87212294",
"0.87108654",
"0.8690331",
"0.86779875",
"0.8674094",
"0.8666424",
"0.86562765",
"0.83658564",
"0.8254065",
"0.812942",
"0.81161124",
"0.78514445",
"0.78205615",
"0.78034556",
"0.7767623",
"0.77164155",
"0.7654934",
"0.7595421",
"0.753... | 0.84849876 | 9 |
This method returns true if the object is null. | public boolean isEmpty( Object object ){
if( object == null ){
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean canBeNullObject() { // for future, nobody calls when first\n return _canBeNullObject;\n }",
"public boolean hasObject(){\n return _object != null;\n }",
"@java.lang.Override\n public boolean hasObject() {\n return object_ != null;\n }",
"public boolean isNull() {\n ... | [
"0.8385925",
"0.7837839",
"0.7831452",
"0.7558254",
"0.753762",
"0.75224507",
"0.7519906",
"0.748717",
"0.7454536",
"0.7420466",
"0.7413285",
"0.7244938",
"0.72288567",
"0.7221654",
"0.72133833",
"0.72073144",
"0.7204356",
"0.7145816",
"0.7113169",
"0.7055305",
"0.7040364",
... | 0.70050263 | 22 |
This method returns true if the input array is null or its length is zero. | public boolean isEmpty( Object[] array ){
if( array == null || array.length == 0 ){
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean checkEmpty() {\n\t\treturn this.array[0] == null;\n\t}",
"public static boolean isNotNullOrEmpty(Object[] array) {\n return array != null && array.length > 0;\n }",
"public boolean isEmpty() {\n //if the array length is 0, then the array is empty\n if (this.array.length ... | [
"0.8207132",
"0.79478693",
"0.7847735",
"0.7823819",
"0.7818527",
"0.781782",
"0.78136194",
"0.77905875",
"0.7743106",
"0.7695687",
"0.76936597",
"0.7543457",
"0.73794204",
"0.7353328",
"0.7338527",
"0.7311949",
"0.73015964",
"0.72786474",
"0.72566974",
"0.72566974",
"0.72524... | 0.7971062 | 1 |
This method returns true if the input string is null or its length is zero. | public boolean isEmpty( String string ){
if( string == null || string.trim().length() == 0 ){
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean hasValue (String s) { return s != null && s.length() != 0; }",
"public boolean isZeroLength() {\r\n return value.length() == 0;\r\n }",
"private static boolean isEmpty(CharSequence str) {\n return str == null || str.length() == 0;\n }",
"private static boolean isEmpty(Char... | [
"0.80796736",
"0.7953436",
"0.7894531",
"0.783152",
"0.77525336",
"0.768535",
"0.76843745",
"0.76741594",
"0.76510894",
"0.76380247",
"0.76312786",
"0.762418",
"0.7624161",
"0.75841165",
"0.7532457",
"0.74962294",
"0.7489915",
"0.74893594",
"0.7478201",
"0.7450728",
"0.744239... | 0.723721 | 46 |
Created by : Subham Tyagi Created on : 04/10/16. | public interface VideoFragmentContract {
interface View extends ILoadingView {
void showVideoList(List<RecyclerItemView> videos);
void showErrorMessage();
RecyclerView getRecyclerView();
}
interface Presenter extends IPresenter<View> {
void loadVideos(Integer movieId);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Over... | [
"0.5986997",
"0.59620583",
"0.5939183",
"0.58759594",
"0.58344865",
"0.58045954",
"0.5783054",
"0.5783054",
"0.57209826",
"0.57092905",
"0.5707573",
"0.569741",
"0.56968504",
"0.56912494",
"0.5672001",
"0.56614286",
"0.56582785",
"0.56577194",
"0.5657005",
"0.5642512",
"0.563... | 0.0 | -1 |
private TextView search = (EditText) findViewById(R.id.inputSearch); | @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.product_details);
act = this;
TextView name = (TextView) findViewById(R.id.name);
TextView description = (TextView) findViewById(R.id.description);
TextView category = (TextView) findViewById(R.id.category);
TextView unity = (TextView) findViewById(R.id.unity);
TextView mark = (TextView) findViewById(R.id.mark);
ListView price_list = (ListView) findViewById(R.id.price_list);
ListView stock_list = (ListView) findViewById(R.id.stock_list);
Bundle extras = getIntent().getExtras();
Realm realm = Realm.getDefaultInstance();
RealmQuery<Product> realmQuery = realm.where(Product.class).equalTo("id", extras.getLong("id"));
RealmResults<Product> realmResults = realmQuery.findAll();
name.setText (realmResults.get(0).getName());
description.setText (realmResults.get(0).getDescription());
category.setText (realmResults.get(0).getCategory());
unity.setText (realmResults.get(0).getUnity());
mark.setText (realmResults.get(0).getMark());
RealmQuery<ProductPrice> productPriceRealmQuery = realm.where(ProductPrice.class).equalTo("product.id", realmResults.get(0).getId());
RealmResults<ProductPrice> productPriceRealmResults = productPriceRealmQuery.findAll();
ProductAdapterPriceDetails adapter_price = new ProductAdapterPriceDetails(productPriceRealmResults, act);
price_list.setAdapter(adapter_price);
RealmQuery<ProductStock> productStockRealmQuery = realm.where(ProductStock.class).equalTo("product.id", realmResults.get(0).getId());
RealmResults<ProductStock> productStockRealmResults = productStockRealmQuery.findAll();
ProductAdapterStockDetails adapter_stock = new ProductAdapterStockDetails(productStockRealmResults, act);
stock_list.setAdapter(adapter_stock);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void search(View view){\n userinput = (EditText) findViewById(R.id.userinput);\n String input = userinput.getText().toString();\n\n if (input.isEmpty()){\n Toast.makeText(this, \"Please enter a city\", Toast.LENGTH_LONG).show();\n }\n else{\n input = ... | [
"0.70278615",
"0.69314843",
"0.6825573",
"0.6797457",
"0.6781498",
"0.67210925",
"0.66914964",
"0.66911936",
"0.6683597",
"0.6680158",
"0.66671616",
"0.6624109",
"0.6536862",
"0.6476464",
"0.6406364",
"0.6366352",
"0.6328624",
"0.6314475",
"0.6312643",
"0.6306226",
"0.6291056... | 0.0 | -1 |
Home and output resources directory | public static void install() {
for (String s : RESOURCES) INSTANCE.ensureResourceExists(s);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract File getResourceDirectory();",
"abstract public String getImageResourcesDir();",
"abstract public String getDataResourcesDir();",
"abstract public String getRingResourcesDir();",
"abstract public String getTopResourcesDir();",
"private File extractResources() {\r\n\t\tif (org.opensourcephysics.d... | [
"0.68376344",
"0.672071",
"0.66507417",
"0.6627192",
"0.6558593",
"0.60773045",
"0.6011983",
"0.5982696",
"0.59557295",
"0.587534",
"0.577783",
"0.5768198",
"0.5763032",
"0.5751343",
"0.57309216",
"0.5706623",
"0.564871",
"0.56266737",
"0.5613212",
"0.5591581",
"0.5591271",
... | 0.0 | -1 |
Try special directory location, but if that is not defined, add to user's home directory | private File getHomeDirectory() {
String brunelDir = System.getProperty("brunel.home");
File home = brunelDir != null ? new File(brunelDir) :
new File(System.getProperty("user.home"), "brunel");
return ensureWritable(home);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected File getDefaultHomeDir()\n throws AntException\n {\n if( null != m_userDir )\n {\n try \n {\n checkDirectory( m_userDir, null );\n return m_userDir;\n }\n catch( final AntException ae ) {}\n }\n\n ... | [
"0.66986185",
"0.6680653",
"0.6592726",
"0.65571237",
"0.651268",
"0.64886206",
"0.640283",
"0.63768274",
"0.63231766",
"0.6261409",
"0.62208074",
"0.621631",
"0.6164796",
"0.61644024",
"0.6131478",
"0.60974884",
"0.6008857",
"0.59789824",
"0.59442633",
"0.59299415",
"0.59209... | 0.6780057 | 0 |
GO BACK TO PLACES ACTIVITY | @Override
public void postResult(boolean success, String text) {
if (progressDialog.isShowing())
progressDialog.dismiss();
finish();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onBackPresed() {\n\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\n\n\t}",
"@Override\n public void onBackPressed() {\n chamarTelaInicial(status_recreate);\n }",
"@Override\n public void onBackPressed() {\n replaceUseCase(meetingManager);\n re... | [
"0.6858856",
"0.62884593",
"0.62256956",
"0.62067074",
"0.6206561",
"0.62028533",
"0.61336416",
"0.61269283",
"0.60963845",
"0.60942894",
"0.60939175",
"0.60676694",
"0.6022589",
"0.6020002",
"0.6015445",
"0.601219",
"0.60060465",
"0.60055006",
"0.5993509",
"0.595541",
"0.594... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.