query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Checks if databaseTable exists by given database name. | public boolean existsTable(Database database, DatabaseTable databaseTable) {
// Start logging elapsed time.
long tIn = System.currentTimeMillis();
ILogging logger = AppRegistryBridge.getInstance().getLoggingBridge();
if (logger!=null) logger.log(ILoggingLogLevel.Debug, this.apiG... | [
"boolean getTableExists(String table);",
"private boolean tableExists(String table) throws SQLException {\n if (HAVE_DB) {\n Connection con = DriverManager.getConnection(dbConnection, dbUser, dbPass);\n Statement stmt = con.createStatement();\n ResultSet rs;\n \n if (dbType.equals(\"my... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Execute the "getCarFromPlate" function | public CarTypPrx getCarFromPlate(String plate, UserTypPrx owner,
Current current) {
OracleCallableStatement cstmt = null;
CarTypPrx result = null;
try {
String sql92Style = "{ ? = call callable_statements.get_car_from_plate(?, ?) }";
// Create the CallableStatement object
cstmt = (OracleCallableState... | [
"Car readCar(String plateNo) throws CarNotFoundException;",
"public uclm.esi.cardroid.data.oracle.Car getCarFromPlate(String plate,\n\t\t\tuclm.esi.cardroid.data.oracle.User owner, Current current) {\n\t\tOracleCallableStatement cstmt = null;\n\t\tuclm.esi.cardroid.data.oracle.Car result = null;\n\n\t\ttry {\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds the cross correlations matrix of a matrix given. | public static double[][] crossCorrelations(Matrix modes) {
double[][] mode = modes.getArrayCopy();
int rows = mode.length;
int columns = mode[0].length;
double[][] correlations = new double[rows][columns];
for (int i = 0; i < rows; i++) {
for (int j = 0; j < columns... | [
"Matrix crosscorrelate(Matrix filter) throws MatrixException;",
"public Matrix correlation() {\n int n = getColDim();\n int m = getRowDim();\n Matrix X = new Matrix(n, n);\n int degrees = (m - 1);\n Matrix V = new Matrix(n, n);\n double c;\n double s1;\n dou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds a list of calendars by the email address of a user who they're shared with. | @GetMapping("/api/calendar/sharedEmail/{sharedEmail}")
List<Calendar> findSharedCalendars(@PathVariable String sharedEmail) {
return calendarRepo.findAll().stream()
.filter(calendar -> calendar != null && calendar.getEditorEmails() != null &&
calendar.getEditorEmails().contains(sharedEmail))
.collect(C... | [
"public List<Event> Search(){\r\n return em.loadPublicCalendar(user_mail);\r\n \r\n \r\n //\r\n \r\n }",
"@GetMapping(\"/api/calendar/findByName/{email}/{name}\")\n\tList<Calendar> findCalendarsByName(@PathVariable String email, @PathVariable String name) {\n\t\tList<Calendar> allCalendars = findO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the badtLoc field is properly copied when a message object is passed through the transformer. | @Test
public void testAudiTrailBadtLoc() {
new AuditTrailFieldTester()
.verifyStringFieldCopiedCorrectly(
FissAuditTrail.Builder::setBadtLoc,
RdaFissAuditTrail::getBadtLoc,
RdaFissAuditTrail.Fields.badtLoc,
5);
} | [
"protected boolean validateLocation (BodyObject source, Location loc)\n {\n return true;\n }",
"@Test\n public void testIsMessageOriginCorrect() {\n System.out.println(\"Test the is message origin correct method\");\n Portal instance = new Portal(\"Fuck you, piece of shit\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
generates for each stream a thread and starts it. | private void makeThreads() {
threads = new HashMap();
for(Stream<T> stream : streams) {
Thread thread =
new Thread(()->{
stream.anyMatch((T item) -> setNextItem(item));
remove(stream);});
threads... | [
"public void start() {\n threads.forEach(it -> {\n it.start();\n });\n }",
"private void startThreads()\n\t{\n\t\tPageGrabber grabber;\n\t\twhile ((grabber = startNextThread()) != null)\n\t\t\tscheduleTask(grabber);\n\t\tfireThreadEvent();\n\t}",
"public void startThread() \n { \n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 left_card_count = 1; optional int32 left_card_count = 1; | boolean hasLeftCardCount(); | [
"int getLeftCardCount();",
"int getPlayerCardCount();",
"public int getLeftCardCount() {\n return leftCardCount_;\n }",
"public int getCardsRemaining() {\n\n\treturn cardsLeft;\n\n }",
"public int cardsLeft() { \n\t return unused_deck.size();\n }",
"public int getNumberOfCardsAtStartup... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates an instance of some dto class to the data storage. | D update(D dto); | [
"public void update(TDeviceInfoPk pk, TDeviceInfo dto) throws TDeviceInfoDaoException;",
"public abstract <T> void update(String id, Map<String, Object> objectMap, Class<T> clazz);",
"public void updateTireType(TireTypeDTO tireTypeDTO);",
"T update(T object);",
"public void update(DiscLivroPk pk, DiscLivro ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
parseRoot() Parses an array element | private LinkedList<Element> parseArray() {
LinkedList<Element> array=new LinkedList<>();//create linked list
char chr=next();//consume first character
assert chr=='[';//assert first character is an open square bracket
while (chr!=']') {//until closing bracket
switch (pee... | [
"private Element parseRoot() {\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n \r\n while (peek()<=' ') next();//skip whitespace\r\n switch (peek()) {//switch on next character\r\n case 'n': return new ScalarElement(parseNull());//parse null ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the scent mark at the given cell. (17) are black colony scents (713) are red. 0 if no scent marker has been placed. | public int getScentMark(); | [
"public char getMark(int row, int col) {\n return theBoard[row][col];\n }",
"public char getMark(int row, int col) {\n\t\treturn theBoard[row][col];\n\t}",
"private static char firstSeatSeen(char[][] matrix, int row, int col, Direction direction) {\n int dr = row + direction.drow;\n int dc = col... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method writes new type to file. | @Override
public void add(Type type) {
try (BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file, true))) {
bufferedWriter.write(type.getId() + " " + type.getName() );
} catch (IOException e) {
e.printStackTrace();
}
} | [
"void writeType(Class<?> clazz) throws IOException {\n int type_number;\n\n if (clazz == lastClass) {\n type_number = lastTypeno;\n } else {\n type_number = types.find(clazz);\n lastClass = clazz;\n lastTypeno = type_number;\n }\n\n if (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the timeline of images where EXIF metadata date time original is defined. | public Timeline getTimeline() {
Timeline timeline = new Timeline();
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
try {
con = getConnection();
String sql = "SELECT exif_date_time_original FROM exif"
+ " WHERE exif_d... | [
"public int[] getThumbnailTimeStamp(int index) throws TvCommonException\r\n\t{\r\n\t\treturn pvrMgr.getThumbnailTimeStamp(index);\r\n\t}",
"Exif getExif(Photo photo) throws ServiceException;",
"Map<String, Object> getImageMetadata(InputStream in);",
"private String dateFromFile(File srcFile, String name)\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets HistoryRecords for one or more DescLogicConepts specified in the list | private List getHistoryRecord(List concepts) throws Exception{
List results = new ArrayList();
for(int i=0; i<concepts.size(); i++){
DescLogicConcept result = (DescLogicConcept)concepts.get(i);
String code = result.getCode();
EVSQuery evsQuery = new EVSQueryImpl();
... | [
"java.util.List<hr.client.appuser.CouponCenter.ExchangeRecord> \n getExchangeHistoryListList();",
"public List<History> getAllHistories() {\n List<History> result = new ArrayList<>();\n AttractionController attractionController = new AttractionController();\n WatchController watchContr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method takes a TaskList and update the view using that list | public void updateView(TaskList taskList){
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
adapter=new TaskRecyclerAdapter(taskList,getActivity());
recyclerView.setAdapter(adapter);
adapter.notifyDataSetChanged();
} | [
"private void displayTasks(List<Task> taskList) {\n\n adapter.setTaskList(taskList);\n adapter.notifyDataSetChanged();\n }",
"public void updateTasks(List<Task> listOfTasks);",
"public void updateTaskList(TaskList tasks) {\n\t\ttaskListViewManager.updateView(tasks);\n\t}",
"public void update... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getNumero method, of class Conta. | @Test
public void testGetNumero() {
System.out.println("getNumero");
Conta instance = new Conta();
String expResult = "";
String result = instance.getNumero();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.... | [
"public int getNumero() {\r\n return numero;\r\n }",
"public int getNumero() {\n return numero;\n }",
"public int getNumero() {\n return dado1;\n }",
"@Test\r\n public void testGetNumero() {\r\n System.out.println(\"getNumero\");\r\n Telefono instance = new Telef... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return an iterator of X spanning the iterators of X in ita. | @SuppressWarnings("unchecked")
private <X> Iterator<X> itx(Iterator<X>[] ita) {
if (ita == null || ita.length == 0)
return (Iterator<X>)Arrays.stream(ofDim(Iterator.class,0)).iterator();
return new Iterator<X>() {
private int i = 0;
public boolean hasNext() {
while ( i < ita.length ... | [
"Iterator<T> createIterator();",
"IteratorExp createIteratorExp();",
"Iterator<Element> getIdentities();",
"public DbIterator iterator() {\n // some code goes here\n ArrayList<Tuple> tuples = new ArrayList<>();\n for (Map.Entry<Field, Integer> kv : g2a.entrySet()) {\n Tuple t =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
remove geometry set at index | final protected void removeGeometrySet(int index) {
GeometriesSet set = removeGeometrySetFromList(index);
if (set != null) {
set.removeBuffers();
}
} | [
"protected GeometriesSet removeGeometrySetFromList(int index) {\n\t\treturn geometriesSetList.remove(index);\n\t}",
"void removeGeometryMember(int i);",
"void unsetGeometryMembers();",
"void removePolygon(int i);",
"private void removeGotoGeometry(FourTuple<PointGeometry, PointGeometry, TileGeometry, Polyli... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check whether word is Betweenword | boolean isBetweenCorrect(int currentIndex, List<String> words); | [
"public static boolean isWord(String word) {\r\n String lower = word.toLowerCase();\r\n int start = getLetterIndex(lower, head); // to find the index for the letter appear\r\n int end = getLetterIndex(lower, tail); // to find the last index for the letter appear\r\n\r\n if (start ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Extracts the most accurate data points from the forecast data set. Starts by finding the most recent forecast date from the data set, then extracts all forecast points. Since the date is in the past, we can be assured that the extracted data points are the most accurate ones. | private static List<? extends AForecast> extractDataForThePast(List<? extends AForecast> data) {
return extractDataForDate(data, TimeUtil.convertDateFromISOString(data.get(0).getApplicableDate()));
} | [
"@Override\n public void forecast(int numFuturePoints) {\n\n int startPoint = 0, endPoint = actual.length;\n double lastValue = actual[startPoint],forecast;\n double[][] trainMatrix = new double[trainPoints + validationPoints][2];\n trainMatrix[0][0] = actual[startPoint];\n tra... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
No checks are done. i.e does file exit. This will delete a global in a xml file fileName: Path of Associations file address: Address of dotNet to with gloabl to be removed Type of global Valid types are local, wideSource, wideDestination, temporary, smart Global number to be removed. Returns the address of the removed ... | public static int deleteGlobal(Path fileName, int dotNetAddress, globalType globalType, int globalNumber) {
int deletedGlobal = -1;
try {
Document doc = getDocument(fileName);
NodeList dotNetNodeList = doc.getElementsByTagName("commsController");
for (int dotNetCount... | [
"public static int deleteDotNet(Path fileName, int address) throws IOException, SAXException, ParserConfigurationException, TransformerException {\n int deletedDotNet = -1;\n Document doc = getDocument(fileName);\n NodeList dotNetNodeList = doc.getElementsByTagName(\"commsController\");\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Used for receiving notifications from the HeadRecognition when gesture such as tilt, nod or shake have been detected. | public interface OnHeadGestureListener {
void onTilt(int direction);
void onNod(int direction);
void onShake();
} | [
"public interface OnHeadTrackingListener {\n\n void onDirectionChanged(int azimuth, int pitch, int roll);\n }",
"@Override\n public void onShakeDetected() {\n LogUtil.e(\"onShakeDetected\");\n }",
"void onFingerprintEntered();",
"public void setOnHeadGestureListener(OnHeadGe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column XUYU_CONTENT_CARD_INFO_RECORD.AGENCY | public String getAgency() {
return agency;
} | [
"public Cursor getAllAgencies() {\n\t\t\treturn db.query(AGENCIES_TABLE, new String[] {\n\t\t\t\t\t// importing only needed columns instead of all\n\t\t\t\t\tKEY_ROWID,\n\t\t\t\t\tKEY_AGENCYNAME},\n\t\t\t\t\tnull,\n\t\t\t\t\tnull,\n\t\t\t\t\tnull,\n\t\t\t\t\tnull,\n\t\t\t\t\tnull);\t\t\t\t\n\t\t}",
"public String... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
List apps Get a list of available applications. | @Test
public void listAppsTest() throws ApiException {
Boolean _public = null;
String name = null;
String executionSystem = null;
String tags = null;
String filter = null;
String naked = null;
Long limit = null;
Long offset = null;
// List<Appl... | [
"public static List<AppInfo> getAppList()\r\n {\r\n NomadicAppManager appMangr = NomadicAppManager.getInstance();\r\n return appMangr.getAppsList();\r\n }",
"java.util.List<com.google.cloud.talent.v4beta1.Application> getApplicationsList();",
"java.util.List<com.clarifai.grpc.api.App> \n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new instance,by setting the first and second filter add them to the list of filters. | public OrFilter(Filter first, Filter second) {
super(first, second);
} | [
"private Filter createSecondFilter() {\n\t\t\n\t\t// creazione l'attributo\n\t\t\t\tAttribute att1 = new Attribute(\"String:anno\");\n\t\t\t\t\n\t\t\t\t// creazione fuzzy set\n\t\t\t\tFuzzySet fs1 = new FuzzySet();\n\t\t\t\t\n\t\t\t\t// creazione metadato\n\t\t\t\tMetadata m = new Metadata(att1, fs1,\n\t\t\t\t\tClo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__PRIMITIVE_TYPE_NAME__Alternatives" $ANTLR start "rule__CommObjectModel__Group__0" InternalCommunicationObject.g:1021:1: rule__CommObjectModel__Group__0 : rule__CommObjectModel__Group__0__Impl rule__CommObjectModel__Group__1 ; | public final void rule__CommObjectModel__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalCommunicationObject.g:1025:1: ( rule__CommObjectModel__Group__0__Impl rule__CommObjectModel__Group__1 )
// InternalCommunicationObject.... | [
"public final void rule__Objective__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:8536:1: ( rule__Objective_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new compound loaded type initializer. | public Compound(List<? extends LoadedTypeInitializer> loadedTypeInitializers) {
this.loadedTypeInitializers = new ArrayList<LoadedTypeInitializer>();
for (LoadedTypeInitializer loadedTypeInitializer : loadedTypeInitializers) {
if (loadedTypeInitializer instanceof Compound) {
... | [
"public Compound(LoadedTypeInitializer... loadedTypeInitializer) {\n this(Arrays.asList(loadedTypeInitializer));\n }",
"TypeInitializer getTypeInitializer();",
"BasicType createBasicType();",
"TypedefCompound createTypedefCompound();",
"TypedLiteralType createTypedLiteralType();",
"Compo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the loginFailedDueToAccountInvalid property. | public void setLoginFailedDueToAccountInvalid(boolean value) {
this.loginFailedDueToAccountInvalid = value;
} | [
"public boolean isLoginFailedDueToAccountInvalid() {\n return loginFailedDueToAccountInvalid;\n }",
"public void setFailedLoginAttempts(int failedLoginAttempts) {\n this.failedLoginAttempts = failedLoginAttempts;\n }",
"public void setFailedLoginAttempts(int value) {\n this.failedLogi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the graph id. | public String getGraphID() {
return graphID;
} | [
"public String getGraphId() {\n return graphId;\n }",
"public java.lang.String getGraphId() {\n java.lang.Object ref = graphId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of findUsersIssuesOwnersByNamePrefix method, of class IssueService. | @Test
public void testFindUsersIssuesOwnersByNamePrefix() {
System.out.println("findUsersIssuesOwnersByNamePrefix");
User user = createUser("xavier", "xavier", "xavier@mail6", "12345");
User userx = createUser("xenofob", "xenofob", "xenofob@mail6", "12345");
IssueState state = IssueS... | [
"@Test\n public void testFindUsersIssuesOwnersByNamePrefixNotMatching() {\n String usernamePrefix = \"a4983e57gfh7854rg\";\n List<User> expResult = new ArrayList<>();\n List<User> result = issueService.findUsersIssuesOwnersByNamePrefix(usernamePrefix);\n assertEquals(expResult, result... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a vertical coordinate system from a datum and linear units. | public VerticalCoordinateSystem createVerticalCoordinateSystem( final String name,
final VerticalDatum datum,
final Unit unit,
... | [
"public VerticalCoordinateSystem createVerticalCoordinateSystem( final String name,\n final VerticalDatum datum ) {\n return createVerticalCoordinateSystem( name, datum, Unit.METRE, AxisInfo.ALTITUDE );\n }",
"private Vertical(float dY) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string healSnIp = 5; | public Builder setHealSnIp(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
healSnIp_ = value;
onChanged();
return this;
} | [
"java.lang.String getHealSnIp();",
"public java.lang.String getHealSnIp() {\n java.lang.Object ref = healSnIp_;\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.toStringU... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a user from a json string | public static User renderUser(String json) {
return new JSONDeserializer<User>().deserialize(json, User.class);
} | [
"GistUser deserializeUserFromJson(String json);",
"private static User getUserFromJson(String userJson) throws Exception {\n verifyJsonFormatting(userJson);\n ObjectMapper objectMapper = new ObjectMapper();\n return objectMapper.readValue(userJson, User.class);\n }",
"@SuppressWarnings(\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the tag's criteria attribute | public String getCriteria()
{
return _criteria;
} | [
"public String getCriteria() {\r\n\t\treturn criteria;\r\n\t}",
"Attribute getAttribute();",
"String getAttribute(String attribute);",
"String attributeValue();",
"public String getCriteriaDetail() {\n return (String) get(13);\n }",
"String attributeChoice();",
"String getCondition();",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
input element default value // | @Test
public void testInputElementWithDefaultValue() {
var prompt = openPrompt();
assertEquals(PROMPT_INPUT_DEFAULT_VALUE, prompt.getInputElement().getInputValue());
} | [
"private InputValue getInputValue(FormInput input) {\n\n\t\t/* Get the DOM element from Selenium. */\n\t\tWebElement inputElement = browser.getWebElement(input.getIdentification());\n\n\t\tswitch (input.getType()) {\n\t\t\tcase TEXT:\n\t\t\tcase PASSWORD:\n\t\t\tcase HIDDEN:\n\t\t\tcase SELECT:\n\t\t\tcase TEXTAREA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the double distance to the next destination | public double getDistanceToDestination() {
return calcMiles(currLocation, destination);
} | [
"private double calculateDistance(){\n int[] finalCords = destination.getCords();\n int[] originCords = originIsland.getCords();\n int distanceBetween = Math.abs(originCords[0] - finalCords[0]);\n int heightBetween = Math.abs(originCords[1] - finalCords[1]);\n double distanceTo = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copy intervals and merge adjacent. Assumes that length reflects the total number of resulting intervals. | private int[][] copyIntervals(int[][] intervals, int length) {
int[][] result = new int[length][2];
int index = 0;
result[0][0] = intervals[0][0];
result[0][1] = intervals[0][1];
for (int iInterval = 1; iInterval < intervals.length; iInterval++) {
if (intervals[iInterval][0] == (result[index][1] + 1)) {
... | [
"public int[][] merge(int[][] intervals) {\n if(intervals.length <= 0) return new int[0][2];\n java.util.Arrays.sort(intervals, new java.util.Comparator<int[]>() {\n public int compare(int[] a, int[] b) {\n return Integer.compare(a[0], b[0]);\n }\n});\n List<RangeTuple> ranges = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Publishes the specified text to the topic with the specified topicName. That is, the text will be put into a MessagePipeline before actually being published as a TextMessage, with the specified messageType, to the message service. If this MessageServiceClient is not a publisher on the topic with the topicName yet, it w... | public void publishTo(final String topicName, final String text, final String messageType) {
publishTo(topicName, text, getMessageProperties(null, messageType));
} | [
"public void publishNowTo(final String topicName, final String text, final String messageType)\r\n throws MessageServiceException {\r\n publishNowTo(topicName, text, getMessageProperties(null, messageType));\r\n }",
"public void publishNowTo(\r\n final String topicName, final String text, fina... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__S_If__Group__4__Impl" $ANTLR start "rule__S_If__Group_4__0" InternalGaml.g:6972:1: rule__S_If__Group_4__0 : rule__S_If__Group_4__0__Impl rule__S_If__Group_4__1 ; | public final void rule__S_If__Group_4__0() throws RecognitionException {
int rule__S_If__Group_4__0_StartIndex = input.index();
int stackSize = keepStackSize();
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 376) ) { return ; }
// InternalGaml... | [
"public final void rule__If__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWhdsl.g:1329:1: ( ( 'if' ) )\n // InternalWhdsl.g:1330:1: ( 'if' )\n {\n // InternalWhdsl.g:1330:1: ( 'if' )... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to fetch Report Template Config Files using Report ID | public List<InsightsReportTemplateConfigFiles> getReportTemplateConfigFileByReportId(int reportId) {
try {
Map<String,Object> parameters = new HashMap<>();
parameters.put("reportId", reportId);
return getResultList(
"FROM InsightsReportTemplateConfigFiles RE WHERE RE.reportId = :reportId",
Ins... | [
"public InsightsReportTemplateConfigFiles getReportTemplateConfigFileByFileNameAndReportId(String fileName,int reportId) {\n\t\ttry {\n\t\t\t\n\t\t\tMap<String,Object> parameters = new HashMap<>();\n\t\t\tparameters.put(\"fileName\", fileName);\n\t\t\tparameters.put(\"reportId\", reportId);\n\t\t\treturn getUniqueR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if exists return the variable else null | public variable arguExist(String id){
for (Iterator<variable> it = arguments.iterator(); it.hasNext(); ) {
variable v = it.next();
if(v.name == id )
return v;
}
return null;
} | [
"public variable lvExist(String id){\n\t\tfor (Iterator<variable> it = localvars.iterator(); it.hasNext(); ) {\n \tvariable v = it.next();\n \tif(v.name == id )\n \t\treturn v;\n }\n return null;\n\t}",
"public Optional<Variable> getOptionalVariable(Object groupIdOrPath, String ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds the number of free uins | @Query
public int countFreeUin(); | [
"private int getNumOfFreeSpace() {\n FixedSizeBitSet fixedSizeBitSet = disk.get(1);\n\n int free = 0;\n for (int i = 0; i < fixedSizeBitSet.size(); i++) {\n if (!fixedSizeBitSet.get(i)) {\n free++;\n }\n }\n\n return free;\n }",
"public st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Contains useful references to realvalued constants. | public interface RealConstants extends Auxiliary, Utility
{
// ========================= CONSTANTS =================================
static final double HALF = BigRealConstant.HALF.doubleValue();
static final double THIRD = BigRealConstant.THIRD.doubleValue();
static final double ONE = BigRealConstant.ONE.doubleV... | [
"private FunctionMemberSynonymicConstants() {\n\t\tthrow new AssertionError();\n\t}",
"@Test\n\tpublic void testSanityOfInternalConstants() {\n\t\tAssert.assertTrue((new Rational(\"0\", 2)).toString(2).equals(\"0\"));\n\t\tAssert.assertTrue((new Rational(\"0\", 10)).toString(10).equals(\"0\"));\n\t\tAssert.assert... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Flush pending commands. This commands forces a flush on the channel and can be used to buffer ("pipeline") commands to achieve batching. Noop if channel is not connected. | void flushCommands(); | [
"void flush() throws IOException {\n // Force current output buffer to be output also.\n\n if ((curOut != null)\n && (curOut.nextAdded > curOut.nextRemoved)) {\n bufferReady = true;\n }\n\n int result = flushChannel(null, false);\n if (result != 0) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Precondition: Requires the x and y coordinates of the button Postcondition: Returns the button that corresponds with the provided coordinates | public JButton getButton(int x, int y)
{
return grid[x][y];
} | [
"public Pair<Integer,Integer> getJButtonCoord(JButton button){\n int row=0,col=0;\n Boolean foundButton = false;\n for(row =0 ; row < ROWS; row ++){\n for(col = 0; col < COLS; col++){\n if (buttonGrid[row][col] == button){\n foundButton = true;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a number of question marks, e.g. for bound variables in a prepared statement | public String preparePlaceHolders(int length) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < length; i++) {
sb.append(i < length-1 ? "?," : "?");
}
return sb.toString();
} | [
"static String createQuestionMarks(int count) {\n StringBuffer buff = new StringBuffer();\n buff.append(\"(?\");\n for (int i = 1; i < count; i++) {\n buff.append(\", ?\");\n }\n\n buff.append(\")\");\n return buff.toString();\n }",
"public static String get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get value 'Amount Credited' field | public String getAmountCredited() {
waitForControl(driver, LiveGuru99.WithdrawallPage.GET_AMOUNT_DEPOSIT, timeWait);
String amount = getText(driver, LiveGuru99.WithdrawallPage.GET_AMOUNT_DEPOSIT);
return amount;
} | [
"java.lang.String getAmount();",
"long getAmount();",
"public static void extract_money(){\n TOTALCMONEY = TOTALCMONEY - BALANCERETRIEVE; //the total cashier money equals the total cashier money minus the retrieve request\r\n BALANCE = BALANCE - BALANCERETRIEVE; //the user balance equals the accou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Is Master Core' attribute. If the meaning of the 'Is Master Core' attribute isn't clear, there really should be more of a description here... | Boolean getIsMasterCore(); | [
"@XmlElement(name = \"master\", required = false)\n public boolean isMaster() {\n StopWatch.start(false);\n StringBuffer procRID = ProvenanceRecorder.documentProcedure(ProvUtils.getStoreOfCurrentThread(), this, new StringBuffer(\"isMaster\"), new StringBuffer(\"label\"), true, null, null);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the alarm filter start date (or null if not set). | public void setAlarmFilterStart(Date aDate)
{
mAlarmFilterStart = aDate;
} | [
"public Date getAlarmFilterStart()\r\n {\r\n return mAlarmFilterStart;\r\n }",
"void setDateStart(java.util.Calendar dateStart);",
"void setEventStartDate(Date startEventDate);",
"private void setStartDate() {\n startDate = calendarBuilder(3000, 0, 0, 0);\n for (Stock s : stocks) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The method to remove a book from the library/bag. The book is found with the find method and the bag maintains the current sequence of books after the removal. If the book is not in the library, the method returns false. | public boolean remove(Book book) { //remove
int index = find(book);
if(index>-1) {
for(int i=index; i<books.length-1; i++) {
books[i] = books[i+1];
}
if(numBooks == books.length) { //put a null space
books[books.length-1] = null;
}
numBooks--;
return true;
}
return false;
} | [
"boolean removeBook(int bookId);",
"public void removeBook(Book book) {\n if (isNull(book)) {\n return;\n }\n int bookCnt = _noOfBooks;\n for (int i = 0; i < bookCnt; i++) {\n if (_lib[i].equals(book)) {\n _lib[i] = null;\n _noOfBooks... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets a param of the application | public void setParam(String param, Object value) {
applicationParams.put(param, value);
} | [
"void setParameter(String name, String value);",
"public static void setAppParams(String value)\r\n {\r\n prefGeneral.put(ID_APP_PARAMS, value);\r\n }",
"public void setParameter(String parameter, String value);",
"public void setApplicationLevelParameter(String valueName, Object value)\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ GA HELPER FUNCTIONS See top comment on chromosome structure, this tries to honor packing order if possible. If bin is full, bestfirst packing gets used. This method also contains a mutation operation bin dumping. | private int[] bestFitModified(int[] chromosome) {
int[] bins = new int[binCount];
ArrayList<Integer> cannotPackList = new ArrayList<Integer>();
//honor chromosome listing when possible
for (int i = 0; i < chromosome.length; i++) {
//if this bin isnt full & won't be after placement & this chrom hasnt gone of... | [
"private void handleBins() {\n\t\t\tfinal int n = getNbBins();\n\t\t\t//compute the number of empty, partially filled and closed bins\n\t\t\t//also compute the remaining space in each open bins\n\t\t\tfor (int b = 0; b < n; b++) {\n\t\t\t\tif(svars[b].isInstantiated()) {\n\t\t\t\t\t//we ignore closed bins\n\t\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method evaluate a single individual and sets the fitness values | public abstract void evaluate(AbstractEAIndividual individual); | [
"public void evaluate(AbstractEAIndividual individual) {\n double[] x;\n// double[] fitness;\n\n x = getXVector(individual);\n\n double[] fit = eval(x);\n individual.SetFitness(fit);\n\t\t \n// if (this.m_UseTestConstraint) {\n// if (x[0] < 1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sorts keys by character frequency. | private Key[] sortKeys(Map<String, Key> map, int[] freq) {
Key[] keys = new Key[map.size()];
int idx = 0;
for (Key key : map.values()) {
keys[idx++] = key;
for (char c : key.ksig) {
key.kfreq += freq[c];
}
sort(key.ksig, freq);
... | [
"public String frequencySort(String s) {\n \n char[] chars = s.toCharArray();\n HashMap<Character,Integer> map = new HashMap<Character, Integer>();\n for(char ch : chars) {\n Character c = new Character(ch);\n if(map.containsKey(c)) {\n Integer n = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new upnp message factory. | private UpnpMessageFactory() {
super();
} | [
"public MessageFactory() {}",
"public MessageFactoryImpl() {\n\t}",
"public MessageDestinationFactory() {\n this.properties = new ConfigMap();\n }",
"private MessageContainerFactory() {\n }",
"Message createMessage();",
"BPMessage createBPMessage();",
"public abstract Message createMessage(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
the default bin size for this index type; use this unless you're aware of the nuances of the particular index type. | public int defaultBinSize(); | [
"public int getBinSize() {\n\n\t\treturn binSize;\n\n\t}",
"public int getBinSize();",
"public long getIndexSizeBytes() {\n return indexSizeBytes;\n }",
"public java.lang.Integer getBinarySize() {\n return binarySize;\n }",
"public BinStore(int sizeThreshold) {\r\n this.sizeThreshold = size... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the value related to the column: AIR_HQ_REMARKS | public void setAirHqRemarks (java.lang.String airHqRemarks) {
this.airHqRemarks = airHqRemarks;
} | [
"public void setRemarks(String value) {\r\n setAttributeInternal(REMARKS, value);\r\n }",
"public void setInterviewRemarks(String value) {\n setAttributeInternal(INTERVIEWREMARKS, value);\n }",
"public void setRemarks(String remarks);",
"public void setRemarks(String value) {\n setA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
burnDown.launchBurnDown(primaryStage); chooseSprint.launchGUISprint(primaryStage, 32); String hello = hashing.getMD5("password"); String[] args; MD5.main(args); login.launchGUI(primaryStage); register.launchRgst(primaryStage); mainMenu.launchMainMenu(primaryStage, 13); mdfAccount.launchMdfAcc(primaryStage, 10); String[... | @Override
public void start(Stage primaryStage) throws Exception {
createNewProject.launchCreateProject(primaryStage, 15);
// int userPass = hashing.hashIt("admin");
// System.out.println(userPass);
// String userPass2 = hashing.retrieveIt(userPass);
// System.out.println(us... | [
"public static void main(String[] args) {\n\t\tInitialization.launchBrowser();\n\t\t\t\tInitialization.navigate();\n\t\t\t\tLoginLogout.login();\n\t\t\t\tHomePage.minimizeFlyOutWindow();\n\t\t\t\tCustomers.tasklog();\n\t\t\t\t//Customers.createCustomer();\n\t\t\t\tProjects.createProject();\n\t\t\t\tProjects.deleteP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Click on Toggle Courses Button. | public TeacherPage clickToggleCoursesButton() {
toggleCourses.click();
return this;
} | [
"public void clickCourse() {\r\n\t\tthis.clickcourse.click();\r\n\r\n\t}",
"public void clickOnCourseCatalogsButton() {\n if(CourseCatalog.isDisplayed()) {\n\t waitAndClick(CourseCatalog);\n }\n\t }",
"public void clickCourse() throws InterruptedException{\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tth... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the custList2 property. | public int getCustList2() {
return custList2;
} | [
"public int getCustList1() {\n return custList1;\n }",
"public void setCustList2(int value) {\n this.custList2 = value;\n }",
"public void setCustList1(int value) {\n this.custList1 = value;\n }",
"public String getLstCustNo() {\n return lstCustNo;\n }",
"public int g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deletes a given Task. | void deleteTask(TaskDef task) throws OpenXDataException; | [
"void deleteTask(String taskId);",
"public void deleteTask(Task task) {\n taskList.remove(task);\n }",
"public void deleteTask(Task task) {\n database.delete(SQLiteHelper.TABLE_TASKS,\n SQLiteHelper.COLUMN_ID + \" = \" + task.get_id(), null);\n }",
"Task deleteTask(String id... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loop through the current set of SharedSpace objects and collect those SharedSpace objects where the lastChangeId attribute matches the parameter value. | public SharedSpaceSet filterLastChangeId(long value)
{
SharedSpaceSet result = new SharedSpaceSet();
for (SharedSpace obj : this)
{
if (value == obj.getLastChangeId())
{
result.add(obj);
}
}
return result;
} | [
"public SharedSpaceSet createLastChangeIdCondition(long value)\n {\n SharedSpaceSet result = new SharedSpaceSet();\n \n for (SharedSpace obj : this)\n {\n if (value == obj.getLastChangeId())\n {\n result.add(obj);\n }\n }\n \n return result;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo que busca en un array una id, y devuelve el nombre y apellidos | private String buscaEnArray(ArrayList<Student> lista, int id){
for (int i=0; i<lista.size(); i++){
if(lista.get(i).getId_student() == id){
return lista.get(i).getName() + " " + lista.get(i).getSurname1();
}
}
return null;
} | [
"public String getApellidos() {\r\n return apellidos;\r\n }",
"public String getApellidos() {\n return apellidos;\n }",
"public String getApellidos() {\n\t\treturn apellidos;\n\t}",
"public void setApellidos(String Apellidos)\r\n {\r\n this.Apellidos = Apellidos;\r\n }",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds the consumer operation | public static String findConsumerOperation(AeBaseXmlDef aDef)
{
return findOperation(aDef, false);
} | [
"protected abstract Consumer findConsumer(MessageReference reference);",
"public Consumer getConsumer();",
"Consumer getConsumer();",
"Set<Operation<E>> findOperationsConsuming(E input);",
"private static String findOperation(AeBaseXmlDef aDef, boolean aRequestFlag)\r\n {\r\n if (aDef != null)\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Open the NMOA Activity | public void openNMOAMenu(View view) {
Intent intent = new Intent(this, NMOAActivity.class);
startActivity(intent);
} | [
"private void openActivity() {\n mManager.cancelAll();\n simpleNotificationWithActivity();\n }",
"public void openNJSMMenu(View view) {\n Intent intent = new Intent(this, NJSMActivity.class);\n startActivity(intent);\n }",
"protected void openActivity(String action) {\n\t\topen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a new reference for the given radius. | private void addRadiusReference(double radius, WorldPerspectiveReference reference) {
Objects.requireNonNull(reference, "reference");
if (Double.isNaN(radius) || radius < 0)
throw new IllegalArgumentException("illegal radius");
radiusReferences.put(radius, reference);
} | [
"public void addCircle(Circle circle){\n circles.add(circle);\n }",
"public GameCircle addCircle(double x, double y, double diameter);",
"private void addNewCircle() {\n /**\n * xDistance is the distance in horizontal axis.\n * yDistance is the distance in vertical axis.\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send the activation secure menu request message. | private void sendActivateSecureMenuRequest(boolean activate)
{
String startinfo = activate ? "activating secure menu..." : "deactivating secure menu...";
logger.info( startinfo );
ConnectionEngineSwingAdapter.getInstance( ).send( SpotMessages.getInstance( ).getServiceMenuSwitchData( activate ));
} | [
"private boolean sendAndReceiveActivation(boolean activate)\r\n\t{\r\n\t\terrorInResponse = false;\r\n\t\treceivedResponse = false;\r\n\r\n\t\tsendActivateSecureMenuRequest( activate ); // request the secure menu activation by spot protocol.\r\n\r\n\t\tsynchronized (this) // wait for the package info response.\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the thousands separator. Note that this separator defines the thousands separator for all decimal numbers that appear in the MPX file. | public char getThousandsSeparator()
{
return (m_thousandsSeparator);
} | [
"public void setThousandsSeparator(char sep)\r\n {\r\n m_thousandsSeparator = sep;\r\n }",
"public String getDecimalSeparator() {\n NumberFormat nf = NumberFormat.getInstance(getLocalCurrency().getLocale());\n if (nf instanceof DecimalFormat) {\n DecimalFormatSymbols sym = ((Deci... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a Heads Up Display (HUD) style check box, similar to that seen in various iApps (e.g. iPhoto). | public static JCheckBox createHudCheckBox(String checkBoxText) {
JCheckBox checkBox = new JCheckBox(checkBoxText);
checkBox.setUI(new HudCheckBoxUI());
return checkBox;
} | [
"private JCheckBox createCheckbox(final String text) {\r\n\t\tfinal boolean isMac = SystemTools.isMac();\r\n\t\treturn isMac ? HudWidgetFactory.createHudCheckBox(text) : new JCheckBox(text);\r\n\t}",
"public HBox createCheckBoxes() {\n HBox box = new HBox();\n box.setSpacing(80);\n box.setAli... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get more search results for result. | void moreSearchResults(SearchResult result, int startIndex,
Handler handler) {
doSearch(result.query, result, startIndex, handler);
} | [
"boolean getMoreResults();",
"public boolean getMoreResults() {\n return moreResults_;\n }",
"public boolean getMoreResults() {\n return moreResults_;\n }",
"private void loadMoreResults() {\r\n \tfindViewById(buttonID).setVisibility(View.GONE);\r\n \t\r\n \tint i = 0;\r\n \tfo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new ChildChanged event. This type of event is triggered by a ApproxsimComplex descendant when one of its children has changed. | public static ApproxsimEvent getChildChanged(Object source,
Object initiator, ApproxsimObject changed) {
return new ApproxsimEvent(source, CHILDCHANGED, initiator, changed);
} | [
"private void\n setChildChanged()\n {\n if (parent_ != null)\n parent_.setChildChanged();\n childChanged_ = true;\n }",
"public void childAdded(StructuralEvent event);",
"public boolean isChildChanged() {\n return CHILDCHANGED.equals(message);\n }",
"protected void handleCh... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the y coordinate of the element containing 0 (the empty tile) | public int getEmptyY()
{
return y0;
} | [
"public int getTileY()\n\t{\n\t\treturn this.tileY;\n\t}",
"public int getY0() {\n\t\treturn this.origin.getY0();\n\t}",
"@java.lang.Override\n public int getTileIndexY() {\n return tileIndexY_;\n }",
"public int getMinTileY();",
"int getWorldTileY();",
"public int getY() {\n return 0;\n// ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of HttpUtil | public HttpUtil() {
} | [
"private HttpUtils() {\n }",
"private CommonHttpUtils() {\n\n\t}",
"private UrlUtil() {\n\n }",
"IHttpHelper getHttpHelper() {\n return new HttpHelper();\n }",
"public HttpURLBuilder() {\n\t\t// Empty\n\t}",
"Object construct(HttpRequest request, HttpResponse response) throws Failure, WebA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generated Property Getter for attribute CLASSINHERITANCEPATH | @Override
public com.gensym.util.Sequence getClassInheritancePathForClass() throws G2AccessException {
java.lang.Object retnValue = getStaticAttributeValue (SystemAttributeSymbols.CLASS_INHERITANCE_PATH_);
return (com.gensym.util.Sequence)retnValue;
} | [
"public com.gensym.util.Sequence getClassInheritancePathForClass() throws G2AccessException;",
"private Path getClasspath() {\n return getRef().classpath;\n }",
"RoleClass_refBaseClassPath_AttrEClass getRefBaseClassPath_AttrEClass();",
"private IRI getClassIri (RoleFamilyType rf, RoleClassLibType rc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Pitfall nr. 2 with LAZY references. Make country reference LAZY in City entity to test behavior of this method | @SuppressWarnings({ "unchecked", "unused" })
@Transactional(readOnly = true, propagation = Propagation.REQUIRED)
public void doSomethingWithCitiesAndTheirCountry() {
String jpql = "FROM " + City.class.getName();
Query query = entityManager.createQuery(jpql);
List<City> cities = query.getResultList(); // 1 query... | [
"@Test\n public void testACreateCity() {\n // do not replace this with a call to setUserContext,\n // the city must be stored using the client/org of the 100 user\n // this ensures that webservice calls will be able to find the city\n // again\n OBContext.setOBContext(\"100\");\n\n // first delet... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Evaluates hand strength of Hand | private void EvalHand() {
// Evaluates if the hand is a flush and/or straight then figures out
// the hand's strength attributes
ArrayList<Card> remainingCards = new ArrayList<Card>();
// Sort the cards!
Collections.sort(CardsInHand, Card.CardRank);
// Ace Evaluation
if (CardsInHand.get(eCa... | [
"public int getHandStrength() {\r\n\t\treturn HandStrength;\r\n\t}",
"float getWetness();",
"public int getMovingStrength(){\n\t\tint strengthValue = 0;\n\t\tfor (CrewCard card : hand){\n\t\t\tstrengthValue += card.getValue();\n\t\t}\n\t\tif (strengthValue == 0){ //no cards scenario \n\t\t\tstrengthValue = 1;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Process the click on retry button. | protected abstract void onClickRetryButton(); | [
"@OnClick(R.id.retryButton)\n public void retryUpload() {\n callback.retryUpload(contribution);\n }",
"public void btnRetryClick(){\n String Tag = TAG + \"-BtnRetry\";\n Log.d(Tag, \"Retrying...\");\n // Clear the chosen Wi-Fi and start connection thread again\n setWifiMod... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
aca estan los datos :D textView.append(datos + "\n"); | public void cargarDatos() {
if (!usuarioList.isEmpty()){
for (Usuario usuario: usuarioList ) {
textView.append(usuario.getTwitter() + "\n");
}
}
} | [
"public void setarText() {\n txdata2 = (TextView) findViewById(R.id.txdata2);\n txdata1 = (TextView) findViewById(R.id.txdata3);\n txCpf = (TextView) findViewById(R.id.cpf1);\n txRenda = (TextView) findViewById(R.id.renda1);\n txCpf.setText(cpf3);\n txRenda.setText(renda.to... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the endpoint address for the specified port name. | public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("TrafficIPGroupsPort".equals(portName)) {
setTrafficIPGroupsPortEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rp... | [
"public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"Sum\".equals(portName)) {\r\n setSumEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.Se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is to execute a PUT Request with a payload | public ValidatableResponse putMethod(String payload, String endpoint, Map header) {
log("Method: PUT\n---------------- URL ------------------\n"
+ RestAssured.baseURI + RestAssured.basePath + endpoint, "INFO", "text");
log("--------------- HEADERS ---------------\n" + header, "INFO", "... | [
"public RequestResult put() {\n request.setMethod(HTTPMethod.PUT);\n ClientResponse<byte[], byte[]> response = run();\n return new RequestResult(injector, request, response, userAgent, messageObserver, port);\n }",
"SimpleHttpResponse put(SimpleHttpRequest request, String requestBody) throws ClientProto... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method does the implementation of update song's favorite number in database then return a DbQueryStatus check if the parameters are all given and shouldDecrement String is correct | @Override
public DbQueryStatus updateSongFavouritesCount(String songId, String shouldDecrementString) {
if (songId == null || shouldDecrementString == null){
dbQueryStatus.setMessage("parameters are missing, please double check the parameters");
dbQueryStatus.setdbQueryExecResult(DbQueryExecResult.QUERY_ERROR_... | [
"protected abstract SQLQuery getFavoriteUpdateSQLQuery();",
"@RequestMapping(value = \"/updateSongFavouritesCount/{songId}\", method = RequestMethod.PUT)\n\t@ResponseBody\n\tpublic Map<String, Object> updateFavouritesCount(@PathVariable(\"songId\") String songId,\n\t\t\t@RequestParam(\"shouldDecrement\") String s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To verify the Alert box message is proper | public void verifyAlertText(String message) {
boolean assertion = message.equals(uiElementAction.getTextfromAlert());
Log.info("Alert message is correct : " + assertion);
Assert.assertTrue("Alert message is correct : " + assertion, assertion);
} | [
"public void verifyMessageInDialogBox(String message) {\n\t String actualMessage=getDriver().switchTo().alert().getText();\n\t if(message.equalsIgnoreCase(actualMessage)){\n\t\tAssert.assertTrue(true);\n\t }\n\t else {\n\t\tAssert.assertTrue(false);\n\t }\t\n }",
"public void verifyAlertMessage... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the value of the deploy on startup flag. If true, it indicates that this host's child webapps should be discovred and automatically deployed at startup time. | public boolean getDeployOnStartup() {
return (this.deployOnStartup);
} | [
"public boolean isStartOnDeploy() {\n return this.startOnDeploy;\n }",
"public void setStartOnDeploy(boolean startOnDeploy) {\n this.startOnDeploy = startOnDeploy;\n }",
"public void setDeployOnStartup(boolean deployOnStartup) {\n\n boolean oldDeployOnStartup = this.deployOnStartup;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates unsorted array of size size having random elements from 0 to scope | public static int[] initRandom (int size, int scope) {
int[] array = new int [size];
for (int i = 0; i < size; ++i) {
int e = RAND.nextInt (scope);
array [i] = e;
}
return array;
} | [
"public static int[] initUnique (int size, int scope) {\n\t\tint[] array = new int [size];\n\n\t\tSet <Integer> created = new HashSet <Integer> (size);\n\n\t\tfor (int i = 0; i < size; ++i) {\n\t\t\tint e = RAND.nextInt (scope);\n\t\t\tif (!created.contains (e)) {\n\t\t\t\tcreated.add (e);\n\t\t\t\tarray [i] = e;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Switching to frame with ID | public static void switchToFrameById(String id, WebDriver driver)
{
try{
driver.switchTo().frame(id);
}
catch (NoSuchFrameException e){
}
catch (Exception e){
}
} | [
"public static void switchtoframebyidorname(String idorname)\n {\n driver.switchTo().frame(idorname);\n Log.info(\"Switched to frame\");\n }",
"public void SwitchToFrame(String handle)\n\t{\n\t}",
"public void switchToFrame(int index){\n\n\t\ttry {\n\t\t\tdriver.switchTo().frame(index);\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
drawing move and checking fuel | @Override
public void drawMove() {
if(vehicle.getFuel()<0){
System.out.println(name + surname + " Out of fuel");
} else {
super.drawMove();
vehicle.fuelUsed();
if (isOpen) {
Platform.runLater(() -> {
controller.getLi... | [
"public void draw() {\t\n \t\t// Draw the centre of the maze\n \t\tPoint2D.Double centrePoint = GetCentrePoint();\n \t\t// if size is a factor of 10, this will be a multiple of 2\n \t\tint centreSize = getCentreSize();\n \t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n \t\tStdDraw.filledSquare(centrePoint.getX()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method to create author name label | private void addAuthor() {
this.author = createLabel(canvas.getWidth()-SIDE_MENU_WIDTH/2.0, canvas.getHeight()-10, "17");
this.author.setLabel("© 2020 dede64");
this.author.move(-this.author.getWidth()/2, 0);
this.author.setColor(Color.BLACK);
} | [
"private static String authorLine()\n {\n return String.format(STR_FORMAT_1 + STR_FORMAT_2, NAME_STR, NAME);\n }",
"public static void getAuthor(){\n print(\"1. Author: Adam King\");\n }",
"public String getAuthor()\n {\n return(\"Ciaran Roche\");\n }",
"public String getAu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if attack is valid given conditions | public boolean isValidAttack(AttackMove a) {
if(a.getSource().getPlague()){
return false;
}
// regions must be owned by different players
//starting must be owned by player
if(!a.getSource().getOwner().getName().equals(player.getName())){
System.out.println("player does not own source");... | [
"private void checkAttack()\n {\n if (usingRandomSprayAttack)\n {\n randomSprayAttack();\n }\n else if (usingFireAtPlayerAttack)\n {\n fireAtPlayerAttack();\n }\n else if (usingWaveAttack)\n {\n waveAttack();\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a FieldTag object | public abstract FieldTag createField(Navajo tb, String condition,
String name) throws NavajoException; | [
"Component constructField(FieldCreationContext context);",
"FieldDefinition createFieldDefinition();",
"HxField createField(final String fieldType,\n final String fieldName);",
"Tag createTag();",
"com.google.cloud.datacatalog.TagTemplateField getTagTemplateField();",
"ObjectField cre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize all Data Normalization Threads. | private void intializeDataNormalizationThread(String dnThrd, String errDir,
String wipDir, DNFactory dnFactory, QueueBank dbQ) {
int inDNThrdCount = Integer.parseInt(dnThrd);
for (int i = 0; i < inDNThrdCount; i++) {
new DataNormalizer(QueueBank.toBeNorm, QueueBank.toBeQuery,
dnFactory, errDir, wipDir, ... | [
"public static void initAllData() {\n\t\tdate = new Date();\n\t\tdataDirSim = dataDir + \"/\" + dateFormat.format(date);\n\t\t\n\t\tFile directory = new File(dataDir);\n\t\tFile directorySim = new File(dataDirSim);\n\t\t\n\t\tif (! directory.exists()){\n\t\t\tdirectory.mkdir();\n\t\t}\n\t\t\n\t\tif (! directorySim.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Class15'. | Class15 createClass15(); | [
"Class10 createClass10();",
"Class17 createClass17();",
"Class18 createClass18();",
"Class14 createClass14();",
"Class9 createClass9();",
"Class19 createClass19();",
"Class5 createClass5();",
"NewClass1 createNewClass1();",
"public static NewExpression new_(Class type) { throw Extensions.todo(); }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a peer identified by a session id. | MsrpPeer getPeer(String sessionId); | [
"Peer getPeer(int id);",
"public PeerRef getPeer(String id) {\n return PEERS.get(id);\n }",
"public String getPeerId();",
"public Peer getPeer();",
"public Peer getPeer(Integer key){\n return peers.get(key);\n }",
"private PlayerSession getRemotePlayerSession(String playerName,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Turns a Throwable into an exception, converting it from a StatusException if necessary. | public static Exception convertThrowableToException(Throwable t) {
if (t instanceof Exception) {
return Util.convertStatusException((Exception) t);
} else {
return new Exception(t);
}
} | [
"private static Exception convertStatusException(Exception e) {\n if (e instanceof StatusException) {\n StatusException statusException = (StatusException) e;\n return exceptionFromStatus(statusException.getStatus());\n } else if (e instanceof StatusRuntimeException) {\n StatusRuntimeException ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column FreeHost_Product_VPS.MaxSNA | public void setMaxsna(Integer maxsna) {
this.maxsna = maxsna;
} | [
"public Integer getMaxsna() {\r\n return maxsna;\r\n }",
"public void setVSN(java.lang.Long value) {\n this.VSN = value;\n }",
"public org.LNDCDC_NCS_TCS.SHOWS.apache.nifi.LNDCDC_NCS_TCS_SHOWS.Builder setVSN(java.lang.Long value) {\n validate(fields()[55], value);\n this.VSN = value;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the count of duplicate numbers seen and sets it to 0 atomically. | public int getAndResetDuplicateCountSinceLastRun() {
return duplicateCount.getAndSet(0);
} | [
"private int countNoDups() {\n try {\n beginUseExistingCursor();\n final OperationStatus status = cursorImpl.getCurrent\n (null /*foundKey*/, null /*foundData*/, LockType.NONE);\n endUseExistingCursor();\n return (status == OperationStatus.SUCCESS) ?... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Accessing methods for member 'knownTypes' | public KnownTypes getKnownTypes() {
return getChild(KnownTypes.class);
} | [
"void resolveTypes() {\n // would need to lookup the base type in the symbol table\n }",
"public Types getTypes();",
"private void performTypeDiscovery() {\n\n beanArchiveManager.discoverTypes();\n\n discoverBeanTypes().forEach(this::registerBeanType);\n\n discoverAlternativeTypes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Enables or disables the Pages... menu item, depending on the number of pages | protected void updatePagesMenuItem(IActionBars bar) {
if (sdPagingProvider instanceof ISDAdvancedPagingProvider) {
IMenuManager menuManager = bar.getMenuManager();
ActionContributionItem contributionItem = (ActionContributionItem) menuManager.find(OpenSDPagesDialog.ID);
I... | [
"private void buttonEnable() {\n Log.d(\"buttonEnable INC: \", \"\"+inc);\n Log.d(\"NUMPAGES \", \"\"+numPages);\n if(numPages <= 1)\n {\n next.setClickable(false);\n next.setEnabled(false);\n }\n if(numPages > 1)\n {\n next.setEnable... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This scenario checks whether sender account number has valid length or not. | @Test
public void testSenderAccountNumberLength() {
AccountTransferRequest accountTransferRequest = new AccountTransferRequest();
accountTransferRequest.setUsername(VALID_USERNAME);
accountTransferRequest.setPassword(VALID_PASSWORD);
accountTransferRequest.setSenderAccount("1234567");
accountTransferR... | [
"@Test\r\n\tpublic void testReceiverAccountNumberLength() {\r\n\t\tAccountTransferRequest accountTransferRequest = new AccountTransferRequest();\r\n\t\taccountTransferRequest.setUsername(VALID_USERNAME);\r\n\t\taccountTransferRequest.setPassword(VALID_PASSWORD);\r\n\t\taccountTransferRequest.setSenderAccount(VALID... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Translate a given point through a given matrix. | static private void translatePoint(Matrix matrix, float[] xy)
{
matrix.mapPoints(xy);
} | [
"public void translate(Point _pt) {\n\t\tint x = getWidth() >> 1;\n\t\tint y = getHeight() >> 1;\n\t\tint dx = x - _pt.x;\n\t\tint dy = y - _pt.y;\n\t\tm_matrix = GeoTransformationMatrix.translate(dx, dy).multiply(m_matrix);\n\t\tm_matrixInv = m_matrix.invers();\n\t}",
"public void translate(int x, int y);",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getDistancia method, of class Dijkstra. | @Test
public void testGetDistancia() {
Dijkstra dijkstra = new Dijkstra(grafo, grafo.getVertice(0));
assertEquals(dijkstra.getDistancia(grafo.getVertice(3)), 20);
assertEquals(dijkstra.getDistancia(grafo.getVertice(4)), 100);
assertEquals(dijkstra.getDistancia(grafo.getVertice(1)), 5... | [
"@Test\n public void testDist() {\n System.out.println(\"dist\");\n Vertex2 Vtx1 = null;\n Vertex2 Vtx2 = null;\n GeneralGraph instance = null;\n float expResult = 0.0f;\n float result = instance.dist(Vtx1, Vtx2);\n assertEquals(expResult, result, 0.0);\n /... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if cond is null this is a top level expr which means the result is to push true or false onto the stack; otherwise our only job is to do the various jumps if true or fallthru if true (used with if statement) NOTE: this code could be further optimized because it doesn't optimize "a && b || c && c" | private void or(Expr.Cond expr, Cond cond)
{
boolean topLevel = cond == null;
if (topLevel) cond = new Cond();
// perform short circuit logical-or
for (int i=0; i<expr.operands.size(); ++i)
{
Expr operand = (Expr)expr.operands.get(i);
expr(operand);
if (i < expr.operands.size()-... | [
"private void and(Expr.Cond expr, Cond cond)\n {\n boolean topLevel = cond == null;\n if (topLevel) cond = new Cond();\n\n // perform short circuit logical-and\n for (int i=0; i<expr.operands.size(); ++i)\n {\n Expr operand = (Expr)expr.operands.get(i);\n expr(operand);\n cond.falseJu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |