query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Goal here is two fold: 1. Really hammer the publisher and consumer side of things. Make sure ordering is preserved as expected. 2. Get some very rough numbers on throughput. They are really just there to identify regressions in other publishing implementations. | @Test
public void largeMessageVolumeTest_buffered() {
int batches = 15;
int batchSize = 5_000;
List<Long> sendReceiveTimings = new ArrayList<>();
List<Long> sendTimings = new ArrayList<>();
for(int i = 0; i< batches; i++) {
List<String> messages = messages(batchSi... | [
"@Test\n public void should_block_one_consumer_but_continue_to_dispatch_to_another_one() throws IOException, InterruptedException {\n directChannel.basicQos(3, GLOBAL_CHANNEL_PREFETCH.not());\n\n directChannel.basicPublish(EXCHANGE, DIRECT_EXC_KEY, null, testMessage(\"1\").getBytes());\n dir... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Commands__Group__0" $ANTLR start "rule__Commands__Group__0__Impl" InternalWhdsl.g:1217:1: rule__Commands__Group__0__Impl : ( ( rule__Commands__ListAssignment_0 ) ) ; | public final void rule__Commands__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalWhdsl.g:1221:1: ( ( ( rule__Commands__ListAssignment_0 ) ) )
// InternalWhdsl.g:1222:1: ( ( rule__Commands__ListAssignment_0 ) )
... | [
"public final void rule__Commands__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWhdsl.g:1301:1: ( ( ( rule__Commands__ListAssignment_1_1 ) ) )\n // InternalWhdsl.g:1302:1: ( ( rule__Commands__ListAssign... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get each day exchange records in order to display in the jsp page. | public List<DayExchangeBean> getDayExchangeRecordsByCriteria(DayExchangeBean dayExchangeBean); | [
"List<ExchangeList> findAll();",
"public List<ExchangeDTO> getExchangeList();",
"void all_Data_retrieve_Days_asc() {\n\t\t\tStatement stm=null;\n\t\t\tResultSet rs=null;\n\t\t\ttry{\n\t\t\t\t//Retrieve tuples by executing SQL command\n\t\t\t stm=con.createStatement();\n\t\t String sql=\"select * from ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve the Specific Manifest Measure Market Rolldown Position Change | public double specificMarketRollDownChange (
final java.lang.String strManifestMeasure)
throws java.lang.Exception
{
org.drip.historical.attribution.PositionManifestMeasureSnap pmmsFirst = _pmsFirst.manifestMeasureSnap
(strManifestMeasure);
if (null == pmmsFirst)
throw new java.lang.Exception
("Posi... | [
"public double marketRollDownChange()\n\t\tthrows java.lang.Exception\n\t{\n\t\tjava.util.Set<java.lang.String> setstrManiFestMeasure = _pmsFirst.manifestMeasures();\n\n\t\tif (null == setstrManiFestMeasure || 0 == setstrManiFestMeasure.size())\n\t\t\tthrow new java.lang.Exception\n\t\t\t\t(\"PositionChangeComponen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Default exit sequence for state Resetting | private void exitSequence_main_region_digitalwatch_Ticker_Main_Update_Resetting() {
nextStateIndex = 2;
stateVector[2] = State.$NullState$;
exitAction_main_region_digitalwatch_Ticker_Main_Update_Resetting();
} | [
"private void enterSequence_main_region_digitalwatch_Ticker_Main_Update_Resetting_default() {\n\t\tentryAction_main_region_digitalwatch_Ticker_Main_Update_Resetting();\n\t\tnextStateIndex = 2;\n\t\tstateVector[2] = State.main_region_digitalwatch_Ticker_Main_Update_Resetting;\n\t}",
"private void enterSequence_mai... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A boolean array indicating the enabled state of all available sensors. True in the array indicated enabled, false indicated disabled. | public static boolean[] getSensorStates() {
boolean[] retVal = new boolean[mSensors.size()];
for (int x = 0; x < mSensors.size(); x++) {
retVal[x] = mSensors.get(x).mEnabled;
}
return retVal;
} | [
"public boolean isEnabled() {\r\n\t\treturn sensor.isEnabled();\r\n\t}",
"private boolean[] getState(){\n int [] ids = new int[]{\n R.id.box1, R.id.box2, R.id.box3, R.id.box4, R.id.box5, R.id.box6,\n R.id.box7, R.id.box8, R.id.box9\n };\n\n boolean[] enabled = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the GEContainers located at the specified level. | private ArrayList getContainersAtLevelLowerThan(int level)
{
ArrayList tempList = new ArrayList();
/** Iterate through all the containers ... */
for (Iterator containerIter = allContainers.iterator(); containerIter.hasNext(); )
{
GEContainer cont = (GEContainer)co... | [
"public ArrayList getContainersAtLevel(int level)\n {\n ArrayList tempList = new ArrayList();\n /** Iterate through all the containers ... */\n for (Iterator containerIter = allContainers.iterator(); containerIter.hasNext(); )\n {\n GEContainer cont = (GEContainer)c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__PartiturTask__PartiturHttpRequestAssignment_3_2" $ANTLR start "rule__PartiturTask__PartiturHttpRequestAssignment_3_3" InternalPartitur.g:2861:1: rule__PartiturTask__PartiturHttpRequestAssignment_3_3 : ( ruleHttpDelete ) ; | public final void rule__PartiturTask__PartiturHttpRequestAssignment_3_3() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalPartitur.g:2865:1: ( ( ruleHttpDelete ) )
// InternalPartitur.g:2866:2: ( ruleHttpDelete )
{
... | [
"public final void ruleHttpDelete() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:266:2: ( ( ( rule__HttpDelete__Group__0 ) ) )\n // InternalPartitur.g:267:2: ( ( rule__HttpDelete__Group__0 ) )\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Draw line from json. | public void drawFromJson(JSONObject json, Activity activity) {
try {
if (mCanvas == null) return;
JSONObject jsonCoordinates = json.getJSONObject("coordinates");
String userId = json.getString("drawer");
if (userId != null && !userId.isEmpty()) {
... | [
"public static Line parseLine(LineResourceData lmd, String jsonResponse)\n throws JSONException, TfLLineDataMissingException {\n // get jsonobject\n JSONObject lineInfo = new JSONObject(jsonResponse);\n\n // create line object, if missing data throws exception\n if(!lineInfo.h... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct the footer table of the indexed portion of the table. Default colors are applied. | public static TabularView getIndexFooterTable(
Context context, Controller controller,
UserTable table, List<String> elementKeysToDisplay,
int[] columnWidths, int fontSize,
Map<String, ColumnProperties> elementKeyToColumnProperties,
Map<String, ColorRuleGroup> elementKeyToColorRuleGroup) {... | [
"public static TabularView getStatusFooterTable(\n Context context, Controller controller,\n UserTable table,\n int[] columnWidths, int fontSize,\n Map<String, ColumnProperties> elementKeyToColumnProperties,\n Map<String, ColorRuleGroup> elementKeyToColorRuleGroup) {\n List<String> dummy... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when a spinner's selected item bind mapping has changed. | public void selectedItemBindMappingChanged(Spinner spinner, Spinner.ItemBindMapping previousSelectedItemBindMapping); | [
"public void selectedItemBindTypeChanged(Spinner spinner, BindType previousSelectedItemBindType);",
"public void spinnerDataBindMappingChanged(Spinner spinner,\n Spinner.SpinnerDataBindMapping previousSpinnerDataBindMapping);",
"public void spinnerDataBindTypeChanged(Spinner spinner, BindType previousSpi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Obl__Group__3__Impl" $ANTLR start "rule__Obl__Group__4" InternalSymboleoide.g:4693:1: rule__Obl__Group__4 : rule__Obl__Group__4__Impl rule__Obl__Group__5 ; | public final void rule__Obl__Group__4() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalSymboleoide.g:4697:1: ( rule__Obl__Group__4__Impl rule__Obl__Group__5 )
// InternalSymboleoide.g:4698:2: rule__Obl__Group__4__Impl rule__Obl__Group... | [
"public final void rule__Language__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1504:1: (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Registers specified listener container | public void registerListeners(Object listenerContainer)
{
listenerManager.registerListener(listenerContainer);
} | [
"public void addContainerListener(ContainerListener listener);",
"void registerListener(RemoteListener listener) throws RemoteException;",
"public void registerListeners();",
"public void registerListener(IMountServiceListener listener) throws RemoteException {\n Parcel _data = Parcel.obtain();... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ForEach__Group__5" $ANTLR start "rule__ForEach__Group__5__Impl" InternalWhdsl.g:2027:1: rule__ForEach__Group__5__Impl : ( ( rule__ForEach__CommandsAssignment_5 ) ) ; | public final void rule__ForEach__Group__5__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalWhdsl.g:2031:1: ( ( ( rule__ForEach__CommandsAssignment_5 ) ) )
// InternalWhdsl.g:2032:1: ( ( rule__ForEach__CommandsAssignment_5 ) )
... | [
"public final void rule__ForEach__Group__5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWhdsl.g:2019:1: ( rule__ForEach__Group__5__Impl rule__ForEach__Group__6 )\n // InternalWhdsl.g:2020:2: rule__ForEach__Group__5__Imp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ fix1 for AutoException (errno=1) Fixes: Missing price in text file. Fixes by: asks user for correct price and changes input text file | public void fix1() {
BufferedReader br;
String filename;
String newbp;
try {
br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter the file name to fix:\n");
filename = br.readLine();
System.out.println("Enter the baseprice:\n");
newbp = br.readLine();
replace... | [
"public void correctPrices(String path) throws IOException {\n\n\t\tArrayList<Record> correction = load(path);\n\t\t\n\t\tfor (Record record: correction) {\n\t\t\tinsertPrice(record);\n\t\t}\n\t}",
"public void fix2() {\n\t\tBufferedReader br;\n\t\tString filename;\n\t\tString[] ar = new String[5];\n\t\t\n\t\ttry... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the peer name. If the symobolic name is available, use it, otherwise returns the peer id. | public String getPeerName() {
return rdvAdv.getName();
} | [
"public String getMyPeerName() {\r\n\t\treturn rootPeerGroup_.getPeerName();\r\n\t}",
"public String getMyPeerName() throws Exception\n {\n Pdu pdu = this.channel.writeForReply(makePdu(\"get_my_peer\"), replyTimeout, \"recv_pids\");\n return pdu.getString(\"pid\");\n }",
"public String getPe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the referee to be edited in the dialog. | public void setReferee(Referee referee) {
this.referee = referee;
firstNameField.setText(referee.getFirstName());
lastNameField.setText(referee.getLastName());
middleNameField.setText(referee.getMiddleName());
cityField.setText(Long.toString(referee.getCityId()));
} | [
"void setRef(java.lang.String ref);",
"protected void editWebLink()\n {\n WebLinkDef wld = (WebLinkDef)list.getSelectedValue();\n WebLinkEditorDlg dlg = new WebLinkEditorDlg(wld, isTableMode ? tableInfo : null);\n dlg.setEdit(true);\n dlg.setVisible(true);\n \n i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
EFFECTS: returns things in this collection as a JSON array | private JSONArray sneakersToJson() {
JSONArray jsonArray = new JSONArray();
for (Sneaker s : collection) {
jsonArray.put(s.toJson());
}
return jsonArray;
} | [
"private JSONArray capturedToJson() {\n JSONArray jsonArray = new JSONArray();\n\n for (Piece p : captured) {\n jsonArray.put(p.toJson());\n }\n\n return jsonArray;\n }",
"public List<Object[]> readAllEffects();",
"@Get\n\tJsonRepresentation getResults();",
"@Suppress... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column TRSDEAL_NIDC_DET.SETTLED_YN | public void setSETTLED_YN(String SETTLED_YN) {
this.SETTLED_YN = SETTLED_YN == null ? null : SETTLED_YN.trim();
} | [
"public String getSETTLED_YN() {\r\n return SETTLED_YN;\r\n }",
"public void setADVANCE_PRINCIPAL_SETLMT_YN(String ADVANCE_PRINCIPAL_SETLMT_YN) {\r\n this.ADVANCE_PRINCIPAL_SETLMT_YN = ADVANCE_PRINCIPAL_SETLMT_YN == null ? null : ADVANCE_PRINCIPAL_SETLMT_YN.trim();\r\n }",
"public void setSE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method load the configuration in the local file and inject the accounts in the accountManagementService | @Override
public void configure() throws Exception {
BankAccountManagementService bankAccountManagementService = services.get(BankAccountManagementService.class);
UserManagementService userManagementService = services.get(UserManagementService.class);
ObjectMapper mapper = JsonMapperFactory.... | [
"private void loadAccountsFromFile(String fileName) {\n\n try {\n InputStream inputStream = this.openFileInput(fileName);\n if (inputStream != null) {\n ObjectInputStream input = new ObjectInputStream(inputStream);\n accountManager = (AccountManager) input.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new NoSimulationException with no detail message. | public NoSimulationException() {
super();
} | [
"public NoSimulationException(String message) {\n super(message);\n }",
"public NoSolutionException()\n {\n super(\"Maze has No Solution\");\n }",
"SimulationInformation createSimulationInformation();",
"SpaceInvaderTest_test_UnNouveauVaisseauPositionneHorsEspaceJeu_DoitLeverUneExceptio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses and writes given WifiLoggerPacket to given DataOutputStream. | private static void dataParse(final WifiPacket packet,
final DataOutputStream outputStream) {
try {
outputStream.writeInt(packet.numAccessPoints);
outputStream.writeLong(packet.timestamp);
for (int i = 0; i < packet.numAccessPoints; i++) {
outputStream.writeInt(packet.signalStrengths[i]);
o... | [
"public void writePacket(DataOutputStream dataOutputStream) throws IOException;",
"private static void dataParse(final GSMPacket packet,\r\n\t\t\tfinal DataOutputStream outputStream) {\r\n\t\ttry {\r\n\t\t\toutputStream.writeLong(packet.time);\r\n\t\t\toutputStream.writeInt(packet.mcc);\r\n\t\t\toutputStream.writ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sorts journeys according to given preferences. The fist element will be the more suitable The last element will be the less suitable | public List<Journey> applyPreferences(List<Journey> journeys) {
Map<Journey, Integer> values = new HashMap<>();
for (Journey journey : journeys) {
values.put(journey, computeJourneyValue(journey));
}
journeys.sort(Comparator.comparingInt((Journey journey) -> values.getOrDefault(journey, 0)).reversed());
r... | [
"private void sortEmployees(String dayOfWeek) {\n availList.clear();\n prefList.clear();\n availability.clear();\n preferences.clear();\n int i = 0;\n switch (dayOfWeek) {\n case \"Monday\":\n for(Employee e: empList) {\n\n if(e.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ NOTIFY HTTP/1.1 HOST: 239.255.255.250:1900 NT: urn:schemasupnporg:service:ContentDirectory:1 NTS: ssdp:alive LOCATION: USN: uuid:9dcf6222fc4b33ebbf49e54643b4f416::urn:schemasupnporg:service:ContentDirectory:1 CACHECONTROL: maxage=1800 SERVER: Windows_XPx865.1, UPnP/1.0, PMS/1.11 | public static String createAliveMessage(){
StringBuffer sb = new StringBuffer();
sb.append("NOTIFY * HTTP/1.1").append("\n");
sb.append("HOST: 239.255.255.250:1900").append("\n");
sb.append("NT: urn:schemas-upnp-org:service:ContentDirectory:1").append("\n");
sb.append("NTS: ssdp:alive").append("\n");
sb.... | [
"public static String createDiscoverResponseMessage(){\n\t\tStringBuffer sb = new StringBuffer();\n\t\t\n\t\tsb.append(\"HTTP/1.1 200 OK\").append(\"\\n\");\n\t\tsb.append(\"CACHE-CONTROL: max-age=1200\").append(\"\\n\");\n\t\tsb.append(\"DATE: Tue, 05 May 2009 13:31:51 GMT\").append(\"\\n\");\n\t\tsb.append(\"LOCA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Class for storing the relationship between assets and attack steps from the simulation. | public ModelData() {
nAssets = Asset.allAssets.size();
// nAttackSteps = AttackStep.allAttackSteps.size();
nAttackSteps = 0;
//nDefenses = Defense.allDefenses.size();
nDefenses = 0;
// Generate model
for (Asset asset : Asset.allAssets) {
assetIds.add(asset.hashCode());
List<AttackStep> ... | [
"public Agent(Integer id, Trajectory trajectory, Traces storage){\n this.id = id;\n this.trajectory = trajectory;\n this.currentPosition = null;\n this.storage = storage;\n this.dead = Boolean.FALSE;\n }",
"public interface Ammunition {\n \n /**\n * \n * @return... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True if has "DocumentManifest" element | boolean isSetDocumentManifest(); | [
"boolean isManifestEntryRequired();",
"public boolean isIncludingManifest() {\n return addManifest;\n }",
"boolean hasDocumentMetadata();",
"private boolean processManifest(File manifestFile){\r\n\t\t\r\n\t\tboolean hasParseError = false;\r\n\t\tDocument doc = null;\r\n\t\t// XML Valiation code from... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor creates instances to each DirectIOCommand with its inXml and opCode. | public DirectIOBinding( String command,String inXml, int opCode) {
this.inXml = inXml;
this.command = command;
this.opCode = opCode;
} | [
"public DeviceDataRequestCommand()\n {\n }",
"public CommandParser() {\n this.commandFactoryMap = new HashMap<>();\n }",
"public CPRCommand()\r\n {\r\n }",
"public LDRCommand()\r\n {\r\n }",
"public CompoundCommand()\r\n\t{\r\n\t\taCommands = new Stack<Command>();\r\n\t}",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column PATIENTDIAGNOSIS.DIAGNOSISNOTE | public void setDiagnosisnote(String diagnosisnote) {
this.diagnosisnote = diagnosisnote == null ? null : diagnosisnote.trim();
} | [
"void setNoteColumn(String noteColumn);",
"public void setDocumentNote (String DocumentNote);",
"public String getDiagnosisnote() {\n return diagnosisnote;\n }",
"@Override\n public void setNote(java.lang.String Note) {\n _auditReport.setNote(Note);\n }",
"public void setNotes(String ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validate data using a collection of shapes and a shape map | @Override
public ShexReport validate(Graph dataGraph, ShexSchema shapes, ShapeMap shapeMap) {
Objects.requireNonNull(dataGraph);
Objects.requireNonNull(shapes);
Objects.requireNonNull(shapeMap);
shapes = shapes.importsClosure();
ValidationContext vCxt = new ValidationContext(... | [
"public boolean isValidShape() {\n for (Point2D p : pointsOfShape)\n if (p == null)\n return false;\n\n return true;\n }",
"@Test\n public void testIsValidGeoJson() {\n // the template used for the JSON feature collection test is valid\n assertTrue(Shape... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Notifies to all others Users that a Player is reconnected | void notifyPlayerReconnected(String username); | [
"void notifyPlayerReconnected(final String player);",
"void notifyPlayerDisconnected(String username);",
"public void reconnected() { }",
"private synchronized void refreshPlayers() {\n for (ServerThread x : clients) {\n if (x.inGame == true) {\n x.user = players.get(players.i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Files (logs, test.xml, undeclared outputs, etc) generated by that test action. repeated .build_event_stream.File test_action_output = 2; | com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.FileOrBuilder getTestActionOutputOrBuilder(
int index); | [
"com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.File getTestActionOutput(int index);",
"java.util.List<com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.File> \n getTestActionOutputList();",
"public com.google.devtools.build.lib.buildeventstream.BuildEventStream... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XIntLiteral__Group_0__4__Impl" $ANTLR start "rule__XIntLiteral__Group_0__5" ../org.xtext.lwc.instances.ui/srcgen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2836:1: rule__XIntLiteral__Group_0__5 : rule__XIntLiteral__Group_0__5__Impl ; | public final void rule__XIntLiteral__Group_0__5() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2840:1: ( rule__XIntLiteral__Group_0__5_... | [
"public final void rule__XIntLiteral__Group_0__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2809:1: ( rule__XIntLiteral_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copies a realm by creating a physical copy of the realm, changing its name/id, and registering it in this RealmManager. A realm can only be copied if it has a element in its config file and if this directory contains the complete realm. | public void copyRealm(String srcRealmID, String destRealmID, String destRealmName,
String destMountPoint, File destDir) throws Exception {
if (getRealm(destRealmID) != null) {
log.warn("Cannot add realm: " + destRealmID + " (realm with this ID exists already)");
throw new Ex... | [
"public void setRealm(Realm realm);",
"public void addRealm(String realmID, String realmName, String mountPoint, String configFileSrc) throws Exception {\n if (getRealm(realmID) != null) {\n log.warn(\"Cannot add realm: \" + realmID + \" (realm with this ID exists already)\");\n throw... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the notice period of this candidate. | @Override
public void setNoticePeriod(java.lang.String noticePeriod) {
_candidate.setNoticePeriod(noticePeriod);
} | [
"void setPeriod(int period);",
"public void adjustPeriod(long nperiod) {\n period = nperiod;\n }",
"void setRateOfChangeOfAppliedCantOverTime(double rateOfChangeOfAppliedCantOverTime);",
"void setRateOfChangeOfCantDeficiencyOverTime(double rateOfChangeOfCantDeficiencyOverTime);",
"public void setN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the sub test result from the web element | private SubTest getSubTestResult(WebElement resultLine) {
SubTest subTest = new SubTest();
List<WebElement> cells = resultLine.findElements(By.tagName("td"));
for (int indexCell = 0; indexCell < cells.size(); indexCell++) {
String value = cells.get(indexCell).getText();
switch (indexCell) {
... | [
"public ITestResult getTestResult() {\n return testResult;\n }",
"@Test\n public void whenGetSubUnitThenReturnResult() {\n MenuUnit expected = underTest.getSubUnit();\n assertThat(expected, is(underTestSub));\n }",
"String getTargetElement();",
"@Test\n public void getElementTextCom... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
update user growth do | Integer updateGrowth(UserGrowthDO userGrowthDO); | [
"public void updateDuration(User user);",
"public void updateUserYearGraduate(int idUser, int yearGraduate) throws PersistenceException;",
"void updateUser(User user);",
"void updateScore(@NotNull User user, int scoreToAdd);",
"public void updateUserPeriod(int idUser, int period) throws PersistenceException... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Confirms a new boat at wharf. | protected void newBoatAtWharf(BoatId id, int stored) throws RemoteException {
totalCatch += stored;
boatsAtWharf.put(id, true);
// if there's only one boat on high sea, set to wharf
if (boatsConfirmedAtWharf() == boats.length - 1) {
setBoatsToWharf();
}
} | [
"public void testBidAcceptionNotification() {\n User owner = new User();\n Thing thing1 = new Thing(owner);\n\n User borrower = new User();\n\n Bid bid = null;\n try {\n bid = new Bid(thing1, borrower, 800);\n }catch(Exception e){\n fail();\n }\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .AllianceBaseMonster hireMonster = 5; | com.hawk.game.protocol.Alliance.AllianceBaseMonster getHireMonster(); | [
"com.hawk.game.protocol.Alliance.AllianceBaseMonsterOrBuilder getHireMonsterOrBuilder();",
"public void setMonster(Monster theMonster) {\n aMonster = theMonster;\n }",
"public Monster getMonster(){\r\n return this.monster;\r\n }",
"public Wand() {\n damage = 5;\n damageType = \"Magic\";\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A list of channel names the user is joined to | public List<String> getChannelNames(); | [
"public Collection<String> getChannels();",
"String getChannelName();",
"public List<String> getChannels() {\n return channels.get();\n }",
"public List getChannels();",
"java.util.List<main.java.io.grpc.chatservice.Channel> \n getChannelsList();",
"public List<String> getChannels() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Appends and returns a new empty value (as xml) as the last "Exclusions" element | public org.landxml.schema.landXML11.ExclusionsDocument.Exclusions addNewExclusions()
{
synchronized (monitor())
{
check_orphaned();
org.landxml.schema.landXML11.ExclusionsDocument.Exclusions target = null;
target = (org.landxml.schema... | [
"public void addToExclusions(entity.GL7ExposureExcl element);",
"public void addToExclusions(entity.GL7SublineTypeExcl element);",
"public String getExcludeString(){\n return excludeList;\n }",
"public void addDefaultExcludes()\n {\n int excludesLength = ( excludes == null ) ? 0 : excludes.lengt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Stops and closes the database. | public void close() {
stop();
if (mDatabase.isOpen()) mDatabase.close();
} | [
"private void shutDown()\n {\n database.close(); // close database connection\n System.exit( 0 ); // terminate program\n }",
"public static void closeDatabase() {\n\t\ttry {\n\t\t\tif (status == OPEN_SUCCESS) {\n\t\t\t\tif (stmt != null)\n\t\t\t\t\tstmt.close();\n\t\t\t\tif (c != null)\n\t\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the copy action. | public Action getCopyAction() {
return copyAction;
} | [
"public Action getCopyAction () {\n\t\treturn copyAction;\n\t}",
"public abstract Action copy();",
"public CopyAction getUserDatumCopyAction(Object key) {\n\t\treturn props.getUserDatumCopyAction(key);\n\t}",
"public static Action getCopy(AssignmentAction action) {\n\t\tAction actioncopy = (Action) EcoreUtil.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create new branch. Each Transition within this branch is a separate behaviorModel. | private static Branch createBranch(CMBG cmbg) {
Branch branch = UsagemodelFactory.eINSTANCE.createBranch();
branch.setEntityName("BehaviorMix");
// TODO
List<BehaviorModel> behaviorModelsList = cmbg.getBehaviorModels();
List<Double> relativeFrequencies = cmbg.getrelativeFrequencies();
for (int i = 0; i < re... | [
"private void createAndSetNewBranch()\n {\n Date startDateOfArticle = getStartDateOfArticle();\n final String branchId = startDateOfArticle == null ? GWikiProps.formatTimeStamp(new Date()) : GWikiProps\n .formatTimeStamp(startDateOfArticle);\n\n wikiContext.runInTenantContext(branchId, getWikiSelec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Run this method to create database, tables, triggers and procedures and test them. | public static void main(String[] args) {
//Create database, tables, triggers and procedures.
create();
//Insert data into all tables, test procedures, inserting invalid data, deleting some data.
test();
} | [
"private static void create() {\n Creation.createDatabase();\n Creation.createTables();\n Creation.createTriggers();\n Creation.createProcedure();\n }",
"@BeforeClass\r\n public static void setUp() {\n \tdb = new EmbeddedDatabaseBuilder()\r\n \t\t.setType(EmbeddedDatabaseType.H2)\r\n \t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__AndroResModelRoot__Group__2" $ANTLR start "rule__AndroResModelRoot__Group__2__Impl" ../hu.bme.mit.androtext.androres.ui/srcgen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/InternalAndroResDsl.g:902:1: rule__AndroResModelRoot__Group__2__Impl : ( ( rule__AndroResModelRoot__ImportsAssign... | public final void rule__AndroResModelRoot__Group__2__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../hu.bme.mit.androtext.androres.ui/src-gen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/InternalAndroResDsl.g:906:1: ( ( ... | [
"public final void rule__AndroResModelRoot__Group__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../hu.bme.mit.androtext.androres.ui/src-gen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/InternalAndroResDsl.g:... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
DELETE /jamhelpauthorities/:id : delete the "id" jamHelpAuthority. | @DeleteMapping("/jam-help-authorities/{id}")
@Timed
public ResponseEntity<Void> deleteJamHelpAuthority(@PathVariable Long id) {
log.debug("REST request to delete JamHelpAuthority : {}", id);
jamHelpAuthorityService.delete(id);
return ResponseEntity.ok().headers(HeaderUtil.createEntityDel... | [
"void deleteChallengeById(int id);",
"int deleteAuthority(AuthCheck data) throws Exception;",
"@GetMapping(\"/jam-help-authorities/{id}\")\n @Timed\n public ResponseEntity<JamHelpAuthorityDTO> getJamHelpAuthority(@PathVariable Long id) {\n log.debug(\"REST request to get JamHelpAuthority : {}\", id... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
'clickAboutMeTab' method clicks on About Me Tab | public void clickAboutMeTab() throws UIAutomationException{
elementController.requireElementSmart(fileName,"About Me Tab",GlobalVariables.configuration.getAttrSearchList(), "About Me Tab");
UIActions.click(fileName,"About Me Tab",GlobalVariables.configuration.getAttrSearchList(), "About Me Tab");
// Assert... | [
"private void openAbout() {\r\n \tIntent intent = new Intent(this, AboutActivity.class);\r\n \tstartActivity(intent);\r\n }",
"private void openAbout() {\n\t\tIntent intent = new Intent();\n\t\tintent.setClassName(\"com.example.collegetimetable\",\n\t\t\t\t\"com.example.collegetimetable.About\");\n\t\tst... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Marker interface for all credential sub interfaces. | public interface Credential {
} | [
"public interface BaseCredentialsProvider {\n}",
"private static interface EnhancedIdentityService extends IdentityService,\n BindingProvider {\n }",
"public interface SuppliesOID {\r\n\t// marker interface\r\n}",
"public interface PermissionAuthorizerConnectorInterface2 {\n\n\t/** The type ID o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the static type for this expression. | public Typed<B, T, V> setStaticType(StaticType newStaticType); | [
"public StaticType getStaticType();",
"public void setStatic() {\n m_declaration.modifiers().add(m_ast.newModifier(Modifier.ModifierKeyword.STATIC_KEYWORD));\n }",
"public void setType(Type t) {\n type = t;\n }",
"public abstract IReflector setStatic(Object value);",
"void setType(Type t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compare the dates of two availabilities | @Override
public int compare(final Availability o1, final Availability o2) {
DateFormat f = new SimpleDateFormat("dd-MM-yyyy");
try {
return f.parse(o1.getDate()).compareTo(f.parse(o2.getDate()));
} catch (ParseException e) {
throw new IllegalArgumentException(e);
... | [
"protected boolean hasSameDates(final Available other) {\n\t\treturn (_tDateStart.equals(other._tDateStart) &&\n\t\t _tDateStamp.equals(other._tDateStamp) &&\n\t\t _tDateEnd.equals(other._tDateEnd) &&\n\t\t _tDateCreated.equals(other._tDateCreated) &&\n\t\t _tLastModified... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for class TypeVectorDouble. Creates a TypeVectorDouble object with values read from the specified filepath. | public TypeVectorDouble(int row, String filepath, String sep) {
this.rowTotal = row;
this.vect = new double[row];
try {
BufferedReader brVect = new BufferedReader(new FileReader(filepath));
String rowLine;
rowLine = brVect.readLine();
String rowL... | [
"public TypeVectorDouble(int row) {\n this.rowTotal = row;\n this.vect = new double[row];\n }",
"public VTDoubleTest() {\n super(VTDouble.class, new Class<?>[] { Double.TYPE, }, new Object[] { 1278518.2, });\n }",
"public TypeVectorDouble(int row, double[] vectIn) {\n this.rowT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column djob.drum_fill | public void setDrumFill(Boolean drumFill) {
this.drumFill = drumFill;
} | [
"void setFill(FilledReportStruct fillReport) throws DataValidationException;",
"void setD(long d);",
"public Boolean getDrumFill() {\n return drumFill;\n }",
"public void setFillLevel(final double fill) {\n\t\t_fillGrade = fill;\n\t}",
"@Override\n public double getFillValue... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the access token of this twitter settings. | public void setAccessToken(String accessToken); | [
"void setOAuthAccessToken(AccessToken accessToken);",
"void setAccessToken(String accessToken);",
"void setAccessToken(java.lang.String accessToken);",
"public void setAccess_token(String access_token) {\n this.access_token = access_token;\n }",
"public void setToken(){\n final Authenticati... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Check if the return from a partner provider to the original provider is possible. Therefore, we first book a quote, register the partner provider as a partner, and then call registerReturn() from the partner provider to return the bikes. We then carry out pickups and dropoffs, and finally check if the bikes from the ... | @Test
public void testDeliveryReturn() {
//Set up use case
this.quotes = Controller.getQuotes(desiredBikes, this.dateRange,
this.customer.getLocation(),
true);
Quote chosenQuote = this.quotes.get(0);
Provider originalProvider = chosenQuote.provider;
... | [
"@Test\n public void testReturnOriginal() {\n this.quotes = Controller.getQuotes(desiredBikes, this.dateRange,\n this.customer.getLocation(),\n false);\n Quote chosenQuote = this.quotes.get(0);\n ArrayList<Bike> availableBikesProvider = new ArrayList<>();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Registers a listener for getting notifications when playback time has been updated. | void onTimeUpdated(Consumer<Double> listener) {
timeUpdatedListeners.add(listener);
} | [
"public void addTimeObserver(TimeObserver observer);",
"public interface TimeListener\n {\n \t/**\n\t * Informs the listener that the time of day has changed\n\t */\n\tpublic void timeChanged( int newTime );\n }",
"private void addTimeListeners()\n {\n myProcessorBuilder.getTimeManager().addActiveTime... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete the specified Report Definition. Prerequisites: The Report Definition must exist Tasks: The Report Definition is accessed using the provided reference. The Report Definition is deleted. No data is returned. | void delete(String reportDefinitionId) throws AuthenticationException, AuthorizationException,
ReportDefinitionNotFoundException, MissingMethodParameterException, SystemException; | [
"boolean deleteSurveyDefinition(SurveyDefinition surveyDefinition)\n throws SurveyServiceException;",
"void deleteReport(MossReport report);",
"public void deleteReport(ReportBase report)\r\n throws PersistenceException;",
"@DeleteMapping(\"/references/{id}\")\n @Timed\n public ResponseEnt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set the value of the madeBy property. | public void setMadeBy(IdeaParticipantDTO newValue)
{
this.madeBy = newValue;
} | [
"public void setUserId(int orderMadeBy) {\r\n this.userId = orderMadeBy;\r\n }",
"void setCreatedBy(final U createdBy);",
"public void setCreatedBy(com.sforce.soap.enterprise.sobject.User createdBy) {\r\n this.createdBy = createdBy;\r\n }",
"public void setChangedBy(User changedBy);",
"@... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Generates a map of hashcode and the corresponding itemset. Since multiple entries can have the same hashcode, there would be a list of itemsets for any hashcode. | public static Map<Integer, List<ItemSet>> getLargeItemsetMap(List<ItemSet> largeItemsets) {
Map<Integer, List<ItemSet>> largeItemsetMap = new HashMap<Integer, List<ItemSet>>();
List<ItemSet> itemsets = null;
for (ItemSet largeItemset : largeItemsets) {
int hashCode = largeItemset.hashCode();
if (largeItemse... | [
"public HashMap<Item, Integer> getItemMap();",
"private void createBitStremMap(){\n itemListMap = new HashMap<>();\n \n for (ArrayList<Integer> transactions_set1 : transactions_set) {\n ArrayList curr_tr = (ArrayList) transactions_set1;\n if(curr_tr.size() >= min_itemset... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new BabbleValue RecordBuilder by copying an existing Builder. | public static com.babbler.ws.io.avro.model.BabbleValue.Builder newBuilder(com.babbler.ws.io.avro.model.BabbleValue.Builder other) {
return new com.babbler.ws.io.avro.model.BabbleValue.Builder(other);
} | [
"public static com.babbler.ws.io.avro.model.BabbleValue.Builder newBuilder(com.babbler.ws.io.avro.model.BabbleValue other) {\n return new com.babbler.ws.io.avro.model.BabbleValue.Builder(other);\n }",
"public static com.babbler.ws.io.avro.model.BabbleValue.Builder newBuilder() {\n return new com.babbler.ws... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Make CarUserManagerHelper available to subclasses. | protected CarUserManagerHelper getCarUserManagerHelper() {
return mCarUserManagerHelper;
} | [
"private UserManager() {\r\n\t\tmc = MedicineManager.getInstance();\r\n\t}",
"public UserHelper() {\n }",
"@Inject\n public SyncingRealmHelper(AdministrationContext ctx, UserManager userManager, GroupManager groupManager, Set<ExternalUserConverter> externalUserConverters) {\n this.ctx = ctx;\n this.us... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Defines a function with the specified name. | public void defineFunction(String name, PPFunction fn) {
functions.put(name, fn);
fn.setName(name);
fn.setSlide(this);
} | [
"public void registerFunction(String name, Function function) {\n functions.put(name, function);\n }",
"public void addFunction(String name, int fnid) {\n func.put(name, fnid);\n }",
"public void addFunction(String name, AbstractFunction function) {\r\n\t\t\r\n\t\tfunctions.put(name, function);\r\n\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Changes every key k>=key to k+delta. This method will create an _invalid_ tree if delta=key in this and the largest jIn other words, this method must not result in any change in the order of the keys in this, since the tree structure is not being changed at all. | IntTree<V> changeKeysAbove(final long key, final int delta) {
if (size == 0 || delta == 0) return this;
if (this.key >= key)
// adding delta to this.key changes the keys of _all_ children of this,
// so we now need to un-change the children of this smaller than key,
// all of which are to the... | [
"IntTree<V> changeKeysBelow(final long key, final int delta) {\n if (size == 0 || delta == 0) return this;\n\n if (this.key < key)\n // adding delta to this.key changes the keys of _all_ children of this,\n // so we now need to un-change the children of this larger than key,\n // all of which a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column trading_item.eBayNowEligible | public void setEbaynoweligible(String ebaynoweligible) {
this.ebaynoweligible = ebaynoweligible == null ? null : ebaynoweligible.trim();
} | [
"public String getEbaynoweligible() {\r\n return ebaynoweligible;\r\n }",
"public void setRewardEligibleAmt(java.math.BigDecimal rewardEligibleAmt)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is to set procedures handled in each location arranged by groups | private void setLocationProceduresByGroups(IacucProtocol iacucProtocol, List<IacucProtocolStudyGroup> iacucProtocolStudyGroups) {
for(IacucProtocolStudyGroupLocation iacucProtocolStudyGroupLocation : iacucProtocol.getIacucProtocolStudyGroupLocations()) {
List<IacucProtocolSpeciesStudyGroup> iacucPro... | [
"private void setLocationProceduresBySpecies(IacucProtocol iacucProtocol, List<IacucProtocolStudyGroup> iacucProtocolStudyGroups) {\n for(IacucProtocolStudyGroupLocation iacucProtocolStudyGroupLocation : iacucProtocol.getIacucProtocolStudyGroupLocations()) {\n List<IacucProtocolSpeciesStudyGroup> ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set value of DummyOption | public final void setDummyOption(java.lang.String dummyoption)
{
setDummyOption(getContext(), dummyoption);
} | [
"public final void setDummyOption(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String dummyoption)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.DummyOption.toString(), dummyoption);\r\n\t}",
"void setOption(String name, Object value);",
"public void setOption(java.lang.Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the probability that the unfilled cells around the position (x, y) will generate a match that will include the cell at (x, y). It needs the number of possible different candy colours to calculate the probability. | public static double getProbabilityOfHopefulCells(Cell[][] board, int x,
int y, int differentColors) {
int hHopeful = getHorizontalHopeful(board, x, y);
int vHopeful = getVerticalHopeful(board, x, y);
double inv = 1.0 / differentColors;
if (hHopeful >= 3) {
if (vHopeful >= 3)
return inv * inv * inv * ... | [
"public int[] probabilityDistributionGuess() {\n //Reset the list of potential candidates for guessing\n this.potentials = new int[this.board.getBoardSize()][this.board.getBoardSize()];\n \n //Loop through all of the squares on the board\n for (int i=0; i<this.board.getBoardSize()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Providing layout resource ID for inflating. | public abstract int getLayoutResourceId(); | [
"@LayoutRes\n int getLayoutId();",
"void setLayoutId(@LayoutRes int layoutId);",
"int getLayoutId();",
"protected abstract int getLayoutId();",
"abstract public int getLayoutId();",
"public int getLayoutId(){\n return R.layout.fragment_record_list;\n }",
"protected abstract int getItemLayou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .adamant.global.v1.IOSTChildAccount iost_child_accounts = 1 [json_name = "iostChildAccounts"]; | public java.util.List<? extends adamant.global.v1.Model.IOSTChildAccountOrBuilder>
getIostChildAccountsOrBuilderList() {
if (iostChildAccountsBuilder_ != null) {
return iostChildAccountsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(iostC... | [
"private ListIOSTChildAccountsResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@java.lang.Override\n public int getIostChildAccountsCount() {\n return iostChildAccounts_.size();\n }",
"@java.lang.Override\n public adamant.global.v1.Model.IOSTChildAccountOr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The constructor takes a file that points to the Escape game configuration file. It should get the necessary information to be ready to create the game manager specified by the configuration file and other configuration files that it links to. | public EscapeGameBuilder(String fileName) throws Exception
{
String xmlConfiguration = getXmlConfiguration(fileName);
// Uncomment the next instruction if you want to see the XML
// System.err.println(xmlConfiguration);
gameInitializer = unmarshalXml(xmlConfiguration);
} | [
"public GameManager(File file) {\n this.config = null;\n this.gameData = new JsonObject();\n this.gameObject = null;\n this.isGameRunning = false;\n try {\n this.classLoader = new URLClassLoader(new URL[] {file.toURI().toURL()});\n }catch(MalformedURLException ex... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Preface' containment reference. If the meaning of the 'Preface' containment reference isn't clear, there really should be more of a description here... | PrefaceType getPreface(); | [
"public String getPreface() {\r\n\t\ttry {\r\n\t\t\treturn prefaces.getFirst();\r\n\t\t} catch (NoSuchElementException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public static Preferences getPrefObject() {\r\n\t\tif (_reference == null)\r\n\t\t\t// it's ok, we can call this constructor\r\n\t\t\t_reference = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An XMLObject whose content model contains "any" child elements. | public interface ElementExtensibleXMLObject extends XMLObject {
/**
* Gets the list of XMLObjects added to this XMLObject as part of the "any" content model.
*
* @return list of XMLObjects added to this XMLObject as part of the "any" content model
*/
public List<XMLObject> getUnknownXMLObj... | [
"public void removeEmptyObjects() {\r\n\t\t// No children objects\r\n\t}",
"ArrayList<XMLPart> getChildrenElements();",
"final GapBoxViewChildren getChildrenNull() {\n return children;\n }",
"@Override\n\tpublic boolean isEmpty() {\n\t\tmodCount = root.numChildren();\n\t\treturn (modCount == 0);\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Revolute__AxisAssignment_1" $ANTLR start "rule__Planar__AxisAssignment_1" ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/srcgen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9820:1: rule__Planar__AxisAssignment_1 : ( ruleAXIS ) ; | public final void rule__Planar__AxisAssignment_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9824:1: ( ( ruleAXIS ) )
... | [
"public final void rule__Revolute__AxisAssignment_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9809:1: ( ( ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Submits a collection of mutations for insertion into the table. This method will return immediately after submission, but may block when there is insufficient capacity to accept the mutations. | WriteStage submitMany(String table, Collection<Mutation> mutations, long timeout, TimeUnit unit) throws InterruptedException; | [
"WriteStage submit(String table, Mutation mutation) throws InterruptedException;",
"private void commitMutations(CassandraTransaction cassDBTran) {\r\n Map<ByteBuffer, Map<String, List<Mutation>>> colMutMap = cassDBTran.getUpdateMap();\r\n if (colMutMap.size() == 0) {\r\n return;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds the specified child in the specified screen. The position and dimension of the child are defined by x, y, spanX and spanY. | void addInScreen(View child, long container, int x, int y, int spanX, int spanY,
boolean insert) {
if (container == LauncherSettings.Favorites.CONTAINER_DESKTOP) {
if (getScreen() == null) {
Log.e(TAG, "Skipping child, screen not found");
// DEBUGGING - Pr... | [
"void addInScreenFromBind(View child, long container, long screenId, int x, int y, int spanX, int spanY) {\n Log.v(TAG, \"addInScreenFromBind\");\n if (container == LauncherSettings.CONTAINER_DESKTOP) {\n if (getScreenWithId(screenId) == null) {\n Log.e(TAG, \"Skipping child,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SNMP v3 priv protocol for this profile | public void set_snmpprivprotocol(String snmpprivprotocol)
{
this.snmpprivprotocol = snmpprivprotocol;
} | [
"public String get_snmpprivprotocol()\r\n\t{\r\n\t\treturn this.snmpprivprotocol;\r\n\t}",
"public String getSnmpv3Privprotocol() {\r\n return snmpv3Privprotocol;\r\n }",
"public interface PU_SNMPV3_AUTH_PROTOCOL {\n public static final int PU_SNMPV3_AUTH_MD5 = 0;\n public static final int PU_SN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
[UC1428] Unificar ID de Clientes com o Mesmo Documento [IT0015] Obter Total Clientes Anteriores | public Integer obterTotalClientesAnteriores()
throws ErroRepositorioException; | [
"public void obtenerCodigoCliente() {\r\n\t\ttry {\r\n\t\t\tsetClientes(clienteService.consultarClientes());\r\n\t\t\tclienteBean.setCodigoCliente(EmisionUtil.obtenerCodigoCliente(clientes.size() + 1));\r\n\t\t} catch (HiperionException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public int getNifClient... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the key code if it is set, otherwise returns undefined | public int getKeyCode() {
if (this.isKeySet) {
return this.keyCode;
}
return KeyEvent.VK_UNDEFINED;
} | [
"public static int getKeyCode()\n {\n checkInstance(\"getKeyCode()\");\n\n if (_gotKey)\n {\n _gotKey = false;\n return _keyCode;\n }\n else\n return KeyEvent.CHAR_UNDEFINED;\n }",
"int getKey();",
"private String getKey()\r\n\t\t{\r\n\t\t\tif (key != null)\r\n\t\t\t{\r\n\t\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getVariance(int month) This method calculates the variance of temperature values. Depending on the given param, it calculates the variance for a month or for all. | public double getVariance(int month); | [
"public double getStandardDeviation(int month);",
"double getVariance();",
"public double getVariance();",
"public abstract double getVariance();",
"double variance(double mean) throws MatrixException;",
"double variance() throws MatrixException;",
"public void setMintariffvariance (String mintariffvari... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Pull author's nickname only. | public String pullAuthorNickname()
{
return authorNickname;
} | [
"private String getAuthorUsername(UIMessage message) {\r\n\t\tString toReturn = \"<Author-Not-Found>\";\r\n\t\ttry {\r\n\t\t\ttoReturn = facade.getMemberByID(message.getAuthorID()).getUsername();\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\t// do nothing - return a default user-name\r\n\t\t}\r\n\t\treturn toRetur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Marker interface for BindingTypePattern and BindingAnnotationTypePattern | public interface BindingPattern extends IHasPosition {
int getFormalIndex();
} | [
"public abstract TypeBindings bindingsForBeanType();",
"BindingType createBindingType();",
"public String getBindingType();",
"public interface AnnotatedBindingBuilder\n extends LinkedBindingBuilder\n{\n\n public abstract LinkedBindingBuilder annotatedWith(Class class1);\n\n public abstract LinkedBin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validates if a logic value is true or false. | public static boolean logic(String logic) {
boolean result = false;
try {
if (logic.equals("true") || logic.equals("false")) {
result = true;
}
} catch (RuntimeException e) {
return false;
}
return result;
} | [
"boolean isLogicValue();",
"boolean isValidBoolean(boolean value);",
"boolean hasFalseValid();",
"protected boolean isValidBoolean(String text) {\n return !isBlank(text) && text.toLowerCase().matches(\"true|false\");\n }",
"private static boolean validateBoolean(String boolString) {\n if (boolString.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets standard product rate id. | public void setStandardProductRateId(String standardProductRateId) {
this.standardProductRateId = standardProductRateId;
} | [
"public String getStandardProductRateId() {\n\t\treturn this.standardProductRateId;\n\t}",
"public void setIdProduct(int idProduct) {\n this.idProduct = idProduct;\n }",
"public void setIdProduct(String idProduct) {\n this.idProduct = idProduct;\n }",
"public String getRateId() {\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is the normal attack of Java Rice that depends on its dexterity modified by the dice. | @Override
public int attack() {
return dexterity/dice.roll();
} | [
"@Override\n\tpublic void attack() {\n\t}",
"public int attack(){\n int damage = super.attack();\n int magic = Randomizer.nextInt(20)+1;\n if (magic>1)\n {\n return damage;\n }\n else\n {\n return damage+50;\n }\n }",
"@Override\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the entrance id. | public void setEntranceId(int entranceId) {
this.entranceId = entranceId;
} | [
"public void setId(long entranceId){\n this.id = entranceId;\n }",
"@Override\n\tpublic void setId(long id) {\n\t\t_tincanAgent.setId(id);\n\t}",
"void setLocalId(long id);",
"public void setId(final String id) {\n \t\teventId = id;\n \t}",
"public int getEntranceId() {\n\t\treturn entranceId;\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
display informations about user logged | public void displayUserDetails(){
User user = userInLocalDb.getLoggedUser();
nameLogged.setText(user.name);
emailReg.setText(user.email);
} | [
"public void printUserInfo(){\n System.out.print(\"Username: \"+ getName() + \"\\n\" + \"Birthday: \"+getBirthday()+ \"\\n\"+ \"Hometown: \"+getHome()+ \"\\n\"+ \"About: \" +getAbout()+ \" \\n\"+ \"Subscribers: \" + getSubscriptions());\n\t}",
"public void displayUserInformations() {\n println(\"getLocati... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new shape for the given block type. | Shape create(BlockType blockType) {
Shape result;
switch (blockType) {
case Empty:
result = new EmptyShape();
break;
case I:
result = new IShape();
break;
case J:
result = new JShape();
... | [
"ShapeType createShapeType();",
"public void createBlock(Vector3 position, BlockType blockType)\r\n\t{\r\n\t\tif (position == null)\r\n\t\t\treturn;\r\n\t\tBlock block;\r\n\t\tif(blockType == BlockType.Robot)\r\n\t\t\tblock = new RobotBlock(position, blockType);\r\n\t\telse\r\n\t\t\tblock = new Block(position, bl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Used to find the last tick in the animation when building the model. Takes in a tick value and sets it as the endTick value. | void setEndTick(int tick); | [
"int getEndTick();",
"void setLastTickPos(Vec3 pos);",
"int getLastTick();",
"int getFinalTick();",
"private MidiEvent getEnd( final long tick ) throws InvalidMidiDataException\n\t{\n\t\tfinal MetaMessage mt = new MetaMessage();\n\t\tfinal byte[] bet =\n\t\t{}; // empty array\n\t\tmt.setMessage( 0x2F, bet, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
email recipients to be notified when zimbraAggregateQuotaLastUsage reaches zimbraDomainAggregateQuotaWarnPercent of the zimbraDomainAggregateQuota | @ZAttr(id=1331)
public void setDomainAggregateQuotaWarnEmailRecipient(String[] zimbraDomainAggregateQuotaWarnEmailRecipient) throws com.zimbra.common.service.ServiceException {
HashMap<String,Object> attrs = new HashMap<String,Object>();
attrs.put(Provisioning.A_zimbraDomainAggregateQuotaWarnEmailRe... | [
"@ZAttr(id=1331)\n public void addDomainAggregateQuotaWarnEmailRecipient(String zimbraDomainAggregateQuotaWarnEmailRecipient) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"+\" + Provisioning.A_z... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the charRange specified by someRange is contained within this range. | public boolean contains(charRange someRange) {
return (isValid() && someRange.isValid() && (start <= someRange.start) && (end >= someRange.end));
} | [
"public boolean contains(charRange someRange) {\n return (isValid() && someRange.isValid() && (body.start <= someRange.start) && (body.end >= someRange.end));\n }",
"public boolean contains(tagRange someRange) {\n return (isValid() && someRange.isValid() && (start <= someRange.startTa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CONSTRUCTOR TradingDayInfo Preconditions: None Postconditions The object's fields are set to the provided values | public TradingDayInfo(String ticker, String date, double openingPrice, double highPrice, double lowPrice, double closingPrice) {
this.ticker = ticker;
this.date = date;
this.openingPrice = openingPrice;
this.highPrice = highPrice;
this.lowPrice = lowPrice;
this.closingPri... | [
"public DayCallInfo ()\r\n {\r\n \r\n }",
"public DayCallInfo(Date date)\r\n {\r\n super(date);\r\n }",
"public TradingModel() {\r\n }",
"public TranxInfo() {\n }",
"public PeriodInfo(){}",
"private DailyForecastSummary() {}",
"public DateMetadataEntry() {\n\t\t// do noth... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the field shipPoint. | public String getShipPoint() {
return shipPoint;
} | [
"public Point getShipLocation(){\r\n\t\treturn shipLocation;\r\n\t}",
"public Ship getShip() {\r\n\t\treturn ship;\r\n\t}",
"public Ship getShip() {\n\t\treturn mShip;\n\t}",
"public String getShip() {\n return ship.toString();\n }",
"public String getShippingPoint() {\n return shippingPoin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function for the initialization of the required resources. Appropriate method for the Toshiba demo: Avoid initializing all the common resources/tools with the user reviews demo (i.e. wordnet and stopwords) | public static void initializeToolsAndResourcesForDemo(IDictionary dict) throws MalformedURLException, IOException {
wordnet_dict = dict;
wordnet_dict.open();
// Choose wordnet sources to be used
wordnetResources.add("synonyms");
//wordnetResources.add("antonyms");
//word... | [
"public static void initializeToolsAndResources(String wordnetPath) throws MalformedURLException, IOException {\n\n Logger.getLogger(ExternalKnowledgeDemoMain.class.getName()).log(Level.INFO, \"...Generating stop-words lists...\");\n StringUtils.generateStopListsFromExternalSource(filePath_en, filePat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
C++: Mat estimateRigidTransform(Mat src, Mat dst, bool fullAffine) | private static native long estimateRigidTransform_0(long src_nativeObj, long dst_nativeObj, boolean fullAffine); | [
"public static Mat estimateRigidTransform(Mat src, Mat dst, boolean fullAffine)\n {\n\n Mat retVal = new Mat(estimateRigidTransform_0(src.nativeObj, dst.nativeObj, fullAffine));\n\n return retVal;\n }",
"public static Matrix estimateAffineTransform(KEDetectedFace face) {\n\t\treturn estimateAf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column CTSCARDS_MGT_HST.DESIGN | public BigDecimal getDESIGN() {
return DESIGN;
} | [
"public void setDESIGN(BigDecimal DESIGN) {\r\n this.DESIGN = DESIGN;\r\n }",
"java.lang.String getDesignation();",
"public java.lang.String getDesignation() {\n return designation;\n }",
"public String getDesignation () {\n\t\treturn designation;\n\t}",
"public Design getDesign() {\n r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Takes the row to compress. the pattern to replace and the previously calculated reduction amount and creates the new compressed array | public int[] compressArray(int[] row, int[] pattern, int reduction){
int[] temp = new int[row.length-reduction];
for(int i=0; i<pattern.length; i++) {
temp[i] = pattern[i];
}
temp[pattern.length] = -1;
int i=0;
int n=pattern.length+1;
... | [
"public int[] decompressArray(int[] row){\r\n\r\n int i=0;\r\n int sCount=0;\r\n\r\n while(row[i]!= -1){\r\n sCount++;\r\n i++;\r\n }\r\n\r\n int[] pattern = new int[sCount];\r\n for(int j=0; j<pattern.length; j++){\r\n pattern[j] = row[j];\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the LANA offline polling interval to check for the LANA coming back online | public final long getLANAOfflinePollingInterval() {
return m_lanaPoll;
} | [
"public abstract int getPollStatusInterval();",
"int getHeartbeatInterval();",
"int getHealthCheckInterval();",
"public int getCheckInterval();",
"long getKeepAlivePingMinutes();",
"public long getPingInterval()\n {\n return _pingInterval;\n }",
"long getRebalanceIntervalMillis();",
"public int... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a retail options for image items If none exists, returns null. | private RetailOption getImageRetailOption(ResultSet rs)
{
RetailOption opt = null;
//TODO getImageRetailOption
return opt;
} | [
"private RetailOption getRetailOption(ResultSet rs)\n\t{\n\t\tRetailOption opt = null;\n\t\tString item = null;\n\n\t\ttry {\n\t\t\titem = rs.getString(\"item_id\");\n\n\t\t\topt = getItemRetailOption(rs);\n\n\t\t\tif ( opt == null )\n\t\t\t\topt = getImageRetailOption(rs);\n\n\t\t\tif ( opt == null )\n\t\t\t\topt ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
utility method to print all the words and their frequency stored in hashmap. useful for debugging. | public void printFrequencyMap() {
for (Map.Entry<String, Integer> entry : wordFrequency.entrySet()) {
System.out.println(entry.getKey() + ":" + entry.getValue());
}
} | [
"private void printKeywords() {\n\t\tfor (Word w : keywordsByFreqDesc.values()) {\n\t\t\tSystem.out.println(w.toString());\n\t\t}\n\n\t}",
"public void displayWordsByCount(){\n List<WordCount> wordList = this.getMap().getWordCountsByCount();\n for (int i = 0; i < wordList.size(); i++){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the nonnegative id number of the given book if he is owned by this library, 1 otherwise. | int getBookId(Book book) {
// goes through all our books
for (int index = 0; index < this.bookCounter; index++) {
// checks if the book is already in the library
if (book == this.bookShelf[index]) {
return index;
}
}
// we could not find the book
return -1;
} | [
"public long getId_book() {\n\t\treturn _myLibrary.getId_book();\n\t}",
"private int find(Book book) { // helper method to find a book in the bag\n\t\tint count= 0;\n\t\twhile(count<numBooks) {\n\t\t\tif(books[count].equals(book)) {\n\t\t\t\treturn count; //index in array not serial num\n\t\t\t}\n\t\t\tcount++;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Static factory method to create a default system SecurityId from information in Config. | public static SecurityId getSystemId() {
String username = Config.getProp(CKfw.SYSTEMID_NAME);
String password = Config.getProp(CKfw.SYSTEMID_PASSWORD, "");
return ((username == null) ? null : new SecurityId(username, password));
} | [
"java.lang.String getSysId();",
"String getSecId();",
"public static Serializable getSystemId() {\n Serializable ret = null;\n if (getSystemStatic() != null) {\n ret = getSystemStatic().getDistributionManager().getId();\n }\n return ret;\n }",
"public SecurityId getSecurityId()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |