query stringlengths 7 33.1k | document stringlengths 7 335k | metadata dict | negatives listlengths 3 101 | negative_scores listlengths 3 101 | document_score stringlengths 3 10 | document_rank stringclasses 102 values |
|---|---|---|---|---|---|---|
get the user field. | public String getUser() {
return user;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String[] getUserField()\n {\n return this.userField;\n }",
"public String[] getUserField()\n {\n return this.userField;\n }",
"public String[] getUserField()\n {\n return this.userField;\n }",
"public JTextField getTextFieldUser() {\r\n\t\treturn textFieldUser;\r\n\t}",
"public String... | [
"0.7928698",
"0.7928698",
"0.7928698",
"0.72783035",
"0.69287044",
"0.69248486",
"0.6842693",
"0.68336636",
"0.68336636",
"0.68336636",
"0.6821829",
"0.6817152",
"0.68092674",
"0.6788822",
"0.67332065",
"0.6728036",
"0.6728036",
"0.6728036",
"0.670129",
"0.6698276",
"0.667414... | 0.6593566 | 30 |
get the password field. | public String getPassword() {
return password;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JPasswordField getPasswordField() {\n return pwPassword;\n }",
"public JPasswordField getPasswordField() {\n return passwordField;\n }",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java... | [
"0.8458495",
"0.83882195",
"0.82463247",
"0.82463247",
"0.82463247",
"0.82463247",
"0.82463247",
"0.82463247",
"0.82463247",
"0.81930774",
"0.81414664",
"0.8093874",
"0.8092312",
"0.8083449",
"0.8083449",
"0.807412",
"0.80524546",
"0.8033575",
"0.8033575",
"0.8030788",
"0.803... | 0.0 | -1 |
Set the user member | public void setUser(String user) {
this.user = user;
// BUG Fix submitted by Lamine Brahimi
// add this (taken form sip_messageParser)
// otherwise comparison of two SipUrl will fail because this
// parameter is not set (whereas it is set in sip_messageParser).
if (user != null
&& (user.indexOf(POUND) >= 0 || user.indexOf(SEMICOLON) >= 0)) {
setUserType(TELEPHONE_SUBSCRIBER);
} else {
setUserType(USER);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setMember (com.jspgou.cms.entity.ShopMember member) {\r\n\t\tthis.member = member;\r\n\t}",
"void setPassedUser(User passedUser);",
"public void setMemberID(String memberID){ this.memberID=memberID; }",
"public void setUser(String user)\n {\n _user = user;\n }",
"public void setCurrentU... | [
"0.68579084",
"0.67634964",
"0.6673589",
"0.65967613",
"0.65143627",
"0.6457338",
"0.64392316",
"0.6373344",
"0.6337272",
"0.63302916",
"0.63302916",
"0.6307338",
"0.6297328",
"0.6297328",
"0.6297328",
"0.62963784",
"0.62944424",
"0.62924576",
"0.62867206",
"0.6282711",
"0.62... | 0.0 | -1 |
Set the password member | public void setPassword(String p) {
password = p;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setPassword(String password);",
"void setPassword(String password);",
"void setPassword(String password);",
"public void setPassword(String password)\r\n/* 26: */ {\r\n/* 27:42 */ this.password = password;\r\n/* 28: */ }",
"public void setPassword(java.lang.String newPassword);",
"public... | [
"0.83766705",
"0.83766705",
"0.83766705",
"0.83189183",
"0.8274277",
"0.8221816",
"0.8020229",
"0.7994293",
"0.7988001",
"0.7943329",
"0.7935593",
"0.7854285",
"0.7749255",
"0.77316874",
"0.77239007",
"0.77239007",
"0.76540935",
"0.7606243",
"0.75975305",
"0.7546345",
"0.7531... | 0.77141535 | 16 |
Set the user type (to TELEPHONE_SUBSCRIBER or USER). | public void setUserType(int type) throws IllegalArgumentException {
if (type != TELEPHONE_SUBSCRIBER && type != USER) {
throw new IllegalArgumentException("Parameter not in range");
}
userType = type;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setType(final UserType type);",
"public void setUserType(String userType) {\n\t\t_userType = userType;\n\t}",
"public void setUserType(String userType) {\n this.userType = userType;\n }",
"public void setUserType(UserType userType) {\n\t\tthis.userType = userType;\n\t\tif (userType != Customer... | [
"0.78981227",
"0.77184504",
"0.7654579",
"0.7529879",
"0.74804056",
"0.7480085",
"0.7466591",
"0.7404245",
"0.7404245",
"0.7404245",
"0.6661659",
"0.66468936",
"0.659769",
"0.659769",
"0.659769",
"0.659769",
"0.65809345",
"0.65705454",
"0.6492601",
"0.6448854",
"0.6434333",
... | 0.8174483 | 0 |
refresh access token by refresh token | public AccessToken refreshAccessToken(String refreshToken) throws OAuthSdkException {
// prepare params
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair(CLIENT_ID, String.valueOf(client.getId())));
params.add(new BasicNameValuePair(REDIRECT_URI, client.getRedirectUri()));
params.add(new BasicNameValuePair(CLIENT_SECRET, client.getSecret()));
params.add(new BasicNameValuePair(GRANT_TYPE, GrantType.REFRESH_TOKEN.getType()));
params.add(new BasicNameValuePair(TOKEN_TYPE, AccessToken.TokenType.MAC.getType()));
params.add(new BasicNameValuePair(REFRESH_TOKEN, refreshToken));
HttpResponse response = httpClient.get(AuthorizeUrlUtils.getTokenUrl(), params);
log.debug("Refresh access token response[{}]", response);
String entityContent = HttpResponseUtils.getEntityContent(response);
if (StringUtils.isBlank(entityContent) || !JSONUtils.mayBeJSON(entityContent)) {
log.error("The refresh token response[{}] is not json format!", entityContent);
throw new OAuthSdkException("The refresh token response is not json format");
}
JSONObject json = JSONObject.fromObject(entityContent);
if (json.has("access_token")) {
log.debug("Refresh access token json result[{}]", json);
return new AccessToken(json);
}
// error response
int errorCode = json.optInt("error", -1);
String errorDesc = json.optString("error_description", StringUtils.EMPTY);
log.error("Refresh access token error, error info [code={}, desc={}]!", errorCode, errorDesc);
throw new OAuthSdkException("Refresh access token error!", errorCode, errorDesc);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void refreshAccessToken() throws IOException {\n\n if (clientId == null) fetchOauthProperties();\n\n URL url = new URL(tokenURI);\n\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"refresh_token\", refreshToken);\n params.put(\"client_id\", cli... | [
"0.80448484",
"0.7293847",
"0.7175314",
"0.7133889",
"0.71207416",
"0.69714147",
"0.68850154",
"0.68804187",
"0.68045354",
"0.67933637",
"0.6735434",
"0.6725768",
"0.6711648",
"0.6711228",
"0.6682984",
"0.66163665",
"0.6540092",
"0.6529604",
"0.650116",
"0.64784205",
"0.64589... | 0.70523757 | 5 |
Make sure default constructor can be used without exceptions being thrown. | @Test
public void defaultContructorWorks() {
try {
new EventIDAssociator();
} catch (MalformedURLException mue) {
Assert.fail("default contructor threw exception");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }",
"defaultConstructor(){}",
"void DefaultConstructor(){}",
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"@Test( ... | [
"0.75775796",
"0.74710166",
"0.7380089",
"0.71750957",
"0.7091423",
"0.7055644",
"0.68238854",
"0.681995",
"0.6678916",
"0.66589737",
"0.66574585",
"0.66530025",
"0.66463923",
"0.6629844",
"0.66214913",
"0.6609969",
"0.6607085",
"0.6604388",
"0.6602595",
"0.6591073",
"0.65721... | 0.713139 | 4 |
Check the nearby queries generated by event id associator match expectations. | @Test
public void testNearbyQuery() throws Exception {
DefaultEventInfo event = new DefaultEventInfo();
event.setTime(new Date());
event.setLatitude(new BigDecimal("34"));
event.setLongitude(new BigDecimal("-118"));
event.setDepth(new BigDecimal("1.32"));
event.setMagnitude(new BigDecimal("4.5"));
EventQuery query;
EventComparison criteria = testAssociator.getNearbyCriteria();
testAssociator.getNearbyEvents(event, null);
query = testService.lastQuery;
long milliseconds = testAssociator.getNearbyCriteria().getTimeDifference()
.multiply(new BigDecimal("1000")).longValue();
Assert.assertEquals("expected start time", query.getStartTime(), new Date(
event.getTime().getTime() - milliseconds));
Assert.assertEquals("expected end time", query.getEndTime(), new Date(event
.getTime().getTime() + milliseconds));
Assert.assertEquals("expected latitude", event.getLatitude(),
query.getLatitude());
Assert.assertEquals("expected longitude", event.getLongitude(),
query.getLongitude());
Assert.assertEquals(
"expected radius",
criteria.getLocationDifference().divide(
EventIDAssociator.KILOMETERS_PER_DEGREE, MathContext.DECIMAL32),
query.getMaxRadius());
Assert.assertEquals("expected min depth",
event.getDepth().subtract(criteria.getDepthDifference()),
query.getMinDepth());
Assert.assertEquals("expected max depth",
event.getDepth().add(criteria.getDepthDifference()),
query.getMaxDepth());
Assert.assertEquals("expected min magnitude", event.getMagnitude()
.subtract(criteria.getMagnitudeDifference()), query.getMinMagnitude());
Assert.assertEquals("expected max magnitude",
event.getMagnitude().add(criteria.getMagnitudeDifference()),
query.getMaxMagnitude());
Assert.assertNull("expected null network", query.getCatalog());
testAssociator.getNearbyEvents(event, "testnetwork");
query = testService.lastQuery;
Assert.assertEquals("expected null network", "testnetwork",
query.getCatalog());
try {
testAssociator.getNearbyEvents(new DefaultEventInfo(), null);
Assert.fail("empty event should throw exception");
} catch (IllegalArgumentException iae) {
// expected
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void findNearByEvents() {\n LatLng latLng = mMapFragment.getCenterOfScreen();\n double longitude = latLng.longitude;\n double latitude = latLng.latitude;\n\n int spEventsPosition = mEventsSpinner.getSelectedItemPosition();\n int spTimesPosition = mTimesSpinner.getSelected... | [
"0.57598406",
"0.56444526",
"0.54938644",
"0.5455396",
"0.53801197",
"0.5370869",
"0.53538597",
"0.5321831",
"0.5299498",
"0.52779925",
"0.5251142",
"0.52405876",
"0.51660985",
"0.51474655",
"0.51260686",
"0.5091775",
"0.5066142",
"0.5063292",
"0.5055531",
"0.50350434",
"0.50... | 0.6821783 | 0 |
When a criteria is null, it should not be used in a query. | @Test
public void testNullCriteria() throws Exception {
EventQuery query = null;
Date time = new Date();
BigDecimal latitude = new BigDecimal("34");
BigDecimal longitude = new BigDecimal("-118");
BigDecimal depth = new BigDecimal("1.32");
BigDecimal magnitude = new BigDecimal("4.5");
String network = "net";
// null location criteria
testAssociator.setNearbyCriteria(new EventComparison(
BigDecimal.ONE, null, BigDecimal.ONE, BigDecimal.ONE));
testAssociator.getNearbyEvents(time, latitude, longitude, depth, magnitude, null);
query = testService.lastQuery;
Assert.assertNotNull("starttime", query.getStartTime());
Assert.assertNotNull("endtime", query.getEndTime());
Assert.assertNull("no longitude", query.getLongitude());
Assert.assertNull("no latitude", query.getLatitude());
Assert.assertNull("no maxradius", query.getMaxRadius());
Assert.assertNotNull("mindepth", query.getMinDepth());
Assert.assertNotNull("maxdepth", query.getMaxDepth());
Assert.assertNotNull("minmagnitude", query.getMinMagnitude());
Assert.assertNotNull("maxmagnitude", query.getMaxMagnitude());
Assert.assertNull("catalog", query.getCatalog());
// do opposite
testAssociator.setNearbyCriteria(new EventComparison(
null, BigDecimal.ONE, null, null));
testAssociator.getNearbyEvents(time, latitude, longitude, depth, magnitude, network);
query = testService.lastQuery;
Assert.assertNull("no starttime", query.getStartTime());
Assert.assertNull("no endtime", query.getEndTime());
Assert.assertNotNull("longitude", query.getLongitude());
Assert.assertNotNull("latitude", query.getLatitude());
Assert.assertNotNull("maxradius", query.getMaxRadius());
Assert.assertNull("no mindepth", query.getMinDepth());
Assert.assertNull("no maxdepth", query.getMaxDepth());
Assert.assertNull("no minmagnitude", query.getMinMagnitude());
Assert.assertNull("no maxmagnitude", query.getMaxMagnitude());
Assert.assertNotNull("catalog", query.getCatalog());
// with location criteria and partial location
testAssociator.setNearbyCriteria(new EventComparison(
BigDecimal.ONE, BigDecimal.ONE, null, null));
testAssociator.getNearbyEvents(time, null, longitude, depth, magnitude, null);
query = testService.lastQuery;
Assert.assertNull("no longitude", query.getLongitude());
Assert.assertNull("no latitude", query.getLatitude());
Assert.assertNull("no maxradius", query.getMaxRadius());
testAssociator.getNearbyEvents(time, latitude, null, depth, magnitude, null);
query = testService.lastQuery;
Assert.assertNull("no longitude", query.getLongitude());
Assert.assertNull("no latitude", query.getLatitude());
Assert.assertNull("no maxradius", query.getMaxRadius());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testNotIsNullCriteria() throws Exception {\n String sql = \"Select a From db.g Where Not a IS NULL\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_RE... | [
"0.65104944",
"0.6111943",
"0.60311836",
"0.59747124",
"0.5923899",
"0.58883536",
"0.5803454",
"0.56602085",
"0.5635744",
"0.5621694",
"0.5621694",
"0.5609602",
"0.5609602",
"0.5609602",
"0.5609602",
"0.55766857",
"0.5571523",
"0.5521336",
"0.55155635",
"0.54997927",
"0.54991... | 0.635013 | 1 |
Test sort order via getSortedNearbyEvents. | @Test
public void testAssociatorSort() throws Exception {
// add out of order to events list
JsonEventInfoComparatorTest comparatorTest = new JsonEventInfoComparatorTest();
comparatorTest.setup();
testService.events.add(comparatorTest.farEvent);
testService.events.add(comparatorTest.fartherEvent);
testService.events.add(comparatorTest.closeEvent);
JsonEventInfo reference = new JsonEventInfo(comparatorTest.referenceEvent);
List<JsonEventInfo> sorted = testAssociator.getSortedNearbyEvents(
reference, null);
Assert.assertEquals("closest event first",
comparatorTest.closeEvent, sorted.get(0).getEvent());
Assert.assertEquals("farther event last",
comparatorTest.fartherEvent,
sorted.get(testService.events.size() - 1).getEvent());
System.err.println(testAssociator.formatOutput(reference, null, sorted));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void sortEvents(){\n if(events.size()>0){\n Comparator<Event> comp = new Comparator<Event>(){\n public int compare(Event e1, Event e2){\n if(e1.getEventStartTime().before(e2.getEventStartTime())){\n return -1;\n }\n ... | [
"0.691639",
"0.6702165",
"0.66437614",
"0.64927405",
"0.6365058",
"0.620671",
"0.6140558",
"0.6084896",
"0.6031376",
"0.5957156",
"0.59455943",
"0.5933842",
"0.5913158",
"0.5892678",
"0.5886245",
"0.58844405",
"0.58746886",
"0.5842658",
"0.58317393",
"0.58028924",
"0.5794243"... | 0.7362801 | 0 |
add out of order to events list | @Test
public void testExitCodes() throws Exception {
JsonEventInfoComparatorTest comparatorTest = new JsonEventInfoComparatorTest();
comparatorTest.setup();
testService.events.add(comparatorTest.farEvent);
testService.events.add(comparatorTest.fartherEvent);
testService.events.add(comparatorTest.closeEvent);
JsonEventInfo reference = new JsonEventInfo(comparatorTest.referenceEvent);
List<JsonEventInfo> sorted = testAssociator.getSortedNearbyEvents(
reference, null);
JsonEventInfo good = sorted.get(0);
JsonEventInfo bad = sorted.get(2);
// no events
Assert.assertEquals("no events",
EventIDAssociator.EXIT_EVENT_NOT_FOUND,
testAssociator.getExitCode(new ArrayList<JsonEventInfo>()));
// multiple events
Assert.assertEquals("multiple events",
EventIDAssociator.EXIT_MULTIPLE_EVENTS_FOUND,
testAssociator.getExitCode(sorted));
// one good event
sorted.clear();
sorted.add(good);
Assert.assertEquals("one good event",
EventIDAssociator.EXIT_SUCCESS,
testAssociator.getExitCode(sorted));
// one bad event
sorted.clear();
sorted.add(bad);
Assert.assertEquals("one bad event",
EventIDAssociator.EXIT_EVENT_NOT_SANE,
testAssociator.getExitCode(sorted));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setEvents(Event[] event) {\n\n setEventID(event[0].getEventID());\n\n //Store keys as EventID for later use to put it all in order\n Map<String, ArrayList<Event>> listMap = new HashMap<>();\n\n for (int i = 0; i < event.length; i++) {\n\n events.put(event[i].getEv... | [
"0.6454972",
"0.64303905",
"0.6383815",
"0.63774925",
"0.63503593",
"0.63382137",
"0.60055023",
"0.6004235",
"0.5989689",
"0.5969868",
"0.59303236",
"0.5921688",
"0.5917881",
"0.59082377",
"0.58908975",
"0.5852294",
"0.58269954",
"0.5826792",
"0.58176345",
"0.58164215",
"0.58... | 0.0 | -1 |
serve a custom feed with multiple events | @Test
public void testSuccess() throws Exception {
EventWebServiceTest.TestingWebServer server =
new EventWebServiceTest.TestingWebServer(
5680,
"etc/testdata/detail.geojson");
server.start();
EventIDAssociator.main(new String[] {
// include lat and lon argument so it will run
EventIDAssociator.LATITUDE_ARGUMENT + "-4.9489",
EventIDAssociator.LONGITUDE_ARGUMENT + "102.3727",
// use testing web server to get data
EventIDAssociator.SERVICE_URL_ARGUMENT + "http://localhost:5680/"
});
server.stop();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void queryEvents() {\n ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n // include data referred by user key\n query.include(Event.KEY_HOST);\n // limit query to latest 20 items\n query.setLimit(30);\n // order posts by creation date (newest first)\n ... | [
"0.6096098",
"0.60405236",
"0.60232097",
"0.5978878",
"0.58509725",
"0.572109",
"0.57127815",
"0.5704118",
"0.5693514",
"0.56719434",
"0.56638527",
"0.56529707",
"0.55847275",
"0.5582409",
"0.5568305",
"0.55507123",
"0.55153245",
"0.55059177",
"0.547023",
"0.54662097",
"0.543... | 0.0 | -1 |
Create by zhoumingbing on 20190511 | public interface TaskErrorService {
PageResponse<List<TaskErrorPageVo>> findPage(TaskErrorQo taskErrorQo);
Response<TaskErrorInfoVo> findTaskErrorInfo(TaskErrorInfoQo dcErrorQo);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void create() {\n\t\t\n\t}",
"@Override\n\tpublic void create() {\n\t\t\n\t}",
"@Override\r\n\tpublic void create() {\n\t\t\r\n\t}",
"@Override\n\tpublic void create() {\n\n\t}",
"@Override\n\tpublic void create () {\n\n\t}",
"CreationData creationData();",
"@Override\r\n\tpublic void create() {... | [
"0.62148166",
"0.61676604",
"0.6118888",
"0.6104417",
"0.6097941",
"0.59650785",
"0.5906937",
"0.5779652",
"0.5720234",
"0.56742907",
"0.5486155",
"0.54671395",
"0.54671395",
"0.5462599",
"0.5436598",
"0.5422036",
"0.53878343",
"0.53857577",
"0.53799444",
"0.5370157",
"0.5356... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected EntityManager getEntityManager() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
byte, short, int, long, float , double Widening Casting | public static void main(String[] args) {
byte a = 18;
short b = 900;
int c = 900000;
System.out.println((double)a);
// Narrowing Casting
double d = 42.98;
int e = (int)d;
// Widening Casting
System.out.println((double)e);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n int a=10;\n byte b=(byte)a; //explicit casting\n System.out.println(b);\n\n double DecimalNumber=10.5;\n float FloatNumber=(float) DecimalNumber;\n System.out.println(FloatNumber);\n\n double DecimalNumber2=10.5;\n f... | [
"0.75439185",
"0.684201",
"0.66151124",
"0.65096426",
"0.6440909",
"0.64147806",
"0.61721146",
"0.6137102",
"0.60999525",
"0.6092341",
"0.60675293",
"0.60335886",
"0.601085",
"0.5965006",
"0.59521586",
"0.5941058",
"0.59058976",
"0.5869585",
"0.57795924",
"0.5611503",
"0.5608... | 0.6768159 | 2 |
text in the card | public Cards(int imageProfile, String cardtext) {
this.imageProfile = imageProfile;
this.cardtext = cardtext;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\tpublic String getText() {\n\t\t\t\treturn text;\r\n\t\t\t}",
"@Override\n\tpublic String getText() {\n\t\treturn \"MMS: \" + text;\n\t}",
"public String cardDisplay(){\n if(this.faceDown) {\n return \"Bicycle\";}\n else{ return \"Friendly Names of: \" + this.rank + \":\"... | [
"0.6790398",
"0.66073644",
"0.65792185",
"0.6425423",
"0.64083856",
"0.63763726",
"0.6356883",
"0.6316335",
"0.6303699",
"0.6257171",
"0.6257171",
"0.6257171",
"0.6257171",
"0.6238168",
"0.62361693",
"0.62361693",
"0.62361693",
"0.62361693",
"0.62361693",
"0.62361693",
"0.623... | 0.0 | -1 |
ivDamageMap.setImageBitmap(damageMap.getDamageMap()); /Intent intent = new Intent(); intent.putExtra("damageMap", damageMap.getDamageMap()); setResult(RESULT_OK, intent); finish(); | @Override
public void returnDamageMap(DamageMap damageMap) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\r\n Bitmap b=(Bitmap)data.getExtras().get(\"data\");\r\n i1.setImageBitmap(b);\r\n\r\n }",
"@Override\r\nprotected void onActivityResul... | [
"0.77818406",
"0.7541768",
"0.7354",
"0.7210406",
"0.7119965",
"0.7072262",
"0.7056996",
"0.7005687",
"0.6990608",
"0.6989676",
"0.69697785",
"0.6962471",
"0.6961085",
"0.6946613",
"0.6940442",
"0.68794",
"0.6864243",
"0.6853377",
"0.6806152",
"0.67943555",
"0.675925",
"0.6... | 0.0 | -1 |
Init the JLabel with the given title | public CategoryLabel(String title) {
super(title.toUpperCase());
setForeground(GUIParameters.LEFTBAR_CAT);
setAlignmentX(CENTER_ALIGNMENT);
Border empty = new EmptyBorder(0, 0, 20, 0);
setBorder(empty);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setupTitle(){\n\t\tJLabel title = new JLabel(quiz_type.toString()+\": \"+parent_frame.getDataHandler().getLevelNames().get(parent_frame.getDataHandler().getCurrentLevel())); \n\t\ttitle.setFont(new Font(\"Arial Rounded MT Bold\", Font.BOLD, 65));\n\t\ttitle.setForeground(new Color(254, 157, 79));\n\t\... | [
"0.79071593",
"0.74523896",
"0.738232",
"0.731225",
"0.71425194",
"0.71271724",
"0.70821434",
"0.7064416",
"0.7056218",
"0.6930188",
"0.6827571",
"0.67802083",
"0.67602986",
"0.6752829",
"0.6747383",
"0.67302924",
"0.671321",
"0.6708483",
"0.6677699",
"0.66203046",
"0.6618475... | 0.6564276 | 23 |
1 2 3 4 5 6 | private static TreeNode getNode() {
TreeNode treeNode = new TreeNode(1);
TreeNode left = new TreeNode(2);
TreeNode right = new TreeNode(3);
treeNode.left = left;
treeNode.right = right;
left.left = new TreeNode(4);
right.left = new TreeNode(5);
right.right = new TreeNode(6);
return treeNode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getBlockNumbers(int index);",
"int getBlockNums(int index);",
"int getBlockNums(int index);",
"public static void main(String[] args) {\n int[] array = new int[6];\n array[0] = 33;\n int[] arr = { 2, 3, 5, 7 };\n \n //1 2,5 4,7\n for (int ... | [
"0.5784044",
"0.5639908",
"0.5639908",
"0.5622798",
"0.5599574",
"0.5560001",
"0.5554157",
"0.5531808",
"0.55103034",
"0.5507059",
"0.54803485",
"0.5465174",
"0.5458015",
"0.54307646",
"0.54145163",
"0.541098",
"0.5364151",
"0.5355388",
"0.535061",
"0.53505087",
"0.53338075",... | 0.0 | -1 |
connection: M person N jobs | public int match(boolean[][] connections) {
int matchCount = 0;
this.connections = connections;
M = connections.length;
N = connections[0].length;
matchx = new int[M];
matchy = new int[N];
Arrays.fill(matchx, -1);
Arrays.fill(matchy, -1);
/* For each one, check it can find a match */
for (int i = 0; i < M; i++) {
boolean[] seen = new boolean[N];
if (matchx[i] != -1 || findMatch(i, matchx, matchy, seen)) {
matchCount++;
}
}
return matchCount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Jobs jobs();",
"public static void main(String[] args) {\n\t\tJob1 job = new Job1();\n\t\tjob.head = new Node(1);\n\t\tfor(int i = 2; i < 6; i ++) {\n\t\t\tjob.head.insertTail(new Node(i));\n\t\t}\n\t\tjob.head.printAll();\n\t}",
"cb.Careerbuilder.Job getJobs(int index);",
"public void scheduleJobs();... | [
"0.58026433",
"0.5522135",
"0.5367409",
"0.53616375",
"0.5352366",
"0.53466636",
"0.53361106",
"0.53249526",
"0.530714",
"0.52931505",
"0.527824",
"0.526853",
"0.52628",
"0.5260774",
"0.52579653",
"0.5232269",
"0.5228944",
"0.5228915",
"0.5218117",
"0.521718",
"0.516439",
"... | 0.0 | -1 |
/ For x, find if others can adjust so that it can find a mate | private boolean findMatch(int x, int[] matchx, int[] matchy, boolean[] seen) {
for (int y = 0; y < N; y++) {
if (!seen[y] && connections[x][y]) {
seen[y] = true;
if (matchy[y] == -1 || findMatch(matchy[y], matchx, matchy, seen)) {
matchx[x] = y;
matchy[y] = x;
return true;
}
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static final int adjustment(int x, int xn) \n\t {\n\t int xn2 = xn * xn;\n\t \n\t // |xn * xn - x|\n\t int comparitor0 = xn2 - x;\n\t if (comparitor0 < 0) {\n\t comparitor0 = -comparitor0;\n\t }\n\t \n\t int twice_xn = xn << 1;\n\t \n\t // |x - (xn-1) * (xn-1)|\n... | [
"0.5967246",
"0.5759592",
"0.5702273",
"0.5670725",
"0.56538826",
"0.5632116",
"0.56262827",
"0.5564814",
"0.5552652",
"0.5541905",
"0.547824",
"0.54348224",
"0.5413651",
"0.5406163",
"0.5403137",
"0.53888166",
"0.5371721",
"0.5366362",
"0.5362925",
"0.53532034",
"0.53327894"... | 0.0 | -1 |
Given a input folder name, this function will create a dictionary of TF, IDF, TFIDF, TFIDF2 values | public void createDictionary(int wordLength, int shiftLength, String lettersInputFolder) throws IOException{
//read File
// go to letters directory
String seriesLetterFolder = lettersInputFolder + File.separator + "letters";
File directory = new File(seriesLetterFolder);
fileNames = directory.listFiles(new FileFilter() {
@Override
public boolean accept(File pathname) {
String name = pathname.getName().toLowerCase();
return name.endsWith(".csv") && pathname.isFile();
}
});
for (int i = 0; i < fileNames.length; i++) {
// Overall structure is as follows:
// On each row, for each word - we have a Map of String and List<Double> indicating a word
// and list for TF, IDF, and IDF2 values. So for each csv file, you will have a List of these maps.
// the size of the list is 20. Eventually the global dictionary will be a List of such lists.
// in case of sample data, the global dictionary is of 60 lists.
BufferedReader in = new BufferedReader(new FileReader(fileNames[i]));
// for each document
List<Map<String,List<Double>>> mapPerGestureFile = new ArrayList<Map<String,List<Double>>>();
Map<String,List<Double>> wordMap = null; //per row
while(in.ready()) {
wordMap = new HashMap<String, List<Double>>(); //per rows
String series = in.readLine();
String letters[]= series.split(",");
Integer lastLocationForRef = -1; // for padding
double totalWordCountPerDocument = 0.0;
for (int curLineCharLocation = 0; curLineCharLocation < letters.length
- wordLength + 1; curLineCharLocation = curLineCharLocation
+ shiftLength) {
// this for loop runs on each line and curLineCharLocation
// indicates the current pointer
// from which we should be forming the word
// extract a word and move the shift length
String currentWord = "";
for (int currentWordLocation = curLineCharLocation; currentWordLocation < wordLength
+ curLineCharLocation; currentWordLocation++) {
// this inner for loop denotes the current word to be
// created
currentWord = currentWord
+ letters[currentWordLocation];
}
addWordToMap(wordMap, currentWord);
lastLocationForRef = curLineCharLocation + shiftLength;
totalWordCountPerDocument = totalWordCountPerDocument + 1;
}
// check to see if we have any leftover strings. If yes then pad that word using
// the last character pointed by lastLocationForRef
Integer difference = letters.length - lastLocationForRef;
if (difference > 0) {
String paddedWord = "";
Integer extraPaddingSize = wordLength - difference;
while (difference > 0) {
// this while loop will simply create the padded word
// to be appended at the end
paddedWord = paddedWord + letters[lastLocationForRef];
difference = difference - 1;
lastLocationForRef = lastLocationForRef + 1; //advance to next location
}
while(extraPaddingSize > 0) {
paddedWord = paddedWord + letters[lastLocationForRef-1];
extraPaddingSize = extraPaddingSize - 1;
}
addWordToMap(wordMap, paddedWord);
totalWordCountPerDocument = totalWordCountPerDocument + 1;
}
wordMap = updateWordMapForTotalCountK(wordMap,totalWordCountPerDocument); // n/k , where n is frequency of word in doc/ k total freq
mapPerGestureFile.add(wordMap);
}
getTfMapArrayIDF().add(mapPerGestureFile);
//count idf2 per document
initIDF2Map(mapPerGestureFile);
in.close();
}
//populate global map for IDF values List<LIst<Map>
initIDFMap(getTfMapArrayIDF());
//Generate IDF Files from Global Map * TF Values
calculateIDFValues();
//Generate IDF2 Files
calculateIDF2Values();
//normalize tfidf and tfidf2
normalizeDictionary();
createDatabaseFiles(getTfMapArrayIDF(),lettersInputFolder);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static Multimap<String, File> createMapOfFiles(File folder) throws Exception {\n Multimap<String, File> map = ArrayListMultimap.create();\n return createMapOfFiles(folder, map);\n }",
"private static Multimap<String, File> createMapOfFiles(File folder, Multimap<String, File> map) throws Exceptio... | [
"0.5624183",
"0.52676463",
"0.5252109",
"0.5205088",
"0.51363707",
"0.5103464",
"0.49902079",
"0.49226457",
"0.48545137",
"0.48386058",
"0.48250934",
"0.47831",
"0.47224247",
"0.4641467",
"0.45931143",
"0.45928538",
"0.45865667",
"0.45760232",
"0.4547543",
"0.45460838",
"0.45... | 0.43940648 | 40 |
Simply add this word to given map | private void addWordToMap(Map<String, List<Double>> wordMap,
String currentWord) {
if (wordMap.containsKey(currentWord)) {
List<Double> list = wordMap.get(currentWord);
list.set(0, list.get(0) + 1.0F); // 0 index for TF
wordMap.put(currentWord, list);
} else {
List<Double> list = new ArrayList<Double>();
list.add(0, 1.0);
//bad logic - should have used Double Array
list.add(1,0.0);
list.add(2,0.0);
list.add(3,0.0);
list.add(4,0.0);
list.add(5,0.0); // unnormilzed TF
//
wordMap.put(currentWord, list);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addWord(Word word);",
"public void addWord(String word) {\n if (word == null || word.equals(\"\")) return;\n char[] str = word.toCharArray();\n WordDictionary cur = this;\n for (char c: str) {\n if (cur.letters[c - 'a'] == null) cur.letters[c - 'a'] = new WordDi... | [
"0.7270224",
"0.71906537",
"0.70597947",
"0.69225055",
"0.68503493",
"0.6850122",
"0.6848261",
"0.6792612",
"0.6713712",
"0.66738915",
"0.66724676",
"0.665979",
"0.66592115",
"0.6654387",
"0.6623308",
"0.6616589",
"0.6587592",
"0.6584136",
"0.6577165",
"0.6576644",
"0.6556402... | 0.67657346 | 8 |
This function is actually calculating the TF values for each word and setting those values back into the original map | private Map<String, List<Double>> updateWordMapForTotalCountK(
Map<String, List<Double>> wordMap, double totalWordCountPerDocument) {
Iterator<Entry<String, List<Double>>> iterator = wordMap.entrySet().iterator();
while(iterator.hasNext()){
Map.Entry<String, List<Double>> entry = (Map.Entry<String, List<Double>>) iterator.next();
if(totalWordCountPerDocument> 0.0)
entry.getValue().set(5,entry.getValue().get(0)); //store unnormized version
entry.getValue().set(0,entry.getValue().get(0)/totalWordCountPerDocument); //add all tf for total words
}
return wordMap;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateFinalMaps() {\r\n\t\t//prints out probMap for each tag ID and makes new map with ln(frequency/denominator) for each\r\n\t\t//wordType in transMapTemp\r\n\t\tTreeMap<String, TreeMap<String, Float>> tagIDsFinal = new TreeMap<String, TreeMap<String, Float>>();\r\n\t\tfor (String key: this.transMapTe... | [
"0.660973",
"0.6539411",
"0.6469359",
"0.64470387",
"0.63040376",
"0.6137505",
"0.61077434",
"0.60718906",
"0.6050372",
"0.6037364",
"0.5984397",
"0.59153646",
"0.5898678",
"0.5851378",
"0.5834764",
"0.5831748",
"0.5801007",
"0.5797828",
"0.5785454",
"0.5764725",
"0.5737832",... | 0.63658506 | 4 |
After all values are calculated, normalize those | private void normalizeDictionary() {
Collections.sort(idfValues, Collections.reverseOrder());
Collections.sort(idf2Values, Collections.reverseOrder());
Double maxIDF=idfValues.get(0)==0.0?1.0:idfValues.get(0);
Double maxIDF2=idf2Values.get(0)==0.0?1.0:idf2Values.get(0);
for (int i = 0; i < getTfMapArrayIDF().size(); i++) {
List<Map<String,List<Double>>> gestureDocument = getTfMapArrayIDF().get(i);
for (int j = 0; j < gestureDocument.size(); j++) {
Map<String,List<Double>> tempMap = gestureDocument.get(j);
Iterator<Entry<String, List<Double>>> it = tempMap.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String,List<Double>> pairs = (Map.Entry)it.next();
//normalize tf-idf
pairs.getValue().set(3, pairs.getValue().get(3)/maxIDF);
//normalize tf-idf2
pairs.getValue().set(4, pairs.getValue().get(4)/maxIDF2);
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void normalize() {\n // determine the maximum value\n \n Double max = getMaxValue();\n \n if(max!=null) {\n normalize(max);\n }\n }",
"private void normalize() {\r\n // GET MAX PRICE \r\n for (Alternative alt : alternati... | [
"0.7920224",
"0.7794805",
"0.74737483",
"0.7249475",
"0.7148371",
"0.7142368",
"0.70593905",
"0.7026577",
"0.7025298",
"0.7023994",
"0.69747174",
"0.6924783",
"0.6875507",
"0.6869066",
"0.68162763",
"0.67675906",
"0.6757978",
"0.666621",
"0.6652158",
"0.6640004",
"0.66021377"... | 0.6117062 | 50 |
Again this is just a pre processing step | private void initIDFMap(List<List<Map<String,List<Double>>>> tfMap){
for (int i = 0; i < tfMap.size(); i++) {
List<Map<String,List<Double>>> gestureDocument = tfMap.get(i);
for (int j = 0; j < gestureDocument.size(); j++) {
Map<String,List<Double>> tempMap = gestureDocument.get(j);
Iterator<Entry<String, List<Double>>> it = tempMap.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String,Integer> pairs = (Map.Entry)it.next();
if(getTfIDFMapGlobal().containsKey(pairs.getKey()))
getTfIDFMapGlobal().put(pairs.getKey(), getTfIDFMapGlobal().get(pairs.getKey())+1);
else
getTfIDFMapGlobal().put(pairs.getKey(), 1);
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void preProcess();",
"public void preprocess() {\n }",
"public void preprocess() {\n }",
"public void preprocess() {\n }",
"public void preprocess() {\n }",
"protected void preRun() {\r\n\t\tthis.preparePairs();\r\n\t}",
"@Override\n public void preprocess() {\n }",
"public void int... | [
"0.69254494",
"0.68335766",
"0.68335766",
"0.68335766",
"0.68335766",
"0.6742979",
"0.66989166",
"0.6604545",
"0.6573679",
"0.65676284",
"0.6558388",
"0.64882314",
"0.64644814",
"0.62714267",
"0.6269644",
"0.6267559",
"0.6171241",
"0.613984",
"0.61132085",
"0.6089097",
"0.607... | 0.0 | -1 |
Find a word has occurred in how many documents in a gesture file Just update the count this is a pre processing step | private void initIDF2Map(List<Map<String, List<Double>>> mapPerGestureFile) {
Map<String,Double> idf2PerDocument = new HashMap<String, Double>(); // per univariate series
for (int i = 0; i < mapPerGestureFile.size(); i++) {
Map<String,List<Double>> tmpMap = mapPerGestureFile.get(i);
Iterator<Entry<String, List<Double>>> iterator = tmpMap.entrySet().iterator();
while(iterator.hasNext()) {
Map.Entry<String, List<Double>> pairs = (Entry<String, List<Double>>) iterator.next();
if(idf2PerDocument.containsKey(pairs.getKey()))
idf2PerDocument.put(pairs.getKey(), idf2PerDocument.get(pairs.getKey())+1.0);
else
idf2PerDocument.put(pairs.getKey(), 1.0);
}
}
getTfMapArrayIDF2().add(idf2PerDocument);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void countWord() {\n\t\tiniStorage();\n\t\tWordTokenizer token = new WordTokenizer(\"models/jvnsensegmenter\",\n\t\t\t\t\"data\", true);\n\t\t// String example =\n\t\t// \"Nếu bạn đang tìm kiếm một chiếc điện thoại Android? Đây là, những smartphone đáng để bạn cân nhắc nhất. Thử linh tinh!\";\n\t\t// token.... | [
"0.68543667",
"0.67432225",
"0.66478574",
"0.65705603",
"0.6474805",
"0.6342908",
"0.628605",
"0.6254677",
"0.6226739",
"0.6196794",
"0.61812097",
"0.61342806",
"0.61041594",
"0.60401154",
"0.5987318",
"0.596824",
"0.59634215",
"0.5956461",
"0.5933216",
"0.5927491",
"0.592554... | 0.0 | -1 |
Calculate actual IDF2 values | private void calculateIDF2Values() throws IOException {
for (int i = 0; i < getTfMapArrayIDF().size(); i++) {
List<Map<String, List<Double>>> gestureDocument = getTfMapArrayIDF()
.get(i);
Map<String, Double> idf2PerDocument = getTfMapArrayIDF2().get(i);
for (int j = 0; j < gestureDocument.size(); j++) {
Map<String, List<Double>> tempMap = gestureDocument.get(j);
Iterator<Entry<String, List<Double>>> it = tempMap.entrySet()
.iterator();
while (it.hasNext()) {
Map.Entry<String, List<Double>> pairs = (Map.Entry) it
.next();
Double inverse = (new Double(getTfMapArrayIDF().get(0)
.size()) / idf2PerDocument.get(pairs.getKey())); // already
// inversse
List<Double> tf = pairs.getValue();
tf.set(2,Math.log(inverse));
tf.set(3,tf.get(0) * tf.get(1)); //tf-idf
idfValues.add(tf.get(1));
tf.set(4,tf.get(0) * tf.get(2)); //tf-idf2
idf2Values.add(tf.get(2));
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static float A00(DDD ddd, int i, float f, float f2) {\n float[] fArr;\n DDG[] ddgArr = ddd.A01;\n if (ddgArr == null || (fArr = ddd.A00) == null) {\n return BaseViewManager.CAMERA_DISTANCE_NORMALIZATION_MULTIPLIER;\n }\n int i2 = i - 1;\n DDG ddg = ddgArr... | [
"0.63305604",
"0.62872607",
"0.5957517",
"0.58682597",
"0.57670385",
"0.57172966",
"0.5714924",
"0.57034206",
"0.5668757",
"0.5611535",
"0.56059784",
"0.55962425",
"0.5577505",
"0.5575044",
"0.5570376",
"0.55625385",
"0.5526366",
"0.5516575",
"0.55163443",
"0.55058855",
"0.54... | 0.74717885 | 0 |
/ Normal Getters and Setters | public void setTfIDFMapGlobal(Map<String,Integer> tfIDFMapGlobal) {
this.tfIDFMapGlobal = tfIDFMapGlobal;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract Set method_1559();",
"@Override\n public void get() {}",
"@Override\r\n\tpublic void get() {\n\t\t\r\n\t}",
"@Override\n String get();",
"public void get() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"public int getAge() {return age;}",
"public void setAge(i... | [
"0.6866259",
"0.6789662",
"0.67850846",
"0.63868994",
"0.638121",
"0.6367659",
"0.6358538",
"0.6351699",
"0.6193435",
"0.6162784",
"0.61460257",
"0.61336225",
"0.61259484",
"0.6111829",
"0.6108436",
"0.60938156",
"0.60877526",
"0.6070894",
"0.60645294",
"0.6062834",
"0.606283... | 0.0 | -1 |
METHODS DEALING WITH BUILDING UNITS (HOUSES AND HOTELS) | public boolean canBuild(int numToBuild)
{
return (numBuildings+numToBuild) <= MAX_NUM_UNITS;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\tArrayList<Item> hallInventory = new ArrayList<>();\n\tArrayList<Exit> hallExits = new ArrayList<>();\n\tRoom Hall = new Room(\"Entrance Hall\", \"It is an entrance hall of a very grand house\", hallInventory, hallExits);\n\n\t//kitchen\n\tArrayList<Item> kitchenInventory... | [
"0.55847096",
"0.5577133",
"0.54625577",
"0.5456797",
"0.53865784",
"0.532134",
"0.52915186",
"0.52905864",
"0.5285032",
"0.5282964",
"0.52362806",
"0.5234286",
"0.522634",
"0.52216905",
"0.5207942",
"0.51671994",
"0.516579",
"0.5157977",
"0.51423967",
"0.5116391",
"0.5108619... | 0.0 | -1 |
METHODS DEALING WITH COLOUR GROUPS | public ColorGroup getColorGroup()
{
return colorGroup;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract int getColour();",
"@Override\n\t\t\tpublic void onRgb() {\n\t\t\t\t((ExpandableListView) parent).collapseGroup(groupPosition);\n\t\t\t\ttextMode.setText(\"RGB\");\n\t\t\t\tgroupLayLeft.setBackgroundResource(R.drawable.list_group_item_corner);\n\t\t\t\tgroupLayRight.setBackgroundResource(R.drawab... | [
"0.5540466",
"0.5509721",
"0.5465501",
"0.5420886",
"0.53967434",
"0.53845835",
"0.5370263",
"0.53118813",
"0.5288479",
"0.52687645",
"0.52222764",
"0.518197",
"0.51771253",
"0.5156046",
"0.51400805",
"0.5135833",
"0.51313436",
"0.5124815",
"0.5110362",
"0.51103175",
"0.50894... | 0.53948945 | 5 |
METHODS DEALING WITH RENT | public int getRent()
{
int rent;
if(numBuildings == 0 && super.getOwner().isGroupOwner(this))
{
rent = rentTable[0];
}
else if(numBuildings == 0 && super.getOwner().isGroupOwner(this))
{
rent = 2*rentTable[0];
}
else
{
rent = rentTable[numBuildings];
}
return rent;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void recount();",
"public int rent() {\n\t\treturn 0;\n\t}",
"public void rentDVD()\n\t{\n\t\tif (avail >0 )\n\t\t{\n\t\t\tavail--;\n\t\t\trented++;\n\t\t}\n\t\t\t\n\t\t\n\t}",
"public abstract int getCntRod();",
"int getReaultCount();",
"public abstract void setCntRod(int cntRod);",
"@Override\n\tpubl... | [
"0.657789",
"0.6380826",
"0.6214366",
"0.6200482",
"0.6097476",
"0.593292",
"0.5782775",
"0.5717361",
"0.56137884",
"0.5603909",
"0.5573094",
"0.55293006",
"0.5517813",
"0.54864365",
"0.54815876",
"0.54758316",
"0.54746133",
"0.5467462",
"0.54608804",
"0.5452809",
"0.54240775... | 0.0 | -1 |
Construct a Temporal object. | protected Temporal(final Node n) throws RIFCSException {
super(n, Constants.ELEMENT_TEMPORAL);
initStructures();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Geotemporal() {\n }",
"public Timestamp() {\n makeNow();\n }",
"public static UsuarioTemporal getUsuarioTemporal(){\n UsuarioTemporal usuarioTemporal = new UsuarioTemporal();\n usuarioTemporal.setCorreo(\"gerente11@gerente.com\");\n usuarioTemporal.setNombre(\"Gerente\"... | [
"0.65155625",
"0.6096946",
"0.597435",
"0.579322",
"0.57928413",
"0.57814354",
"0.5674988",
"0.5673134",
"0.56427646",
"0.5569574",
"0.55669093",
"0.5564049",
"0.5557161",
"0.5551168",
"0.55484724",
"0.5525106",
"0.5523869",
"0.54922545",
"0.5415534",
"0.5398973",
"0.5363511"... | 0.6465878 | 1 |
Create and return an empty DateWithTypeDateFormat object. The returned object has no properties or content and is not part of the RIFCS document, it is essentially a constructor of an object owned by the RIFCS document. The returned object needs to be "filled out" (e.g. with properties, additional subelements, etc) before being added to the RIFCS document. | public final DateWithTypeDateFormat newDate() throws RIFCSException {
return new DateWithTypeDateFormat(this.newElement(
Constants.ELEMENT_DATE));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static final DataType<Date> createDate(final String format) {\r\n return new ARXDate(format);\r\n }",
"private ARXDate() {\r\n this(\"Default\");\r\n }",
"public SimpleDateFormat() {\n\t\tthis(getDefaultPattern(), null, null, null, null, true, null);\n\t}",
"protected abstr... | [
"0.619133",
"0.5843718",
"0.5804819",
"0.5745644",
"0.5615626",
"0.560739",
"0.5598037",
"0.5573397",
"0.55673516",
"0.5560855",
"0.554457",
"0.54785836",
"0.54683304",
"0.5406159",
"0.5377139",
"0.53039503",
"0.5300389",
"0.52998304",
"0.526868",
"0.5261767",
"0.523417",
"... | 0.7194216 | 0 |
Obtain the date information for this temporal coverage. | public final List<DateWithTypeDateFormat> getDates() {
return this.dates;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DateInfo getDate() {\r\n\t\treturn new DateInfo(super.getDate());\r\n\t\t//return new DateInfo(maturityDate);\r\n\t}",
"public DateInfo getDateInfo() {\n return dateInfo;\n }",
"public String getIncidentDate(){\n\t\treturn this.incidentDate;\n\t}",
"public String getCostsDate() {\n return c... | [
"0.6996338",
"0.69080067",
"0.64800435",
"0.64723",
"0.64637053",
"0.64575064",
"0.6413319",
"0.6413319",
"0.6388661",
"0.6381614",
"0.63808906",
"0.63759667",
"0.637343",
"0.6372942",
"0.6372942",
"0.6357778",
"0.6352931",
"0.6337108",
"0.6333565",
"0.6333565",
"0.6332645",
... | 0.0 | -1 |
Obtain the text information for this temporal coverage. | public final List<String> getText() {
ArrayList<String> al = new ArrayList<String>();
for (Iterator<Element> i = texts.iterator(); i.hasNext();) {
al.add(i.next().getTextContent());
}
return al;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getInfoText();",
"public String getText() {\n if (text == null) {\n return \"NO TEXT IN MEMORY.\";\n }\n return text.getTextPart();\n }",
"@Override\r\n\t\t\tpublic String getText() {\n\t\t\t\treturn text;\r\n\t\t\t}",
"public String getText()\n\t{\n\t\treturn... | [
"0.66442347",
"0.6173888",
"0.6150021",
"0.61199045",
"0.61199045",
"0.61199045",
"0.6107438",
"0.6075178",
"0.6074306",
"0.6068045",
"0.6063963",
"0.60587543",
"0.604781",
"0.604781",
"0.604781",
"0.604781",
"0.604781",
"0.604781",
"0.60466486",
"0.60381556",
"0.60381556",
... | 0.0 | -1 |
Add text information to the temporal object. | public final void addText(final String text) {
Element e = this.newElement(Constants.ELEMENT_TEXT);
e.setTextContent(text);
this.getElement().appendChild(e);
this.texts.add((Element) e);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\tpublic void addText(String txt) {\n\t\t\t\n\t\t}",
"public void addText(String text) {\n\t\tthis.text = text;\n\t}",
"public void insertStaticText(String text){\n if(lastText != null){\n lastText.clear();\n }\n lastText = new TextBuilder(text);\n lastText.... | [
"0.731248",
"0.70561975",
"0.67344165",
"0.67320263",
"0.6694785",
"0.65806943",
"0.6528926",
"0.6504011",
"0.6407461",
"0.6375882",
"0.6280745",
"0.62789625",
"0.62785304",
"0.6222055",
"0.61487097",
"0.61213136",
"0.61132264",
"0.6015889",
"0.60015464",
"0.599229",
"0.59766... | 0.6031346 | 17 |
Add temporal date to the coverage object. A convenience method creating a single temporal element with a date element. | public final void addDate(final String date, final String type)
throws RIFCSException {
this.addDate(date, type, "W3C");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DataResourceBuilder _temporalCoverage_(TemporalEntity _temporalCoverage_) {\n this.dataResourceImpl.getTemporalCoverage().add(_temporalCoverage_);\n return this;\n }",
"Builder addDateCreated(Date value);",
"void addDate(long t) {\n\tif (act != null) {\n\t long date = act.getDate() +... | [
"0.6420493",
"0.5835625",
"0.5740138",
"0.57090026",
"0.5705518",
"0.56996554",
"0.56077737",
"0.5586584",
"0.55809206",
"0.55646276",
"0.5527802",
"0.54305124",
"0.5372749",
"0.53191906",
"0.530823",
"0.529019",
"0.5289281",
"0.5223182",
"0.5159189",
"0.5117777",
"0.5051863"... | 0.52222896 | 18 |
Add temporal date to the coverage object. A convenience method creating a single temporal element with a date element. | public final void addDate(final String date,
final String type, final String dateFormat) throws RIFCSException {
DateWithTypeDateFormat de = this.newDate();
de.setType(type);
de.setDateFormat(dateFormat);
de.setValue(date);
this.getElement().appendChild(de.getElement());
this.dates.add((DateWithTypeDateFormat) de);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DataResourceBuilder _temporalCoverage_(TemporalEntity _temporalCoverage_) {\n this.dataResourceImpl.getTemporalCoverage().add(_temporalCoverage_);\n return this;\n }",
"Builder addDateCreated(Date value);",
"void addDate(long t) {\n\tif (act != null) {\n\t long date = act.getDate() +... | [
"0.6420493",
"0.5835625",
"0.5740138",
"0.57090026",
"0.5705518",
"0.56996554",
"0.56077737",
"0.5586584",
"0.55809206",
"0.55646276",
"0.5527802",
"0.54305124",
"0.5372749",
"0.53191906",
"0.530823",
"0.529019",
"0.5289281",
"0.5223182",
"0.52222896",
"0.5159189",
"0.5117777... | 0.0 | -1 |
Add temporal date to the coverage object. A convenience method creating a single temporal element with a date element. | public final void addDate(final Date date,
final String type) throws RIFCSException {
DateFormat df = new SimpleDateFormat(TEMPORAL_DATE_FORMAT);
String text = df.format(date);
String result = text.substring(0, TEMPORAL_DATE_FORMAT_LENGTH)
+ ":" + text.substring(TEMPORAL_DATE_FORMAT_LENGTH);
this.addDate(result, type);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DataResourceBuilder _temporalCoverage_(TemporalEntity _temporalCoverage_) {\n this.dataResourceImpl.getTemporalCoverage().add(_temporalCoverage_);\n return this;\n }",
"Builder addDateCreated(Date value);",
"void addDate(long t) {\n\tif (act != null) {\n\t long date = act.getDate() +... | [
"0.6419902",
"0.58360165",
"0.5742953",
"0.5709113",
"0.5706385",
"0.5700489",
"0.5608386",
"0.5582985",
"0.55647784",
"0.5529843",
"0.5431379",
"0.5373513",
"0.5317756",
"0.5307269",
"0.5289809",
"0.5288656",
"0.52250123",
"0.5223682",
"0.5158886",
"0.5117086",
"0.50523597",... | 0.5588023 | 7 |
Initialisation code for existing documents. A wrapper that invokes initTexts() and initDates() in turn. | private void initStructures() throws RIFCSException {
initTexts();
initDates();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void init() { \n\t\ttry { \n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); \n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder(); \n\t\t\tthis.document = builder.newDocument(); \n\t\t\tlogger.info(\"initilize the document success.\");\n\t\t} catch (ParserConfigurationE... | [
"0.717823",
"0.6671725",
"0.65641326",
"0.65049964",
"0.6479924",
"0.64785177",
"0.6470157",
"0.63722223",
"0.63703454",
"0.6310181",
"0.62853473",
"0.6231915",
"0.62050563",
"0.6158315",
"0.5980415",
"0.5966572",
"0.5958346",
"0.5911463",
"0.59019756",
"0.5901361",
"0.589952... | 0.0 | -1 |
Initialisation code for element elements. | private void initTexts() throws RIFCSException {
NodeList nl = super.getElements(Constants.ELEMENT_TEXT);
for (int i = 0; i < nl.getLength(); i++) {
texts.add((Element) nl.item(i));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Element() {\n\t}",
"public void initElements() {\n\n emptyStateElement = driver.findElement(By.id(\"com.fiverr.fiverr:id/empty_state_title\"));\n postRequestButton = driver.findElement(By.id(\"com.fiverr.fiverr:id/empty_list_button\"));\n }",
"public ElementoInicial() {\r\n\t\tsuper();\r\n\t}"... | [
"0.74268794",
"0.70805305",
"0.7051139",
"0.6955315",
"0.6919315",
"0.6838032",
"0.6790424",
"0.6681921",
"0.6669961",
"0.6663679",
"0.6661693",
"0.66545856",
"0.66257733",
"0.66233194",
"0.6621414",
"0.6607046",
"0.65975034",
"0.6592468",
"0.65529007",
"0.6548523",
"0.654208... | 0.0 | -1 |
Initialisation code for date elements. | private void initDates() throws RIFCSException {
NodeList nl = super.getElements(Constants.ELEMENT_DATE);
for (int i = 0; i < nl.getLength(); i++) {
dates.add(new DateWithTypeDateFormat(nl.item(i)));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void initDate() {\n\n\t}",
"date initdate(date iDate)\n {\n iDate.updateElementValue(\"date\");\n return iDate;\n }",
"private ARXDate() {\r\n this(\"Default\");\r\n }",
"private void initializeDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\n\t\tmYear =... | [
"0.8133444",
"0.7676158",
"0.7535146",
"0.7124669",
"0.70511127",
"0.70299995",
"0.7023384",
"0.7023384",
"0.69563776",
"0.69045305",
"0.69000995",
"0.68720126",
"0.68171906",
"0.67805237",
"0.6690306",
"0.66889167",
"0.66622007",
"0.6660674",
"0.6650819",
"0.661316",
"0.6591... | 0.7739176 | 1 |
ProductionBuffer.java TODO consider renaming this class to MachineBuffer | public interface ProductionBuffer {
public int getMaxBufferSize();
public int getCurrentBufferSize();
public boolean isFull();
public boolean isEmpty();
//Add to the back of the buffer
public boolean add(BufferSlot bs);
//Remove from the front of the buffer
public BufferSlot remove();
//empties the buffer
public void clear();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public Buffer createBuffer();",
"public IBuffer newBuffer();",
"abstract public ByteString getBlocksBuffer();",
"@Override\n protected void releaseBuffer() {\n }",
"byte [] getBuffer ();",
"@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}",
"protected CoarseMeBuffer(CoarseMeScalars ... | [
"0.62312365",
"0.6062591",
"0.59443885",
"0.57076776",
"0.56274253",
"0.5462765",
"0.54467225",
"0.5443969",
"0.5443643",
"0.5439477",
"0.5417931",
"0.5415862",
"0.540283",
"0.53984046",
"0.53838915",
"0.53791153",
"0.53675854",
"0.53622866",
"0.536111",
"0.53338975",
"0.5316... | 0.7107634 | 0 |
Add to the back of the buffer | public boolean add(BufferSlot bs); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private final void buffer_push_back(byte d)\n\t{\n\t\tif (buffer_size_ >= buffer_.length) {\n int newsize = buffer_size_ * 2 + 10;\n byte[] newbuffer = new byte[newsize];\n\n for (int i = 0; i < buffer_size_; ++i)\n {\n newbuffer[i] = buffer_[i];\n ... | [
"0.72977877",
"0.6778472",
"0.66879696",
"0.66584677",
"0.66447604",
"0.6560154",
"0.65445626",
"0.6252307",
"0.6134446",
"0.60653615",
"0.60461473",
"0.59599555",
"0.59445965",
"0.59378445",
"0.5931498",
"0.5876787",
"0.5850639",
"0.58130544",
"0.5812311",
"0.57798135",
"0.5... | 0.5827207 | 17 |
Remove from the front of the buffer | public BufferSlot remove(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private synchronized void popBuffer() {\n IoBuffer buf = data.removeFirst();\n if(marked) {\n resetCache.push(buf);\n if(!data.isEmpty()) {\n data.getFirst().mark();\n }\n } else {\n buf.free();\n }\n }",
"@Override\n\tpubl... | [
"0.7089044",
"0.66689515",
"0.6532518",
"0.65039885",
"0.64648473",
"0.6417288",
"0.62164366",
"0.6203998",
"0.6184992",
"0.6134754",
"0.6105143",
"0.60935163",
"0.60567075",
"0.6055824",
"0.60474867",
"0.60461414",
"0.6028973",
"0.60099083",
"0.5993744",
"0.59703845",
"0.594... | 0.70126796 | 1 |
/ MMddHHmmss MMdd hhmmss / GMT+0 GMT+7 | public static String getDateTimeGMT(String format, String timeZone) throws Exception {
SimpleDateFormat dateFormatGmt = new SimpleDateFormat(format);
dateFormatGmt.setTimeZone(TimeZone.getTimeZone(timeZone));
return dateFormatGmt.format(new Date());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String getYYYYMMDDHHMMSS()\r\n/* 56: */ {\r\n/* 57: 68 */ String nowTime = \"\";\r\n/* 58: 69 */ Date now = new Date();\r\n/* 59: 70 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMddHHmmss\");\r\n/* 60: 71 */ nowTime = formatter.format(now);\r\n/* 61: 72 */ ... | [
"0.62637734",
"0.61141455",
"0.60237485",
"0.59653777",
"0.5816725",
"0.5798482",
"0.5793589",
"0.57262295",
"0.5720181",
"0.5717072",
"0.5661619",
"0.56386393",
"0.5586041",
"0.5585001",
"0.5581864",
"0.5573301",
"0.55695146",
"0.55570847",
"0.5520643",
"0.55187595",
"0.5492... | 0.0 | -1 |
Creates a target for a thread given its name and its sleep time | public ThreadNameWithRunnable(String name, int n) {
// Give a name to the thread
t = new Thread(this, name);
// sleepTime
sleepTime = n;
// Start the thread
t.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected Thread createThread(final Runnable runnable, final String name) {\n return new Thread(runnable, Thread.currentThread().getName() + \"-exec\");\n }",
"private VirtualThread createThread(String threadName) {\n\t\tJavaObjectReference threadObj = new JavaObjectReference(new LazyCla... | [
"0.6281257",
"0.6014651",
"0.5814492",
"0.5734867",
"0.5722612",
"0.5713693",
"0.570776",
"0.56959176",
"0.54628205",
"0.54390186",
"0.5435339",
"0.5374558",
"0.5335899",
"0.5297692",
"0.52785856",
"0.5256358",
"0.52264243",
"0.5201224",
"0.5187926",
"0.5186067",
"0.51840955"... | 0.6459578 | 0 |
Prints the thread name several times. Stops for a while at every iteration. | public void run() {
for (int i = 0; i < 10; i++) {
// print the name of the thread
System.out.println(t.getName() + " " + i);
// The thread can be awakened while sleeping
// use a try block to handle the possibility
try {
Thread.sleep(sleepTime);
} catch (InterruptedException e) {
System.out.println(t.getName() + " is awake");
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void run() {\n\t\tfor (int i = 6; i <= 10; i++) {\r\n System.out.println(Thread.currentThread().getName() + \": \" + i); \t\r\n\r\n}\r\n\t}",
"@Override\n public void run(){\n for(int i = 1; i<=count; i++) {\n System.out.printf(\"Threat: %s %d%n\",threadName... | [
"0.71100533",
"0.70317614",
"0.69154704",
"0.6868544",
"0.68386185",
"0.6706481",
"0.6693803",
"0.6682241",
"0.66767395",
"0.6627052",
"0.65613955",
"0.6524547",
"0.64528686",
"0.64310485",
"0.64267844",
"0.6369361",
"0.63569",
"0.6354818",
"0.63275594",
"0.63177055",
"0.6276... | 0.61927104 | 26 |
Creates 3 threads (2 + the main thread) and run them | public static void main(String[] args) {
// Create 2 threads
ThreadNameWithRunnable p = new ThreadNameWithRunnable("One", 700);
ThreadNameWithRunnable q = new ThreadNameWithRunnable("Two", 600);
// Display also the thread that is used for main
for (int i = 0; i < 10; i++) {
System.out.println(Thread.currentThread().getName() + " " + i);
try {
Thread.sleep(1200);
} catch (InterruptedException e) {
System.out.println(Thread.currentThread().getName()
+ " is awake");
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\t\tThread thread1 = new Thread(new ThreadOne());\n\t\tthread1.start();\n\t\t\n\t\tThread thread2 = new Thread(new ThreadOne());\n\t\tthread2.start();\n\t\t\n\t\tThread thread3 = new Thread(new ThreadOne());\n\t\tthread3.start();\n\t\t\n//\t\tThreadOne thread2 = new Thread... | [
"0.7247884",
"0.6997619",
"0.69505787",
"0.6935769",
"0.6914712",
"0.6889525",
"0.68852127",
"0.6873201",
"0.68717",
"0.68255556",
"0.67494714",
"0.67332375",
"0.6683133",
"0.66563046",
"0.6653719",
"0.6647054",
"0.6636956",
"0.65935904",
"0.6563733",
"0.6538011",
"0.6533421"... | 0.6050041 | 98 |
there is only 1 inode table per block group This method gets the block offset using the inode offset passed to it. It checks to see if the inode offset is greater than the total number of inodes, if so it will return 0 because this is a corrupt call beacuse the provided inode offset it greater than the total number inodes. If the offset is less then the method will get the inode block group, then get the position of that block group and use that index to address the inode table pointer array to access the correct inode table, then will use that to calculate the correct block and return it as an integer. | public int getBlockNumber(int inodeOffset, Volume v){
int blockNumber = 0;
if(inodeOffset > v.getSuperBlock().getTotalInodes()){
new Ext2Error("the inode offset is invalid as it is greater than the total number of inodes found in the superblock").print();
}else if(inodeOffset < v.getSuperBlock().getTotalInodes()){
double inodeBlockGroup = getInodeBlockGroup(inodeOffset, v.getSuperBlock().getNumberOfInodesPerGroup()); //this is the block group that the inode is inside of
int blockGroupPosition = getInodeIndex(inodeOffset, v.getSuperBlock().getNumberOfInodesPerGroup()); //gets the index of the inode in the group descriptors inode table
int inodeTablePointer = v.getGroupDescriptor().getInodeTablePointers()[blockGroupPosition]; //the inode table inodeBlockGroup of the block group of the block group (1,2 or 3 in this instance)
double block = calculateContainingBlock(inodeBlockGroup, v.getSuperBlock().getInodeSize(), inodeTablePointer);
blockNumber = (int) block;
}
return blockNumber;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int inodeTablePointer(int groupDescriptorNo) throws IOException\n {\n \tByteBuffer buf_groupDescriptor = ByteBuffer.allocate(1024);\n \tbuf_groupDescriptor.order(ByteOrder.LITTLE_ENDIAN);\n \tbyte[] bytes = new byte[1024];\n f.seek(2048);\n \tf.read(bytes);\n \n \tbuf_groupDescriptor.put(b... | [
"0.6926845",
"0.6831399",
"0.625436",
"0.6240003",
"0.59504527",
"0.58436763",
"0.5808003",
"0.57280403",
"0.57180756",
"0.56636465",
"0.56224996",
"0.55912274",
"0.556032",
"0.55444896",
"0.5471316",
"0.5456273",
"0.54483706",
"0.5418346",
"0.5418346",
"0.5418346",
"0.539736... | 0.7056363 | 0 |
this method calculates the block group using the inode offset and the number of inodes per group in the filesystem, it decrements the offset by 1 because inodes count from the number 1 and arrays start from 0 so decrementing provides the correct offset. Modulo is then used to divide and get the remainder | private double getInodeBlockGroup(int inodeNumber, int inodesPerGroup){
inodeNumber--;
return (inodeNumber % inodesPerGroup);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int offset_group() {\n return (24 / 8);\n }",
"public int getNumberOfBlockGroups(int blocks, int blocksPerGroup){\n int blockGroups = blocks / blocksPerGroup; //get number of block groups\n return (blockGroups % blocksPerGroup) == 0 ? blockGroups : blockGroups+1; //inline if... | [
"0.6041416",
"0.59619606",
"0.56081045",
"0.5494493",
"0.5483256",
"0.54710495",
"0.54404694",
"0.5388753",
"0.53580827",
"0.52225417",
"0.50546676",
"0.50050926",
"0.49702355",
"0.49492335",
"0.49432147",
"0.4933865",
"0.49241203",
"0.4923733",
"0.49106303",
"0.49032998",
"0... | 0.7460544 | 0 |
this method gets the inodes index in the group descriptors inode table by dividing the two values and returns an integer | private int getInodeIndex(int inodeNumber, int inodesPerGroup){
//gets the index of the inode from the group descriptors inode table
return (inodeNumber/inodesPerGroup);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getInodesPerGroup()\n {\n return inodesPerGroup;\n }",
"public int inodeTablePointer(int groupDescriptorNo) throws IOException\n {\n \tByteBuffer buf_groupDescriptor = ByteBuffer.allocate(1024);\n \tbuf_groupDescriptor.order(ByteOrder.LITTLE_ENDIAN);\n \tbyte[] bytes = new byte[1024... | [
"0.6492743",
"0.62362665",
"0.61846304",
"0.5510175",
"0.5428231",
"0.54165405",
"0.52263296",
"0.5218296",
"0.5186723",
"0.5183268",
"0.51611626",
"0.51553184",
"0.50915474",
"0.5037485",
"0.5034939",
"0.50345606",
"0.50155485",
"0.50050664",
"0.49949548",
"0.49887305",
"0.4... | 0.7514146 | 0 |
this method calculates the block that contains the inode by multiplying the block group number by the size of the inode, then dividing by the starting position of data at byte 1024, then it adds that to the value of the inoide table pointer and then the whole value is multiplied by 1024 and this takes us to the inode | private double calculateContainingBlock(double inodeBlockGroup, int inodeSize, int inodeTablePointer){
return ((inodeBlockGroup * inodeSize / Ext2StaticConstants.START_POSITION) + inodeTablePointer) * Ext2StaticConstants.START_POSITION;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private double getInodeBlockGroup(int inodeNumber, int inodesPerGroup){\n\n inodeNumber--;\n return (inodeNumber % inodesPerGroup);\n }",
"public void superBlock() throws FileNotFoundException, IOException\n {\n \tByteBuffer buf = ByteBuffer.allocate(1024);\n \tbuf.order(ByteOrder.LITTLE_E... | [
"0.6675964",
"0.63399327",
"0.63211817",
"0.59013695",
"0.58015364",
"0.5545781",
"0.54477686",
"0.5423684",
"0.53968316",
"0.53927076",
"0.53855526",
"0.53829557",
"0.53591174",
"0.53544736",
"0.5331276",
"0.5290426",
"0.526353",
"0.5242588",
"0.5236386",
"0.5231838",
"0.522... | 0.73647875 | 0 |
this method calculates the number of block groups in the filesystem, it uses the number of blocks and divides that by the number blocks per group and then does a modulo calculation in an inline if statement to see if the value is 0 and if so it returns the actual value of the block groups and if the modulo is not 0 then it will add 1 to the blockGroups value and return that. | public int getNumberOfBlockGroups(int blocks, int blocksPerGroup){
int blockGroups = blocks / blocksPerGroup; //get number of block groups
return (blockGroups % blocksPerGroup) == 0 ? blockGroups : blockGroups+1; //inline if statemnt to check if the modulo value of block groups and blocks per group is 0
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private double getInodeBlockGroup(int inodeNumber, int inodesPerGroup){\n\n inodeNumber--;\n return (inodeNumber % inodesPerGroup);\n }",
"public static int size_group() {\n return (8 / 8);\n }",
"public int getInodesPerGroup()\n {\n return inodesPerGroup;\n }",
"public ... | [
"0.66835314",
"0.61660916",
"0.5945822",
"0.5922808",
"0.5673279",
"0.56532663",
"0.55959314",
"0.55789423",
"0.55647624",
"0.5562773",
"0.5542944",
"0.5504766",
"0.5501364",
"0.5476962",
"0.5416384",
"0.54110587",
"0.53965724",
"0.53939587",
"0.538906",
"0.5347946",
"0.53325... | 0.75836134 | 0 |
Static method to parse the given file into the Document object | public static Document parse(String filename) throws ParserException {
if (filename == null) {
throw new ParserException();
}
File file = new File(filename);
if (!file.exists() || !file.isFile()) {
throw new ParserException();
}
File subDir = file.getParentFile();
if (!subDir.exists() || !subDir.isDirectory()) {
throw new ParserException();
}
// Document should be valid by here
Document doc = new Document();
FieldNames field = FieldNames.TITLE;
List<String> authors = new LinkedList<String>();
String content = new String();
boolean startContent = false;
doc.setField(FieldNames.FILEID, file.getName());
doc.setField(FieldNames.CATEGORY, subDir.getName());
try {
BufferedReader reader = new BufferedReader(new FileReader(file));
String line = reader.readLine();
while (line != null) {
if (!line.isEmpty()) {
switch (field) {
case TITLE:
doc.setField(field, line);
field = FieldNames.AUTHOR;
break;
case AUTHOR:
case AUTHORORG:
if (line.startsWith("<AUTHOR>") || !authors.isEmpty()) {
String[] seg = null;
String[] author = null;
line = line.replace("<AUTHOR>", "");
seg = line.split(",");
author = seg[0].split("and");
author[0] = author[0].replaceAll("BY|By|by", "");
// Refines author names
for (int i = 0; i < author.length; ++i) {
author[i] = author[i].trim();
}
author[author.length - 1] = author[author.length - 1]
.replace("</AUTHOR>", "").trim();
authors.addAll(Arrays.asList(author));
// Saves author organization
if (seg.length > 1) {
doc.setField(FieldNames.AUTHORORG, seg[1]
.replace("</AUTHOR>", "").trim());
}
if (line.endsWith("</AUTHOR>")) {
// Saves author
doc.setField(FieldNames.AUTHOR, authors
.toArray(new String[authors.size()]));
field = FieldNames.PLACE;
}
break;
} else {
// This should be a PLACE
field = FieldNames.PLACE;
}
case PLACE:
if (!line.contains("-")) {
field = FieldNames.CONTENT;
startContent = true;
} else {
String[] seg = line.split("-");
String[] meta = seg[0].split(",");
if (seg.length != 0 && !seg[0].isEmpty()) {
if (meta.length > 1) {
doc.setField(
FieldNames.PLACE,
seg[0].substring(0,
seg[0].lastIndexOf(","))
.trim());
doc.setField(FieldNames.NEWSDATE,
meta[meta.length - 1].trim());
} else {
meta[0] = meta[0].trim();
try {
new SimpleDateFormat("MMM d",
Locale.ENGLISH).parse(meta[0]);
// This is a news date
doc.setField(FieldNames.NEWSDATE,
meta[0]);
} catch (ParseException e) {
// This is a place
doc.setField(FieldNames.PLACE, meta[0]);
}
}
}
}
field = FieldNames.CONTENT;
case CONTENT:
if (!startContent) {
// First line of content
String[] cont = line.split("-");
if (cont.length > 1) {
for (int i = 1; i < cont.length; ++i) {
content += cont[i];
}
}
startContent = true;
} else {
content += " " + line;
}
default:
break;
}
}
line = reader.readLine();
}
doc.setField(FieldNames.CONTENT, content);
doc.setField(FieldNames.LENGTH, Integer.toString(content.trim().split("\\s+").length));
reader.close();
} catch (IOException e) {
throw new ParserException();
}
return doc;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Document parseFile() throws IOException {\n\tString contents = instream_to_contents();\n\tDocument doc = Jsoup.parse(contents);\n\treturn doc;\n }",
"public static final Document parse(final File f) {\r\n String uri = \"file:\" + f.getAbsolutePath();\r\n\r\n if (File.separatorChar == '\\\\') {\r... | [
"0.7606913",
"0.7527742",
"0.75131404",
"0.7334565",
"0.72669286",
"0.7261963",
"0.7211659",
"0.71493894",
"0.7127767",
"0.7071565",
"0.7032952",
"0.69351107",
"0.69009364",
"0.67748135",
"0.6720692",
"0.6670902",
"0.66662705",
"0.6637063",
"0.66337067",
"0.6533024",
"0.64938... | 0.7255605 | 6 |
/ mongoTemplate.upsert(new Query(where("id").is(accountId)), new Update(). set("transactions." + transactionId + ".status", status), AccountInfo.class); | public void updateTransactionStatus(String accountId, String transactionId, TransferState status) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateSingleRecord(){\n MongoCollection<Document> table = db.getCollection(\"user\");\n Document document = new Document();\n document.put(\"userType\", \"Free\");\n\n Document updateDocument=new Document(\"$set\", document);\n\n ObjectId id = null;\n\n try { i... | [
"0.64108086",
"0.6174391",
"0.5896885",
"0.58863235",
"0.5883136",
"0.57837063",
"0.56801367",
"0.56252223",
"0.5602891",
"0.558522",
"0.55832946",
"0.55600387",
"0.5539221",
"0.545885",
"0.54568005",
"0.54568005",
"0.54469633",
"0.54334545",
"0.5382423",
"0.5365258",
"0.5357... | 0.0 | -1 |
inOrder traversal of Binary Tree recursive approach | public void inOrderTraversal(TreeNode<T> root) {
if (null == root) {
return;
} else {
inOrderTraversal(root.getLeftChild());
System.out.println(root);
inOrderTraversal(root.getRightChild());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void inOrderTraverseRecursive();",
"public void inorder()\r\n {\r\n inorder(root);\r\n }",
"public void inorder()\n {\n inorderRec(root);\n }",
"private List<Integer> inOrderTraversal(Tree tree, List<Integer> arr){\n if(tree==null){\n return null;\n }\n\n i... | [
"0.83395964",
"0.80642176",
"0.79498",
"0.78512114",
"0.7842935",
"0.7842935",
"0.78095114",
"0.7776397",
"0.7707234",
"0.7665646",
"0.7563022",
"0.7476753",
"0.74196076",
"0.7416264",
"0.73950875",
"0.73267853",
"0.7325268",
"0.7290719",
"0.7273109",
"0.72719723",
"0.7268373... | 0.7232446 | 24 |
preOrder traversal of Binary Tree recursive approach | public void preOrderTraversal(TreeNode<T> root) {
if (null == root) {
return;
} else {
System.out.println(root);
preOrderTraversal(root.getLeftChild());
preOrderTraversal(root.getRightChild());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void preorder()\r\n {\r\n preorder(root);\r\n }",
"public void preorder()\n {\n preorder(root);\n }",
"public void preorder()\n {\n preorder(root);\n }",
"public void preorder() {\n\t\tpreorder(root);\n\t}",
"public void preOrder(BinarySearchTreeNode<T> node... | [
"0.82567376",
"0.7985059",
"0.7985059",
"0.7821266",
"0.7781381",
"0.7653656",
"0.762063",
"0.759836",
"0.7538095",
"0.7533842",
"0.7517155",
"0.74899685",
"0.7488407",
"0.7483122",
"0.74802226",
"0.7464093",
"0.74565977",
"0.7431751",
"0.7407838",
"0.74058765",
"0.7376828",
... | 0.74716324 | 15 |
postOrder traversal of Binary Tree recursive approach | public void postOrderTraversal(TreeNode<T> root) {
if (null == root) {
return;
} else {
postOrderTraversal(root.getLeftChild());
postOrderTraversal(root.getRightChild());
System.out.println(root);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void postorder()\r\n {\r\n postorder(root);\r\n }",
"void postOrderTraversal(OO8BinaryTreeNode node) {\n\t\tif(node==null)\n\t\t\treturn;\n\t\tpostOrderTraversal(node.getLeftNode());\n\t\tpostOrderTraversal(node.getRightNode());\n\t\tSystem.out.print(node.getValue() + \" \");\n\t}",
"pub... | [
"0.7738294",
"0.7470129",
"0.7453061",
"0.74231976",
"0.74231976",
"0.73617285",
"0.73520577",
"0.734676",
"0.7225567",
"0.7210293",
"0.71633923",
"0.71540076",
"0.71362174",
"0.7125231",
"0.7118647",
"0.710024",
"0.7095888",
"0.705792",
"0.70187736",
"0.7013278",
"0.701165",... | 0.7296731 | 8 |
public method to insert node in Binary Search Tree | public TreeNode<T> insert(TreeNode<T> root, TreeNode<T> node) {
if (null == node || ( null != node && null == node.getInfo())) {
return root;
} else if (root == null) { /*First node case*/
return node;
} else {
insertNode(root, node);
return root;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void insert(HuffmanTree node);",
"private void insertNodeIntoTree(Node node) {\n\t\troot = insert(root,node);\t\n\t}",
"public void insert(Node n);",
"private void insert(RBNode<T> node) {\r\n RBNode<T> current = this.root;\r\n //need to save the information of parentNode\r\n //be... | [
"0.801497",
"0.7969684",
"0.7937543",
"0.7770442",
"0.75258595",
"0.7465819",
"0.7447335",
"0.7435744",
"0.738449",
"0.73796844",
"0.7349243",
"0.7320422",
"0.73120177",
"0.7311722",
"0.72944427",
"0.7280758",
"0.7252483",
"0.7248236",
"0.72392905",
"0.72368914",
"0.72186637"... | 0.6972788 | 45 |
levelOrder traversal of Binary Tree nonrecursive approach | public void levelOrderTraversal(TreeNode<T> root) {
if(null == root) {
return;
} else {
LinkedList<TreeNode<T>> list = new LinkedList<TreeNode<T>>();
list.add(root);
while(!list.isEmpty()) {
TreeNode<T> tempNode = list.removeFirst();
System.out.println(tempNode);
if(null != tempNode.getLeftChild()) {
list.addLast(tempNode.getLeftChild());
}
if(null != tempNode.getRightChild()) {
list.addLast(tempNode.getRightChild());
}
tempNode = null;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void levelOrderTraversal() {\n\t\tif(root==null) {\n\t\t\tSystem.out.println(\"\\nBinary node is empty.\");\n\t\t\treturn;\n\t\t}\n\t\tQueue<OO8BinaryTreeNode> queue = new LinkedList<OO8BinaryTreeNode>();\n\t\tqueue.add(root);\n\t\tOO8BinaryTreeNode currentNode = null;\n\t\twhile(!queue.isEmpty()) {\n\t\t\... | [
"0.8082709",
"0.7870346",
"0.7692143",
"0.7600541",
"0.7465964",
"0.7070046",
"0.7035674",
"0.70296377",
"0.6992522",
"0.69402087",
"0.6937486",
"0.6911546",
"0.69079",
"0.6906624",
"0.6906537",
"0.6904062",
"0.69028896",
"0.68607616",
"0.6848156",
"0.6847147",
"0.6836278",
... | 0.7295994 | 5 |
To search Node from BinarySearchTree | public TreeNode<T> searchNode(TreeNode<T> root, T info) {
if(null == root || null == info) {
return new TreeNode<T>(null);
} else {
if(0 == root.getInfo().compareTo(info)) {
return root;
} else if(root.getInfo().compareTo(info) > 0) {
return searchNode(root.getLeftChild(), info);
} else {
return searchNode(root.getRightChild(), info);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void searchNodesBST()\n {\n BinarySearchTree bst = new BinarySearchTree();\n No root = new No(6);\n bst.insert(root, root);\n bst.insert(root, new No(2));\n bst.insert(root, new No(9));\n No k = new No(1);\n bst.insert(root, k);\n bst.ins... | [
"0.7538466",
"0.7397809",
"0.73063046",
"0.7242068",
"0.71228623",
"0.70669436",
"0.69972813",
"0.6988333",
"0.6974685",
"0.6965577",
"0.6948582",
"0.6847666",
"0.6842209",
"0.6794426",
"0.67822385",
"0.6774109",
"0.6764885",
"0.6751921",
"0.67472434",
"0.6743536",
"0.6730763... | 0.65950185 | 32 |
method to delete node from binary search tree | public TreeNode<T> delete(TreeNode<T> root, T info) {
if(null == root || info == null) {
return root;
} else {
return deleteNode(root, info);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private BinaryNode<E> _delete(BinaryNode<E> node, E e) {\n\t\tif (node == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (comparator.compare(e, node.getData()) < 0) // <, so go left\n\t\t\tnode.setLeftChild(_delete(node.getLeftChild(), e));// recursive call\n\t\telse if (comparator.compare(e, node.getData()) > 0) // >... | [
"0.7809078",
"0.7728646",
"0.7618276",
"0.7386019",
"0.72872764",
"0.72439903",
"0.7182616",
"0.7173524",
"0.71717346",
"0.7145526",
"0.71429265",
"0.7109738",
"0.7102628",
"0.7102255",
"0.71005464",
"0.70942056",
"0.70938665",
"0.7022918",
"0.70129406",
"0.7006222",
"0.69982... | 0.6566362 | 84 |
Bind the ViewHolder to the adapter | @Override
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
holder.tv_name.setText(data.get(position).getName());
holder.tv_phone.setText(data.get(position).getPhone());
holder.img_photo.setImageResource(data.get(position).getPhoto());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ViewHolder(View itemView) {\n super(itemView);\n ButterKnife.bind(this, itemView);\n\n }",
"public void bind() {\n\t\tview.setAdapter(adapter);\n\t}",
"private void bindData(ViewHolder vh, int position) {\n\n }",
"@Override\n // Replace the contents of a view (invoke... | [
"0.7367058",
"0.73352724",
"0.7275435",
"0.7117727",
"0.7097626",
"0.7007905",
"0.69889235",
"0.6973988",
"0.6918856",
"0.6904257",
"0.68515635",
"0.6850256",
"0.68192494",
"0.68094414",
"0.68093956",
"0.6789161",
"0.67536867",
"0.6735639",
"0.67354655",
"0.67263126",
"0.6694... | 0.0 | -1 |
Devuelve la lista de ServicesFacades que se van a inspeccionar en busca de servicio. | private static String[] getServiceFacades() {
String[] facadePropertiesList = null;
try {
facadePropertiesList = ATUIUtils.getDefault().getString(ATUI_SERVICES_FACADE_LIST).trim().split(COMMA);
} catch (Exception e) {
e.printStackTrace();
}
return facadePropertiesList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Programmatic\n public List<Class<?>> allServiceClasses() {\n List<Class<?>> serviceClasses = Lists\n .transform(this.servicesInjector.getRegisteredServices(), new Function<Object, Class<?>>(){\n public Class<?> apply(Object o) {\n return o.getClas... | [
"0.6924442",
"0.68448",
"0.6583247",
"0.64002365",
"0.64002365",
"0.63178265",
"0.6296364",
"0.62807375",
"0.6255248",
"0.62156135",
"0.62156135",
"0.61182433",
"0.60899675",
"0.608449",
"0.608449",
"0.60692906",
"0.60692906",
"0.6059393",
"0.60314476",
"0.6028609",
"0.602484... | 0.6587564 | 2 |
Devuelve una lista con el nombre de los servicios que no deben insertarse en la BBDD porque no deben aparecer en la vista ServicesExplorer. | private static String[] getExcludeServices() {
String[] excludeServicesList = null;
try {
excludeServicesList = ATUIUtils.getDefault().getString(ATUI_EXCLUDE_SERVICES_LIST).trim().split(COMMA);
} catch (Exception e) {
e.printStackTrace();
}
return excludeServicesList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<String> getServices() throws IOException;",
"public static List<String> getServiceNames(Definition definition) {\n Map map = definition.getAllServices();\n List<QName> serviceQnames = new ArrayList<QName>(map.keySet());\n List<String> serviceNames = new ArrayList<String>();\n ... | [
"0.6924843",
"0.6697753",
"0.66705894",
"0.66423297",
"0.66423297",
"0.6568108",
"0.65647763",
"0.6515185",
"0.64829916",
"0.6394859",
"0.6313973",
"0.62782675",
"0.62552273",
"0.62352777",
"0.6233711",
"0.61888003",
"0.6167372",
"0.61640525",
"0.61640525",
"0.6161312",
"0.61... | 0.570448 | 64 |
Devuelve "true" si el nombre del servicio que se pasa por parametro coincide con alguno de los servicios excluidos. | private static boolean isExcludeService(String[] excludeServicesList, String serviceName) {
boolean isExcludeService = false;
// Se itera por la lista buscando coincidencias.
for (String excludeService : excludeServicesList) {
if (excludeService.trim().toLowerCase().equals(serviceName.trim().toLowerCase())) {
isExcludeService = true;
break;
}
}
return isExcludeService;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean delete(Service servico){\n for (Service servicoLista : Database.servico) {\n if(idSaoIguais(servicoLista,servico)){\n Database.servico.remove(servicoLista);\n return true;\n }\n }\n return false;\n }",
"private boolean Che... | [
"0.6073742",
"0.57698905",
"0.56963414",
"0.5683964",
"0.5660456",
"0.5647944",
"0.5647944",
"0.5627774",
"0.5616336",
"0.5571077",
"0.5557093",
"0.5512538",
"0.549289",
"0.54095125",
"0.53801453",
"0.5378807",
"0.5363696",
"0.53557247",
"0.5346006",
"0.53337455",
"0.5320696"... | 0.6140372 | 0 |
private int epsg = 4326; Instantiates a new Bounding box. | public BoundingBox(double minX, double minY, double maxX, double maxY) {
this.setMinX(minX);
this.setMinY(minY);
this.setMaxX(maxX);
this.setMaxY(maxY);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BoundingBox()\n\t{\n\t\tcenter = new Vector2(0.0, 0.0);\n\t\twidth = 1.0;\n\t\theight = 1.0;\n\t}",
"public BoundingBox(Vector2 c, double w, double h)\n\t{\n\t\tcenter = c;\n\t\twidth = w;\n\t\theight = h;\n\t}",
"public GeographicBoundingBox getBoundingBox()\r\n {\r\n return myBoundingBox;\r\... | [
"0.73561126",
"0.66694444",
"0.6652385",
"0.6615146",
"0.65105414",
"0.6428243",
"0.6393293",
"0.63532776",
"0.6323454",
"0.6309352",
"0.6198549",
"0.6161826",
"0.61617416",
"0.61521065",
"0.6149134",
"0.61426127",
"0.6136689",
"0.612732",
"0.6124731",
"0.60999405",
"0.608864... | 0.6081756 | 22 |
Sets m gax y. | public void setMaxY(double maxY) {
this.maxY = maxY;
this.bottomLeftLat = maxY;
this.lowerLeftY = maxY;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setY(long value) {\n bitField0_ |= 0x00000002;\n y_ = value;\n }",
"void setY(float y) {\n _y = y;\n }",
"default void setY(double y)\n {\n getAxis().setY(y);\n }",
"public void setY(double y) {\n this.y = y;\r\n }",
"public void setEgY(int y) {\n\t\tthis.eg... | [
"0.7035445",
"0.6832871",
"0.6802297",
"0.6768158",
"0.6736761",
"0.672967",
"0.67230886",
"0.67230886",
"0.67230886",
"0.6709727",
"0.6702258",
"0.6702258",
"0.6701717",
"0.66806436",
"0.66791904",
"0.6670461",
"0.6668497",
"0.6643796",
"0.6627433",
"0.6614377",
"0.6604582",... | 0.0 | -1 |
Sets upper left y. | public void setLowerLeftY(double lowerLeftY) {
this.maxY = lowerLeftY;
this.bottomLeftLat = lowerLeftY;
this.lowerLeftY = lowerLeftY;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setY(int y) {\n\tbaseYCoord = y;\n}",
"@Override\n\tpublic void setY(int y) {\n\t\tyPos = y;\n\t}",
"@Override\n\tpublic void setY(int y) {\n\t\t\n\t}",
"@Override\n\tpublic void setY(int y) {\n\n\t}",
"public void setUpperRightY(float value)\n {\n rectArray.set(3, new COSFloat( value... | [
"0.770095",
"0.7583523",
"0.7520702",
"0.74962443",
"0.7495613",
"0.74781984",
"0.74781984",
"0.74781984",
"0.74781984",
"0.7475466",
"0.7458976",
"0.74547374",
"0.7448291",
"0.74411285",
"0.74159586",
"0.7389185",
"0.7389185",
"0.7389185",
"0.7389185",
"0.73801965",
"0.73572... | 0.6673457 | 95 |
Sets lower right x. | public void setUpperRightX(double upperRightX) {
this.upperRightX = upperRightX;
this.maxX = upperRightX;
this.topRightLon = upperRightX;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setX(float x) {\r\n\t\tleft = x - width / 2;\r\n\t}",
"protected final void setRight(IntervalNode x) {\n\tthis.right = x;\n\n\t// recalc max and min\n\tsetMax();\n\tsetMin();\n }",
"protected final void setLeft(IntervalNode x) {\n\tthis.left = x;\n\n\t// recalc max and min\n\tsetMax();\n\tsetMin... | [
"0.7560415",
"0.7146603",
"0.7123897",
"0.70083594",
"0.70075387",
"0.69978535",
"0.6982853",
"0.6976542",
"0.6904274",
"0.69012743",
"0.6830883",
"0.6756912",
"0.6756912",
"0.67549247",
"0.67261165",
"0.67261165",
"0.67261165",
"0.67148507",
"0.6714834",
"0.6699007",
"0.6684... | 0.66002333 | 29 |
Sets lower right y. | public void setUpperRightY(double upperRightY) {
this.minY = upperRightY;
this.upperRightY = upperRightY;
this.topRightLat = upperRightY;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setY(int y) {\n\tbaseYCoord = y;\n}",
"public void setY(int y ){\n if(y>0){\n this.y=y;\n }\n \n }",
"public void setY(int y){\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\... | [
"0.7494774",
"0.7477116",
"0.7476508",
"0.74492276",
"0.74492276",
"0.74492276",
"0.74492276",
"0.74115014",
"0.73765725",
"0.7367069",
"0.7367069",
"0.7367069",
"0.7362548",
"0.73618096",
"0.73495394",
"0.73495394",
"0.73495394",
"0.73495394",
"0.7336972",
"0.73326886",
"0.7... | 0.69835114 | 66 |
Sets top left lat. | public void setBottomLeftLat(double bottomLeftLat) {
this.maxY = bottomLeftLat;
this.bottomLeftLat = bottomLeftLat;
this.lowerLeftY = bottomLeftLat;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTopRightLat(double topRightLat) {\r\n this.minY = topRightLat;\r\n this.upperRightY = topRightLat;\r\n this.topRightLat = topRightLat;\r\n }",
"public void setLat(double value) {\n lat = value;\n }",
"public void setLat(double value) {\n this.lat = value;... | [
"0.67668563",
"0.6700373",
"0.6482389",
"0.64739394",
"0.64236534",
"0.64235437",
"0.6422019",
"0.64090556",
"0.63801277",
"0.6275343",
"0.6253029",
"0.6200645",
"0.6163332",
"0.61357665",
"0.61082965",
"0.60792714",
"0.6074244",
"0.60464674",
"0.5996463",
"0.5995611",
"0.599... | 0.69712967 | 0 |
Sets bottom right lon. | public void setTopRightLon(double topRightLon) {
this.topRightLon = topRightLon;
this.upperRightX = topRightLon;
this.maxX = topRightLon;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBottomLeftLat(double bottomLeftLat) {\r\n this.maxY = bottomLeftLat;\r\n this.bottomLeftLat = bottomLeftLat;\r\n this.lowerLeftY = bottomLeftLat;\r\n }",
"public Point getBottomRight() {\n return location.bottomRight();\n }",
"public void setTopRightLat(... | [
"0.65024495",
"0.6120846",
"0.61173624",
"0.60864043",
"0.60337114",
"0.60067916",
"0.5895415",
"0.58509535",
"0.58248144",
"0.56888914",
"0.56532484",
"0.563437",
"0.56245935",
"0.5600494",
"0.55774015",
"0.55583555",
"0.5553263",
"0.5547263",
"0.554067",
"0.55099344",
"0.54... | 0.6498887 | 1 |
Gets bottom right lat. | public double getTopRightLat() {
return topRightLat;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Point getBottomRight() {\n return location.bottomRight();\n }",
"double getLongitude();",
"long getLongitude();",
"int getLongitude();",
"Double getLongitude();",
"Double getLongitude();",
"public double getLongitude() {\n if (slon == GempakConstants.IMISSD) {\n return ... | [
"0.7457743",
"0.7158621",
"0.7058744",
"0.7033499",
"0.70253015",
"0.70253015",
"0.68315923",
"0.6822723",
"0.6815692",
"0.68130744",
"0.6799312",
"0.6778331",
"0.67713976",
"0.669816",
"0.66798663",
"0.6647057",
"0.6647057",
"0.6585775",
"0.65785784",
"0.6576633",
"0.6572651... | 0.784831 | 0 |
Sets bottom right lat. | public void setTopRightLat(double topRightLat) {
this.minY = topRightLat;
this.upperRightY = topRightLat;
this.topRightLat = topRightLat;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBottomLeftLat(double bottomLeftLat) {\r\n this.maxY = bottomLeftLat;\r\n this.bottomLeftLat = bottomLeftLat;\r\n this.lowerLeftY = bottomLeftLat;\r\n }",
"void setLongitude(Double longitude);",
"public void setTopRightLon(double topRightLon) {\r\n this.topRightLon ... | [
"0.7208655",
"0.6688508",
"0.6248739",
"0.6093565",
"0.60826313",
"0.60694766",
"0.599394",
"0.59296405",
"0.5920562",
"0.5853935",
"0.58303964",
"0.5824722",
"0.58057624",
"0.57950395",
"0.5791085",
"0.5791085",
"0.5786386",
"0.57748026",
"0.57463545",
"0.57438695",
"0.57242... | 0.6842816 | 1 |
TODO: Warning this method won't work in the case the id fields are not set | @Override
public boolean equals(Object object) {
if (!(object instanceof User)) {
return false;
}
User other = (User) object;
if ((this.idUser == null && other.idUser != null) || (this.idUser != null && !this.idUser.equals(other.idUser))) {
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setId(Integer id) { this.id = id; }",
"private Integer getId() { return this.id; }",
"public void setId(int id){ this.id = id; }",
"public void setId(Long id) {this.id = id;}",
"public void setId(Long id) {this.id = id;}",
"public void setID(String idIn) {this.id = idIn;}",
"public void se... | [
"0.6896886",
"0.6838461",
"0.67056817",
"0.66419715",
"0.66419715",
"0.6592331",
"0.6579151",
"0.6579151",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.65624106",
"0.65624106",
"0.65441847",
"0.65243006",
"0.65154546",
"0.6487427",
"0.64778... | 0.0 | -1 |
LOG.info("test place2"); Create an image file name | private File createImageFile() {
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
String imageFileName = "JPEG_" + timeStamp + "_";
//File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);
File storageDir = new File(utils.getSentImagesDirectory());
File image = null;
try {
image = File.createTempFile(
imageFileName, /* prefix */
".jpg", /* suffix */
storageDir /* directory */
);
} catch (Exception ex) {
ex.printStackTrace();
}
// Save a file: path for use with ACTION_VIEW intents
//LOG.info("test place3");
try {
imageFilePath = image.getAbsolutePath();
} catch (Exception ex) {
ex.printStackTrace();
}
//LOG.info("test place4");
if (image == null) {
LOG.info("image file is null");
} else {
LOG.info("image file is not null path is:" + imageFilePath);
}
return image;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void storeLogMessage(String log)\n {\n logImage += log + \"\\n\";\n System.out.println(logImage);\n printFile(\"Log.txt\");\n }",
"public static void CreateFile(){\n try{\n new File(\"wipimages\").mkdir();\n logscommissions.createNewFile();\n }catch(... | [
"0.70483786",
"0.6473069",
"0.6218714",
"0.6154189",
"0.61480653",
"0.6115117",
"0.60976046",
"0.603961",
"0.59715813",
"0.5969152",
"0.595339",
"0.595339",
"0.5940386",
"0.5908276",
"0.58827543",
"0.58638704",
"0.58522457",
"0.5851237",
"0.58508104",
"0.58299434",
"0.5824361... | 0.63608307 | 2 |
This is used for change orientation of image | public static Bitmap modifyOrientation(Bitmap bitmap, String image_absolute_path) throws
IOException {
ExifInterface ei = new ExifInterface(image_absolute_path);
int orientation = ei.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
switch (orientation) {
case ExifInterface.ORIENTATION_ROTATE_90:
return rotate(bitmap, 90);
case ExifInterface.ORIENTATION_ROTATE_180:
return rotate(bitmap, 180);
case ExifInterface.ORIENTATION_ROTATE_270:
return rotate(bitmap, 270);
case ExifInterface.ORIENTATION_FLIP_HORIZONTAL:
return flip(bitmap, true, false);
case ExifInterface.ORIENTATION_FLIP_VERTICAL:
return flip(bitmap, false, true);
default:
return bitmap;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setOrientation(int orientation) {\n }",
"public void setOrientation(Direction orientation);",
"void orientation(double xOrientation, double yOrientation, double zOrientation);",
"public void setNewOrientation(int value) {\n this.newOrientation = value;\n }",
"void setImageProperty() {\n\t... | [
"0.70882964",
"0.6852918",
"0.6780894",
"0.67782307",
"0.6772436",
"0.67526525",
"0.6741995",
"0.67326957",
"0.6720859",
"0.67114276",
"0.6669627",
"0.66286075",
"0.6570233",
"0.6487539",
"0.64683735",
"0.64101547",
"0.63583755",
"0.63435376",
"0.63098574",
"0.6303449",
"0.62... | 0.61301154 | 30 |
This is used for rotate image whatever you want | static Bitmap rotate(Bitmap bitmap, float degrees) {
Matrix matrix = new Matrix();
matrix.postRotate(degrees);
return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void rotate();",
"public void rotateImage(View view) {\n\n View img = findViewById(ID_PlacementMode_BrickPreview_ImageView);\n\n float rotation;\n\n if (view.getId() == R.id.ID_PlacementMode_RotateLeft_Button) {\n rotation = img.getRotation() - (float) 90.0;\n }\n el... | [
"0.74415946",
"0.7392443",
"0.7371154",
"0.7274586",
"0.7193486",
"0.71719843",
"0.7113016",
"0.7065193",
"0.70307845",
"0.6987983",
"0.6963983",
"0.6930758",
"0.68984324",
"0.689603",
"0.682967",
"0.68148845",
"0.68006086",
"0.6792381",
"0.6772762",
"0.6739701",
"0.67185134"... | 0.61250144 | 77 |
This is used for flip image | static Bitmap flip(Bitmap bitmap, boolean horizontal, boolean vertical) {
Matrix matrix = new Matrix();
matrix.preScale(horizontal ? -1 : 1, vertical ? -1 : 1);
return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public native MagickImage flipImage() throws MagickException;",
"public void flip(){\n Matrix mirrorMatrix = new Matrix();\n mirrorMatrix.preScale(-1, 1);\n Bitmap turnMap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), mirrorMatrix, false);\n turnMap.setDen... | [
"0.8004548",
"0.7991714",
"0.77526176",
"0.75788283",
"0.75483954",
"0.74907637",
"0.7453966",
"0.73638046",
"0.73355204",
"0.732091",
"0.7136864",
"0.7047342",
"0.69744664",
"0.6770434",
"0.6757719",
"0.67424726",
"0.67272663",
"0.66953623",
"0.6676653",
"0.66747785",
"0.665... | 0.65012413 | 26 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
view= inflater.inflate(R.layout.fragment_bpl__fixture_, container, false);
mRecyclerView = view.findViewById(R.id.bpl_fixture_RecyclerViewId);
WorldCupRecyclerView worldCupRecyclerView = new WorldCupRecyclerView(getContext(),lstWorldCup);
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
mRecyclerView.setAdapter(worldCupRecyclerView);
return view;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.66251... | 0.0 | -1 |
prefer the JPA entity name, if specified... | protected String transformEntityName(EntityNaming entityNaming) {
if ( StringHelper.isNotEmpty( entityNaming.getJpaEntityName() ) ) {
return entityNaming.getJpaEntityName();
}
else {
// otherwise, use the Hibernate entity name
return StringHelper.unqualify( entityNaming.getEntityName() );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getEntityName();",
"public String getEntityName() {\n return entityName;\n }",
"String getEntityName() throws DatabaseNotAccessibleException;",
"public String getEntityName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String entityClassName() {\n\t\treturn null;\n\t}",
"public String getE... | [
"0.7179063",
"0.67467594",
"0.67329264",
"0.6719733",
"0.6504623",
"0.64994216",
"0.6485817",
"0.6460469",
"0.6373252",
"0.6311401",
"0.62934875",
"0.62872386",
"0.62844557",
"0.6272139",
"0.6272139",
"0.6266914",
"0.62227386",
"0.61932904",
"0.61730134",
"0.6133778",
"0.6092... | 0.66935027 | 4 |
JPA states the implicit column name should be the attribute name | @Override
public Identifier determineIdentifierColumnName(ImplicitIdentifierColumnNameSource source) {
return toIdentifier(
transformAttributePath( source.getIdentifierAttributePath() ),
source.getBuildingContext()
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"SqlColumns(String columnName){\n\t\t\t this.columnName = columnName; \n\t\t}",
"KijiColumnName getAttachedColumn();",
"public DatabaseQueryColumn(String name) {\n this.formula = null;\n this.name = name;\n }",
"public void setColumnName (String ColumnName);",
"public String getColumnName()... | [
"0.6660508",
"0.65198755",
"0.6518146",
"0.6510813",
"0.6508433",
"0.6494111",
"0.6459628",
"0.6382589",
"0.632162",
"0.63085175",
"0.62904894",
"0.62822884",
"0.6267188",
"0.62591946",
"0.62554777",
"0.6251502",
"0.621748",
"0.62054497",
"0.6157939",
"0.6151308",
"0.6145579"... | 0.549355 | 81 |
JPA states we should use the following as default: "The property or field name" aka: The unqualified attribute path. | @Override
public Identifier determineBasicColumnName(ImplicitBasicColumnNameSource source) {
return toIdentifier( transformAttributePath( source.getAttributePath() ), source.getBuildingContext() );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getDefaultTargetPropertyName() {\r\n return null;\r\n }",
"public String getDefaultSourcePropertyName() {\r\n return null;\r\n }",
"protected String transformAttributePath(AttributePath attributePath) {\n\t\treturn attributePath.getProperty();\n\t}",
"java.lang.String getPro... | [
"0.5844835",
"0.5691401",
"0.5675163",
"0.56204706",
"0.5594406",
"0.5516647",
"0.5509249",
"0.5473914",
"0.5471281",
"0.5470394",
"0.54687667",
"0.54425454",
"0.54418105",
"0.542",
"0.54021454",
"0.5389513",
"0.5385",
"0.5374704",
"0.5372788",
"0.5365592",
"0.53650343",
"0... | 0.0 | -1 |
JPA states we should use the following as default: (1) if there is a "referencing relationship property": "The concatenation of the following: the name of the referencing relationship property or field of the referencing entity or embeddable class; "_"; the name of the referenced primary key column." (2) if there is no such "referencing relationship property", or if the association is an element collection: "The concatenation of the following: the name of the entity; "_"; the name of the referenced primary key column" todo : we need to better account for "referencing relationship property" | @Override
public Identifier determineJoinColumnName(ImplicitJoinColumnNameSource source) {
final String name;
if ( source.getNature() == ImplicitJoinColumnNameSource.Nature.ELEMENT_COLLECTION
|| source.getAttributePath() == null ) {
name = transformEntityName( source.getEntityNaming() )
+ '_'
+ source.getReferencedColumnName().getText();
}
else {
name = transformAttributePath( source.getAttributePath() )
+ '_'
+ source.getReferencedColumnName().getText();
}
return toIdentifier( name, source.getBuildingContext() );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getRelationPropertyName() {\n return getForeignPropertyName();\n }",
"public String getInverseRelationshipName ();",
"EReference getRelationReference();",
"@Override\n\tpublic String toString() {\n\t\treturn \"(relation \" +\n\t\t\t\t(this.source != null ? this.source.getId() : \"nil\... | [
"0.632889",
"0.60385144",
"0.60206753",
"0.6020039",
"0.59826976",
"0.594323",
"0.5721435",
"0.5701349",
"0.56623685",
"0.5635431",
"0.5632603",
"0.5538517",
"0.54936904",
"0.54859805",
"0.54762965",
"0.54358506",
"0.5416464",
"0.5394729",
"0.5380919",
"0.53691596",
"0.534723... | 0.0 | -1 |
JPA states we should use the following as default: "the same name as the primary key column [of the referenced table]" | @Override
public Identifier determinePrimaryKeyJoinColumnName(ImplicitPrimaryKeyJoinColumnNameSource source) {
return source.getReferencedPrimaryKeyColumnName();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Column referencedColumn();",
"@Override\n\tpublic String getPKFieldName() {\n\t\treturn null;\n\t}",
"@Override\n\t\tpublic String getPKFieldName() {\n\t\t\treturn null;\n\t\t}",
"@Override\n public String getPrimaryKey(String tableName) {\n return super.getPrimaryKey(tableName);\n }",
"@Id\n\t@Key\n\... | [
"0.67292774",
"0.6674349",
"0.66637063",
"0.6432435",
"0.64022905",
"0.6394018",
"0.6362872",
"0.6299906",
"0.62830955",
"0.6279109",
"0.6279109",
"0.62334013",
"0.60772806",
"0.6068864",
"0.604891",
"0.602656",
"0.6024451",
"0.59584785",
"0.59378207",
"0.59152913",
"0.585029... | 0.65495896 | 3 |
For JPA standards we typically need the unqualified name. However, a more usable impl tends to use the whole path. This method provides an easy hook for subclasses to accomplish that | protected String transformAttributePath(AttributePath attributePath) {
return attributePath.getProperty();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"default String getQualifiedName() {\n return declaringType().getQualifiedName() + \".\" + this.getName();\n }",
"@Override\n public String resolve(String path)\n {\n\n // strip classname\n path = path.substring(path.lastIndexOf(\"/\") + 1);\n\n return path;\n }",
"public abstract String g... | [
"0.63345194",
"0.6304665",
"0.6257411",
"0.6181762",
"0.60417736",
"0.5959242",
"0.5938211",
"0.593645",
"0.5891465",
"0.58831763",
"0.5831562",
"0.58315015",
"0.5797614",
"0.57787824",
"0.57408375",
"0.57153237",
"0.5705702",
"0.5673364",
"0.56587464",
"0.5647814",
"0.562035... | 0.0 | -1 |
Easy hook to build an Identifier using the keyword safe IdentifierHelper. | protected Identifier toIdentifier(String stringForm, MetadataBuildingContext buildingContext) {
return buildingContext.getMetadataCollector()
.getDatabase()
.getJdbcEnvironment()
.getIdentifierHelper()
.toIdentifier( addUnderscores(stringForm) );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"IdentifierType createIdentifierType();",
"java.lang.String getIdentifier();",
"private IIdentifierElement createIdentifier() throws RodinDBException {\n\t\tfinal IContextRoot ctx = createContext(\"ctx\");\n\t\treturn ctx.createChild(ICarrierSet.ELEMENT_TYPE, null, null);\n\t}",
"private void generateID(){\n\... | [
"0.6655096",
"0.6374665",
"0.62233293",
"0.61836565",
"0.61458385",
"0.61232364",
"0.6106407",
"0.6060289",
"0.60582346",
"0.60523474",
"0.60523474",
"0.60523474",
"0.60523474",
"0.60523474",
"0.60523474",
"0.60523474",
"0.60405505",
"0.6038513",
"0.5988861",
"0.59139085",
"0... | 0.5866629 | 20 |
TODO Autogenerated method stub | @Override
public int getCount() {
return listab.size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Object getItem(int arg0) {
return listab.get(arg0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public long getItemId(int arg0) {
return arg0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public View getView(int arg0, View arg1, ViewGroup arg2) {
if (arg1==null) {
mHolder=new ViewHolder();
arg1=mInflater.inflate(R.layout.pj_item, null);
mHolder.pj_content=(TextView) arg1.findViewById(R.id.pj_content);
mHolder.pj_username=(TextView) arg1.findViewById(R.id.pj_username);
mHolder.pj_time=(TextView) arg1.findViewById(R.id.pj_time);
arg1.setTag(mHolder);
}else {
mHolder=(ViewHolder) arg1.getTag();
}
mHolder.pj_content.setText(listab.get(arg0).getText());
mHolder.pj_username.setText(listab.get(arg0).getU_id()+"");
mHolder.pj_time.setText(listab.get(arg0).getTime()+"");
return arg1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
for simulation purposes only | public IRoadSensor setRoadStatus(ERoadStatus s); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void simulate() {\n\t\t\r\n\t}",
"@Override\n public void simulationPeriodic() {\n }",
"public abstract void simulate();",
"public abstract int simulate();",
"@Override\n public void simulationPeriodic() {\n }",
"private void random() {\n\n\t}",
"public void quickSimulatio... | [
"0.70142424",
"0.6450707",
"0.6412138",
"0.6359343",
"0.62778574",
"0.6273465",
"0.6100688",
"0.60419285",
"0.5989683",
"0.5961025",
"0.59336495",
"0.59195745",
"0.590756",
"0.58706075",
"0.5851727",
"0.57993305",
"0.57560605",
"0.575442",
"0.5751829",
"0.5751242",
"0.5746144... | 0.0 | -1 |
Set name, password, confirm password, in password text box. | public RegisterPage fillRegisterPage (String name, String password, String confirmationPassword)
{
nameBox.sendKeys(name);
passwordBox.sendKeys(password);
confirmPasswordBox.sendKeys(confirmationPassword);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPassword(String text) {\n txtPassword().setText(text);\n }",
"void setPassword(String password);",
"void setPassword(String password);",
"void setPassword(String password);",
"public void setPassword(String pass);",
"public void setPassword(java.lang.String newPassword);",
"pub... | [
"0.7855664",
"0.7512801",
"0.7512801",
"0.7512801",
"0.7417978",
"0.74113",
"0.73308736",
"0.7281146",
"0.72708637",
"0.72334766",
"0.7210013",
"0.7206689",
"0.720108",
"0.70977974",
"0.7071264",
"0.70571446",
"0.70318186",
"0.7016525",
"0.7010956",
"0.7010956",
"0.70064497",... | 0.0 | -1 |
Click on Agree Terms. | public RegisterPage clickOnAgreeTerms()
{
agreeTermsButton.click();
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@OnClick(R.id.tvTermsOfUse)\n void termsOfUse()\n {\n UtilsMethods.openBrowser(this, Keys.TERM_OF_USE_URL);\n }",
"@Then (\"^Accept creation terms$\")\t\t\t\t\t\n public void Accept_creation_terms() throws Throwable \t\t\t\t\t\t\t\n { \t\t\n \tdriver.findElement(By.xpath(\"//*[@id='ph... | [
"0.77439725",
"0.71571934",
"0.6849943",
"0.6485865",
"0.6292031",
"0.6237994",
"0.61728525",
"0.6087621",
"0.6046464",
"0.6033683",
"0.6026626",
"0.6023537",
"0.6001748",
"0.59800965",
"0.5978377",
"0.5957645",
"0.5935208",
"0.59088993",
"0.58993256",
"0.58901453",
"0.587748... | 0.75165176 | 1 |
Click on Age Button. | public RegisterPage clickOnConfirmAgeButton()
{
confirmAgeButton.click();
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\tmCurriculumVitaeInterface.onBirthday();\n\t\t\t\t\t\t}",
"private void ageRollSelectionActionPerform() {\n\t\tif (ageRollSelection.isSelected()) {\n\t\t\tagePanel.setPreferredSize(new Dimension(2400, 220));\n\t\t\tagePanel.remove(ageInput);\n... | [
"0.6420403",
"0.6344782",
"0.5865332",
"0.5804756",
"0.5722534",
"0.569864",
"0.569864",
"0.569864",
"0.569864",
"0.569864",
"0.569864",
"0.5687025",
"0.56846774",
"0.56846774",
"0.56846774",
"0.56846774",
"0.56846774",
"0.56787395",
"0.5672051",
"0.56618476",
"0.56198734",
... | 0.71164393 | 0 |
Click on Continue Button. | public EmagHomePage clickonContinueButton()
{
continueButton.click();
return new EmagHomePage(driver);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clickContinue() {\n\t\tcontinueButton.click();\n\t}",
"private void clickContinueButton() {\n clickElement(continueButtonLocator);\n }",
"@When(\"^I click on the Continue button$\")\n\tpublic void i_click_on_the_Continue_button() throws Throwable {\n\t\tdriver.findElement(By.id(\"tdb5\"))... | [
"0.9098737",
"0.8879397",
"0.78995997",
"0.75651044",
"0.7490869",
"0.73594576",
"0.7356564",
"0.7345194",
"0.7330288",
"0.73149586",
"0.7266635",
"0.72211564",
"0.7137856",
"0.7026749",
"0.69646376",
"0.69388324",
"0.6934444",
"0.6904473",
"0.68627465",
"0.6815993",
"0.68102... | 0.78166497 | 3 |
Path for Elements on the page | public WebElement getEmailFieldForLogin () {
return driver.findElement(By.id("email"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public HtmlPage clickContentPath();",
"protected abstract int[] getPathElements();",
"java.util.List getClassPathElements();",
"public String getXPath();",
"java.lang.String getXpath();",
"@Override\r\n\tpublic List<WebElement> findElements() {\n\t\thandleContext(bean.getIn());\r\n\t\treturn driver.getRe... | [
"0.6149154",
"0.60734296",
"0.6053999",
"0.596173",
"0.5912377",
"0.5910231",
"0.58694804",
"0.58476436",
"0.5820424",
"0.5581188",
"0.556779",
"0.55219674",
"0.5505577",
"0.548881",
"0.54788977",
"0.54032564",
"0.54010594",
"0.538248",
"0.5348262",
"0.53277165",
"0.531752",
... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.