query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
read the second line, number of ships | private void getNumberOfShips() {
do {
scanner = new Scanner(System.in);
readLine = scanner.nextLine();
} while (readLine.equals(""));
parseNumberOfShips(readLine);
} | [
"private void getShipsInfo() {\n String input[] = new String[numberOfShips];\n for (int i = 0; i < input.length; i++) {\n do {\n scanner = new Scanner(System.in);\n readLine = scanner.nextLine();\n } while (readLine.equals(\"\"));\n input[... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method that permits to know if the neural network has an associated default output function. | public boolean hasDefaultOutFunction() {
return (outFunc != null);
} | [
"public boolean getDefaultOutputsEnabled();",
"boolean isInputNeuron();",
"boolean isBiasNeuron();",
"boolean isDefault();",
"boolean supportsDefault();",
"boolean hasIsOutputParameter();",
"public boolean requiresDenseOutput() {\n return true;\n }",
"boolean hasSigmoidCalibration();",
"bo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the quantity of the factory with the given index to the specified quantity. | public void setQuantity(final int index, final int quantity)
{
final ComplexFactory factory = this.factories.get(index);
if (factory.getQuantity() != quantity)
{
factory.setQuantity(quantity);
calculateBaseComplex();
updateShoppingList();
}
} | [
"void setQuantity(int quantity);",
"public void setQuantity(int quantity);",
"public void setQuantity(int value) {\n this.quantity = value;\n }",
"public final void SetIndexQuantity (int iIQuantity)\r\n {\r\n m_iIQuantity = iIQuantity;\r\n }",
"public void setQuantity(int _quantity)\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the DSCRD value for this CodeCD. | public java.lang.String getDSCRD() {
return DSCRD;
} | [
"public java.lang.String getDSCRSD() {\n return DSCRSD;\n }",
"public java.lang.String getDSCRMD() {\n return DSCRMD;\n }",
"public String getDcrp() {\n return dcrp;\n }",
"public String getDcrp() {\n\t\treturn dcrp;\n\t}",
"public java.lang.String getDSCRF() {\n return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delegate required for converting byte data to a Java Object. A delegate is not required when converting data to JSON. | public interface JsonByteDataConverterDelegate<T> {
/**
* @return Returns a GSON {@link TypeToken} that defines what to use when
* converting from a JSON string to an object.
*/
public TypeToken<T> getJsonConversionType();
} | [
"private static <T> T readJson(final byte[] data, final Class<T> clazz) throws IOException {\n return ObjectMapperFactory.getThreadLocal().readValue(data, clazz);\n }",
"protected Object getObject(Class cl, byte[] data) throws Exception\r\n {\r\n JsonHandler jsonHandler = new JsonDefaultHandler();\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns the numberOfChecksUsed. | public int getChecksUsed(){
// TODO
return 0;
} | [
"public int getChecksUsed() {\n //TODO: implement\n return this.numberOfChecksUsed;\n }",
"public int getCheckCount() {\r\n return checkResults.size();\r\n }",
"@Override\n\tpublic int getActiveCheckCount() {\n\t\treturn hostChecks.size();\n\t}",
"@Override\r\n public final int get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
remove superhero from the system, indicated by id return status 201 on success | @PostMapping("/remove/{id}")
@ResponseStatus(HttpStatus.CREATED)
public List<Superhero> removeSuperhero(@PathVariable("id") long heroId){
for (Superhero superhero : superheroes){
if(superhero.getId() == heroId){
superheroes.remove(superhero);
return superheroe... | [
"@PreAuthorize(\"hasRole('ADMIN')\")\n @RequestMapping(value = \"/{troopId}/hero/remove/{heroId}\", method = RequestMethod.POST)\n public String removeHero(@PathVariable(\"troopId\") final long troopId,\n @PathVariable(\"heroId\") final long heroId,\n fi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the Date defined by calendar in a medium date format | public static String mediumDateFormat(Calendar calendar) {
return DateFormat.getDateInstance(DateFormat.MEDIUM).format(calendar.getTime());
} | [
"java.lang.String getFoundingDate();",
"static String getProperDate(Calendar cal) {\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\tString properDate = dateFormat.format(cal.getTime());\n\t\treturn properDate;\n\t}",
"java.util.Calendar getSystemEntryDate();",
"java.lang.String g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Provides the state of the executed delegate command (if it already exists). | @Override
public CommandState getCommandState() {
return executedDelegateCmdClone != null
? executedDelegateCmdClone.getCommandState()
: super.getCommandState();
} | [
"public String getExecuteState() {\n\t\treturn executeState;\n\t}",
"ExecutionState getState();",
"public IState execute();",
"public String getCommandReturned() {\n return commandReturned;\n }",
"com.google.dataflow.v1beta3.ExecutionState getState();",
"public String getExecuted() {\n retur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests a directory with one file of size 1. | @Test
public void testDeleteFolders1FileSize1() throws IOException {
FileUtils.copyDirectory(Paths.get("src/test/resources/org/apache/commons/io/dirs-1-file-size-1").toFile(),
tempDirectory.toFile());
final CountingPathFileVisitor visitor = new DeletingPathFileVisitor();
File... | [
"@Test\n public void testDeleteFolders1FileSize0() throws IOException {\n FileUtils.copyDirectory(Paths.get(\"src/test/resources/org/apache/commons/io/dirs-1-file-size-0\").toFile(),\n tempDirectory.toFile());\n final CountingPathFileVisitor visitor = new DeletingPathFileVisitor();\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get duplicate recipients by key column from customer table | HashMap<ProfileRecipientFields, ValidatorResults> getDuplicateRecipientsFromExistData(Map<ProfileRecipientFields, ValidatorResults> recipientBeans, ImportProfile importProfile, CSVColumnState[] columns); | [
"private List<Contact> getDuplicatesByEmail(List<Contact> contacts) {\n List<Object> duplicates = getDuplicatesByKey(Contact::getEmail, contacts);\n\n // Only return Contact records that match the duplicated email addresses\n return contacts.stream()\n .filter(contact -> duplicat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter for property accept. | public void setAccept(Boolean accept) {
this.accept = accept;
} | [
"public void setAccept(boolean accept){\r\n \t\tthis.accept = accept;\r\n \t}",
"public void setAccept(boolean accept) {\n\t\tthis.accept = accept;\n\t}",
"public void setAccept(String accept) {\n this.accept = accept;\n }",
"public boolean accept(Property property);",
"public Boolean getAccept() ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by Abator for iBATIS. This method sets the value of the database column t_sys_menu_info.menu_type | public void setMenuType(String menuType) {
this.menuType = menuType;
} | [
"public void setMenu ( Object menu ) {\r\n\t\tgetStateHelper().put(PropertyKeys.menu, menu);\r\n\t\thandleAttribute(\"menu\", menu);\r\n\t}",
"public void setSystemmenu(Long systemmenu) {\n this.systemmenu = systemmenu;\n }",
"public void setSysType(String sysType) {\n this.sysType = sysType;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
choose k elements of S and add to result | private void subsets(int[] S, int k, ArrayList<ArrayList<Integer>> result) {
ArrayList<Integer> set = new ArrayList<Integer>();
helper(S, k, 0, result, set);
} | [
"private void helper(int[] S, int k, int p, ArrayList<ArrayList<Integer>> result, ArrayList<Integer> set) {\n if(k==0) {\n result.add(set);\n return;\n }\n if(S.length-p>=k) {\n ArrayList<Integer> newSet = new ArrayList<Integer>(set);\n newSet.add(S[p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Accessor for manager for java types. | TypeManager getTypeManager(); | [
"TypeManager getTypeManager() {\n return types;\n }",
"public TypeManager getTypeManager() {\n return typeManager;\n }",
"final protected TypeConversionManager getTypeConversionManager() {\r\n return typeConversionManager;\r\n }",
"protected TypeManager getTypeManager()\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the secondsEnd value for this VideoTimeInfoDTO. | public double getSecondsEnd() {
return secondsEnd;
} | [
"public long getEndTs() {\n return this.startTimestamp + this.resolution * this.size;\n }",
"public Long getEndTs() {\n return endTs;\n }",
"public void setSecondsEnd(double secondsEnd) {\n this.secondsEnd = secondsEnd;\n }",
"public java.lang.Long getTimeEnd() {\n return time... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the distance of a point from a line. Preconditions: Line and point must not be null. Postconditions: Returns the distance of the point from the line as a double. | public double distance(Line line, Point p) {
Point pointA = line.getPointA();
Point pointB = line.getPointB();
double dX = pointB.x() - pointA.x();
double dY = pointB.y() - pointA.y();
double dist = dX * (pointA.y() - p.y()) - dY * (pointA.x() - p.x());
if (dist < 0) {
dist = -dist;
}
return dist;
} | [
"private double distancePointLine(double[] point, double[] line_point1, double[] line_point2) {\n double p0x = point[0];\n double p0y = point[1];\n double p1x = line_point1[0];\n double p1y = line_point1[1];\n double p2x = line_point2[0];\n double p2y = line_point2[1];\n\n double num = Math.abs... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__JvmWildcardTypeReference__ConstraintsAssignment_2_0" $ANTLR start "rule__JvmWildcardTypeReference__ConstraintsAssignment_2_1" ../org.xtext.lwc.instances.ui/srcgen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:13563:1: rule__JvmWildcardTypeReference__ConstraintsAssignment_... | public final void rule__JvmWildcardTypeReference__ConstraintsAssignment_2_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:13567:1: ( (... | [
"public final void rule__JvmWildcardTypeReference__ConstraintsAssignment_2_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all the broker message listeners where companyId = &63;. | @Override
public List<BrokerMessageListener> findByCompany(long companyId)
throws SystemException {
return findByCompany(companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
null);
} | [
"@Override\n public BrokerMessageListener[] findByCompany_PrevAndNext(\n long brokerMessageListenerId, long companyId,\n OrderByComparator orderByComparator)\n throws NoSuchBrokerMessageListenerException, SystemException {\n BrokerMessageListener brokerMessageListener = findByPrimaryK... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return whether redirects should stay compatible with HTTP 1.0 clients. | protected boolean isRedirectHttp10Compatible() {
return this.redirectHttp10Compatible;
} | [
"public boolean isRedirect() {\n return (value & 0xC0000000) != 0;\n }",
"@Override\n protected boolean isHttpToHttpsRedirect(String fetched,\n String redirect,\n String normalized) {\n log.debug3(\"c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is using PUT method in order to update a property. | @PutMapping("/property/edit/{id}") //is mapping a put request at the specified uri
public Property updateProperty(@RequestBody Property property, @PathVariable Long id) {
Property p = this.propertyService.retrieveProperty(id); //get the property by id
User u = p.getOwner(); //get the owner of property
property.... | [
"public abstract boolean updateCSONByProperty(long id,String propertyName,Object value);",
"public void updateProperty(String property, NodeType type) ;",
"String putProperty(String propName, String propValue);",
"public void setProperty(String property, String value);",
"void put(String kind, String name, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of horizontalDisplacementTo method, of class GPSCoordinate. | @Test
public void testHorizontalDisplacementTo() {
System.out.println("Testing HorizontalDisplacementTo() for a range of different GPS coordinates");
double distancesExpected[] = {
555.998,
555.998,
-555.998,
-555.998,
72.266,
72.266,
-72.266,... | [
"@Test\n public void testVerticalDisplacementTo() {\n System.out.println(\"Testing verticleDisplacementTo() for a range of different GPS coordinates\");\n double distancesExpected[] = {\n 555.998,\n -555.998,\n -555.998,\n 555.998,\n\t\t\t72.266,\n\t\t\t-... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleLeftParenthesis" $ANTLR start "entryRuleRightParenthesis" ../eu.artist.postmigration.nfrvt.lang.gml/srcgen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:5185:1: entryRuleRightParenthesis returns [String current=null] : iv_ruleRightParenthesis= ruleRightParenthesis EOF ; | public final String entryRuleRightParenthesis() throws RecognitionException {
String current = null;
AntlrDatatypeRuleToken iv_ruleRightParenthesis = null;
try {
// ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/interna... | [
"public final String entryRuleLeftParenthesis() throws RecognitionException {\r\n String current = null;\r\n\r\n AntlrDatatypeRuleToken iv_ruleLeftParenthesis = null;\r\n\r\n\r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/par... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a events to know when the user selects a note | private void addEvents() {
mlv.getMapNotesOverlay().addEventListener(new NoteSelectedListener()
{
@Override
public void handleNoteSelectedEvent(EventObject e, Group gr) {
//We have to go to gallery because the user has select a (groups) note
selectedGroup = gr;
onClick(mlv);
... | [
"public void onNotePressed(Note note);",
"public interface OnNoteClickListener {\n void onNoteClick(NoteStruct note);\n\n void onNoteDelete(String id);\n }",
"@FXML\n void addNotes(MouseEvent event) throws SQLException {\n \t\n \tdbQueries.frage_selektieren(frage);\n \tif (DBQueries... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
OpenNTF Domino extensions to Database class | public interface Database extends Base {
/**
*
* Enum for Database-level events, triggered by listeners.
*
* <p>
* Options are:
* <ul>
* <li>BEFORE_CREATE_DOCUMENT / AFTER_CREATE_DOCUMENT: triggered at the start / end of the Database.createDocument method, source and
* target will be Database (newly-cr... | [
"public abstract Object getDatabase();",
"@CodeCompletion\n public abstract WGHierarchicalDatabase hdb() throws WGException;",
"yandex.cloud.api.mdb.mongodb.v1.DatabaseOuterClass.DatabaseSpec getDatabaseSpec();",
"public interface CompiereDatabase\n{\n\t/**\n\t * Get Database Name\n\t * @return database ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to get che player coins. | int getCoins(); | [
"public int getCoins() {\n return coins; //XXX-CHANGE-XXX\n }",
"public int[] getCoin() {\r\n\t\treturn coin;\r\n\t}",
"public int getTotalCoins() {\n\treturn coins;\n}",
"public JLabel getCoins() {\n\t\treturn coins;\n\t}",
"public int getNumberOfCoins() {\n return coins;\n }",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "RULE_MINUS" $ANTLR start "RULE_DIVIDE" | public final void mRULE_DIVIDE() throws RecognitionException {
try {
int _type = RULE_DIVIDE;
int _channel = DEFAULT_TOKEN_CHANNEL;
// ../com.dubture.editor.sass.ui/src-gen/com/dubture/editor/sass/ui/contentassist/antlr/internal/InternalSass.g:2229:13: ( '/' )
// ... | [
"protected Parser divideFactor() {\r\n\tSequence s = new Sequence(\"divideFactor\");\r\n\ts.add(new Symbol('/').discard());\r\n\ts.add(factor());\r\n\ts.setAssembler(new ArithmeticAssembler('/'));\r\n\treturn s;\r\n}",
"public final void mDIVIDE() throws RecognitionException {\n try {\n int _typ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENLAST:event_deleteBtnMouseEntered Delete Btn Exited Color Change | private void deleteBtnMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_deleteBtnMouseExited
deleteBtn.setBackground(Color.decode("#4fc482"));
} | [
"private void deleteBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_deleteBtnMouseEntered\n deleteBtn.setBackground(Color.decode(\"#339966\"));\n }",
"private void deleteBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_deleteBtnMousePressed\n deleteBtn.setBackgr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the RateLimiterMode enumeration value by passing the byte identifier to this method. | public static RateLimiterMode getRateLimiterMode(final byte byteIdentifier) {
for (final RateLimiterMode rateLimiterMode : RateLimiterMode.values()) {
if (rateLimiterMode.getValue() == byteIdentifier) {
return rateLimiterMode;
}
}
throw new IllegalArgumentException(
"Illegal val... | [
"int getQuotaModeValue();",
"RRateLimiter getRateLimiter(String name);",
"public Byte getRateType() {\n return rateType;\n }",
"public long getRatelimit() {\n\t\t\n\t\treturn this.rateLimitValue;\n\t}",
"public DMaaPCambriaLimiter getfRateLimiter() {\r\n\t\treturn fRateLimiter;\r\n\t}",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes out the encapsulated origin entry ledger report to the given reportWriterService | public abstract void writeLedgerSummaryReport(ReportWriterService reportWriterService); | [
"public void writeClosedAccountBalanceForwardLedgerSummaryReport(ReportWriterService reportWriterService) {\n closedAccountForwardBalanceLedgerReport.writeReport(reportWriterService);\n }",
"public void writeOpenAccountBalanceForwardLedgerSummaryReport(ReportWriterService reportWriterService) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the visibility of the items required to find an existing operation. | private void setVisibilityExistingOperation(boolean visibility) {
existingOperationLabel.setVisible(visibility);
existingOperationInput.setVisible(visibility);
registerExistingButton.setVisible(visibility);
backButton.setVisible(visibility);
} | [
"private void setVisibilityOperationButtons(boolean visibility) {\n newOperationButton.setVisible(visibility);\n existingOperationButton.setVisible(visibility);\n }",
"private void updateVisibility() {\n boolean calculating = p001.calculationInProgress();\n calculationProgressBar.se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "less_mixin_guarded" $ANTLR start "less_condition" /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1184:1: less_condition : ( NOT ( ws )? )? LPAREN ( ws )? ( ( cp_variable | less_function_in_condition ) ( ws )? ( less_condition_operator ( ws )? cp_math_expression )? ) RPAREN ; | public final void less_condition() throws RecognitionException {
try { dbg.enterRule(getGrammarFileName(), "less_condition");
if ( getRuleLevel()==0 ) {dbg.commence();}
incRuleLevel();
dbg.location(1184, 0);
try {
// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1185:5: (... | [
"public final void less_condition_operator() throws RecognitionException {\n\t\ttry { dbg.enterRule(getGrammarFileName(), \"less_condition_operator\");\n\t\tif ( getRuleLevel()==0 ) {dbg.commence();}\n\t\tincRuleLevel();\n\t\tdbg.location(1206, 0);\n\n\t\ttry {\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Appends and returns a new empty "TaskType" element | eu.aladdin_project.xsd.SystemParameter addNewTaskType(); | [
"public void addType(String type) {\r\n\r\n\t\tTaskType tt = new TaskType();\r\n\t\ttt.name = type;\r\n\t\taddState(type, \"OPEN\");\r\n\t\taddState(type, \"CLOSED\");\r\n\t\taddNextState(type, \"OPEN\", \"CLOSED\");\r\n\r\n\t\ttaskTypes.add(tt);\r\n\t\tif (getTaskTypes().contains(type))\r\n\t\t\treturn;\r\n\r\n\t}... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
updates chart based on the controller | private void updateChart(){
addDataToSeries();
handleEdges();
} | [
"@Override\n public void update() {\n setupBarChart();\n }",
"public Chart update() {\n graph();\n chart.setTitle(\"Crime Rate over Time\");\n chart.setLegendVisible(false);\n chart.getXAxis().setLabel(\"Days in year\");\n chart.getYAxis().setLabel(\"Frequency\");\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/While there is at least 1 astronaut remaining, returns a random astronaut. | private Astronaut getRandomAstronaut() {
while(roamingAstronauts > 0) {
int i = random.nextInt(gameObject.size());
if (gameObject.get(i) instanceof Astronaut)
return (Astronaut) gameObject.get(i);
}
return null;
} | [
"private Alien getRandomAlien() {\n\t\twhile(roamingAliens >= 0){\n\t\t\tint i = random.nextInt(gameObject.size());\n\t\t\tif(gameObject.get(i)instanceof Alien)\n\t\t\t\treturn (Alien) gameObject.get(i);\n\t\t}\n\t\treturn null;\n\t}",
"public static String getRandomAdultAspiration(SimsAssistant assistant) {\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Storage constructor and initializer. Attempts to load and set the last used directory. If none was found, DEFAULT_DIRECTORY will be set instead. Postcondition: all the fields of Storage have been instantiated. | public Storage() {
storageReader = new StorageReader();
storageWriter = new StorageWriter();
directoryManager = new DirectoryManager();
File loadedDirectory = storageReader.loadDirectoryConfigFile(FILENAME_DIRCONFIG);
if (loadedDirectory != null) {
if (directoryManager.createDirectory(loadedDirectory) == ... | [
"public Storage() {\n file = new File(DEFAULT_STORAGE_FILEPATH);\n }",
"public Storage() {\n this.storageDirectory = \"./user-data\";\n }",
"public Storage() {\n dataDirectory = System.getProperty(BASE_DIRECTORY) + FOLDER_NAME;\n filePath = dataDirectory + FILE_NAME;\n u... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Align F1[i_s,i_p] with F2[j_t,j_q]. If p = s1, by convention it means F1[i_s,i_p] = empty forest. Idem for q=t1. | private List<Tree<AlignedNode<ValueType1, ValueType2>>> computeForestAlignment(
int i, int s, int p, int j, int t, int q) {
if (p == s - 1) { // left forest is the empty forest
List<Tree<AlignedNode<ValueType1, ValueType2>>> result =
new ArrayList<Tree<AlignedNode<ValueType1, ValueType... | [
"public void prepareAlignment(String sq1, String sq2) {\n if(F == null) {\n this.n = sq1.length(); this.m = sq2.length();\n this.seq1 = strip(sq1); this.seq2 = strip(sq2);\n F = new float[3][n+1][m+1];\n B = new TracebackAffine[3][n+1][m+1];\n for(int k ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes the "Wrapper" Object into the file "jsontest.json" in your project folder. | public static void writeToFile(Wrapper wrp) {
try {
/*
* If you want to write into a network output stream, you will need to change the "writer" accordingly
*
* don't forget to flush the network output stream after sending a message.
*/
... | [
"private void writeWrapper(MonitoredZoneWrapper zoneWrapper) {\n String filename = AppConfig.getMonitoredZoneFilename();\n final FileLocalStorage<MonitoredZoneWrapper> zoneStorage =\n new FileLocalStorage<>(filename, zoneWrapper, activity.getApplicationContext());\n try {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Will return how many at most can spawn in a chunk at once. | public int getMaxSpawnedInChunk()
{
return 4;
} | [
"public int getMaxSpawnedInChunk()\n {\n return 10;\n }",
"int getNumOfChunks();",
"int getChunksAmount();",
"public int getMaxSpawnedInChunk()\n {\n return 2;\n }",
"public int getMaxSpawnsPerChunk() {\n\t\treturn 6;\n\t}",
"static long numChunks(long datasize, int bytesPerCheck... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
overlap method returning a TimeInterval object | public TimeInterval overlapInterval(TimeInterval otherInterval) {
long currentStart, currentEnd;
if (this.startTime >=(otherInterval.startTime) ) {
currentStart = this.startTime;
} else {
currentStart = otherInterval.startTime;
}
if (this.endTime <=(otherInterval.endTime) ) {
currentEnd = this.end... | [
"boolean overlap(Interval otherInterval);",
"@Test\n public void isOverlap_interval1ContainsInterval2OnEnd_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(0,3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns all the questions serialized into a string | public String getQuestions(){
return String.join("---", questions);
} | [
"public String toString() {\n String s = \"\"; \n s += \"Question: \" + question;\n \n return s;\n }",
"public String toString() {\n return question + \"\\n\" + answer;\n }",
"public String toString()\n {\n return (\"Question:\\t\\t\" + getQuestion() + \"\\nQuesti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the text written on the LuposDocument. Returns null if the document is bad located. | public String getText(){
String text = null;
try {
text = this.document.getText(0, this.document.getLength());
} catch (final BadLocationException e) {e.printStackTrace();}
return text;
} | [
"public String getText() {\n return document.getText();\n }",
"java.lang.String getDocument();",
"protocol.VersionedTextDocumentIdentifier getTextDocument();",
"@NonNull\n public String getPlainText() throws IOException {\n return document.text().toLowerCase();\n }",
"public String ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add an annotation when the action's return type is implicit and inferred by the SARL compiler. | @SuppressWarnings("checkstyle:npathcomplexity")
private void createImplicitActionReturnType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor) {
final List<XtendFunction> actions = EcoreUtil2.eAllOfType(resource.getContents().get(0), XtendFunction.class);
for (final XtendFunction action : actions) {... | [
"protected abstract void runReturnAnnotationHandler();",
"public interface MPReturnType extends RestReturnType {}",
"@Override\n protected void runReturnAnnotationHandler() {\n checkContainsAny(MSG_RETURN_VALUE_WITH_NONNULL_BY_DEFAULT,\n NullnessAnnotation.RETURN_VALUES_ARE_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Perform single parameter substitution before logging the message of level ERROR according to the format outlined above. | public void error(String format, Object arg) {
formatAndLog(LOG_LEVEL_ERROR, format, arg, null);
} | [
"public void error(final String format, final Object arg) {\n formatAndLog(Log.ERROR, format, arg);\n }",
"public void error(String format, Object arg1, Object arg2) {\n formatAndLog(LOG_LEVEL_ERROR, format, arg1, arg2);\n }",
"public void setPlanningError(String formatText, Object... argu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add new tags for a loggedTime. Adds a tag to an existing loggedTime. | public void addLoggedTimeTag(Integer loggedTimeId, String loggedTimeTag) throws ApiException {
addLoggedTimeTagWithHttpInfo(loggedTimeId, loggedTimeTag);
} | [
"public void addTag(String tag, long startTime, long endTime, Level detail) {\n if (sampleDetail.value >= detail.value) {\n Sample sample = tagTimings.get(tag);\n int millis = (int) (endTime - startTime);\n if (sample == null) {\n sample = new Sample(millis);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The constructor for the merge.This creates a queue to hold all the sorted arrays. Preconditions:An instance of Merge is made. Postconditions:A queue is made to hold a sorted arrays. | public Merge() {
this.listsOfSorted = new LinkedList<>();
} | [
"public void sort(){\n\t\t\n\t\tif(Q.size() != 1){\n\t\t\tArrayQueue<E> tempQueue1 = Q.dequeue();\n\t\t\tArrayQueue<E> tempQueue2 = Q.dequeue();\n\t\t\tArrayQueue<E> tempQueue3 = merge(tempQueue1, tempQueue2);\n\t\t\tQ.enqueue(tempQueue3);\n\t\t\tsort();\n\t\t}\n\t\t\n\t}",
"private static void sort(Queue<Integer... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
new StockTakeLine(stl.id, stl.quantity, s.isbn, s.title) | public StockTakeLine(Long id, Long quantity, String isbn, String title) {
this(id);
setQuantity(quantity);
StockItem stockItem = new StockItem();
stockItem.setIsbn(isbn);
stockItem.setTitle(title);
setStockItem(stockItem);
} | [
"public BuyStock(Stock abcStock){\n this.abcStock = abcStock;\n }",
"public ProductLine(Product product, Integer quantity)\n {\n this.product = product;\n this.quantity = quantity;\n }",
"public void addStock(Stock stock);",
"void createCartLine(CartLine cartline) throws Business... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column TRSDEAL_PROMISSORY_FX.DEAL_CLASSIFY_DUE_SETLD_DATE | public void setDEAL_CLASSIFY_DUE_SETLD_DATE(Date DEAL_CLASSIFY_DUE_SETLD_DATE)
{
this.DEAL_CLASSIFY_DUE_SETLD_DATE = DEAL_CLASSIFY_DUE_SETLD_DATE;
} | [
"public Date getDEAL_CLASSIFY_DUE_SETLD_DATE()\r\n {\r\n\treturn DEAL_CLASSIFY_DUE_SETLD_DATE;\r\n }",
"public void setDEAL_DATE(Date DEAL_DATE)\r\n {\r\n\tthis.DEAL_DATE = DEAL_DATE;\r\n }",
"public void setDEAL_VALUE_DATE(Date DEAL_VALUE_DATE) {\r\n this.DEAL_VALUE_DATE = DEAL_VALUE_DATE;\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new regional TCP health check on the specified port, with default parameters | public String createNewHealthCheckForPort(String region, String protocol, Integer port)
throws IOException {
String healthCheckName = "hc-" + port.toString() + UUID.randomUUID().toString();
HealthCheck healthCheck = new HealthCheck();
healthCheck.setName(healthCheckName);
healthCheck.setType(proto... | [
"@Test\n public void testHealthCheck() throws Exception {\n final HealthCheck healthCheck = TcpHealthCheck.of(HEALTH_CHECK_PORT);\n final TemporaryJob job = temporaryJobs.job()\n .image(ALPINE)\n .command(\"sh\", \"-c\", \"nc -l -p 4711 && nc -kl -p 4712 -e true\")\n .port(HE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the songName property | public SimpleStringProperty songNameProperty(){
return songName;
} | [
"public String getName() {\n\t\treturn songName;\n\t}",
"public String getNameSong() {\n return nameSong;\n }",
"public String getSongName() {\n\t\treturn songName;\n\t}",
"public String getSongName() {\n return mSongName;\n }",
"public String getSongName() {\n\n return SongName;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
knob has been picked | @Override
public void itemsPicked(final Actor actor, final Set<Object> items, final PickingCameraEvent event) {
if (items.contains(knob)) {
if (event.getTypes().containsAll(EnumSet.of(CameraEventType.LEFT, CameraEventType.DOWN))) {
pressed(event.getX(), event.getY());
... | [
"boolean isPickEnabled();",
"public void knobGenerated( final BumpGenerator generator, final Knob knob );",
"public void selectionChanged(BrickusPiece piece);",
"public void shapeSelectionChanged();",
"public void willGenerateKnob( final BumpGenerator generator, final AcceleratorNode node );",
"public voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GWT.log("initialize DrawingToolsControls with map=" + map); | @Override
protected Widget initialize(final MapWidget map) {
final HandlerManager bus = this.eventBus;
Panel container = new FlowPanel();
lineButton = new Image(ToolResources.INSTANCE.lineUp());
lineButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
... | [
"private void initMapPanel() {\n\t\tmapPanel= new MapPanel(this);\n\t}",
"public MapDrawingPanel(Map map) {\n initComponents();\n this.map = map;\n this.setPreferredSize(new Dimension(map.width*map.boxSize+1, map.height*map.boxSize+1));\n gridColour = new Color(216, 216, 216);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the destination file for the given target. If the directory where the file should reside does not exist it will be created. | private File getDestinationFile(File destination,
String packageName,
String filename)
throws IOException
{
StringBuffer buf = new StringBuffer(90);
buf.append(destination);
buf.append(File.separator);
... | [
"private File getDestination() {\r\n\t\tOption op;\r\n\t\t// CodeLabel cl;\r\n\r\n\t\tif (getUnscopedBooleanOptionValue(OptionRegistry.DESTINATION_FOLLOWS_TARGET)) {\r\n\t\t\tFile f = getTargetFiles()[0];\r\n\t\t\treturn f.getParentFile();\r\n\t\t} else {\r\n\t\t\top = getOption(OptionRegistry.DESTINATION_DIR);\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .Copyright.Type typ = 1; | public Builder setTyp(Metadata.Copyright.Type value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
typ_ = value.getNumber();
onChanged();
return this;
} | [
"Metadata.Copyright.Type getTyp();",
"io.bloombox.schema.licensure.Licensure.LicenseType getType();",
"Metadata.Copyright getCopyright(int index);",
"Builder addCopyrightYear(String value);",
"private CopyrightHeader() {\n }",
"public String getCopyright();",
"Builder addCopyrightHolder(String value)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If the text comes from an ASR engine, it may have errors, so use this method to correct it, if possible. | protected abstract String textCorrection(String text); | [
"java.lang.String getCorrectedText();",
"private void sanitizeInput(String textForSpellcheck) {\n }",
"void verifyCompleteString() \n\t{\n\t\tString tmpText = text.getText();\n\t\t\n\t\tif ( ( tmpText == null ) || ( tmpText.equals( \"\" ) ) )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry \n\t\t{\n\t\t\tBigDeci... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column HF_hy_01.t1_rf_1_d3 | public Float getT1Rf1D3() {
return t1Rf1D3;
} | [
"@Column(name = \"UDF3\")\n\tpublic String getUdF3()\n\t{\n\t\treturn udF3;\n\t}",
"public Integer getF3() {\r\n return f3;\r\n }",
"@Override\n\tpublic int getField3() {\n\t\treturn model.getField3();\n\t}",
"public Float getT1Rf1jsqdt() {\r\n return t1Rf1jsqdt;\r\n }",
"public Float ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets a team's score. | public void setScoreOfTeam(Team team, int newScore) {
teamScore.put(team.getTeamId(), newScore);
} | [
"void setScore(int score);",
"public void setCurrentScore(int score) {\r\n this.score = score;\r\n }",
"public void setMatchScore(int matchIndex, S scoreTeamOne, S scoreTeamTwo);",
"void setScoreValue(int scoreValue);",
"public void setScore(int score) {\n if (score >= 0) {\n thi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
public Integer getUnReadApply(String userId); | List<Apply> getApplies(String userId); | [
"public Integer getApplyUserId() {\n return applyUserId;\n }",
"List<Map<String, Object>> getSomeOneUnReadMessageInEveryOrganization(String userId);",
"long countAllByUserIdAndRead(String userId, boolean read);",
"int getUnapprovedUserNumber();",
"public void setApplyUserId(Integer applyUserId) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize a regular node in the GCP2P Network. Randomly choose among the three CDN servers as its closest CDN. Randomly generate its RTT values for each of the three landmarks (3070 ms). Set the node's upload and download speed by randomly choosing from values between 01000 Kbps and 10002000 Kbps, respectively. Set th... | public void initialize(Node n)
{
if (Network.size() == 0) return; // never happens since the Network starts with CDNs as initial nodes
GCP2PProtocol prot = (GCP2PProtocol) n.getProtocol(pid);
prot.setNodeTag(GCP2PProtocol.RegularTag); // initialize the node to be Regular
prot.setConnectedCDN(CommonState.... | [
"private void init() {\n myNodeDetails = new NodeDetails();\n try {\n //port will store value of port used for connection\n //eg: port = 5554*2 = 11108\n String port = String.valueOf(Integer.parseInt(getMyNodeId()) * 2);\n //nodeIdHash will store hash of nod... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use DispatcherRoomProto.newBuilder() to construct. | private DispatcherRoomProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
} | [
"private RoomRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private Room(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFiel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deletes item with given key from all files of this bundle. | public void removeItem(String key) {
for (int i=0; i < getEntryCount(); i++) {
PropertiesFileEntry pfe = getNthEntry(i);
if (pfe != null) {
PropertiesStructure ps = pfe.getHandler().getStructure();
if (ps != null) {
ps.deleteItem(key);
... | [
"boolean delete(String key) throws FileStorageException;",
"public void removeItemByKey(String key)\n {\n int pos = FavChampKeys.indexOf(key);\n FavChampKeys.remove(key);\n notifyItemRemoved(pos);\n notifyItemChanged(pos, FavChampKeys.size());\n }",
"public void __delitem__( Py... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
notify the listeners of the tree model that the view has changed | public void onChanged() {
treeModel.fireTreeChange();
} | [
"public abstract void treeNodesChanged(TreeModelEvent e);",
"@Override\n public void treeNodesChanged(TreeModelEvent e) {\n }",
"public void treeNodesChanged(TreeModelEvent e) {\n //To change body of implemented methods use Options | File Templates.\n }",
"private void notifyObservers() {\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the agent_ref_nbr value for this Order_item_select_responseOrder_item. | public void setAgent_ref_nbr(java.lang.String agent_ref_nbr) {
this.agent_ref_nbr = agent_ref_nbr;
} | [
"public void setAgentRef(CondominioAgent agentRef){\n\t\tagentName = agentRef;\n\t}",
"public void xsetAgentId(org.apache.xmlbeans.XmlString agentId)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This util method returns an array of ServiceInfo in which index 0 will have the immediate lower priority service and index 1 will have the immediate higher priority service among the list of existing serviceInfos | public static BoundServices[] getHighAndLowPriorityService(
List<BoundServices> serviceInfos, BoundServices currentServiceInfo) {
BoundServices higher = null; // this will be used to hold the immediate higher service priority with respect to the currentServiceInfo
BoundServices lower = null; // this... | [
"List<ServiceInfo> getServices();",
"java.util.List<org.apache.skywalking.apm.network.common.KeyIntValuePair> \n getServicesList();",
"public String [] getServicesList(){\n String baseName = null;\n Session session = sessionFactory.openSession();\n List serviceList = null;\n\n\t // ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the header followed by the uncompressed data, even if using compression. This is needed for storing uncompressed blocks in the block cache. Can be called in the "writing" state or the "block ready" state. Returns only the header and data, does not include checksum data. | ByteBuffer getUncompressedBufferWithHeader() {
expectState(State.BLOCK_READY);
return ByteBuffer.wrap(uncompressedBytesWithHeader);
} | [
"byte[] getHeaderAndDataForTest() throws IOException {\n ensureBlockReady();\n if (compressAlgo == NONE) {\n if (onDiskChecksum == HConstants.EMPTY_BYTE_ARRAY) {\n throw new IOException(\"A \" + blockType + \" without compression should have checksums \"\n + \" stored separate... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method that deletes the last element in the circular linked list. When a item is deleted from the list the size decreases by one. | public Item deleteAtEnd() {
Item returnItem = tail.item;
tail = tail.previous;
head.previous = tail;
size--;
return returnItem;
} | [
"public Item removeLast() {\n Item last = items[size];\n items[size] = null;\n size -= 1;\n return last;\n }",
"public void deleteLast()\n\t{\n\t\t// Creamos un nodo auxiliar para almacenar la lista actual\n NodoDeLista<T> aux = primero;\n\n // Verificamos si la lista ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Se agregan los nombres de las funciones existentes | private static void addFuncionesName() {
funcionesName = new ArrayList<String>();
if (funciones == null) {
addFunciones();
}
Iterator it = funciones.iterator();
while (it.hasNext()) {
funcionesName.add(((GlobalSimilarityNode) it.next()).getName());
... | [
"private static void addFuncionesName() {\n\n funcionesName = new ArrayList<String>();\n if (funciones == null) {\n addFunciones();\n }\n Iterator it = funciones.iterator();\n funcionesName.add(utils.Utils.selecione);\n while (it.hasNext()) {\n funcion... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method verifies if there is an existing/running gameserver by a given port that has been stopped, waiting to save final logs. | public boolean isExistingStoppedGameserver(int port) {
return stopped_gameservers.contains(port);
} | [
"public boolean isExistingGameserver(int port) {\n return gameservers.containsKey(port);\n }",
"private boolean checkPortExists(Bot b, int port) {\n return b.getServer(port) != null;\n }",
"public void addStoppedGameserver(int port) {\n stopped_gameservers.add(port);\n }",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column T_CGTHMASTER.COLUMNTWO | public String getColumntwo() {
return columntwo;
} | [
"public String getColNameCn() {\r\n return colNameCn;\r\n }",
"public String getDbCol() {\n return dbCol;\n }",
"public String getCOLUMN_NAME() {\r\n return getValue(\"COLUMN_NAME\");\r\n }",
"public DbColumn getDbColumn() {\n\t\treturn this.db_column;\n\t}",
"Column getCol();"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
locateApple method This method locate an apple on the board. | private void locateApple() {
xApplePosition = random.nextInt(32);
yApplePosition = random.nextInt(21);
} | [
"private void placeApple() {\r\n\t\tdo {\r\n\t\t\tapple = new Apple(getRandomPositionX(), getRandomPositionY());\r\n\t\t} while (snake.getParts().contains(apple) ||\r\n\t\t\t\twalls.stream().anyMatch(wall -> wall.getSegments().contains(apple)));\r\n\t\tboard.setCell(GridCell.APPLE, apple);\r\n\t}",
"private void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set a point on/off | public void setPoint(Point p, boolean value){
setPoint(p.x, p.y, value);
} | [
"public void setAtPoint(boolean atPoint) {\n\tboolean oldAtPoint = this.atPoint;\n\tthis.atPoint = atPoint;\n\tpropertyChangeSupport.firePropertyChange(PROP_ATPOINT, oldAtPoint, atPoint);\n\t// disable Y value text box if not normalizing at a point and using \"Value\" for the statistic.\n\tif (this.atPoint) {\n\t ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the humanreadable and localized difficulty. | public final String getHumanReadableDifficulty() {
switch (this.getDifficulty()) {
case EASY: return i18n.tr("Easy");
case MEDIUM: return i18n.tr("Medium");
case HARD: return i18n.tr("Hard");
case NOT_INTERACTIVE: return i18n.tr("Not Interactive");
default: return null;
}
} | [
"public final String getDifficulty() {\n return difficulty;\n }",
"protected String getDifficulty() {\n\t\treturn (String) difficultyChooser.getSelectedItem();\n\t}",
"public int getDifficulty() {\n return difficulty;\n }",
"public int getDifficulty() {\n return this.difficulty;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Hold database connection to prevent further transactions when database is in maintenance. Jeremy '15,5,23 | public void holdDBConnection() {
databaseOnHold = true;
} | [
"public void refeshDatabaseConnection() {\n con = mysqlConnInstance.refreshConnection();\n }",
"public void reduceDatabaseConnection() {\n\t\tsynchronized (LOCK) {\n\t\t\tint numberOfOpenConnections = OPEN_CONNECTIONS.decrementAndGet();\n\t\t\tif (numberOfOpenConnections == 0 && dbConnection != null) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the maximum number of characters allowed in a JACK port name. This is the full port name, prefixed by "client_name:". | public int getMaximumPortNameSize() throws JackException {
try {
return jackLib.jack_port_name_size() - 1;
} catch (Throwable e) {
LOG.log(Level.SEVERE, CALL_ERROR_MSG, e);
throw new JackException(e);
}
} | [
"public int getMaxCharNameLength()\n {\n if (initNameSetsLengths()) {\n return m_maxNameLength_;\n }\n else {\n return 0;\n }\n }",
"public int getMaximumClientNameSize() throws JackException {\n try {\n return jackLib.jack_client_name_size... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string next_camera = 1; | @java.lang.Override
public java.lang.String getNextCamera() {
java.lang.Object ref = nextCamera_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.to... | [
"public java.lang.String getNextCamera() {\n java.lang.Object ref = nextCamera_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n nextCamera_ = s;\n r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Upsert one or more personalisations. | public Observable<ServiceResponse<Object>> upsertPersonalisationsWithServiceResponseAsync() {
final List<PersonalisationDto> personalisations = null;
return service.upsertPersonalisations(personalisations)
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Object>>>() {
... | [
"public Object upsertPersonalisations() {\n return upsertPersonalisationsWithServiceResponseAsync().toBlocking().single().body();\n }",
"public Object upsertPersonalisations(List<PersonalisationDto> personalisations) {\n return upsertPersonalisationsWithServiceResponseAsync(personalisations).toBl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__NandForm__Group__1__Impl" $ANTLR start "rule__NandForm__Group_1__0" InternalDSLSAT.g:950:1: rule__NandForm__Group_1__0 : rule__NandForm__Group_1__0__Impl rule__NandForm__Group_1__1 ; | public final void rule__NandForm__Group_1__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDSLSAT.g:954:1: ( rule__NandForm__Group_1__0__Impl rule__NandForm__Group_1__1 )
// InternalDSLSAT.g:955:2: rule__NandForm__Group_1__0__Impl ... | [
"public final void rule__NandForm__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSLSAT.g:900:1: ( rule__NandForm__Group__0__Impl rule__NandForm__Group__1 )\n // InternalDSLSAT.g:901:2: rule__NandForm__Group__0_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a message for the given smsc message id and smscID or null if nothing found. | public SmsMessage getSmsMessageBySmscMessageId(String smscMessageId,
String smscID); | [
"@org.jetbrains.annotations.Nullable()\n public abstract com.moez.QKSMS.model.ScheduledMessage getScheduledMessage(long id);",
"public TransportMessage findMessage(String id) {\n try{\n return (TransportMessage)storage(Q_STORENAME).getRecordForValue(\"cache-id\", id);\n }\n catc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
String representation indicates access type, address and length in bytes | @Override
public String toString() {
return (getAccessType() == AccessNotice.READ ? "R " : "W ") + "Mem " + address + " " + length + "B = " + value;
} | [
"public String getAccessTypeString() {\n return String.valueOf(accessType);\n }",
"java.lang.String getField1536();",
"String getAccess();",
"public String getAccess();",
"java.lang.String getField1620();",
"java.lang.String getField1024();",
"static String OIDtoString(byte[] buffer, int offset, int... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method recursively calculates the depth of a given search value. If the given value is not in the tree, this method returns 1. Note that if the tree is a proper BST, this method should complete in O(log n) time. Additionally, remember that the depth is the number of nodes on the path from a node to the root (i.e. ... | public int depth(int search){
int depth = 0;
if(search < myValue){
if(left != null){
if(left.depth(search) == -1){
return -1;
}
return depth + left.depth(search) +1;
}
}
if(search > myValue) {
... | [
"public int depth(int search){\n\t\t int sum = 1;\r\n\t\t if (search < myValue) {\r\n\t\t if (left != null) {\r\n\t\t return sum + left.depth(search);\r\n\t\t }\r\n\t\t }\r\n\t\t if (search > myValue) {\r\n\t\t if (right != null) {\r\n\t\t return sum + right.depth(search);\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Save the association id(s) specified in the request object into the session. | public static String setAssociationId(HttpServletRequest request, HttpServletResponse response) {
Map<String, Object> requestParams = UtilHttp.getParameterMap(request);
// check distributor
String distriParam[] = { "distributor_id", "distributorid", "distributor" };
String distributorId... | [
"Session saveSession(Session session);",
"void saveSession(SessionData session);",
"public void storeAssociation(Association association) {\n\n Connection connection = IdentityDatabaseUtil.getDBConnection();\n PreparedStatement prepStmt = null;\n\n try {\n\n// if (!isAssociationE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Populate an empty bar with previous value. A bar contains the previous bar values if there was no tick during this time interval. | public IntradayBarRequestBuilder fillInitialBar() {
this.fillInitialBar = true;
return this;
} | [
"protected void createBar() {\n mBar = createBar(getContext(), getMarginLeft(), getYPos(), getBarLength(), mBarBulge, mTickCount, mTickHeight, mBarWeight, mBarColor, mTickWeight, mTickColor);\n invalidate();\n }",
"private void setBarValues() {\n\t\t// Get highest value\n\t\tint iMax = 0;\n\t\tdo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs an instance of LoginUnauthorizedException with the specified detail message. | public LoginUnauthorizedException(String msg) {
super(msg);
} | [
"public LoginUnauthorizedException() {\r\n }",
"public AuthenticationException(String message) {\n super(message);\n }",
"public InvalidCredentialsException(String message) {\n super(message);\n }",
"public AuthenticationFailedException(String msg) {\r\n\t\tsuper(msg);\r\n\t}",
"public Auth... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Pre Expr'. This implementation returns null; returning a nonnull result will terminate the switch. | public T casePreExpr(PreExpr object) {
return null;
} | [
"public T casePreprocess(Preprocess object)\n\t{\n\t\treturn null;\n\t}",
"public T caseCommon_Preprocess(at.jku.weiner.c.common.common.Preprocess object)\n\t{\n\t\treturn null;\n\t}",
"public T casePreShell(PreShell object)\n {\n return null;\n }",
"public T casePreCondition(PreCondition object) {\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helm helm = new Helm(12, Color.SILVER,Button.NO); Wheel wheel = new Wheel(20, Color.GOLD, Tire.SUMMER); Body body = new Body(12000, Color.BROWN, BodyType.UNIVERSAL); Car car = new Car(helm, wheel, body, Brand.LEXUS); car.printCar(); helm.setButton(Button.YES); body.setColor(Color.BLACK); wheel.setSize(15); helm.setColo... | public static void main(String[] args) {
Car car1 = new Car(new Helm(18, Color.BLACK, Button.NO), new Wheel(13, Color.BROWN, Tire.SUMMER),
new Body(1000, Color.GREAN, BodyType.UNIVERSAL), Brand.TOYOTA);
car1.printCar();
Car car2 = new Car(new Helm(18, Color.BLACK, Button.YES), new Wheel(17, Color.BROWN, ... | [
"public void createBike(){\n createFrame();\n addWheels();\n addPedals();\n getPrice();\n }",
"public void makeCars()\n\t{\n\t\t//users can add colors or names\n\t\tString[] names = new String[]{\"DYLAN\",\"EDAN\",\"RICKY\",\"NEATO\"};\n\t\tColor[] colors = new Color[]{Color.BLUE,Co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method sorts the arrayList of events in ascending order sing a comparator and anonymous class | public static void sortEvents(){
if(events.size()>0){
Comparator<Event> comp = new Comparator<Event>(){
public int compare(Event e1, Event e2){
if(e1.getEventStartTime().before(e2.getEventStartTime())){
return -1;
}
else if... | [
"private void sortEvents() {\n //sort the event list when we add a new event. Pass a comparator to handle what defines\n //greater than for Java objects\n Collections.sort(eventsList, new Comparator<Event_withID>() {\n @Override\n public int compare(Event_withID event_with... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Positive test case for listDrafts method with mandatory parameters. | @Test(enabled = true, description = "gmail {listDrafts} integration test with mandatory parameter.")
public void testListDraftsWithMandatoryParameters() throws IOException, JSONException {
String methodName = "gmail_listDrafts";
String apiEndPoint =
connectorProperties.getPro... | [
"@Test(enabled = true, description = \"gmail {listDrafts} integration test with optional parameter.\")\n public void testListDraftsWithOptionalParameters() throws IOException, JSONException {\n String methodName = \"gmail_listDrafts\";\n String apiEndPoint =\n connectorProper... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Constructs a new empty ReplacementSet. | public ReplacementSet(boolean required) {
super(required);
this.replacements = new LinkedHashSet<>();
this.sortedReplacements = null;
} | [
"static Set createEmpty() {\n return new EmptySet();\n }",
"public static FeatureSet empty() {\n return new FeatureSet(ImmutableSet.of(), ImmutableSet.of());\n }",
"Set emptySet();",
"@SuppressWarnings(\"unchecked\")\r\n public ImmutableHashOrderSet()\r\n {\r\n this(false, (T[]) SortedArray... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for the ignore selection flag | public boolean isIgnoreSelection()
{
return ignoreSelection;
} | [
"public void setIgnoreSelection( boolean ignoreSelection )\n {\n this.ignoreSelection = ignoreSelection;\n }",
"public void setIgnoreSelection(boolean ignore) {\n ignoreSelection = ignore;\n }",
"public int getIgnoreMask() {\n return this.ignoreMask;\n }",
"@Override\n public abstract bool... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update DB table FIR_BNK_CHK. The sql statement for this operation is update fir_bnk_chk set up_error_flg='1' where ((chk_bat_no = ?) AND (up_error_flg = '3')) | @SuppressWarnings("unchecked")
public int updateFirBnkChkForUpError(String chkBatNo) throws DataAccessException; | [
"public String updateStatusInTblBooks(int accid, int accno){\n String retVal = \"OOPs...Could not Updated, Retry Later !\";\n try{\n Connection con = getDbConnObj();\n PreparedStatement pstmt = null; \n if(con == null)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create DDL for Database Definition | private void createDatabase(DBContext context)
{
DBSQLScript script = new DBSQLScript(context);
getCreateDDLScript(script);
// Show DDL Statement
log.info(script.toString());
// Execute Script
script.executeAll(false);
} | [
"public void createDBSchema() throws NoConnectionToDBException, SQLException, IOException {\n \n InputStream in = EDACCApp.class.getClassLoader().getResourceAsStream(\"edacc/resources/edacc.sql\");\n if (in == null) {\n throw new SQLQueryFileNotFoundException();\n }\n Buf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Covers UC 05.01.01 and 05.02.01 Shows a task provider bidding on a task then a list of tasks the provider has bid on | public void testBidOnTask() {
Context context = this.getInstrumentation().getTargetContext().getApplicationContext();
ArrayList<String> queryList = new ArrayList<>();
// Delete the test requester if their account already exists
DataManager.deleteUsers delRequester = new DataManager.del... | [
"public abstract List<Task> findTasksByBidder(User bidder) throws IOException;",
"@Override\n public void onClick(View v) {\n\n String oldProviderId = task.getProviderId();\n bidList = task.getBidList();\n task.clearAssignedProvider();\n\n if ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the value of the attribute "onkeydown". Refer to the documentation for details on the use of this attribute. | public final String getOnKeyDownAttribute() {
return getAttributeValue("onkeydown");
} | [
"public final String getOnKeyDownAttribute() {\n return getAttributeValue(\"onkeydown\");\n }",
"public java.lang.String getOnkeydown() {\n if (null != this.onkeydown) {\n return this.onkeydown;\n }\n ValueBinding _vb = getValueBinding(\"onkeydown\");\n if (_vb != null) {\n return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .POGOProtos.Rpc.TemporaryEvolutionResourceProto mega_evolution_resources = 3; | POGOProtos.Rpc.TemporaryEvolutionResourceProtoOrBuilder getMegaEvolutionResourcesOrBuilder(
int index); | [
"POGOProtos.Rpc.TemporaryEvolutionResourceProto getMegaEvolutionResources(int index);",
"java.util.List<? extends POGOProtos.Rpc.TemporaryEvolutionResourceProtoOrBuilder> \n getMegaEvolutionResourcesOrBuilderList();",
"java.util.List<POGOProtos.Rpc.TemporaryEvolutionResourceProto> \n getMegaEvolutionR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column sys_company_role.role_no | public String getRoleNo() {
return roleNo;
} | [
"public Integer getRoleid() {\r\n return roleid;\r\n }",
"public Integer getRoleid() {\n return roleid;\n }",
"java.lang.String getRoleid();",
"public Long getRoleid() {\n return roleid;\n }",
"public BigDecimal getROLE_CODE() {\r\n return ROLE_CODE;\r\n }",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get optional objId attribute which can be used to tag a Permission object with an identity, i.e. objName='Customer', objId='12345'. This value is not constrained by any other object. | public String getObjId()
{
return objId;
} | [
"int getObjId();",
"java.lang.String getObjectID();",
"int getInfluenObjId();",
"public int getObjid() {\n\treturn objid;\n}",
"public IPermissionOwner getPermissionOwner(long id);",
"public static String getIDString(TBPersistable obj) {\n\t\tString prefix = getPrefixForClass(obj.getClass());\n\t\tif (pre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if (newField==null) fail();//TODO: this will never happen | private void checkField(ThriftField oldField, ThriftField newField){
if (!newField.getType().getType().equals(oldField.getType().getType())){//TODO: check equals method for ThriftTypeID
fail("type is not compatible "+oldField.getType().getType()+" vs "+newField.getType().getType());
return;
}
i... | [
"public void testSetValueNull() {\n Field f = new Field(\"test\", null, null, false);\n try {\n f.setValue(null);\n fail(\"Did not fail.\");\n } catch (IllegalArgumentException e) { /* expected */\n } catch (Exception e) {\n fail(\"Wrong exception. \" + e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a suitable handler method for an event. First, it searches for a method with a single argument that assignmentcompatible with the event. Failing that, it searches for a method with no arguments. Failing that, it returns null. | public static Method getHandler(String handlerName, Object instance, Event event) {
handlerName = handlerName != null ? handlerName : event.getType();
Method method = MethodUtils.getMatchingAccessibleMethod(instance.getClass(), handlerName,
new Class<?>[] { event.getClass() });
retur... | [
"@SuppressWarnings(\"unchecked\")\n @Override\n public Method getEventMethod(EventObject event, Object target) {\n Method method = null;\n if(methodResolver != null) {\n method = methodResolver.resolveMethod(event, target);\n }\n if(method == null) {\n method... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the image to be used for given item after item text. | public Image getImageAfter(T anItem) { return null; } | [
"String getItemImage();",
"public abstract String mapItemToImage(Item item, Tile tile);",
"public View getGraphicAfter(T anItem)\n{\n Image img = getImageAfter(anItem);\n return img!=null? new ImageView(img) : null;\n}",
"public ImageItem getImageItem() {\n if (imageItem == null) {//GEN-END:|443-... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test: set the thank You page path | @Test
@DisplayName("Test: set the thank You page path")
public void testSetThankYouPage() throws InterruptedException {
FormContainerEditDialog dialog = formComponents.openEditDialog(containerPath);
dialog.selectActionType("foundation/components/form/actions/store");
Commons.selectInAuto... | [
"@Test\r\n\tpublic void verifyThankYouPage() throws IOException {\n\t\tboolean thankYouMessage = driver.findElement(By.cssSelector(\"#checkout_complete_container > h2\")).isDisplayed();\t\t\r\n\t\tif(thankYouMessage == true) {\r\n\t\t\tSystem.out.println(\"PASS Thank You Message displyed to user\");\r\n\t\t}\r\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |