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 |
|---|---|---|---|---|---|---|
This method return action info | @Override
public String info() {
return String.format("%s. %s", this.key, this.name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getActionInfo() {\n\n String\taction\t= getAction();\n\n if (ACTION_AppsProcess.equals(action)) {\n return \"Process:AD_Process_ID=\" + getAD_Process_ID();\n } else if (ACTION_DocumentAction.equals(action)) {\n return \"DocumentAction=\" + getDocAction();\n ... | [
"0.80830914",
"0.80071706",
"0.75022525",
"0.7051421",
"0.7035591",
"0.70346844",
"0.70346844",
"0.70346844",
"0.70346844",
"0.70315987",
"0.69927883",
"0.6973902",
"0.69212854",
"0.6904159",
"0.6886007",
"0.6882514",
"0.6874885",
"0.68666667",
"0.68666667",
"0.68666667",
"0.... | 0.0 | -1 |
validate the sign up information when the sign up button is clicked. | @OnClick(R.id.fragment_register_sign_up_button)
public void validateSignupInformation() {
mValidator.validate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onClickSignUp(View view) {\r\n\t\tcheckRegistationValidation();\r\n\t}",
"public void onSignUpClick() {\n\t\tString uid = regview.getUsername();\n\t\tString pw = regview.getPassword();\n\t\tString na = regview.getName();\n\t\tString em = regview.getEmail();\n\t\tString text = \"\";\n\t\tif(uid.equals... | [
"0.79165334",
"0.76057637",
"0.7377592",
"0.73272735",
"0.7304692",
"0.72379",
"0.7218183",
"0.7080942",
"0.7071726",
"0.70699996",
"0.6998451",
"0.69870013",
"0.6964505",
"0.69644356",
"0.69588304",
"0.6919068",
"0.68530065",
"0.6791751",
"0.679061",
"0.67370915",
"0.6732634... | 0.8192026 | 0 |
Save user information into User Preferences(right after registration success) | private void saveUserInPreferences(String userName, String password, User user) {
mUserManager.setUsername(userName);
mUserManager.setPassword(password);
mUserManager.saveUser(user);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void saveUserSettings() {\n\t}",
"public void saveInfo(View view){\n SharedPreferences sharedPref = getSharedPreferences(\"userinfo\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"username\", usernameInput.getText().toString());\... | [
"0.75899434",
"0.74687254",
"0.73766387",
"0.73612666",
"0.73575157",
"0.7350789",
"0.7257594",
"0.71953297",
"0.7158528",
"0.71566",
"0.7151423",
"0.71413404",
"0.71017814",
"0.707494",
"0.7015552",
"0.7014767",
"0.699072",
"0.6986335",
"0.6982792",
"0.69684803",
"0.69469726... | 0.702259 | 14 |
Use the current date as the default values for the picker | @Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
if (mYear == null || mMonthOfYear == null || mDayOfMonth == null) {
final Calendar c = Calendar.getInstance();
mYear = c.get(Calendar.YEAR);
mMonthOfYear = c.get(Calendar.MONTH);
mDayOfMonth = c.get(Calendar.DAY_OF_MONTH);
}
// Create a new instance of DatePickerDialog and return it
DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), this, mYear, mMonthOfYear, mDayOfMonth);
datePickerDialog.getDatePicker().setMaxDate(DateTime.now().getMillis());
return datePickerDialog;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void set_value_to_default() {\n this.selectionListStrike.setText(\"\");\n this.selectionListCal_iv.setText(\"\");\n this.selectionListUlast.setText(\"\");\n String format = new SimpleDateFormat(\"dd/MM/yyyy\").format(new Date());\n int parseInt = Integer.parseInt(format.su... | [
"0.7473171",
"0.719602",
"0.69968814",
"0.6823391",
"0.6786904",
"0.6711535",
"0.6487093",
"0.646433",
"0.6441328",
"0.6438136",
"0.643467",
"0.64253265",
"0.6416133",
"0.6402763",
"0.6365018",
"0.63647234",
"0.63281286",
"0.6322397",
"0.6303129",
"0.6302595",
"0.6291918",
... | 0.0 | -1 |
Creates a new Colorguard game owned by given side. For networking, runGame takes a server and client. One of these must be null. runGame manages GUI, networking, and game logic together. runGame updates some states of the game, such as jailbreaks. | public void runGame(String side, Server server, Client client) throws InterruptedException, IOException {
// Initialize Colorguard game, GameWindow window, GameBoard board. Update GUI
Colorguard game = new Colorguard(side);
GameWindow window = new GameWindow();
window.show();
// Get starting spots and prompt player
HashSet<Location> possSpots = game.getStartingPoints();
for (int i = 0; i < pieceTypes.length; i++) {
window.addMessage("Place " + pieceNames[i]);
window.promptUser(possSpots);
Location loc = window.getLastValidLocation();
game.addPiece(loc, pieceTypes[i]);
possSpots.remove(loc);
window.updateSquare(loc, game.getBoard());
window.addMessage(pieceNames[i] + " placed at " + loc);
}
window.updateBoard(game);
// Gets opponent initialized Pieces and adds them to the game
window.addMessage("Pieces initialized. Waiting for opponent...");
Object input;
if (server == null) {
client.sendObject(game);
input = client.getSentObject();
} else {
server.sendObject(game);
input = server.getSentObject();
}
Colorguard oppGame = (Colorguard) input;
LinkedList<Piece> newPieces;
if (game.mySide().equals("Blue"))
newPieces = oppGame.getBoard().getRedPieces();
else
newPieces = oppGame.getBoard().getBluePieces();
for (Piece p : newPieces) {
game.addPiece(p);
window.addMessage("Opponent intialized " + p.gameName() + " at " + p.getLocation());
}
game.startGame();
window.updateBoard(game);
// Display opening message of the game
window.addMessage(game.getCurrentTurn() + " turn! (Turn: " + game.getTurns() + ")");
while (!game.gameOver()) {
// Updates game and the side if it is not your turn currently
if (!game.mySide().equals(game.getCurrentTurn())) {
window.addMessage("Opponent turn...");
if (server == null)
input = client.getSentObject();
else
input = server.getSentObject();
game = (Colorguard) input;
if (game.mySide().equals("Blue"))
game.setMySide("Red");
else
game.setMySide("Blue");
window.updateBoard(game);
if (game.gameOver())
break;
// Handles actions when it is your turn
} else {
window.addMessage(game.getCurrentTurn() + " turn! (Turn: " + game.getTurns() + ")");
// Powerup handling
LinkedList<Powerup> yourPowerups = game.getCurrentPowerups();
if (yourPowerups != null && yourPowerups.size() != 0)
window.addMessage("Your powerups: " + yourPowerups);
if (game.getTurns() % 3 == 0) {
Powerup nextPowerup = game.addNewPowerup();
window.addMessage("New Powerup " + nextPowerup.gameName() + " at " + nextPowerup.getLocation());
}
window.updateBoard(game);
// Jailbreak handling
if (game.getTurns() % 8 == 0) {
handleJailbreak(game, window);
}
window.updateBoard(game);
// Piece movement handling
while (game.getMovedPieces().size() < 7) {
if (game.gameOver())
break;
possSpots = game.getPossiblePieces();
if (possSpots.size() == 0)
break;
int i = 0;
if (game.getCurrentTurn().equals("Blue"))
i = 4;
for (Powerup p : yourPowerups) {
possSpots.add(new Location(i, 21));
i++;
}
window.addMessage("Move a piece or use a powerup. Enter ESC to end turn.");
window.promptUser(possSpots);
Location loc = window.getLastValidLocation();
// End turn option
if (loc.getRow() == -1 && loc.getCol() == -1) {
break;
// Powerup option
} else if (loc.getCol() == 21) {
// Fetches powerup based on location external from board
Powerup powerup = game.getPowerupAtIndex(loc.getRow());
// Handles different kinds of Powerups
if (powerup.powerupType().equals("swapper")) {
window.addMessage("Enter effected Piece 1");
possSpots = game.getPossiblePieces();
window.promptUser(possSpots);
Location loc1 = window.getLastValidLocation();
possSpots.remove(loc1);
window.addMessage("Enter effected Piece 2");
window.promptUser(possSpots);
Location loc2 = window.getLastValidLocation();
String message = game.useSwapper((Swapper) powerup, loc1, loc2);
window.addMessage(message);
} else if (powerup.powerupType().equals("jailbreak")) {
handleJailbreak(game, window);
} else if (powerup.powerupType().equals("clone")) {
window.addMessage("Enter Piece to clone");
possSpots = game.getPossiblePieces();
window.promptUser(possSpots);
Location pieceLocation = window.getLastValidLocation();
possSpots.remove(pieceLocation);
window.addMessage("Enter location of the clone");
possSpots = game.getStartingPoints();
window.promptUser(possSpots);
Location cloneLocation = window.getLastValidLocation();
String message = game.useClone((Clone) powerup, pieceLocation, cloneLocation);
window.addMessage(message);
} else if (powerup.powerupType().equals("highwall")) {
String message = game.useHighWall((HighWall) powerup);
window.addMessage(message);
} else if (powerup.powerupType().equals("paralysis")) {
window.addMessage("Enter Piece to paralyze enemies around");
possSpots = game.getPossiblePieces();
;
window.promptUser(possSpots);
Location pieceLocation = window.getLastValidLocation();
String message = game.useParalysis((Paralysis) powerup, pieceLocation);
window.addMessage(message);
} else if (powerup.powerupType().equals("throw")) {
Location poss = game.getFlagHolder();
if (poss == null) {
window.addMessage("Nobody has flag. Cannot use Quarterback");
break;
}
window.addMessage("Enter the thrower");
HashSet<Location> locs = new HashSet<Location>();
locs.add(poss);
window.promptUser(locs);
Location thrower = window.getLastValidLocation();
locs = game.getThrowOptions();
if (locs.size() == 0) {
window.addMessage("No possible recievers. Cannot use Quarterback");
break;
}
window.addMessage("Enter the reciever");
window.promptUser(locs);
Location rec = window.getLastValidLocation();
String message = game.useThrow((Throw) powerup, thrower, rec);
window.addMessage(message);
} else {
window.addMessage("Enter Piece to use " + powerup.gameName() + " on");
possSpots = game.getPossiblePieces();
window.promptUser(possSpots);
Location pieceLocation = window.getLastValidLocation();
String message = game.usePowerup(powerup, pieceLocation);
window.addMessage(message);
}
window.updateBoard(game);
// Piece movement option
} else {
window.addMessage("Click new location. ESC to cancel");
possSpots = game.getPossibleMovements(loc);
window.promptUser(possSpots);
Location newLoc = window.getLastValidLocation();
// Cancel option
if (newLoc.getRow() == -1 && newLoc.getCol() == -1) {
window.addMessage("Cancelled move");
// Handle Piece movement
} else {
String message = game.movePiece(loc, newLoc);
window.addMessage(message);
// Check for jail break
if (game.getCurrentTurn().equals("Red")) {
if ((newLoc.getRow() == 16 && newLoc.getCol() >= 0 && newLoc.getCol() <= 2)
|| (newLoc.getCol() == 2 && newLoc.getRow() >= 17 && newLoc.getRow() <= 19))
handleJailbreak(game, window);
}
else
{
if ((newLoc.getCol() == 18 && newLoc.getRow() >= 0 && newLoc.getRow() <= 2)
|| (newLoc.getRow() == 3 && newLoc.getCol() >= 18 && newLoc.getCol() <= 20))
handleJailbreak(game, window);
}
}
window.updateBoard(game);
}
// Send game to other side
if (client == null)
server.sendObject(game);
else
client.sendObject(game);
System.out.println("Sent");
window.updateBoard(game);
}
if (game.gameOver())
break;
window.addMessage("Turn ended");
game.nextTurn();
window.updateBoard(game);
if (game.getTurns() % 8 == 0) {
handleJailbreak(game, window);
}
window.updateBoard(game);
// Send game to other side
if (client == null)
server.sendObject(game);
else
client.sendObject(game);
System.out.println("Sent");
}
}
window.addMessage("Game over! " + game.getCurrentTurn() + " wins!!!!");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createGame()\n {\n //call Client Controller's setState method with\n //a parameter of new ClientLobbyState()\n clientController.startMultiPlayerGame(\"GameLobby\");\n }",
"public Game createGame();",
"void startGame(int gameId) {\n game = new Game(gameId);\n }",... | [
"0.65465194",
"0.5982516",
"0.59703547",
"0.5829048",
"0.5811438",
"0.5759287",
"0.56289905",
"0.56060994",
"0.5601323",
"0.5598933",
"0.55875856",
"0.54887444",
"0.5482433",
"0.5475826",
"0.5472891",
"0.54136604",
"0.54068226",
"0.5398404",
"0.53810626",
"0.5369942",
"0.5366... | 0.716958 | 0 |
Helper method that handles a situation for jailbreak Prompts user for Location to put Pieces after a jailbreak. | private void handleJailbreak(Colorguard game, GameWindow window) throws IOException, InterruptedException {
Queue<Piece> freePieces = game.jailbreak();
HashSet<Location> possSpots = game.getLandingSpots();
while (!freePieces.isEmpty()) {
Piece free = freePieces.remove();
System.out.println(free + " " + free.getLocation());
window.addMessage("Enter landing zone for " + free.gameName());
window.promptUser(possSpots);
Location newLoc = window.getLastValidLocation();
game.getBoard().movePiece(free, newLoc);
window.addMessage(free.gameName() + " landed at " + newLoc);
possSpots.remove(newLoc);
window.updateBoard(game);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setPickupLocation(){\n \t\t// Defines the AutoCompleteTextView pickupText\n \t\tacPickup = (AutoCompleteTextView)findViewById(R.id.pickupText);\n \t\t// Controls if the user has entered an address\n \t\tif(!acPickup.getText().toString().equals(\"\")){\n \t\t\t// Gets the GeoPoint of the written addres... | [
"0.5561584",
"0.53759646",
"0.5342889",
"0.5339345",
"0.52954465",
"0.51784664",
"0.5101044",
"0.50534135",
"0.50528175",
"0.50513506",
"0.5033123",
"0.5005893",
"0.49858457",
"0.49721453",
"0.49694774",
"0.4948978",
"0.49418238",
"0.49057183",
"0.49049845",
"0.49015987",
"0.... | 0.63270104 | 0 |
super.setHeading(heading); //To change body of generated methods, choose Tools | Templates. | @Override
public void setHeading(String heading) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final native void setHeading(int heading) /*-{\n this.setHeading(heading);\n }-*/;",
"public void setHeading(boolean isHeading) {\n/* 1395 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\r\npublic void setTitle(String title) {\n\tsuper.setTitle(title);\r\n}",
"public voi... | [
"0.72932625",
"0.71937656",
"0.71133906",
"0.70897",
"0.7062603",
"0.70098865",
"0.6984145",
"0.69174",
"0.6814232",
"0.67612994",
"0.66735214",
"0.6672103",
"0.66564626",
"0.6608124",
"0.6608124",
"0.6566882",
"0.65102965",
"0.6500892",
"0.6402343",
"0.63921005",
"0.6389873"... | 0.82895386 | 0 |
/Return month in alphabet | public String getMonthAlphabet(int month) {
return new DateFormatSymbols().getShortMonths()[month];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void Month() {\n System.out.printf(\"%d%n\", Month.FEBRUARY.maxLength());\n\n Month month = Month.AUGUST;\n Locale locale = Locale.getDefault();\n System.out.println(month.getDisplayName(TextStyle.FULL, locale));\n System.out.println(month.getDisplayName(TextStyle.NARROW, locale));\n... | [
"0.7198904",
"0.71078944",
"0.69888043",
"0.6917117",
"0.68983155",
"0.68786263",
"0.68158966",
"0.6810668",
"0.67860067",
"0.6753594",
"0.6745565",
"0.6730093",
"0.6721764",
"0.6697274",
"0.6682557",
"0.6667255",
"0.6520894",
"0.64792264",
"0.64731675",
"0.64642155",
"0.6443... | 0.7993923 | 0 |
/Get All Country From OS | public JSONArray getCountry(Activity act)
{
JSONArray json = null;
prefManager = new SharedPrefManager(act);
HashMap<String, String> init = prefManager.getCountry();
String dataCountry = init.get(SharedPrefManager.COUNTRY);
Log.e("dataCountry",dataCountry);
try {
json = new JSONArray(dataCountry);
Log.e("json",Integer.toString(json.length()));
}catch (JSONException e){
e.printStackTrace();
}
return json;
/*Locale[] locales = Locale.getAvailableLocales();
ArrayList<String> countries = new ArrayList<String>();
for (Locale locale : locales) {
String country = locale.getDisplayCountry();
String countryCode = locale.getCountry();
if (country.trim().length()>0 && !countries.contains(country)) {
countries.add(country+"-"+countryCode);
}
}
Collections.sort(countries);
return countries;*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void fetchCountryInformation();",
"@Test\n\tpublic void ListAllCountry() {\n\t\tRequestSpecification requestSpecification = new base().getRequestSpecification();\n\t\tString json = given().get(Endpoint.GET_COUNTRY).then().extract().asString();\n\t\tJsonPath jp = new JsonPath(json);\n\t\tList<String> list = jp.ge... | [
"0.72313094",
"0.71145576",
"0.70666945",
"0.70319694",
"0.7009778",
"0.6831128",
"0.6831128",
"0.68146056",
"0.6812804",
"0.6758683",
"0.6651527",
"0.66426206",
"0.66300416",
"0.6569092",
"0.6535352",
"0.6517221",
"0.6463346",
"0.64617604",
"0.64407015",
"0.6430948",
"0.6401... | 0.6710011 | 10 |
Gets PartitionId based on serialized bytes. | public PartitionId getPartitionIdFromStream(DataInputStream stream)
throws IOException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getPartitionId();",
"int getPartitionForDataSetId(String topic, String datasetId);",
"public static JobID fromByteArray(byte[] bytes) {\n return new JobID(bytes);\n }",
"public TrackId(byte[] bytes) throws KlvParseException {\n try {\n id = UuidUtils.arrayToUuid(bytes, 0);\n ... | [
"0.66229576",
"0.5981359",
"0.5911636",
"0.58577114",
"0.55100614",
"0.55100614",
"0.55100614",
"0.55100614",
"0.55100614",
"0.55100614",
"0.5462602",
"0.5363801",
"0.5281301",
"0.52298146",
"0.52286464",
"0.52286464",
"0.52286464",
"0.52286464",
"0.5120141",
"0.5086828",
"0.... | 0.7171586 | 0 |
Gets a list of partitions that are available for writes. | public List<PartitionId> getWritablePartitionIds(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Partition> getPartitions() {\n return partitions;\n }",
"@SuppressWarnings(\"FieldAccessNotGuarded\")\n @Override\n public int partitions()\n {\n return partitions.length;\n }",
"public Long getPartitions() {\n return this.Partitions;\n }",
"public List<Part... | [
"0.67299193",
"0.63483614",
"0.6028422",
"0.58579797",
"0.5652414",
"0.5454769",
"0.5439486",
"0.54321235",
"0.54256105",
"0.53856057",
"0.53398865",
"0.53343034",
"0.53343034",
"0.5310347",
"0.52752304",
"0.52711415",
"0.5202079",
"0.51889277",
"0.5188766",
"0.51712817",
"0.... | 0.6907677 | 0 |
Checks if datacenter name corresponds to some datacenter in this cluster map's hardware layout. | public boolean hasDatacenter(String datacenterName); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasClusterName();",
"public String getDataCenterName() {\n return dataCenterName;\n }",
"boolean hasDataName();",
"public boolean isSetCardistrictname() {\n return this.cardistrictname != null;\n }",
"private boolean checkDeviceName(String name) {\n switch (name) {\n ... | [
"0.6261337",
"0.57859266",
"0.56073076",
"0.5549418",
"0.54844785",
"0.5482171",
"0.53739256",
"0.5323833",
"0.53149277",
"0.52918833",
"0.522472",
"0.522472",
"0.51971114",
"0.5176046",
"0.5099364",
"0.50705636",
"0.5058033",
"0.5047612",
"0.50297284",
"0.50094074",
"0.49975... | 0.76681346 | 0 |
Gets a specific DataNodeId by its hostname and port. | public DataNodeId getDataNodeId(String hostname, int port); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"NodeId getNodeId();",
"public String selectNodeId(Node node, String remoteHost, String remoteAddress);",
"public int getDataNodeID() throws Exception {\n\t\tSocket socket = new Socket(nameNodeHost, nameNodePort);\n\t\tFSMessage message = new FSMessage(FSMessage.MESSAGE_DATANODE_REQ)\n\t\t\t\t.withPort(port)\n\... | [
"0.6807546",
"0.6360468",
"0.60659385",
"0.5934001",
"0.58070743",
"0.58070743",
"0.58036613",
"0.58028466",
"0.5784536",
"0.57771236",
"0.577514",
"0.5757854",
"0.5742451",
"0.57283396",
"0.57249725",
"0.57072425",
"0.5687639",
"0.5578963",
"0.5567964",
"0.5567964",
"0.55636... | 0.87445605 | 0 |
Gets the ReplicaIds stored on the specified DataNodeId. | public List<ReplicaId> getReplicaIds(DataNodeId dataNodeId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<DataNodeId> getDataNodeIds();",
"java.util.List<java.lang.Long> getIdsList();",
"Enumeration getChildIds(String nodeId) throws PortalException;",
"public List getAllIds();",
"private List<Replica> listReplicaEntries(Identifier pid, Map<String, String> tableMap)\n throws SQLException ... | [
"0.7187672",
"0.564422",
"0.56376565",
"0.5502153",
"0.5348885",
"0.53334445",
"0.5301636",
"0.52744037",
"0.52739453",
"0.5267948",
"0.5246959",
"0.5244964",
"0.524427",
"0.5213674",
"0.520382",
"0.5141585",
"0.51332986",
"0.5119829",
"0.51192313",
"0.5114528",
"0.50787604",... | 0.89489925 | 0 |
Gets the DataNodeIds for all nodes in the cluster. | public List<DataNodeId> getDataNodeIds(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<ReplicaId> getReplicaIds(DataNodeId dataNodeId);",
"public List<Output<TInt32>> nodeIdsList() {\n return nodeIdsList;\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<String> getClusterIDs() {\r\n\t\tArrayList<String> clusterIDs = new ArrayList<String>();\r\n\t\t//xPath expression to ge... | [
"0.6705724",
"0.65323347",
"0.6529039",
"0.64870125",
"0.6158324",
"0.5841143",
"0.5802939",
"0.57747746",
"0.57439387",
"0.5686411",
"0.5674047",
"0.5615312",
"0.55849075",
"0.5584636",
"0.5575245",
"0.55729336",
"0.5564428",
"0.5541846",
"0.5509527",
"0.5495477",
"0.5467626... | 0.7661798 | 0 |
Gets the MetricRegistry that other users of the ClusterMap ought to use for metrics. | public MetricRegistry getMetricRegistry(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"MetricsRegistry getMetrics2Registry() {\n return metrics2Registry;\n }",
"public MetricRegistry getMetricRegistry() {\n return metricRegistry;\n }",
"protected MetricRegistry filter(MetricRegistry metricRegistry) {\n if (!monitorAll) {\n final MetricRegistry filtered = new Metri... | [
"0.6683609",
"0.6507582",
"0.5737665",
"0.55736446",
"0.54979485",
"0.54605657",
"0.5418495",
"0.5403425",
"0.53196084",
"0.5297095",
"0.52937645",
"0.52386063",
"0.52235353",
"0.52050954",
"0.51918244",
"0.51688373",
"0.5159177",
"0.51119715",
"0.51088244",
"0.50890577",
"0.... | 0.6812062 | 0 |
Performs the required action for a replica related event. | public void onReplicaEvent(ReplicaId replicaId, ReplicaEventType event); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void shardOperationOnPrimary(\n Request shardRequest,\n IndexShard primary,\n ActionListener<PrimaryResult<ReplicaRequest, Response>> listener\n );",
"protected void acquireReplicaOperationPermit(\n final IndexShard replica,\n final ReplicaRequest request,... | [
"0.6130435",
"0.59195364",
"0.5803723",
"0.5746844",
"0.55230856",
"0.5493442",
"0.5467751",
"0.5369923",
"0.5252999",
"0.5248013",
"0.5210314",
"0.51985455",
"0.5103577",
"0.5099311",
"0.5070367",
"0.5035353",
"0.49943033",
"0.49657097",
"0.49437562",
"0.49279416",
"0.491614... | 0.715206 | 0 |
Atributo Retorna a instancia do FirebaseDatabase Banco de Dados RealTime | public static DatabaseReference getFirebaseDatabase(){
if (firebase == null){
firebase = FirebaseDatabase.getInstance().getReference();
}
return firebase;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void iniciarBaseDeDatos(){\n db_reference = FirebaseDatabase.getInstance().getReference();\n\n }",
"private void iniciarFirebase(){\n FirebaseApp.initializeApp(getApplicationContext());\n firebaseDatabase = FirebaseDatabase.getInstance();\n databaseReference = firebaseDatab... | [
"0.72866404",
"0.6720795",
"0.6679668",
"0.643607",
"0.63159776",
"0.62607443",
"0.6203169",
"0.61280453",
"0.61142594",
"0.6060405",
"0.60406023",
"0.6030504",
"0.6025058",
"0.6011611",
"0.59704494",
"0.5949026",
"0.59214175",
"0.59081244",
"0.5906473",
"0.58994395",
"0.5890... | 0.61194557 | 8 |
Function that generates a random word with a dimension between "min_length">"max_length" Arguments: int min_length> Minimum size of the word int max_length> Maximum size of the word | public static String generate(int min_length, int max_length) {
int length = (int) (Math.random() * (max_length - min_length)) + min_length;
String result = "";
int value_random;
int[] interval_chars = new int[122 - 97];
Arrays.setAll(interval_chars, i -> i + 97);
for (int num = 0; num < length; num++) {
value_random = (Math.abs((int) System.nanoTime())) % 58;
if (value_random >= 48 && value_random <= 57) {
result = result.concat(Character.toString((char) value_random));
continue;
}
result = result.concat(Character.toString((char) (interval_chars[(int) (Math.random() * interval_chars.length)] - (Math.random() > 0.5 ? 32 : 0))));
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String generateRandomWord()\n {\t\n\tRandom randomNb = new Random(System.currentTimeMillis());\n\tchar [] word = new char[randomNb.nextInt(3)+5];\n\tfor(int i=0; i<word.length; i++)\n\t word[i] = letters[randomNb.nextInt(letters.length)];\n\treturn new String(word);\n }",
"private static Stri... | [
"0.69790524",
"0.6708571",
"0.6486797",
"0.6407633",
"0.6404103",
"0.6379494",
"0.6352537",
"0.6351599",
"0.6282312",
"0.6278949",
"0.62733656",
"0.61522824",
"0.60942733",
"0.6084983",
"0.6057437",
"0.6050139",
"0.6019029",
"0.5932896",
"0.59130746",
"0.5909202",
"0.59015524... | 0.6321449 | 8 |
Takes a list of function arguments and converts it to equivalent options that would be used if the file was declared using DDL. | private Map<String, Object> toOptions(List<Object> arguments) {
assert arguments.size() == parameters.size();
Map<String, Object> options = new HashMap<>();
options.put(OPTION_FORMAT, format);
for (int i = 0; i < arguments.size(); i++) {
if (arguments.get(i) != null) {
options.put(parameters.get(i).getName(), arguments.get(i));
}
}
return options;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Arguments convert(List<String> args){\n List<ArgumentPair> sortedArgPairs = sortArgs(args);\n return processArgs(sortedArgPairs);\n }",
"private static ConvertTSVToSQLiteOperation extractArguments(String[] args) {\r\n\t\tif (args == null || args.length < 1)\r\n\t\t\treturn null;\r\... | [
"0.59826607",
"0.5963322",
"0.56456256",
"0.55028725",
"0.55017287",
"0.539414",
"0.53793836",
"0.53712726",
"0.5323548",
"0.53120965",
"0.53116834",
"0.5296226",
"0.5280379",
"0.5215986",
"0.5191736",
"0.5169824",
"0.5100083",
"0.5077579",
"0.5057712",
"0.50363445",
"0.50157... | 0.61291 | 0 |
/ EX2 LunchBox economy = new LunchBox(); economy.add(new Rice(200)); economy.add(new Cabbage(100)); economy.add(new PorkRib(250)); System.out.println("Total calories of an economy lunch box are " + economy.getCalorie() + "."); LunchBox valuedChoice = new LunchBox(); valuedChoice.add(new Rice(200)); valuedChoice.add(new Egg(30)); valuedChoice.add(new Carrot(200)); valuedChoice.add(new PorkRib(300)); System.out.println("Total calories of a valuedchoice lunch box are " + valuedChoice.getCalorie() + "."); EX3 | public static void main(String[] args){
LunchBox economy = new LunchBox();
economy.add(new Rice(200));
economy.add(new Cabbage(100));
economy.add(new PorkRib(250));
//設定變數值
economy.setPriceRatio(1.2);
System.out.println("Total calories of an economy lunch box are " + economy.getCalorie());
System.out.println("The price of an economy lunch box is " + economy.getPrice());
LunchBox valuedChoice = new LunchBox();
valuedChoice.add(new Rice(200));
valuedChoice.add(new Egg(30));
valuedChoice.add(new Carrot(100));
valuedChoice.add(new PorkRib(300));
valuedChoice.setPriceRatio(1.3);
System.out.println("Total calories of a valued-choice lunch box are " + valuedChoice.getCalorie());
System.out.println("The price of an valued-choice lunch box is " + valuedChoice.getPrice());
//EX4
System.out.println("便當economy比便當valued-choice更便宜嗎?" + (LunchBox.isCheaperThan(economy, valuedChoice)?"是":"否"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n Addition onion = new Addition(\"Onion\", 1.5);\n Addition potato = new Addition(\"Potato\", 1.5);\n Addition lettuce = new Addition(\"Lettuce\", 0.5);\n Addition ketchup = new Addition(\"Ketchup\", 0.5);\n Addition chips = new Addition(\... | [
"0.7536754",
"0.7261988",
"0.66436934",
"0.6541923",
"0.6474182",
"0.6407739",
"0.63036346",
"0.6253289",
"0.62168163",
"0.6200058",
"0.6177545",
"0.6152765",
"0.6145482",
"0.61267203",
"0.6085932",
"0.6075121",
"0.6045336",
"0.59814966",
"0.59567076",
"0.5952453",
"0.5949049... | 0.7283102 | 1 |
Default constructor: creates a new board. | public Board() {
this.board = new byte[][] { new byte[3], new byte[3], new byte[3] };
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Board()\r\n\t{\r\n\t\tsuper(8, 8);\r\n\t}",
"public Board() {\n initialize(3, null);\n }",
"public Board() {\n\t\tintializeBoard(_RowCountDefault, _ColumnCountDefault, _CountToWinDefault);\n\t}",
"public Board()\r\n\t{\r\n\t\treset();\r\n\t}",
"private Board() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t... | [
"0.8377777",
"0.8176305",
"0.8117418",
"0.80119926",
"0.7920283",
"0.79105765",
"0.7890061",
"0.7855837",
"0.7787622",
"0.7661171",
"0.7508233",
"0.74998206",
"0.7454457",
"0.7413665",
"0.7399835",
"0.73952013",
"0.7393749",
"0.73740786",
"0.73738056",
"0.73503035",
"0.733953... | 0.7921217 | 4 |
Creates a new board by copying existing one. | public Board(Board original) {
this();
for (int i = 0; i <= 2; i++) {
for (int j = 0; j <= 2; j++) {
board[i][j] = original.board[i][j];
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Board(Board board) {\n copyFrom(board);\n }",
"@Override\n public BoardFramework copyBoard() {\n List<List<GamePiece>> pieceCopies= new ArrayList<>();\n for(List<GamePiece> row: myGamePieces){\n List<GamePiece> rowOfPieceCopies = new ArrayList<>();\n for(GamePiece... | [
"0.73568606",
"0.7348922",
"0.7211562",
"0.7186167",
"0.71394473",
"0.6987911",
"0.6944928",
"0.6859507",
"0.6836359",
"0.6829205",
"0.67800146",
"0.67694247",
"0.6740977",
"0.6628129",
"0.6603383",
"0.6578784",
"0.65482646",
"0.6531238",
"0.6493026",
"0.6491036",
"0.6485483"... | 0.6432962 | 23 |
Registers a move done at this board by the specific player. | public void registerMove(byte player, int field) {
Coordinates coords = new Coordinates(field);
int row = coords.getRow();
int column = coords.getColumn();
if (board[row][column] != 0) {
throw new IllegalStateException("Board at field " + field + " ([" + row + "][" + column + "]) has already a value of " + board[row][column]);
} else {
board[row][column] = player;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void moveAdded(int playerIndex, Move move);",
"public void setMove(char player, int place) {\n\n playBoard[place] = player;\n }",
"@Override\n\tpublic void moveExecFinished(ReadOnlyBoard board, Counter player,\n\t\t\tCounter nextPlayer) {\n\n\t}",
"public void setMove(int hash, Player player) {\n ... | [
"0.65875095",
"0.6329198",
"0.62903804",
"0.621874",
"0.61807686",
"0.60393274",
"0.60304904",
"0.6024835",
"0.5986335",
"0.59306985",
"0.59041786",
"0.59029526",
"0.5864084",
"0.5856621",
"0.5853778",
"0.5834654",
"0.5806513",
"0.5797619",
"0.5763075",
"0.57469535",
"0.56868... | 0.67961574 | 0 |
Returns a value of the given field. | public byte getAt(int fieldNumber) {
Coordinates c = new Coordinates(fieldNumber);
return board[c.getRow()][c.getColumn()];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Nullable\n\tObject getFieldValue(String field);",
"abstract public String getValue(String fieldname);",
"private Object getFieldValue(Field field){\n\t\tObject value = null;\n//\t\tPropertyDescriptor pd;\n//\t\ttry {\n//\t\t\t//to new a PropertyDescriptor, you MUST have getter and setter method in the class,\... | [
"0.8521871",
"0.7723201",
"0.7257979",
"0.71268374",
"0.71086323",
"0.70306844",
"0.70080847",
"0.6891982",
"0.6874723",
"0.6797516",
"0.6791028",
"0.67265034",
"0.6718598",
"0.66997635",
"0.6690399",
"0.6688181",
"0.6679844",
"0.6661921",
"0.66288424",
"0.65872705",
"0.65784... | 0.0 | -1 |
List of free fields e.g. to choose from when doing our move. | public List<Integer> getFreeFields() {
List<Integer> freeFields = new ArrayList<>();
for (int i = 1; i <= 9; i++) {
if (getAt(i) == 0) {
freeFields.add(i);
}
}
return freeFields;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected String getFields()\n\t{\n\t\tString fields = \" GAZOID, GAZFLD, GAZPVN, GAZTYP, GAZCLN, GAZCLS \";\n\t\treturn fields;\n\t}",
"@Override\n public java.util.List<Field> getFieldsList() {\n return fields_;\n }",
"java.lang.String getFields();",
"public String getFields() {\n ... | [
"0.67448366",
"0.66547745",
"0.6627301",
"0.6549117",
"0.6547233",
"0.6542053",
"0.6511386",
"0.64767283",
"0.64509434",
"0.6428404",
"0.64273334",
"0.63618207",
"0.6356351",
"0.6347236",
"0.632464",
"0.6292472",
"0.6234472",
"0.6225007",
"0.6199635",
"0.6191592",
"0.61687905... | 0.7082084 | 0 |
Who is the winner, if any? | public Integer getWinner() {
if (isWinner(PLAYER_X)) {
return (int) PLAYER_X;
} else if (isWinner(PLAYER_O)) {
return (int) PLAYER_O;
} else if (getFreeFields().isEmpty()) {
return 0;
} else {
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int winner() {\n if(humanPlayerHits == 17) {\n return 1;\n }\n if(computerPlayerHits == 17){\n return 2;\n }\n return 0;\n }",
"public void determineWinner() {\n\t\twinner = \"\";\n\t\tif (board[6] > board[13])\n\t\t\twinner = player1.getName();\... | [
"0.7801933",
"0.7748692",
"0.7723369",
"0.7719011",
"0.76983356",
"0.7553811",
"0.753953",
"0.7520818",
"0.7476062",
"0.74163127",
"0.7408732",
"0.7401153",
"0.73963207",
"0.7381549",
"0.7379355",
"0.7364131",
"0.7251022",
"0.72273195",
"0.7223221",
"0.72143674",
"0.7200567",... | 0.0 | -1 |
Checks if "player" is the winner by looking at his signs in rows, columns and diagonals. | private boolean isWinner(byte player) {
for (int row = 0; row <= 2; row++) {
if (board[row][0] == player && board[row][1] == player && board[row][2] == player) {
return true;
}
}
for (int column = 0; column <= 2; column++) {
if (board[0][column] == player && board[1][column] == player && board[2][column] == player) {
return true;
}
}
if (board[0][0] == player && board[1][1] == player && board[2][2] == player) {
return true;
} else if (board[0][2] == player && board[1][1] == player && board[2][0] == player) {
return true;
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean checkForWinner(String player) {\r\n\t\t\r\n\t\t// check rows\r\n\t\tfor (int row = 0; row < board.length; row++) {\r\n\t\t\tint markCounter = 0;\r\n\t\t\tfor (int col = 0; col < board[row].length; col++) {\r\n\t\t\t\tif (board[row][col].getText().contains(player)) {\r\n\t\t\t\t\tmarkCounter++;\r\n\t... | [
"0.81641364",
"0.8008169",
"0.78388965",
"0.7757549",
"0.77435577",
"0.77135956",
"0.77103907",
"0.7578344",
"0.7542394",
"0.751437",
"0.74598324",
"0.74424756",
"0.74311066",
"0.74289733",
"0.7423985",
"0.74209577",
"0.7414593",
"0.7403874",
"0.7398941",
"0.7384395",
"0.7369... | 0.7819244 | 3 |
Returns the first character of the given String. | public static char first(String s) {
return s.charAt(0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static char first(String s) {\n return s.charAt(0);\n }",
"public static char firstLetter(String s){\r\n\t\tchar firstLetter = 0;\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\tif(Character.isLetter(s.charAt(i))){\r\n\t\t\tfirstLetter = s.charAt(i);\r\n\t\t\treturn firstLetter;\r\n\t\t\t... | [
"0.86308795",
"0.76888245",
"0.7344582",
"0.7266989",
"0.7180451",
"0.7114811",
"0.6995213",
"0.69560057",
"0.68285114",
"0.6586938",
"0.6578087",
"0.6495877",
"0.6442992",
"0.6441505",
"0.63991034",
"0.6394551",
"0.63786876",
"0.6353941",
"0.6323218",
"0.6307674",
"0.6287902... | 0.8509221 | 1 |
Returns all but the first letter of the given String. | public static String rest(String s) {
return s.substring(1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String clean(String string) {\n\t\tif(!Character.isLetter(string.charAt(string.length() - 1))){\n\t\t\tString str = \"\";\n\t\t\tfor(int i = 0; i < string.length() - 1; i++){\n\t\t\t\tstr += string.charAt(i);\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t\treturn string;\n\t}",
"public static char firstLet... | [
"0.7179204",
"0.70053333",
"0.6741473",
"0.6729033",
"0.6668969",
"0.6636248",
"0.65284985",
"0.6497409",
"0.6354157",
"0.6323614",
"0.62567574",
"0.6253492",
"0.6253492",
"0.6253492",
"0.61740494",
"0.6158849",
"0.60685813",
"0.6031689",
"0.6024454",
"0.60187393",
"0.6013712... | 0.5671733 | 41 |
Returns all but the first and last letter of the String. | public static String middle(String s) {
return s.substring(1, s.length() - 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String clean(String string) {\n\t\tif(!Character.isLetter(string.charAt(string.length() - 1))){\n\t\t\tString str = \"\";\n\t\t\tfor(int i = 0; i < string.length() - 1; i++){\n\t\t\t\tstr += string.charAt(i);\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t\treturn string;\n\t}",
"public String withoutEnd(St... | [
"0.6711729",
"0.60689723",
"0.6020035",
"0.5919747",
"0.5853272",
"0.58361477",
"0.5709271",
"0.5705499",
"0.57000536",
"0.56983334",
"0.5688737",
"0.5672729",
"0.56462985",
"0.5634008",
"0.55900705",
"0.5578049",
"0.5535651",
"0.55175596",
"0.5489151",
"0.54742557",
"0.54382... | 0.5734589 | 6 |
Returns the length of the given sing. | public static int length(String s) {
return s.length();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int length(String s) {\n return s.length();\n }",
"public org.python.types.Int __len__();",
"public int length();",
"public int length();",
"public int length();",
"public int length();",
"public int length();",
"public int length() {\n int counter = 0;\n while (... | [
"0.6767379",
"0.6532868",
"0.6503517",
"0.6503517",
"0.6503517",
"0.6503517",
"0.6503517",
"0.64749134",
"0.64402896",
"0.64328337",
"0.6394486",
"0.63898295",
"0.63759136",
"0.63578624",
"0.6353281",
"0.6350009",
"0.63350564",
"0.63350564",
"0.63350564",
"0.63350564",
"0.633... | 0.6859012 | 0 |
Write your code here | public static void main(String[] args) throws IOException{
Reader sc = new Reader();
int n=sc.nextInt();
int m=sc.nextInt();
int ans[]=new int[n];
for(int i=0;i<m;i++)
{
int l=sc.nextInt();
int r=sc.nextInt();
// indexing is 1 based.
l--;
r--;
ans[l]++;
if(r!=n-1)
{
ans[r+1]--;
}
}
int s=0;
int max=0;
for(int i=0;i<n;i++)
{
s+=ans[i];
ans[i]=s;
if(s>max)
{
max=s;
}
}
int brr[]=new int[max+1];
for(int i=0;i<n;i++)
{
brr[ans[i]]++;
}
s=0;
for(int i=max;i>=0;i--)
{
s+=brr[i];
brr[i]=s;
}
int q=sc.nextInt();
for(int i=0;i<q;i++)
{
int x=sc.nextInt();
if(x>max)
{
System.out.println(0);
}
else
System.out.println(brr[x]);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void generateCode()\n {\n \n }",
"public void logic(){\r\n\r\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"void pramitiTechTutorials() {\n\t\n}",
"public void ganar() {\n // TODO implement here\n }",
"@Override\r... | [
"0.6385292",
"0.62825674",
"0.6094859",
"0.59705144",
"0.59174407",
"0.5879631",
"0.58751583",
"0.58699447",
"0.5869017",
"0.58553624",
"0.5826625",
"0.5825323",
"0.58233553",
"0.577183",
"0.576982",
"0.5769503",
"0.57691693",
"0.5748044",
"0.57379705",
"0.573767",
"0.5728572... | 0.0 | -1 |
Constructor with Perioikoi characteristics | public RacerPerioikoi(String Name) {
energy = 130;
position = 0;
name = "p_" + Name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PupilInfo() {\n }",
"public PIInfo() {\n }",
"public Potencial() {\r\n }",
"public Pitonyak_09_02() {\r\n }",
"public Ov_Chipkaart() {\n\t\t\n\t}",
"public Plato(){\n\t\t\n\t}",
"Petunia() {\r\n\t\t}",
"public Produto() {}",
"public Perro() {\n// super(\"No define\", \... | [
"0.6893493",
"0.6856713",
"0.68001866",
"0.66415143",
"0.6640805",
"0.66251177",
"0.661364",
"0.65658295",
"0.65485597",
"0.6424982",
"0.63841957",
"0.63312876",
"0.6314962",
"0.63120866",
"0.63119847",
"0.6298655",
"0.6280069",
"0.62732065",
"0.6269715",
"0.62639683",
"0.624... | 0.5839057 | 90 |
/ Ukladani cesta, ucastniku a rezervaci je nutne provest v NativeQuery, protoze je v Query potreba udelat Cast( id AS uuid) a ukladat kazde zvlast (cestu, rezervace a ucastniky) | public boolean saveCesta(Cesta cesta) {
Query q = em.createNativeQuery(cesta.isNewEntity() ? insCesta : updCesta)
.setParameter(1, cesta.getIdtypzdr().getId())
.setParameter(2, cesta.getIdoso().getId())
.setParameter(3, cesta.getKomentar())
.setParameter(4, cesta.getZaloha())
.setParameter(5, cesta.getPopis())
.setParameter(6, cesta.getPlatiod())
.setParameter(7, cesta.getPlatido())
.setParameter(8, cesta.getId());
if (cesta.isDelEntity()) {
q = em.createNativeQuery(delCesta)
.setParameter(1, cesta.getId());
}
// em.getTransaction().begin();
q.setFlushMode(FlushModeType.COMMIT);
try {
q.executeUpdate();
} catch (Exception e) {
// em.getTransaction().rollback();
throw e;
}
// em.getTransaction().commit();
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Prueba selectByPrimaryKey(Integer id);",
"BaseReturn selectByPrimaryKey(String guid);",
"NjProductTaticsRelation selectByPrimaryKey(String id);",
"IceApp selectByPrimaryKey(Long id);",
"Abum selectByPrimaryKey(String id);",
"Disease selectByPrimaryKey(Integer id);",
"Tourst selectByPrimaryKey(String id... | [
"0.6315276",
"0.62623096",
"0.61830103",
"0.60819876",
"0.60771465",
"0.6075895",
"0.606385",
"0.60382026",
"0.6010913",
"0.60103375",
"0.5978368",
"0.59621227",
"0.5961249",
"0.5925441",
"0.59079975",
"0.5893492",
"0.58802164",
"0.58701855",
"0.58687127",
"0.58615255",
"0.58... | 0.0 | -1 |
Deserialize from a String to type T | static public Value deserialize(IMessage message, String propertyName, String format) throws AnzoException {
Value object = null;
if (message.hasProperty(SerializationConstants.object) && message.hasProperty(SerializationConstants.objectType)) {
String objectValue = message.getProperty(SerializationConstants.object);
String objectType = message.getProperty(SerializationConstants.objectType);
NodeType nodeType = null;
if (objectType.equals(SerializationConstants.literal)) {
nodeType = NodeType.LITERAL;
} else if (objectType.equals(SerializationConstants.bnode)) {
nodeType = NodeType.BNODE;
} else if (objectType.equals(SerializationConstants.uri)) {
nodeType = NodeType.URI;
} else {
nodeType = NodeType.valueOf(objectType);
}
if (nodeType != null) {
switch (nodeType) {
case URI:
object = Constants.valueFactory.createURI(objectValue);
break;
case BNODE:
object = Constants.valueFactory.createBNode(objectValue);
break;
case LITERAL: {
String dataType = message.getProperty(SerializationConstants.dataType);
String lang = message.getProperty(SerializationConstants.language);
if (dataType != null) {
URI datatype = Constants.valueFactory.createURI(dataType);
object = Constants.valueFactory.createLiteral(objectValue, datatype);
} else if (lang != null) {
object = Constants.valueFactory.createLiteral(objectValue, lang);
} else {
object = Constants.valueFactory.createLiteral(objectValue);
}
}
break;
case ANY:
object = Constants.ANY_URI;
break;
}
}
}
return object;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract T deserialize(String serial);",
"public T parse(String value);",
"protected <T> T deserialize(final String value, final Class<T> type) throws JsonDeserializationException {\n return json.deserialize(value, type);\n }",
"<T> T fromJson(String source, JavaType type);",
"<T> T fromJs... | [
"0.7449197",
"0.73120606",
"0.70888895",
"0.7057374",
"0.70067847",
"0.6984349",
"0.69200087",
"0.683671",
"0.68326396",
"0.6817315",
"0.68086356",
"0.67677456",
"0.6767478",
"0.67613417",
"0.67018455",
"0.66717464",
"0.66191036",
"0.659015",
"0.65522546",
"0.6530688",
"0.652... | 0.0 | -1 |
Serialize the given object to a String | static public void serialize(Value value, String propertyName, String format, IMessage message) throws AnzoException {
if (value instanceof Literal) {
Literal literal = (Literal) value;
String objectString = literal.getLabel();
message.setProperty(SerializationConstants.objectType, NodeType.LITERAL.name());
if (literal instanceof TypedLiteral) {
URI dt = ((TypedLiteral) literal).getDatatypeURI();
message.setProperty(SerializationConstants.dataType, dt.toString());
} else if (literal instanceof PlainLiteral) {
message.setProperty(SerializationConstants.language, ((PlainLiteral) literal).getLanguage());
}
message.setProperty(SerializationConstants.object, objectString);
} else if (value instanceof URI) {
message.setProperty(SerializationConstants.objectType, NodeType.URI.name());
message.setProperty(SerializationConstants.object, value.toString());
} else if (value instanceof BlankNode) {
message.setProperty(SerializationConstants.objectType, NodeType.BNODE.name());
message.setProperty(SerializationConstants.object, ((BlankNode) value).getLabel());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String serialize(Object object) {\n\t\treturn serialize(object, false);\n\t}",
"public String serialize(final Object object)\n {\n StringBuffer buffer;\n\n buffer = new StringBuffer();\n serializeObject(object, buffer);\n return buffer.toString();\n }",
"String serializ... | [
"0.8056728",
"0.80264974",
"0.76140404",
"0.7432771",
"0.7263368",
"0.7166537",
"0.71011376",
"0.7052651",
"0.7052651",
"0.70358664",
"0.70216787",
"0.70104796",
"0.69297284",
"0.6927275",
"0.6921425",
"0.69176364",
"0.690804",
"0.6887324",
"0.688565",
"0.688136",
"0.6864011"... | 0.0 | -1 |
/This method add because XL plugin returns invalid response if send a request with resourceURL | private String removeResourceURL(String sbSubsrequst) {
String sbrequestString = "";
try {
JSONObject objJSONObject = new JSONObject(sbSubsrequst);
JSONObject objSubscriptionRequest = (JSONObject) objJSONObject.get("subscription");
objSubscriptionRequest.remove("resourceURL");
sbrequestString = objSubscriptionRequest.toString();
} catch (JSONException ex) {
log.error("Error in removeResourceURL" + ex.getMessage());
throw new AxiataException("POL0299", "", new String[]{"Error registering subscription"});
}
return "{\"subscription\":" + sbrequestString + "}";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n \tpublic Representation getResource() throws Exception {\n \t\tJsonRepresentation result = null;\n \t\t// Rcupre l'identifiant unique de la ressource demande.\n \t\tString interId = (String) this.getRequestAttributes().get(\"interId\");\n \t\tString srcId = (String) this.getRequestAttributes().get(\"so... | [
"0.5726133",
"0.56924945",
"0.5670918",
"0.554941",
"0.55397415",
"0.5535336",
"0.5413999",
"0.5396593",
"0.539412",
"0.5384585",
"0.53629726",
"0.53623945",
"0.5341038",
"0.5332842",
"0.5332842",
"0.5330782",
"0.53209233",
"0.5308809",
"0.5300578",
"0.5292497",
"0.5285452",
... | 0.0 | -1 |
TODO Configurar permitAll login | @Override
public void configure(WebSecurity web) throws Exception {
web.ignoring().antMatchers("/login");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void login() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void login() {\n\t\t\r\n\t}",
"@Override\n\tprotected void login() {\n\t\tsuper.login();\n\t}",
"@Override\r\n\tpublic void login() {\n\r\n\t}",
"protected Response login() {\n return login(\"\");\n }",
"@Override\n\tpublic void log... | [
"0.7726833",
"0.740716",
"0.7233943",
"0.72248375",
"0.70969844",
"0.7087482",
"0.6881382",
"0.67990047",
"0.6788501",
"0.67826366",
"0.676068",
"0.6760346",
"0.6727952",
"0.67247033",
"0.669435",
"0.6662347",
"0.6661963",
"0.66391855",
"0.663903",
"0.6618325",
"0.6614409",
... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Double operate(List<DataPoint<Short>> data) throws Exception {
Double max = Double.MIN_VALUE;
for (DataPoint<Short> point : data) {
if (max.doubleValue() < point.getValue().doubleValue()) {
max = point.getValue().doubleValue();
}
}
return max;
} | {
"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 thread communicates with UI thread | public void startProgress(View view) {
new Thread(()->{
// reset (UI communication)
progress.post(() -> progress.setProgress(0));
// work
for (int i = 0; i <= 10; i++) {
final int value = i;
doSomething();
// (UI communication)
progress.post(() -> {
text.setText("Updating");
progress.setProgress(value);
});
}
// end work (UI communication)
progress.post(()->{
text.setText("Finish");
});
}).start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tupdateUI();\n\t\t\t\t\t\t}",
"@Override\n public void run() {\n Message uiMSG;\n //Create message with only SHOW_ORIGINAL_COLOR argument\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(Bidire... | [
"0.73859054",
"0.71071064",
"0.67354834",
"0.6582462",
"0.6582462",
"0.6570716",
"0.6570716",
"0.6570716",
"0.6570716",
"0.6570716",
"0.6570716",
"0.6570716",
"0.6559028",
"0.6559028",
"0.65534633",
"0.6519768",
"0.6519768",
"0.6519768",
"0.649131",
"0.649131",
"0.64742166",
... | 0.0 | -1 |
This is the interface of the Animation controller. Classes that implement this interface only need the method start to start the actual animation. | public interface IAnimationController {
/**
* This method should start the animation using the provided model.
*/
void start();
/**
* Retrieve the log from this controller.
*
* @return The log of this controller
* @throws UnsupportedOperationException Throws exception if the controller does not support the
* functionality
*/
Appendable getLog();
/**
* Retrieve the timer from this controller.
* @return The timer of this controller
* @throws UnsupportedOperationException Throws exception if the controller does not support the
* functionality
*/
Timer getTimer();
/**
* Retrieves the tempo of the controller.
* @return tempo used by controller
* @throws UnsupportedOperationException Throws exception if the controller does not support the
* functionality
*/
double getTempo();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void animationStarted();",
"void startAnimation();",
"@Override\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t... | [
"0.8004375",
"0.76988006",
"0.7487487",
"0.74449694",
"0.74094427",
"0.74094427",
"0.73913693",
"0.73787534",
"0.7357084",
"0.7357084",
"0.73347354",
"0.7326503",
"0.7326503",
"0.7283848",
"0.72787195",
"0.7264036",
"0.7252339",
"0.72493833",
"0.72491604",
"0.72441214",
"0.72... | 0.7895126 | 1 |
This method should start the animation using the provided model. | void start(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void run() {\n runAnimation();\n }",
"public void startAnimation() {\r\n\t\tani.start();\r\n\t}",
"public void startAnimation() {\n animationStart = System.currentTimeMillis();\n }",
"public void start()\n {\n animator = new Thread(this);\n animator.... | [
"0.64948094",
"0.6477881",
"0.64769834",
"0.64537907",
"0.64366436",
"0.6292485",
"0.6219309",
"0.621752",
"0.6196282",
"0.6161403",
"0.6153686",
"0.6153686",
"0.61461556",
"0.6141447",
"0.6125003",
"0.61243474",
"0.60896665",
"0.6067338",
"0.6066941",
"0.60657024",
"0.606098... | 0.0 | -1 |
Retrieve the log from this controller. | Appendable getLog(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Log getLog() {\n if (controller != null) {\n log = controller.getLog();\n } \n return log ;\n }",
"public LogController logController() {\r\n\t\treturn logsController;\r\n\t}",
"public Log getLog() {\r\n return this.delegate.getLog();\r\n }",
"@Override\r\... | [
"0.8341043",
"0.75033784",
"0.73958385",
"0.7393058",
"0.7343055",
"0.73216987",
"0.7318181",
"0.72738516",
"0.71591353",
"0.70670396",
"0.69537175",
"0.69068664",
"0.6809527",
"0.67469454",
"0.67427427",
"0.6705944",
"0.6701093",
"0.6690817",
"0.66300505",
"0.65594065",
"0.6... | 0.6011169 | 44 |
Retrieve the timer from this controller. | Timer getTimer(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getTimer() {\n return timer;\n }",
"public Timer getTimer(){\n\t\treturn timer;\n\t}",
"public String getTimer() {\n return timer;\n }",
"public Timer getTimer() {\r\n\t\treturn timer;\r\n\t}",
"public GameTimer getTimer()\n {\n return timer;\n }",
"public long getTime... | [
"0.77982223",
"0.76266634",
"0.75992507",
"0.7554626",
"0.72076017",
"0.7111636",
"0.7049568",
"0.6860736",
"0.6805039",
"0.6685228",
"0.66711545",
"0.66102886",
"0.65589505",
"0.6485921",
"0.6437331",
"0.62952787",
"0.6275087",
"0.6246388",
"0.6149935",
"0.61064273",
"0.6096... | 0.68579715 | 8 |
Retrieves the tempo of the controller. | double getTempo(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public int getTempo() {\n return tempo;\n }",
"public int getTempoSec() {\n return tempoSec;\n }",
"public Integer getTempo() {\n return this.tempoSpeed;\n }",
"public int getTempoMili() {\n return tempoMili;\n }",
"public int getTempoPatrulha() {\n ... | [
"0.73628014",
"0.70345557",
"0.6934478",
"0.67887115",
"0.6679283",
"0.6122135",
"0.6025831",
"0.5861611",
"0.58437526",
"0.583234",
"0.576643",
"0.5651979",
"0.55783826",
"0.55398345",
"0.5510775",
"0.54529274",
"0.5444472",
"0.5429373",
"0.54256636",
"0.5418867",
"0.5411733... | 0.5585393 | 12 |
Creates a id token for the implicit grant flow, "token id_token". | public String makeForAccessToken(String plainTextAccessToken, String nonce, TokenClaims tokenClaims, ResourceOwner resourceOwner, List<String> scopesForIdToken) throws ProfileNotFoundException, KeyNotFoundException, IdTokenException {
Profile profile = null;
try {
profile = profileRepository.getByResourceOwnerId(resourceOwner.getId());
} catch (RecordNotFoundException e) {
throw new ProfileNotFoundException(PROFILE_ERROR_MESSAGE, e);
}
resourceOwner.setProfile(profile);
String accessTokenHash = makeAccessTokenHash.makeEncodedHash(plainTextAccessToken);
IdToken idToken = idTokenFactory.make(accessTokenHash, nonce, tokenClaims, scopesForIdToken, resourceOwner);
RSAPrivateKey key = null;
try {
key = rsaPrivateKeyRepository.getMostRecentAndActiveForSigning();
} catch (RecordNotFoundException e) {
throw new KeyNotFoundException(KEY_ERROR_MESSAGE, e);
}
RSAKeyPair rsaKeyPair = privateKeyTranslator.from(key);
String encodedJwt = translateIdTokenToEncodedJwt(rsaKeyPair, idToken);
return encodedJwt;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void createIdTokenForRefreshRequest() {\n\t\tgenerateIdTokenClaims();\n\n\t\taddAtHashToIdToken();\n\n\t\taddCustomValuesToIdTokenForRefreshResponse();\n\n\t\tsignIdToken();\n\n\t\tcustomizeIdTokenSignatureForRefreshResponse();\n\n\t\tencryptIdTokenIfNecessary();\n\t}",
"public void setIDToken(JWT toke... | [
"0.65057385",
"0.6317582",
"0.62407684",
"0.6197416",
"0.61579883",
"0.61211425",
"0.60591453",
"0.60436386",
"0.5988759",
"0.5984682",
"0.59773713",
"0.59713954",
"0.5964617",
"0.59338623",
"0.592444",
"0.5880427",
"0.5839131",
"0.58275753",
"0.5825946",
"0.58226293",
"0.582... | 0.53354794 | 50 |
Creates a id token for the implicit grant flow, "id_token". | public String makeIdentityOnly(String nonce, TokenClaims tokenClaim, ResourceOwner resourceOwner, List<String> scopes) throws ProfileNotFoundException, KeyNotFoundException, IdTokenException {
Profile profile = null;
try {
profile = profileRepository.getByResourceOwnerId(resourceOwner.getId());
} catch (RecordNotFoundException e) {
throw new ProfileNotFoundException(PROFILE_ERROR_MESSAGE, e);
}
resourceOwner.setProfile(profile);
IdToken idToken = idTokenFactory.make(nonce, tokenClaim, scopes, resourceOwner);
RSAPrivateKey key = null;
try {
key = rsaPrivateKeyRepository.getMostRecentAndActiveForSigning();
} catch (RecordNotFoundException e) {
throw new KeyNotFoundException(KEY_ERROR_MESSAGE, e);
}
RSAKeyPair rsaKeyPair = privateKeyTranslator.from(key);
String encodedJwt = translateIdTokenToEncodedJwt(rsaKeyPair, idToken);
return encodedJwt;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void createIdTokenForRefreshRequest() {\n\t\tgenerateIdTokenClaims();\n\n\t\taddAtHashToIdToken();\n\n\t\taddCustomValuesToIdTokenForRefreshResponse();\n\n\t\tsignIdToken();\n\n\t\tcustomizeIdTokenSignatureForRefreshResponse();\n\n\t\tencryptIdTokenIfNecessary();\n\t}",
"public void setIDToken(JWT toke... | [
"0.66588587",
"0.6124303",
"0.60674465",
"0.600977",
"0.59960467",
"0.59940714",
"0.59799606",
"0.5960739",
"0.5910168",
"0.588543",
"0.5881722",
"0.58761394",
"0.5824039",
"0.58055526",
"0.57706076",
"0.57337904",
"0.57229984",
"0.56663305",
"0.56126314",
"0.56089693",
"0.56... | 0.48320845 | 77 |
Converts GameLogic style coordinates to Swing style ones | private int convertX(double x)
{
return (int)Math.round(x);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static Vector2f toGuiCoords(float x, float y) {\r\n\t\treturn(new Vector2f((x/DisplayManager.getWidth()) - 0.5f, y/DisplayManager.getHeight()));\r\n\t}",
"public String getGVCoordsForLabel() {\n StringBuilder coordsBuilder = new StringBuilder();\n\n coordsBuilder.append(\"X\");\n\n i... | [
"0.5712611",
"0.53831613",
"0.5377126",
"0.52356213",
"0.5210643",
"0.51897943",
"0.5185381",
"0.51634943",
"0.5156019",
"0.51547253",
"0.5139665",
"0.5138402",
"0.5083072",
"0.50503993",
"0.5047257",
"0.5020602",
"0.50035876",
"0.49971187",
"0.49780867",
"0.49618223",
"0.491... | 0.0 | -1 |
Reads an input stream and parses out the headers. Can be used for both request and response streams. Reads the newline also. Returns the number of headers present or 1 if more than iNumElements headers are present. | static int readHeaders(InputStream stream, String [] aHeaders) throws IOException
{
boolean bEmptyLine = false;
int iIndex;
int iNumElements = aHeaders.length;
for(iIndex=0; !bEmptyLine && (iIndex <= iNumElements); iIndex+=2)
{
String sThisLine = readLine(stream).trim();
int iLength = sThisLine.length();
if (iLength == 0)
{
bEmptyLine = true;
}
else
{
int iSeparator = sThisLine.indexOf(":");
if (-1 != iSeparator)
{
aHeaders[iIndex] = sThisLine.substring(0, iSeparator).trim();
aHeaders[iIndex+1] = sThisLine.substring(iSeparator+1).trim();
//System.out.println("Read: " + aHeaders[iIndex] + ": " + aHeaders[iIndex+1]);
}
else
{
// I couldn't make out anything
aHeaders[iIndex] = sThisLine;
aHeaders[iIndex+1] = null;
//System.out.println("Read-: " + aHeaders[iIndex]);
}
}
}
return (iIndex > iNumElements) ? -1 : iIndex;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getSizeOfHeaders()\n throws IOException, EndOfStreamException\n {\n return peFile_.readUInt32(relpos(Offsets.SIZE_OF_HEADERS.position));\n }",
"public int size()\r\n/* 376: */ {\r\n/* 377:548 */ return this.headers.size();\r\n/* 378: */ }",
"protected int readNumRecordsHeader(... | [
"0.6223053",
"0.60395986",
"0.59335655",
"0.59302086",
"0.57054037",
"0.56668913",
"0.5592965",
"0.5502971",
"0.5498882",
"0.5383704",
"0.5345215",
"0.5330102",
"0.529409",
"0.52613765",
"0.5259882",
"0.5250236",
"0.5226497",
"0.5208043",
"0.5188191",
"0.51744425",
"0.5085633... | 0.680592 | 0 |
Writes the headers back into the output stream. Can be used for both request and response streams. Writes the newline also. | static void writeHeaders(OutputStream stream, String [] aHeaders) throws IOException
{
int iIndex;
int iNumElements = aHeaders.length;
for(iIndex=0; iIndex<iNumElements; iIndex+=2)
{
if (null != aHeaders[iIndex+1])
{
stream.write((aHeaders[iIndex]+": "+aHeaders[iIndex+1]+"\n").getBytes());
//System.out.println("Wrote: " + aHeaders[iIndex] + ": " + aHeaders[iIndex+1]);
}
else if (null != aHeaders[iIndex])
{
// Header format was not what we expected. Just in case. :)
stream.write((aHeaders[iIndex]+"\n").getBytes());
//System.out.println("Wrote-: " + aHeaders[iIndex]);
}
}
stream.write("\n".getBytes());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void writeHeader(PrintWriter out, RequestProperties reqState)\n throws IOException\n {\n out.write(this.getPageHeader());\n }",
"protected void finish() {\n writerServerTimingHeader();\n\n try {\n\n // maybe nobody ever call getOutputStream() or getWriter()\n if (buffer... | [
"0.63005835",
"0.6285108",
"0.6142576",
"0.6042768",
"0.60323495",
"0.5956515",
"0.593498",
"0.5918186",
"0.5873011",
"0.5834187",
"0.5812416",
"0.57472104",
"0.5708623",
"0.5696751",
"0.5668616",
"0.5637666",
"0.55765986",
"0.55472285",
"0.55328536",
"0.549888",
"0.5493905",... | 0.57896924 | 11 |
Encapsulates table information for an SQL Resource. | public interface TableMetaData {
/** Adds normal column. */
public void addColumn(final ColumnMetaData column);
/** Adds primary key column. */
public void addPrimaryKey(final ColumnMetaData column);
/** Returns map of column meta data, keyed by the column label (the alias if provided in the query, otherwise the name). */
public Map<String, ColumnMetaData> getColumns();
/** Returns database name. */
public String getDatabaseName();
/** Returns ordered list of columns that are primary keys. */
public List<ColumnMetaData> getPrimaryKeys();
/**
* Returns fully qualified table name in database-specific form for use in SQL statements. MySQL uses the form
* <code>database.table</code>, for example <code>sakila.film</code>. PostgreSQL uses the form
* <code>database.schema.table</code>, for example <code>sakila.public.film</code>.
*/
public String getQualifiedTableName();
/** Returns row alias. */
public String getRowAlias();
/** Returns row set alias. */
public String getRowSetAlias();
/**
* Returns row alias.
*
* @deprecated As of 0.8.11 use {@link #getRowAlias()}
*/
@Deprecated
public String getTableAlias();
/** Returns table name. */
public String getTableName();
/** Returns role of table in the SQL Resource. */
public TableRole getTableRole();
/** Returns true if the SQL Resource role is child. */
public boolean isChild();
/** Returns true if the SQL Resource role is parent. */
public boolean isParent();
/** Sets all the row and row set aliases. */
public void setAliases(final String alias, final String rowAlias, final String rowSetAlias);
/** Sets attributes. */
public void setAttributes(final String tableName, final String qualifedTableName,
final String databaseName, final TableRole tableRole);
/**
* Sets table alias.
*
* @deprecated As of 0.8.11 use {@link #setAliases(String, String, String)}
*/
@Deprecated
public void setTableAlias(final String tableAlias);
/** Represents all of the roles a table may plan in a SQL Resource. */
@XmlType(namespace = "http://restsql.org/schema")
public enum TableRole {
Child, ChildExtension, Join, Parent, ParentExtension, Unknown;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface SqlResourceMetaData {\r\n\r\n\tpublic List<ColumnMetaData> getAllReadColumns();\r\n\r\n\tpublic TableMetaData getChild();\r\n\r\n\tpublic List<TableMetaData> getChildPlusExtTables();\r\n\r\n\tpublic List<ColumnMetaData> getChildReadColumns();\r\n\r\n\tpublic TableMetaData getJoin();\r\n\r\n\tpubli... | [
"0.6682602",
"0.61893404",
"0.61077416",
"0.60970926",
"0.6093327",
"0.6034784",
"0.6029524",
"0.601493",
"0.6001318",
"0.59679234",
"0.59430915",
"0.591383",
"0.59092313",
"0.5867504",
"0.5836713",
"0.581921",
"0.58114475",
"0.5789007",
"0.57810485",
"0.5756185",
"0.57507575... | 0.62221926 | 1 |
Adds primary key column. | public void addPrimaryKey(final ColumnMetaData column); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addColumnSectionId() {\n addColumnInPrimarySection(ColumnMetaData.KEY_SECTION_ID);\n }",
"private void addColumnInPrimarySection(String key) {\n _queryBuilder.addColumn(key);\n _queryBuilder.addJoin(FilterMetaData.KEY_OUTER_JOIN_PATH_SECTION);\n _queryBuilder.addTable(TableMetaData.KEY_T... | [
"0.7135759",
"0.6876519",
"0.65806943",
"0.6420725",
"0.64117026",
"0.63916034",
"0.6351882",
"0.6330828",
"0.62027264",
"0.62027264",
"0.62027264",
"0.61950684",
"0.61661905",
"0.6161767",
"0.6139841",
"0.6131557",
"0.6105344",
"0.6075985",
"0.6044897",
"0.60101336",
"0.5988... | 0.77336526 | 0 |
Returns map of column meta data, keyed by the column label (the alias if provided in the query, otherwise the name). | public Map<String, ColumnMetaData> getColumns(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static Map<String, ColumnMetaData> buildColumnMetadataMap(ResultSet rs) {\n\t\t/*\n\t\t * LinkedHashmap to preserve key traversal order.\n\t\t * Important as we output rows as arrays of values where the index position in\n\t\t * the row implicitly corresponds to the entry order of the column map.\n\t\t * R... | [
"0.6709194",
"0.6432497",
"0.6046875",
"0.5999884",
"0.5690163",
"0.56796694",
"0.56164396",
"0.56164396",
"0.5608359",
"0.55256265",
"0.5520144",
"0.5495561",
"0.5481701",
"0.548042",
"0.5480231",
"0.5420396",
"0.5420206",
"0.5413591",
"0.5409058",
"0.53592145",
"0.5355281",... | 0.7018412 | 0 |
Returns ordered list of columns that are primary keys. | public List<ColumnMetaData> getPrimaryKeys(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private List<String> getPrimaryKeys(Table table) {\n\t\tlog.debug(\"getPrimaryKeys\");\n\t\tList<String> primaryKeyList = new ArrayList<String>();\n\n\t\tfor (Index index : table.getIndexes()) {\n\t\t\tfor (Index.Column column : index.getColumns()) {\n\t\t\t\tif (index.isPrimaryKey()) {\n\t\t\t\t\tprimaryKeyList.a... | [
"0.7575131",
"0.7156306",
"0.70644057",
"0.7015962",
"0.68073404",
"0.6799579",
"0.6697707",
"0.65949476",
"0.6590956",
"0.63356405",
"0.63202995",
"0.62994015",
"0.6286544",
"0.61292875",
"0.60831755",
"0.60748875",
"0.60532737",
"0.6035922",
"0.5994561",
"0.596425",
"0.5961... | 0.8295513 | 0 |
Returns fully qualified table name in databasespecific form for use in SQL statements. MySQL uses the form database.table, for example sakila.film. PostgreSQL uses the form database.schema.table, for example sakila.public.film. | public String getQualifiedTableName(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getDBTableName()\n\t{\n\t\treturn this.getClass().getSimpleName();\n\t}",
"String getTableName(String name);",
"public abstract String getDatabaseTableName(String entityName);",
"String getTableName();",
"public TableName name();",
"public String getTableName() throws DatabaseSchemaExceptio... | [
"0.733163",
"0.7228009",
"0.7197368",
"0.7176118",
"0.7155936",
"0.7090864",
"0.7028249",
"0.6929106",
"0.6913159",
"0.6872727",
"0.6860174",
"0.6857969",
"0.68251604",
"0.6785306",
"0.6758219",
"0.67367333",
"0.6725035",
"0.67110705",
"0.6710146",
"0.6634766",
"0.662158",
... | 0.7017525 | 7 |
Returns row set alias. | public String getRowSetAlias(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setAliases(final String alias, final String rowAlias, final String rowSetAlias);",
"default String getAliasPrefix() {\n\t\treturn getDataSet() + \"_\";\n\t}",
"@Override\n\tpublic String alias() {\n\t\treturn toString();\n\t}",
"protected String[] getResultRowAliases() {\n \t\t return null;\n \t}... | [
"0.6583654",
"0.6547864",
"0.6506128",
"0.6427272",
"0.6396598",
"0.6396598",
"0.63831824",
"0.63693345",
"0.63573223",
"0.63279825",
"0.6325737",
"0.6290364",
"0.62764436",
"0.62583315",
"0.62583315",
"0.61380816",
"0.6047179",
"0.5909338",
"0.5829347",
"0.5813283",
"0.58092... | 0.8152409 | 0 |
Returns role of table in the SQL Resource. | public TableRole getTableRole(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getRole();",
"String getRole();",
"SecurityRole getRole();",
"public Role getRoleById(int id);",
"SysRole selectByPrimaryKey(String id);",
"public SecRole getRoleById(Long role_Id);",
"private static String setRoleFromDatabase () {\n String sqlRetrieveUserRole = \"SELECT user_role.role FR... | [
"0.6981815",
"0.6981815",
"0.6661668",
"0.6579119",
"0.65483",
"0.6534097",
"0.64675665",
"0.64605457",
"0.6454507",
"0.6453892",
"0.6441838",
"0.64329636",
"0.6424687",
"0.64129454",
"0.64039826",
"0.63880914",
"0.6384087",
"0.6381948",
"0.63783044",
"0.6361187",
"0.6352834"... | 0.83370435 | 0 |
Returns true if the SQL Resource role is child. | public boolean isChild(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isChild(){\n return child;\n }",
"public boolean isChild(){\n return child;\n }",
"public boolean isChild() {\n\t\treturn false;\n\t}",
"public Boolean getIsChild() {\n return isChild;\n }",
"public boolean isChild(){\n return false;\n }",
"private boolean _hasC... | [
"0.69894123",
"0.69894123",
"0.68345785",
"0.65776074",
"0.65353215",
"0.64930624",
"0.6463666",
"0.6379309",
"0.63502336",
"0.63277555",
"0.62141645",
"0.6184723",
"0.61718404",
"0.6117596",
"0.6117596",
"0.60646236",
"0.6056435",
"0.6055076",
"0.60386723",
"0.60349536",
"0.... | 0.73198277 | 0 |
Returns true if the SQL Resource role is parent. | public boolean isParent(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean hasParent() {\r\n if (parent == null) \r\n return false;\r\n \r\n return true;\r\n }",
"public boolean hasParent() {\n return getParent() != null;\n }",
"protected boolean parentExists() {\n\n\t\tIRodinElement parentElement = getParent();\n\t\tif (parentElem... | [
"0.7173403",
"0.7036572",
"0.6918988",
"0.68997633",
"0.68997633",
"0.6807312",
"0.6739498",
"0.6728869",
"0.6682387",
"0.6577689",
"0.6533349",
"0.6398198",
"0.63517064",
"0.63029075",
"0.6290591",
"0.62316984",
"0.62159604",
"0.6136408",
"0.61030185",
"0.6085307",
"0.607377... | 0.7385603 | 0 |
Sets all the row and row set aliases. | public void setAliases(final String alias, final String rowAlias, final String rowSetAlias); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected String[] getResultRowAliases() {\n \t\t return null;\n \t}",
"public void setAliases(Set<Object> aliases)\n {\n // WARNING: This code is hack for backwards compatiblity\n \n // Here we fixup the aliases to map JMX like ObjectNames to their canonical form\n // I've made it a p... | [
"0.5968627",
"0.5730943",
"0.5403937",
"0.5353661",
"0.5279806",
"0.5236053",
"0.5169476",
"0.51079005",
"0.5082059",
"0.50791454",
"0.49703676",
"0.49088538",
"0.48447907",
"0.48106897",
"0.4805402",
"0.47908065",
"0.47785673",
"0.47593918",
"0.47267473",
"0.47077277",
"0.47... | 0.77642894 | 0 |
TODO Autogenerated method stub | public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int num=sc.nextInt();
int count=0;
while(num>0)
{
if(num%2==0)
{
num/=2;
count++;
}
else
{
num-=1;
count++;
}
}
System.out.println(count);
} | {
"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 |
Contruct a new certificate panel | CertAllPanel(ConfigurationInfo model) {
super(model);
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
add(Box.createRigidArea(new java.awt.Dimension(1,5)));
// Create a main cert panel
JPanel certPanel = new JPanel();
certPanel.setLayout(new BorderLayout());
certPanel.setBorder(new EmptyBorder(0, 5, 0, 5));
// Create a JList and attach to certPanel
certList = new JList();
certList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
certPanel.add(new JScrollPane(certList), BorderLayout.CENTER);
// Create four button and attach ActionListener to them
removeButton = new JButton(mh.getMessage("remove_button"));
removeButton.setMnemonic(mh.getAcceleratorKey("remove_button"));
removeButton.addActionListener(this);
exportButton = new JButton(mh.getMessage("export_button"));
exportButton.setMnemonic(mh.getAcceleratorKey("export_button"));
exportButton.addActionListener(this);
importButton = new JButton(mh.getMessage("import_button"));
importButton.setMnemonic(mh.getAcceleratorKey("import_button"));
importButton.addActionListener(this);
viewCertButton = new JButton(mh.getMessage("details_button"));
viewCertButton.setMnemonic(mh.getAcceleratorKey("details_button"));
viewCertButton.addActionListener(this);
// Create a button panel and attach four buttons to it
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new FlowLayout(FlowLayout.CENTER));
// Add four buttons
buttonPanel.add(importButton);
buttonPanel.add(exportButton);
buttonPanel.add(removeButton);
buttonPanel.add(viewCertButton);
// Add buttons panel to certPanel
certPanel.add(buttonPanel, BorderLayout.SOUTH);
// Add certPanel to Main panel
add(certPanel);
// Call reset in ActivatorPanel, not here.
//reset();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CertificatePanel( )\n {\n initComponents();\n String icn_ok = \"/dimm/home/images/web_check.png\";\n String icn_empty = \"/dimm/home/images/ok_empty.png\";\n String icn_warn = \"/dimm/home/images/web_delete.png\";\n\n ok_icn = new ImageIcon(this.getClass().getResourc... | [
"0.65448505",
"0.6233972",
"0.6158134",
"0.6003697",
"0.5953247",
"0.59414506",
"0.5863459",
"0.58347243",
"0.58020043",
"0.5801281",
"0.5755153",
"0.57419723",
"0.5706531",
"0.5702628",
"0.5676787",
"0.5664823",
"0.56398916",
"0.563361",
"0.56187546",
"0.56169885",
"0.561208... | 0.61971027 | 2 |
Enable / Disable the UI depending on the number of outstanding certificates. Changed certificate from active set into inactive set if "Remove" button is clicked. Changed certificate from active set into inactive import set if "Import" button is clicked. | public void actionPerformed(ActionEvent e)
{
int i = certList.getSelectedIndex();
//if (i < 0)
// return;
// Changed the certificate from the active set into the
// inactive set. This is for removing the certificate from
// the store when the user clicks on Apply.
//
String alias = (String) certList.getSelectedValue();
if (e.getSource()==removeButton)
{
// Changed the certificate from the active set into the
// inactive set. This is for removing the certificate from
// the store when the user clicks on Apply.
//
if (getRadioPos() == mh.getMessage("SignedApplet_value"))
model.deactivateCertificate(alias);
else
model.deactivateHttpsCertificate(alias);
reset();
}
else if (e.getSource() == viewCertButton)
{
X509Certificate myCert = null;
if (getRadioPos() == mh.getMessage("SignedApplet_value"))
myCert = (X509Certificate) model.getCertificate(alias);
else if (getRadioPos() == mh.getMessage("SecureSite_value"))
myCert = (X509Certificate) model.getHttpsCertificate(alias);
else if (getRadioPos() == mh.getMessage("SignerCA_value"))
myCert = (X509Certificate) model.getRootCACertificate(alias);
else if (getRadioPos() == mh.getMessage("SecureSiteCA_value"))
myCert = (X509Certificate) model.getHttpsRootCACertificate(alias);
X509Certificate[] certs = new X509Certificate[] {myCert};
// Make sure the certificate has been stored or in the import HashMap.
if (certs.length > 0 && certs[0] instanceof X509Certificate)
{
CertificateDialog dialog = new CertificateDialog(this, certs, 0, certs.length);
dialog.DoModal();
}
else
{
// The certificate you are trying to view is still in Import HashMap
X509Certificate impCert = null;
if (getRadioPos() == mh.getMessage("SignedApplet_value"))
impCert = model.getImpCertificate(alias);
else
impCert = model.getImpHttpsCertificate(alias);
X509Certificate[] impCerts = new X509Certificate[] {impCert};
CertificateDialog impDialog = new CertificateDialog(this, impCerts, 0, impCerts.length);
impDialog.DoModal();
}
}
else if (e.getSource() == importButton)
{
// Popup FileChooser
JFileChooser jfc = new JFileChooser();
// Set filter for File Chooser Dialog Box
CertFileFilter impFilter = new CertFileFilter();
impFilter.addExtension("csr");
impFilter.addExtension("p12");
impFilter.setDescription("Certificate Files");
jfc.setFileFilter(impFilter);
jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);
jfc.setDialogType(JFileChooser.OPEN_DIALOG);
jfc.setMultiSelectionEnabled(false);
int result = jfc.showOpenDialog(this);
if (result == JFileChooser.APPROVE_OPTION)
{
File f = jfc.getSelectedFile();
if (f == null) return;
try
{
InputStream inStream = System.in;
inStream = new FileInputStream(f);
// Import certificate from file to deployment.certs
boolean impStatus = false;
impStatus = importCertificate(inStream);
// Check if it is belong to PKCS#12 format
if (!impStatus)
{
// Create another inputStream for PKCS#12 foramt
InputStream inP12Stream = System.in;
inP12Stream = new FileInputStream(f);
importPKCS12Certificate(inP12Stream);
}
}
catch(Throwable e2)
{
DialogFactory.showExceptionDialog(this, e2, getMessage("dialog.import.file.text"),
getMessage("dialog.import.error.caption"));
}
}
reset();
}
else if (e.getSource() == exportButton)
{
X509Certificate cert = null;
if (getRadioPos() == mh.getMessage("SignedApplet_value"))
cert = (X509Certificate) model.getCertificate(alias);
else if (getRadioPos() == mh.getMessage("SecureSite_value"))
cert = (X509Certificate) model.getHttpsCertificate(alias);
else if (getRadioPos() == mh.getMessage("SignerCA_value"))
cert = (X509Certificate) model.getRootCACertificate(alias);
else if (getRadioPos() == mh.getMessage("SecureSiteCA_value"))
cert = (X509Certificate) model.getHttpsRootCACertificate(alias);
// Make sure the certificate has been stored, if not, get from import table.
if (!(cert instanceof X509Certificate))
{
// The certificate you are trying to export is still in Import HashMap
if (getRadioPos() == mh.getMessage("SignedApplet_value"))
cert = model.getImpCertificate(alias);
else
cert = model.getImpHttpsCertificate(alias);
} //not saved certificate
if (cert != null)
{
// Popup FileChooser
JFileChooser jfc = new JFileChooser();
jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);
jfc.setDialogType(JFileChooser.SAVE_DIALOG);
jfc.setMultiSelectionEnabled(false);
int result = jfc.showSaveDialog(this);
if (result == JFileChooser.APPROVE_OPTION)
{
File f = jfc.getSelectedFile();
if (f == null) return;
PrintStream ps = null;
try {
ps = new PrintStream(new BufferedOutputStream(new FileOutputStream(f)));
exportCertificate(cert, ps);
}
catch(Throwable e2)
{
DialogFactory.showExceptionDialog(this, e2, getMessage("dialog.export.text"),
getMessage("dialog.export.error.caption"));
}
finally {
if (ps != null)
ps.close();
}
}
} // Cert not null
else {
DialogFactory.showErrorDialog(this, getMessage("dialog.export.text"), getMessage("dialog.export.error.caption"));
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void reset() {\n\n\tCollection certs = null;\n\n\tif ( getRadioPos() == mh.getMessage(\"SignedApplet_value\"))\n\t certs = model.getCertificateAliases();\n\telse if ( getRadioPos() == mh.getMessage(\"SecureSite_value\"))\n\t certs = model.getHttpsCertificateAliases();\n\telse if ( getRadioPos() == mh.getMessag... | [
"0.6289217",
"0.62233305",
"0.60601246",
"0.58855623",
"0.58055335",
"0.57866013",
"0.57212436",
"0.5693612",
"0.56648517",
"0.56227726",
"0.5550192",
"0.55340904",
"0.5507024",
"0.5485305",
"0.5481709",
"0.5471456",
"0.5460642",
"0.54602146",
"0.53962594",
"0.5393375",
"0.53... | 0.6228315 | 1 |
/ Export a certificate to a file | void exportCertificate(X509Certificate cert, PrintStream ps)
{
BASE64Encoder encoder = new BASE64Encoder();
ps.println(X509Factory.BEGIN_CERT);
try
{
encoder.encodeBuffer(cert.getEncoded(), ps);
}
catch (Throwable e)
{
Trace.printException(this, e);
}
ps.println(X509Factory.END_CERT);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void writeToPemFile(X509Certificate cert, File file) {\n try {\n\t writeToPemFile(PemType.CERTIFICATE, cert.getEncoded(), file);\n\t } catch (CertificateEncodingException e) {\n\t throw new RuntimeException(\"Failed to write certificatet PEM to [\"+file+\"]\", e);\n\t }\n }",
... | [
"0.66577",
"0.6589273",
"0.6550544",
"0.6463549",
"0.64368343",
"0.63012344",
"0.61411774",
"0.6068911",
"0.5880027",
"0.5824296",
"0.57016116",
"0.56509465",
"0.56211954",
"0.5615467",
"0.55816585",
"0.5546905",
"0.5511937",
"0.5446229",
"0.53518116",
"0.53410906",
"0.532776... | 0.71025014 | 0 |
/ Import a PKCS12 format certificate and adds it to the list of trusted certificates | void importPKCS12Certificate(InputStream is)
{
KeyStore myKeySto = null;
// passord
char[] password = null;
try
{
myKeySto = KeyStore.getInstance("PKCS12");
// Pop up password dialog box
Object dialogMsg = getMessage("dialog.password.text");
JPasswordField passwordField = new JPasswordField();
Object[] msgs = new Object[2];
msgs[0] = new JLabel(dialogMsg.toString());
msgs[1] = passwordField;
JButton okButton = new JButton(getMessage("dialog.password.okButton"));
JButton cancelButton = new JButton(getMessage("dialog.password.cancelButton"));
String title = getMessage("dialog.password.caption");
Object[] options = {okButton, cancelButton};
int selectValue = DialogFactory.showOptionDialog(this, msgs, title, options, options[0]);
// for security purpose, DO NOT put password into String. Reset password as soon as
// possible.
password = passwordField.getPassword();
// User click OK button
if (selectValue == 0)
{
// Load KeyStore based on the password
myKeySto.load(is,password);
// Get Alias list from KeyStore.
Enumeration aliasList = myKeySto.aliases();
while (aliasList.hasMoreElements())
{
X509Certificate cert = null;
// Get Certificate based on the alias name
String certAlias = (String)aliasList.nextElement();
cert = (X509Certificate)myKeySto.getCertificate(certAlias);
// Add to import list based on radio button selection
if (getRadioPos() == mh.getMessage("SignedApplet_value"))
model.deactivateImpCertificate(cert);
else if (getRadioPos() == mh.getMessage("SecureSite_value"))
model.deactivateImpHttpsCertificate(cert);
}
} // OK button
}
catch(Throwable e)
{
// Show up Error dialog box if the user enter wrong password
// Avoid to convert password array into String - security reason
String uninitializedValue = "uninitializedValue";
if (!compareCharArray(password, uninitializedValue.toCharArray()))
{
String errorMsg = getMessage("dialog.import.password.text");
String errorTitle = getMessage("dialog.import.error.caption");
DialogFactory.showExceptionDialog(this, e, errorMsg, errorTitle);
}
}
finally {
// Reset password
if(password != null) {
java.util.Arrays.fill(password, ' ');
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void importTrustedCertificate() {\n\t\t// Let the user choose a file containing trusted certificate(s) to\n\t\t// import\n\t\tFile certFile = selectImportExportFile(\n\t\t\t\t\"Certificate file to import from\", // title\n\t\t\t\tnew String[] { \".pem\", \".crt\", \".cer\", \".der\", \"p7\", \".p7c\" }, //... | [
"0.7431814",
"0.65008825",
"0.5785433",
"0.55872405",
"0.5566139",
"0.5558029",
"0.55123186",
"0.5444717",
"0.5384374",
"0.53658646",
"0.52694887",
"0.5259442",
"0.51346534",
"0.50651675",
"0.50598943",
"0.50508744",
"0.5037253",
"0.50252503",
"0.49726856",
"0.49654326",
"0.4... | 0.6399952 | 2 |
/ Import a certificate and adds it to the list of trusted certificates | boolean importCertificate(InputStream is)
{
CertificateFactory cf = null;
X509Certificate cert = null;
try
{
cf = CertificateFactory.getInstance("X.509");
cert = (X509Certificate)cf.generateCertificate(is);
// Changed the certificate from the active set into the
// inactive Import set. This is for import the certificate from
// the store when the user clicks on Apply.
//
if (getRadioPos() == mh.getMessage("SignedApplet_value"))
model.deactivateImpCertificate(cert);
else if (getRadioPos() == mh.getMessage("SecureSite_value"))
model.deactivateImpHttpsCertificate(cert);
}
catch (CertificateParsingException cpe)
{
// It is PKCS#12 format.
return false;
}
catch (CertificateException e)
{
// Wrong format of the selected file
DialogFactory.showExceptionDialog(this, e, getMessage("dialog.import.format.text"), getMessage("dialog.import.error.caption"));
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void importTrustedCertificate() {\n\t\t// Let the user choose a file containing trusted certificate(s) to\n\t\t// import\n\t\tFile certFile = selectImportExportFile(\n\t\t\t\t\"Certificate file to import from\", // title\n\t\t\t\tnew String[] { \".pem\", \".crt\", \".cer\", \".der\", \"p7\", \".p7c\" }, //... | [
"0.8213586",
"0.6666195",
"0.6494004",
"0.5982338",
"0.58541584",
"0.5831186",
"0.57563776",
"0.5642538",
"0.5642108",
"0.5562043",
"0.5550335",
"0.5534726",
"0.55246556",
"0.5505013",
"0.5488109",
"0.54175794",
"0.54021364",
"0.5357329",
"0.53322446",
"0.5330098",
"0.5328197... | 0.5637499 | 9 |
Refill the list box with the active set of certificates. Disable UI if necessary. | void reset() {
Collection certs = null;
if ( getRadioPos() == mh.getMessage("SignedApplet_value"))
certs = model.getCertificateAliases();
else if ( getRadioPos() == mh.getMessage("SecureSite_value"))
certs = model.getHttpsCertificateAliases();
else if ( getRadioPos() == mh.getMessage("SignerCA_value"))
certs = model.getRootCACertificateAliases();
else if ( getRadioPos() == mh.getMessage("SecureSiteCA_value"))
certs = model.getHttpsRootCACertAliases();
if (certs == null || certs.size() == 0)
{
certList.setListData(new String[0]);
}
else
{
// Construct a TreeSet object to sort the certificate list
TreeSet tsCerts = new TreeSet(certs);
// Fill up list box with the sorted certificates
certList.setListData(tsCerts.toArray());
}
// Make sure we do have content in certificate
boolean enable = (certs != null && certs.size() > 0);
// For Root CA and Web Sites, only enable View button
if (getRadioPos() == mh.getMessage("SignerCA_value") ||
getRadioPos() == mh.getMessage("SecureSiteCA_value"))
{
setEnabled(removeButton, false);
setEnabled(exportButton, false);
setEnabled(importButton, false);
setEnabled(viewCertButton, enable);
}
else
{
setEnabled(removeButton, enable);
setEnabled(exportButton, enable);
setEnabled(importButton, true);
setEnabled(viewCertButton, enable);
}
if (enable)
certList.setSelectedIndex(0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void actionPerformed(ActionEvent e) \n {\n\tint i = certList.getSelectedIndex();\n\t\n\t//if (i < 0)\n\t// return;\n\t \t \n\t// Changed the certificate from the active set into the \n\t// inactive set. This is for removing the certificate from\n\t// the store when the user clicks on Apply.\n\t/... | [
"0.5613114",
"0.5532334",
"0.5425503",
"0.5423346",
"0.5317017",
"0.52966535",
"0.5177169",
"0.51407945",
"0.5129922",
"0.5111883",
"0.51098603",
"0.50903666",
"0.5073621",
"0.5072042",
"0.50690097",
"0.50574636",
"0.50396156",
"0.50344783",
"0.5032964",
"0.50250626",
"0.5019... | 0.7100026 | 0 |
Method to get an internationalized string from the Activator resource. | private static String getMessage(String key)
{
return mh.getMessage(key);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getStringResource(LocaleResource resource){\n\t\tContext c = ConnectedApp.getContextStatic();\n\t\tswitch(resource){\t\t\n\t\tcase support_contact:\n default:\n\t\t\tint resId= c.getResources().getIdentifier(resource.toString()+\"_\"+ getCountryCode().toLowerCase(Locale.US), \"string\",\n\... | [
"0.6863709",
"0.6490844",
"0.6473137",
"0.63469887",
"0.62147135",
"0.6208301",
"0.6151637",
"0.60975623",
"0.6019481",
"0.59837204",
"0.5941062",
"0.58886814",
"0.58225954",
"0.5805758",
"0.57856554",
"0.5755984",
"0.5746685",
"0.57341206",
"0.57283807",
"0.5724656",
"0.5710... | 0.0 | -1 |
/ JADX WARNING: inconsistent code. / Code decompiled incorrectly, please refer to instructions dump. | public static void registerMultiWindowModeChangeListener(IMultiWindowModeChangeListener listener, boolean forceCallBackNow) {
if (listener != null) {
synchronized (sMultiWindowCallbackList) {
if (sMultiWindowCallbackList.containsKey(listener)) {
return;
}
sMultiWindowCallbackList.put(listener, null);
if (forceCallBackNow) {
listener.multiWindowModeChangeCallback(sIsInMultiWindowMode);
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }",
"protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }",
"protected void method_2247() {\r\n // $FF: Couldn't be decom... | [
"0.7616782",
"0.75728166",
"0.7525724",
"0.74507046",
"0.74505866",
"0.74373597",
"0.7381616",
"0.7381616",
"0.7366568",
"0.735341",
"0.73420185",
"0.73150736",
"0.7308675",
"0.73055106",
"0.7274724",
"0.72523946",
"0.72216254",
"0.71979403",
"0.7177258",
"0.7136552",
"0.7106... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method returns the value of the database column litemall_product.id | public Integer getId() {
return id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic long getId() {\n\t\treturn _buySellProducts.getId();\n\t}",
"public int getProduct_id() {\r\n\t\treturn product_id;\r\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _buySellProducts.getPrimaryKey();\n\t}",
"public int getProduct_id() {\n\t\treturn product_id;\n\t}",
"pub... | [
"0.65563875",
"0.61905545",
"0.6140056",
"0.6113106",
"0.60678613",
"0.60678613",
"0.6015304",
"0.6015304",
"0.5976537",
"0.59636015",
"0.59603643",
"0.59603643",
"0.59532416",
"0.59532416",
"0.59532416",
"0.59412706",
"0.5906991",
"0.5906991",
"0.5906991",
"0.5906991",
"0.59... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method sets the value of the database column litemall_product.id | public void setId(Integer id) {
this.id = id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void setId(long id) {\n\t\t_buySellProducts.setId(id);\n\t}",
"public void setM_Product_ID (int M_Product_ID);",
"public void setM_Product_ID (int M_Product_ID);",
"public void setProduct_id(int product_id) {\r\n\t\tthis.product_id = product_id;\r\n\t}",
"public void setProductId(String... | [
"0.658911",
"0.641044",
"0.641044",
"0.62606716",
"0.61077976",
"0.60848284",
"0.60848284",
"0.60296476",
"0.60296476",
"0.60251015",
"0.60251015",
"0.60251015",
"0.60251015",
"0.60251015",
"0.60251015",
"0.6021653",
"0.5964946",
"0.59598535",
"0.5894714",
"0.5867857",
"0.579... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method returns the value of the database column litemall_product.goods_id | public Integer getGoodsId() {
return goodsId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long getGoodsId() {\r\n return goodsId;\r\n }",
"public Long getGoodsId() {\n return goodsId;\n }",
"public void setGoodsId(Long goodsId) {\r\n this.goodsId = goodsId;\r\n }",
"public void setGoodsId(Long goodsId) {\n this.goodsId = goodsId;\n }",
"public Inte... | [
"0.7216342",
"0.7153695",
"0.6725177",
"0.6626215",
"0.6489492",
"0.6426349",
"0.6426349",
"0.6426349",
"0.6426349",
"0.6426349",
"0.6426349",
"0.6426349",
"0.6217699",
"0.6060628",
"0.60335207",
"0.60243",
"0.59794074",
"0.59697425",
"0.5963618",
"0.5862221",
"0.5812723",
... | 0.7061876 | 7 |
This method was generated by MyBatis Generator. This method sets the value of the database column litemall_product.goods_id | public void setGoodsId(Integer goodsId) {
this.goodsId = goodsId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setGoodsId(Long goodsId) {\r\n this.goodsId = goodsId;\r\n }",
"public void setGoodsId(Long goodsId) {\n this.goodsId = goodsId;\n }",
"public Long getGoodsId() {\r\n return goodsId;\r\n }",
"public Long getGoodsId() {\n return goodsId;\n }",
"public void... | [
"0.7407796",
"0.7294467",
"0.65610224",
"0.64671034",
"0.643639",
"0.6342213",
"0.6342213",
"0.6342213",
"0.6342213",
"0.6342213",
"0.6342213",
"0.6342213",
"0.61739683",
"0.6143839",
"0.5854748",
"0.5655072",
"0.56411207",
"0.56340796",
"0.5582433",
"0.5568419",
"0.5568419",... | 0.7155606 | 7 |
This method was generated by MyBatis Generator. This method returns the value of the database column litemall_product.name | public String getName() {
return name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getProductName(){\n return productRelation.getProductName();\n }",
"@Override\n\tpublic String getName() {\n\t\treturn product.getName();\n\t}",
"public String getName(){\n\t\treturn Name; // Return the product's name\n\t}",
"public String getProductName() {\r\n return productN... | [
"0.65933406",
"0.61414677",
"0.6092658",
"0.6025033",
"0.5995974",
"0.5988284",
"0.5988284",
"0.5988284",
"0.59752977",
"0.59182066",
"0.5916123",
"0.59125185",
"0.5880392",
"0.58586156",
"0.5741368",
"0.5715454",
"0.56171614",
"0.5613367",
"0.55900097",
"0.5529867",
"0.54933... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method sets the value of the database column litemall_product.name | public void setName(String name) {
this.name = name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setProductName(final String productName);",
"public void setProductName(String productName) {\r\n this.productName = productName;\r\n }",
"public void setProductName(String productName) {\n this.productName = productName;\n }",
"public void setProductName(String productName) {... | [
"0.65676856",
"0.63345146",
"0.6255273",
"0.6255273",
"0.6255273",
"0.6219819",
"0.61983234",
"0.6187719",
"0.61240304",
"0.6017015",
"0.6008417",
"0.5957536",
"0.584698",
"0.55686617",
"0.5554215",
"0.55104095",
"0.5509762",
"0.5505032",
"0.5500416",
"0.5499466",
"0.54922503... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method returns the value of the database column litemall_product.series_id | public Integer getSeriesId() {
return seriesId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSeriesId(Integer seriesId) {\n this.seriesId = seriesId;\n }",
"@Override\n\tpublic long getId() {\n\t\treturn _buySellProducts.getId();\n\t}",
"public long getSalesID() {\n return salesID;\n }",
"public Integer getSeriesCd() {\n\t\treturn seriesCd;\n\t}",
"public StrColu... | [
"0.6450189",
"0.58709425",
"0.55533653",
"0.5501384",
"0.54848886",
"0.54702157",
"0.5441752",
"0.5441752",
"0.5417638",
"0.54002595",
"0.54002595",
"0.5370949",
"0.5351849",
"0.5348168",
"0.5345095",
"0.5345095",
"0.5345095",
"0.5345095",
"0.5345095",
"0.5345095",
"0.5337968... | 0.72095156 | 0 |
This method was generated by MyBatis Generator. This method sets the value of the database column litemall_product.series_id | public void setSeriesId(Integer seriesId) {
this.seriesId = seriesId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer getSeriesId() {\n return seriesId;\n }",
"@Override\n\tpublic void setId(long id) {\n\t\t_buySellProducts.setId(id);\n\t}",
"public void setSeries(String series) {\n\t\tthis.series = series;\n\t}",
"public void setSeriesService(SeriesService seriesService) {\n this.seriesServi... | [
"0.6373728",
"0.5878918",
"0.5856937",
"0.5650522",
"0.5623678",
"0.5623678",
"0.55136555",
"0.54811025",
"0.54573274",
"0.54368466",
"0.5400753",
"0.5400753",
"0.53914905",
"0.5324739",
"0.53123885",
"0.52960265",
"0.5205938",
"0.5205938",
"0.5198496",
"0.5170544",
"0.515942... | 0.7081822 | 0 |
This method was generated by MyBatis Generator. This method returns the value of the database column litemall_product.brand_id | public Integer getBrandId() {
return brandId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer getBrandId() {\r\n return brandId;\r\n }",
"public String getBrandId() {\n\t\treturn brandId;\n\t}",
"public Short getBrandId() {\n return brandId;\n }",
"public void setBrandId(Integer brandId) {\r\n this.brandId = brandId;\r\n }",
"public void setBrandId(Integ... | [
"0.7598564",
"0.73030084",
"0.70133954",
"0.6822967",
"0.6767517",
"0.6767517",
"0.64768666",
"0.62794155",
"0.62200844",
"0.6167679",
"0.6089476",
"0.6057111",
"0.59899956",
"0.5917795",
"0.58461964",
"0.5836131",
"0.58220446",
"0.57568866",
"0.5736223",
"0.5736223",
"0.5736... | 0.7586667 | 2 |
This method was generated by MyBatis Generator. This method sets the value of the database column litemall_product.brand_id | public void setBrandId(Integer brandId) {
this.brandId = brandId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBrandId(Integer brandId) {\r\n this.brandId = brandId;\r\n }",
"public Integer getBrandId() {\r\n return brandId;\r\n }",
"public Integer getBrandId() {\n return brandId;\n }",
"public Integer getBrandId() {\n return brandId;\n }",
"public void setBran... | [
"0.7587714",
"0.7150668",
"0.7129239",
"0.7129239",
"0.70933557",
"0.70441467",
"0.69898766",
"0.6738373",
"0.67088914",
"0.6472427",
"0.6386744",
"0.6386744",
"0.63748515",
"0.632881",
"0.62689996",
"0.62372464",
"0.62218636",
"0.60798967",
"0.6055378",
"0.6036495",
"0.59988... | 0.7540605 | 2 |
This method was generated by MyBatis Generator. This method returns the value of the database column litemall_product.gallery | public String[] getGallery() {
return gallery;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setGallery(String[] gallery) {\n this.gallery = gallery;\n }",
"public List<Gallery> getGallery() {\n List<Gallery> galleries = new ArrayList<>();\n galleries.add(new Gallery(\"islands\", \"Holiday 2017\", \"Islands\", 130, 4, \"City break\", \"13/04/2018\", \"15/04/2018\"));\... | [
"0.5884665",
"0.58459896",
"0.5803726",
"0.5622323",
"0.5600953",
"0.55061716",
"0.54583114",
"0.5434877",
"0.541574",
"0.54022044",
"0.53520024",
"0.5328078",
"0.52272063",
"0.52257836",
"0.5160924",
"0.5124008",
"0.51212156",
"0.5070582",
"0.49857557",
"0.49828357",
"0.4962... | 0.6393189 | 0 |
This method was generated by MyBatis Generator. This method sets the value of the database column litemall_product.gallery | public void setGallery(String[] gallery) {
this.gallery = gallery;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public GiftCardProductQuery mediaGallery(MediaGalleryInterfaceQueryDefinition queryDef) {\n startField(\"media_gallery\");\n\n _queryBuilder.append('{');\n queryDef.define(new MediaGalleryInterfaceQuery(_queryBuilder));\n _queryBuilder.append('}');\n\n return this;\n }",
"pu... | [
"0.55962056",
"0.5559761",
"0.5289498",
"0.52341473",
"0.5232584",
"0.51914614",
"0.5111351",
"0.50310963",
"0.49545962",
"0.49530992",
"0.49517184",
"0.49513882",
"0.49040532",
"0.48873866",
"0.4877738",
"0.48559946",
"0.48329663",
"0.48275054",
"0.48240292",
"0.48152503",
"... | 0.6532425 | 0 |
This method was generated by MyBatis Generator. This method returns the value of the database column litemall_product.keywords | public String getKeywords() {
return keywords;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getKeywords() {\n\t\tif (keywords != null) {\n\t\t\tString keywordsString = \"\";\n\t\t\tfor (final String keyword : keywords) {\n\t\t\t\tif (!\"\".equals(keywordsString))\n\t\t\t\t\tkeywordsString += \",\";\n\t\t\t\tkeywordsString += keyword;\n\t\t\t}\n\t\t\treturn ProteomeXchangeFilev2_1.MTD + TAB ... | [
"0.64540017",
"0.6306882",
"0.6266413",
"0.6254842",
"0.6236242",
"0.6230092",
"0.5961307",
"0.5924984",
"0.5903145",
"0.58787316",
"0.5877993",
"0.5857675",
"0.57361203",
"0.5721817",
"0.5721817",
"0.5710474",
"0.56650674",
"0.5649026",
"0.5613451",
"0.5608391",
"0.5600952",... | 0.61297536 | 7 |
This method was generated by MyBatis Generator. This method sets the value of the database column litemall_product.keywords | public void setKeywords(String keywords) {
this.keywords = keywords;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setKeywords(String keywords)\r\n {\r\n m_keywords = keywords;\r\n }",
"public void setKeywords(String keywords) {\n this.keywords = keywords == null ? null : keywords.trim();\n }",
"public void setKeywords(String keywords) {\n this.keywords = keywords == null ? null : keyw... | [
"0.6619664",
"0.6354122",
"0.6354122",
"0.6017061",
"0.5980528",
"0.58947515",
"0.58717966",
"0.58710146",
"0.58082604",
"0.5678537",
"0.5633714",
"0.56323516",
"0.56041217",
"0.55526507",
"0.5542263",
"0.5502752",
"0.54553276",
"0.54553276",
"0.54553276",
"0.5405677",
"0.539... | 0.64594483 | 1 |
This method was generated by MyBatis Generator. This method returns the value of the database column litemall_product.brief | public String getBrief() {
return brief;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getBrief() {\r\n\t\treturn brief;\r\n\t}",
"public String longDescription() {\n return this.longDescription;\n }",
"java.lang.String getProductDescription();",
"public String getProductDescription() {\r\n/* 221 */ return this._productDescription;\r\n/* */ }",
"public Strin... | [
"0.5561362",
"0.54587096",
"0.54501307",
"0.5413318",
"0.54124224",
"0.54058015",
"0.5402343",
"0.5363099",
"0.5360124",
"0.5259006",
"0.52379024",
"0.52372664",
"0.5233912",
"0.5220322",
"0.52031213",
"0.5152355",
"0.51272434",
"0.51118046",
"0.50750583",
"0.49727187",
"0.49... | 0.5582552 | 1 |
This method was generated by MyBatis Generator. This method sets the value of the database column litemall_product.brief | public void setBrief(String brief) {
this.brief = brief;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBrief(String brief) {\r\n\t\tthis.brief = brief;\r\n\t}",
"public void setBrief(String brief) {\n this.brief = brief == null ? null : brief.trim();\n }",
"void setProductDescription(java.lang.String productDescription);",
"public void setProductDescription(String productDescription) ... | [
"0.6103046",
"0.56909895",
"0.56641054",
"0.56037617",
"0.54601276",
"0.5338412",
"0.5289438",
"0.52640724",
"0.52420074",
"0.523509",
"0.5212004",
"0.51652616",
"0.5126486",
"0.50954026",
"0.5073492",
"0.5057388",
"0.5048719",
"0.5034303",
"0.50025237",
"0.49885842",
"0.4979... | 0.60484475 | 1 |
This method was generated by MyBatis Generator. This method returns the value of the database column litemall_product.sort_order | public Short getSortOrder() {
return sortOrder;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getSortOrder();",
"public int getSortOrder() {\r\n return sortOrder;\r\n }",
"public Integer getSortOrder() {\n return sortOrder;\n }",
"java.lang.String getOrderBy();",
"@Override\n\tpublic String getOrder() {\n\t\treturn \"zjlxdm,asc\";\n\t}",
"public BigDecimal getSor... | [
"0.6842814",
"0.67984027",
"0.6770568",
"0.67521137",
"0.67105967",
"0.6678812",
"0.66482335",
"0.66197515",
"0.6559451",
"0.65592116",
"0.65115047",
"0.6480125",
"0.6395538",
"0.63699275",
"0.63099796",
"0.6244558",
"0.6179805",
"0.61309713",
"0.61143607",
"0.6057481",
"0.60... | 0.66487074 | 6 |
This method was generated by MyBatis Generator. This method sets the value of the database column litemall_product.sort_order | public void setSortOrder(Short sortOrder) {
this.sortOrder = sortOrder;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSortOrder(String sortOrder);",
"public static void setOrderBy (String columnList){\n fetchAllOrderBy=columnList;\n }",
"public void setSortOrder(int value) {\r\n this.sortOrder = value;\r\n }",
"public void setSortOrder(Integer sortOrder) {\n this.sortOrder = sortOrd... | [
"0.681925",
"0.65916884",
"0.6537675",
"0.6477584",
"0.6393118",
"0.6366966",
"0.6350721",
"0.631827",
"0.62701356",
"0.6140919",
"0.6119344",
"0.5989366",
"0.5962427",
"0.58711076",
"0.58584625",
"0.5847761",
"0.58226",
"0.57712203",
"0.57541025",
"0.5730715",
"0.5720144",
... | 0.6134445 | 10 |
This method was generated by MyBatis Generator. This method returns the value of the database column litemall_product.pic_url | public String getPicUrl() {
return picUrl;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getProductImageUrl();",
"public String getProductPictureDetails(){\r\n\t\t\t\r\n\t\t\treturn (hasProductPicture())?McsElement.getElementByXpath(driver, PRODUCT_PIC_CONTAINER+\"//img\").getAttribute(\"src\"): \"\";\r\n\t\t}",
"@JsonProperty(\"productImageUrl\")\n public String getProductImag... | [
"0.6658847",
"0.6393975",
"0.59867156",
"0.5942417",
"0.59235674",
"0.5912879",
"0.58770424",
"0.5871605",
"0.58315766",
"0.58248633",
"0.5822339",
"0.5817591",
"0.5799412",
"0.5790454",
"0.5758509",
"0.575467",
"0.5751987",
"0.5751927",
"0.5751927",
"0.5751927",
"0.5751927",... | 0.6034565 | 2 |
This method was generated by MyBatis Generator. This method sets the value of the database column litemall_product.pic_url | public void setPicUrl(String picUrl) {
this.picUrl = picUrl;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setProductImageUrl(final String productImageUrl);",
"public void setImage (Product product) {\n\t\t//TODO beh�ver hj�lp. hur s�tter jag mha referens till objektet bilden?\n\t\tpictureLbl.setText(\"\");\n\t\t//picLbl.setIcon(product.getImageName());\n\t\tpictureLbl.repaint();\n\t}",
"protected void ... | [
"0.6568881",
"0.60629183",
"0.60432076",
"0.6012829",
"0.5990556",
"0.58182025",
"0.57892084",
"0.57318366",
"0.5661334",
"0.5660055",
"0.564381",
"0.5615796",
"0.5613562",
"0.5613562",
"0.5613562",
"0.5613562",
"0.5597279",
"0.5557129",
"0.5555827",
"0.5500603",
"0.5455769",... | 0.60792774 | 1 |
This method was generated by MyBatis Generator. This method returns the value of the database column litemall_product.buy_link | public String getBuyLink() {
return buyLink;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBuyLink(String buyLink) {\n this.buyLink = buyLink;\n }",
"public String getBuyprice() {\n return buyprice;\n }",
"@Column(name=\"link\")\n\tpublic String getLink() {\n\t\treturn link;\n\t}",
"public static WebElement getPayBillLink() {\r\n\t\treturn payBillLink;\r\n\t}",
... | [
"0.67706364",
"0.55546355",
"0.55484205",
"0.5538099",
"0.52319896",
"0.5207705",
"0.5160052",
"0.51215774",
"0.505197",
"0.5004994",
"0.49834353",
"0.4956207",
"0.49379778",
"0.49011406",
"0.48902568",
"0.48902568",
"0.48780373",
"0.48579472",
"0.48579472",
"0.48579472",
"0.... | 0.69609874 | 0 |
This method was generated by MyBatis Generator. This method sets the value of the database column litemall_product.buy_link | public void setBuyLink(String buyLink) {
this.buyLink = buyLink;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getBuyLink() {\n return buyLink;\n }",
"public void setBuy_num(Integer buy_num) {\n this.buy_num = buy_num;\n }",
"public void setParcelBuyList(ParcelBuyList parcelBuyList) {\r\n/* 417 */ this._parcelBuyList = parcelBuyList;\r\n/* */ }",
"public void setBuyDate(Dat... | [
"0.6199632",
"0.5370187",
"0.53618723",
"0.5342625",
"0.5257374",
"0.5242969",
"0.51903474",
"0.51658833",
"0.5155064",
"0.5109123",
"0.5081407",
"0.50399745",
"0.50213736",
"0.50146836",
"0.50103045",
"0.5007221",
"0.4988461",
"0.49862334",
"0.49369806",
"0.49240637",
"0.491... | 0.7327769 | 0 |
This method was generated by MyBatis Generator. This method returns the value of the database column litemall_product.add_time | public LocalDateTime getAddTime() {
return addTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Date getAddtime() {\r\n return addtime;\r\n }",
"public Date getAddtime() {\n return addtime;\n }",
"public Date getAddTime() {\n return addTime;\n }",
"public Integer getAddTime() {\n return addTime;\n }",
"@ApiModelProperty(value = \"添加时间\")\n\tpublic Date g... | [
"0.70839536",
"0.7074236",
"0.7020475",
"0.70032036",
"0.67702705",
"0.6529082",
"0.6515548",
"0.6069388",
"0.6045787",
"0.6045787",
"0.6045787",
"0.59878045",
"0.59804523",
"0.58564913",
"0.58051103",
"0.57660156",
"0.56579965",
"0.5634964",
"0.55204964",
"0.5511951",
"0.546... | 0.6834784 | 6 |
This method was generated by MyBatis Generator. This method sets the value of the database column litemall_product.add_time | public void setAddTime(LocalDateTime addTime) {
this.addTime = addTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setAddtime(Date addtime) {\r\n this.addtime = addtime;\r\n }",
"public void setAddtime(Date addtime) {\n this.addtime = addtime;\n }",
"public void setAddTime(Integer addTime) {\n this.addTime = addTime;\n }",
"@Override\n\tpublic void setAddTime(Date addTime) {\n\t\... | [
"0.69677806",
"0.694153",
"0.676494",
"0.6641417",
"0.65208703",
"0.6452161",
"0.6361611",
"0.6293667",
"0.6181759",
"0.6064315",
"0.6064315",
"0.6064315",
"0.598407",
"0.5927797",
"0.58679694",
"0.57665503",
"0.57645506",
"0.5704607",
"0.5697905",
"0.5548327",
"0.55104095",
... | 0.6898312 | 4 |
This method was generated by MyBatis Generator. This method returns the value of the database column litemall_product.update_time | public LocalDateTime getUpdateTime() {
return updateTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long getUpdateDatetime() {\n return updateDatetime;\n }",
"public Date getUpdate_time() {\n return update_time;\n }",
"public Date getUpdate_time() {\n return update_time;\n }",
"public String getUpdatetime() {\n\t\treturn updatetime;\n\t}",
"public String getUpdatetime... | [
"0.73080015",
"0.72625345",
"0.72625345",
"0.72430027",
"0.72430027",
"0.71939874",
"0.71939874",
"0.71836185",
"0.71836114",
"0.69398314",
"0.6906565",
"0.6891711",
"0.6872371",
"0.68590856",
"0.68590856",
"0.68590856",
"0.68552965",
"0.68437356",
"0.68437356",
"0.68329567",
... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method sets the value of the database column litemall_product.update_time | public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"public void setUpdatetime(Date updatetime) {\r\n this.updatetime = updatetime;\r\n }",
"public void set... | [
"0.7234889",
"0.7234889",
"0.69997865",
"0.6977351",
"0.6977351",
"0.68773556",
"0.66871214",
"0.66814595",
"0.6593296",
"0.65799487",
"0.65648705",
"0.65648705",
"0.65648705",
"0.65648705",
"0.6522631",
"0.6522631",
"0.6511377",
"0.65050673",
"0.65050673",
"0.65050673",
"0.6... | 0.6580232 | 10 |
This method was generated by MyBatis Generator. This method corresponds to the database table litemall_product | public void andLogicalDeleted(boolean deleted) {
setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t... | [
"0.65381384",
"0.6327605",
"0.63234967",
"0.6197391",
"0.608372",
"0.5998906",
"0.5976797",
"0.59724194",
"0.5946152",
"0.5945253",
"0.5944576",
"0.5944576",
"0.59153074",
"0.58949244",
"0.5884854",
"0.581619",
"0.58115894",
"0.5810023",
"0.5808849",
"0.58005947",
"0.5786624"... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method returns the value of the database column litemall_product.deleted | public Boolean getDeleted() {
return deleted;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long deleted() {\n return this.deleted;\n }",
"public Integer getDeleted() {\n return deleted;\n }",
"public java.lang.Boolean getDeleted();",
"public Boolean getDeleted() {\n return deleted;\n }",
"public Integer getIsdeleted() {\n return isdeleted;\n }",
"public... | [
"0.68256813",
"0.6501382",
"0.6403533",
"0.62126964",
"0.6202089",
"0.6196607",
"0.61283875",
"0.6097867",
"0.6058261",
"0.6053364",
"0.6018845",
"0.60050136",
"0.5980742",
"0.5952637",
"0.5936567",
"0.5936567",
"0.58248234",
"0.58248234",
"0.5792783",
"0.5785942",
"0.5785442... | 0.6219352 | 6 |
This method was generated by MyBatis Generator. This method sets the value of the database column litemall_product.deleted | public void setDeleted(Boolean deleted) {
this.deleted = deleted;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@IcalProperty(pindex = PropertyInfoIndex.DELETED)\n public void setDeleted(final boolean val) {\n deleted = val;\n }",
"public void setDeleted(java.lang.Boolean deleted);",
"public void setDeleted(boolean deleted);",
"public void setDeleted(Integer deleted) {\n this.deleted = deleted;\n }",
... | [
"0.61336",
"0.60484177",
"0.60269165",
"0.5980463",
"0.595799",
"0.5949997",
"0.59324485",
"0.5813656",
"0.5770003",
"0.575319",
"0.5740466",
"0.56952715",
"0.565442",
"0.56113917",
"0.5609516",
"0.56062025",
"0.55570036",
"0.55374527",
"0.55163497",
"0.5495179",
"0.5481491",... | 0.60106367 | 7 |
This method was generated by MyBatis Generator. This method returns the value of the database column litemall_product.detail | public String getDetail() {
return detail;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getDetail_id() {\n return detail_id;\n }",
"public String getDetail() {\r\n return detail;\r\n }",
"public String getDetail() {\r\n return detail;\r\n }",
"public String getDetail()\n {\n return detail;\n }",
"@Override\n\tpublic ProductVO detailOrde... | [
"0.6324774",
"0.62711513",
"0.62711513",
"0.61874497",
"0.57357365",
"0.56855416",
"0.56556696",
"0.5547287",
"0.5546108",
"0.5546108",
"0.5546108",
"0.5546108",
"0.55330306",
"0.55330306",
"0.55330306",
"0.5496409",
"0.5470608",
"0.542114",
"0.5392406",
"0.53876257",
"0.5377... | 0.6221151 | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.