query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Sets the value of the allowPaymentEdit property. | public void setAllowPaymentEdit(boolean value) {
this.allowPaymentEdit = value;
} | [
"public void setAllowpaymentedit(String allowpaymentedit) {\r\n this.allowpaymentedit = allowpaymentedit == null ? null : allowpaymentedit.trim();\r\n }",
"public boolean isAllowPaymentEdit() {\n return allowPaymentEdit;\n }",
"public void setAllowInvoiceEdit(java.lang.Boolean allowInvoiceEd... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the value related to the column: inj_detail_vagina | public void setInjDetailVagina (java.lang.String injDetailVagina) {
this.injDetailVagina = injDetailVagina;
} | [
"public void setVaginaInjDetail (java.lang.String vaginaInjDetail) {\n\t\tthis.vaginaInjDetail = vaginaInjDetail;\n\t}",
"public java.lang.String getInjDetailVagina () {\n\t\treturn injDetailVagina;\n\t}",
"public java.lang.String getVaginaInjDetail () {\n\t\treturn vaginaInjDetail;\n\t}",
"public void setVig... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form EditThreadsPage | public EditThreadsPage() {
initComponents();
oldthreadname = SelectThreadPage.threadname;
client = new Client();
} | [
"private void editBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editBtnActionPerformed\n //getting the selected item from the list of threads\n String selectedListItem = chatList.getSelectedValue();\n \n //new chatthread list from the server\n List<ChatThre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update the text in the status label GUI component. | private void updateStatus(final String statusText) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
statusLabel.setText(statusText);
}
});
} | [
"private void updateStatus(String text)\n\t{\n\t\tlblStatusLine.setText( text );\n\t}",
"private void updateStatusLabel()\n {\n StringBuilder status = new StringBuilder(_status);\n if (!_displayError) {\n for (int ii = 0; ii < _statusDots; ii++) {\n status.append(\" .\")... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a listener for closing the given GameFrame, to reopen the menu and record a win/loss. | private static void setWindowListener(GameFrame gframe)
{
gframe.addWindowListener(new WindowAdapter()
{
@Override
public void windowClosed(WindowEvent e)
{
frame.setVisible(true);
if (gframe.isWin())
{
recordWin();
}
else
{
recordLoss();
}
}
});
} | [
"public void closeGame() {\r\n if(gameEngine.isGameRunning())\r\n gameEngine.stopGameEngine();\r\n menuFrame.dispose();\r\n System.exit(0);\r\n }",
"@Override\n public void endGameAsLoss()\n {\n // UPDATE THE GAME STATE USING THE INHERITED FUNCTIONALITY\n sup... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the TileImprovementPlan which should be the next target. | public void setTileImprovementPlan(TileImprovementPlan tip) {
this.tileImprovementPlan = tip;
} | [
"public TileImprovementPlan getTileImprovementPlan() {\n return tileImprovementPlan;\n }",
"public void setNextTile(PathTile nextTile) {\n\t\tthis.nextTile = nextTile;\n\t}",
"public void setPlan(Plan plan) {\n this.plan = plan;\n }",
"public static TileImprovementPlan findTileImprovementPlan(AI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a batch of entities of a given kind | private QueryResultList<Entity> getEntitiesByKind_withCursor(String kind,
Cursor cursor, int pageSize){
int thread_id = 0;
if(TWTs_NO!=0)
thread_id = (int) (Thread.currentThread().getId()%TWTs_NO);
boolean proof = true;
QueryResultList<Entity> results = null;
/**
* Bullet proof reads from the Datastore.
*/
while(proof){
try{
FetchOptions fetchOptions = FetchOptions.Builder.withLimit(pageSize);
if(cursor!=null)
fetchOptions.startCursor(cursor);
Query q = new Query(kind);
PreparedQuery pq = connectionList.get(thread_id).ds.prepare(q);
results = pq.asQueryResultList(fetchOptions);
proof = false;
}catch(Exception e){
log.error(Thread.currentThread().getName() +
"ERROR: getEntitiesByKind_withCursor -> "+e.getMessage());
}
}
return results;
} | [
"public <T extends Object> List<? extends T> getEntities(Class<T> entityType);",
"public <ENTITY extends Persistable> List<ENTITY> getAll(Class<ENTITY> clazz);",
"public List<Entity> all(int limit, int offset);",
"protected abstract List<?> findAll(Class<?> entityClass);",
"List<Entity> getEntities();",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
auto generated Axis2 call back method for checkPayPassword method override this method for handling normal response from checkPayPassword operation | public void receiveResultcheckPayPassword(
org.tempuri.UserWcfStub.CheckPayPasswordResponse result) {
} | [
"public void receiveResultuserRePayPassword(\r\n org.tempuri.UserWcfStub.UserRePayPasswordResponse result) {\r\n }",
"void onChangePasswordSuccess(ConformationRes data);",
"public void receiveResultaccountMatchPwd(\r\n org.tempuri.UserWcfStub.AccountMatchPwdResponse result) {\r\n }",
"void... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculate a value from one range into another range by first calculating the fraction in the 'from range' and then back to a value in the 'to range'. | public static double calculateFromRangeToRange(final double fromMin, final double fromMax, final double fromValue,
final double toMin, final double toMax) {
return calculateValueInRange(toMin, toMax, calculateFractionInRange(fromMin, fromMax, fromValue));
} | [
"public static double mapValueFromRangeToRange(\n double value,\n double fromLow,\n double fromHigh,\n double toLow,\n double toHigh) {\n double fromRangeSize = fromHigh - fromLow;\n double toRangeSize = toHigh - toLow;\n double valueScale = (value - fromLow) / fromRangeSize;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the reward held by the briefcase | public double getReward() {
return reward;
} | [
"public int getReward() {\n return reward;\n }",
"public double getReward(){\n return this.params.reward;\n }",
"public double getReward()\n {\n return this.reward;\n }",
"double getTotalReward();",
"public double getLastReward();",
"public BigDecimal getReward() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Print to a postscript file, EPS if requested. | public static void printPostscript( Printable printable, boolean eps,
PrintRequestAttributeSet pageSet,
Rectangle bounds, String fileName )
throws SplatException
{
if ( eps ) {
try {
BufferedOutputStream ostrm =
new BufferedOutputStream( new FileOutputStream(fileName) );
EpsGraphics2D g2 =
new EpsGraphics2D( fileName, ostrm,
bounds.x, bounds.y,
bounds.x + bounds.width,
bounds.y + bounds.height );
printable.print( g2, null, 0 );
g2.close();
}
catch (Exception e) {
throw new SplatException( e );
}
}
else {
PrintService service =
PrintUtilities.getPostscriptPrintService( fileName );
if ( service != null ) {
try {
PrinterJob pj = PrinterJob.getPrinterJob();
pj.setPrintService( service );
pj.setPrintable( printable );
if ( pj.printDialog( pageSet ) ) {
pj.print( pageSet );
StreamPrintService sps = (StreamPrintService) service;
sps.dispose();
sps.getOutputStream().close();
}
}
catch ( PrinterException e ) {
throw new SplatException( e );
}
catch ( IOException e ) {
throw new SplatException( e );
}
}
else {
// Report there are no printers available.
throw new SplatException( "Sorry no printers are available" );
}
}
} | [
"public static void writePostscript(final String filename) {\n// psfile = file(filename, 'w');\n// psfile.write(_canvas.postscript(pageanchor='sw',\n// y='0.c',\n// x='0.c'));\n// psfile.close();\n throw new UnsupportedOperationException();... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update the timestamps for the folders specified and notifies on the recent folder URI. | private int updateTimestamp(final Context context, String id, Uri[] folders){
int updated = 0;
final long now = System.currentTimeMillis();
final ContentResolver resolver = context.getContentResolver();
final ContentValues touchValues = new ContentValues();
for (int i=0, size=folders.length; i < size; ++i) {
touchValues.put(MailboxColumns.LAST_TOUCHED_TIME, now);
LogUtils.d(TAG, "updateStamp: %s updated", folders[i]);
updated += resolver.update(folders[i], touchValues, null, null);
}
final Uri toNotify =
UIPROVIDER_RECENT_FOLDERS_NOTIFIER.buildUpon().appendPath(id).build();
LogUtils.d(TAG, "updateTimestamp: Notifying on %s", toNotify);
resolver.notifyChange(toNotify, null);
return updated;
} | [
"public void findFoldersLastUpdateTimeIn() {\n AdhocQueryRequest req = getQueryRequest(XDSConstants.XDS_FindFolders, XDSConstants.QUERY_RETURN_TYPE_LEAF, DEFAULT_PARAMS);\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMddHHmmss\");\n String ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the CEDEXBureauInternal field. | public void setCEDEXBureauInternal(java.lang.String value) {
__getInternalInterface().setFieldValueForCodegen(CEDEXBUREAUINTERNAL_PROP.get(), value);
} | [
"public void setCEDEXBureauInternal(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(CEDEXBUREAUINTERNAL_PROP.get(), value);\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getCEDEXBureauInternal() {\n return (java.lang.String)__getInternalInterfa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lists the assessment templates that correspond to the assessment targets that are specified by the ARNs of the assessment targets. | java.util.concurrent.Future<ListAssessmentTemplatesResult> listAssessmentTemplatesAsync(ListAssessmentTemplatesRequest listAssessmentTemplatesRequest,
com.amazonaws.handlers.AsyncHandler<ListAssessmentTemplatesRequest, ListAssessmentTemplatesResult> asyncHandler); | [
"java.util.concurrent.Future<ListAssessmentTemplatesResult> listAssessmentTemplatesAsync(ListAssessmentTemplatesRequest listAssessmentTemplatesRequest);",
"public Collection findTemplatesByOwner(Agent owner);",
"public List<InsightsAssessmentReportTemplate> getAllReportTemplatesList() {\n\t\ttry {\n\t\t\tMap<S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
29. Name of the Function: ClearRecord Desc: Clears the currenct record Base Location:O:\EBS QA\WR2OATS\GMS_OATS\12.2\Library\palib Clears the Record | public void ClearRecord()throws Exception{
/*Select Clear Record option from menu*/
forms.window("//forms:window[(@enabled='true')]").selectMenu("Edit|Clear|Record");
} | [
"@ActionTrigger(action=\"KEY-CLRREC\", function=KeyFunction.CLEAR_RECORD)\n\t\tpublic void sovlcur_ClearRecord()\n\t\t{\n\t\t\t\n\t\t\t\tgetSoqolibSovlcurController().sovlcur_ClearRecord();\n\t\t\t}",
"@ActionTrigger(action=\"KEY-DELREC\", function=KeyFunction.DELETE_RECORD)\n\t\tpublic void sovlcur_DeleteRecord(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of p r registrations where groupId = &63; and datePurchased = &63;. | @Override
public int countByG_DP(long groupId, Date datePurchased)
throws SystemException {
FinderPath finderPath = FINDER_PATH_COUNT_BY_G_DP;
Object[] finderArgs = new Object[] { groupId, datePurchased };
Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs,
this);
if (count == null) {
StringBundler query = new StringBundler(3);
query.append(_SQL_COUNT_PRREGISTRATION_WHERE);
query.append(_FINDER_COLUMN_G_DP_GROUPID_2);
boolean bindDatePurchased = false;
if (datePurchased == null) {
query.append(_FINDER_COLUMN_G_DP_DATEPURCHASED_1);
}
else {
bindDatePurchased = true;
query.append(_FINDER_COLUMN_G_DP_DATEPURCHASED_2);
}
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
qPos.add(groupId);
if (bindDatePurchased) {
qPos.add(CalendarUtil.getTimestamp(datePurchased));
}
count = (Long)q.uniqueResult();
FinderCacheUtil.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
FinderCacheUtil.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
} | [
"@Override\n\tpublic int filterCountByG_DP(long groupId, Date datePurchased)\n\t\tthrows SystemException {\n\t\tif (!InlineSQLHelperUtil.isEnabled(groupId)) {\n\t\t\treturn countByG_DP(groupId, datePurchased);\n\t\t}\n\n\t\tStringBundler query = new StringBundler(3);\n\n\t\tquery.append(_FILTER_SQL_COUNT_PRREGISTRA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Invokes minesButtonClicked method for the registered listeners. | private void fireMinesButtonClicked(MinesButtonEvent mbe) {
for (Enumeration en =listeners.elements(); en.hasMoreElements();) {
MinesButtonListener l = (MinesButtonListener) en.nextElement();
l.minesButtonClicked(mbe);
}
} | [
"public void buttonClicked() {\n mSanitizorGame.buttonClicked();\n }",
"private void addSeaInvadersButtonListener() {\n Button seaInvadersButton = findViewById(R.id.sea_invaders_button);\n seaInvadersButton.setOnClickListener(new View.OnClickListener() {\n @Override\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns report runnable from design file | public static IReportRunnable getRunnableFromDesignFile(
HttpServletRequest request, String designFile, Map options )
throws EngineException
{
IReportRunnable reportRunnable = null;
// check the design file if exist
File file = new File( designFile );
if ( file.exists( ) )
{
reportRunnable = ReportEngineService.getInstance( )
.openReportDesign( designFile, options );
}
else
{
// try to get resource from war package
InputStream is = null;
URL url = null;
try
{
designFile = ParameterAccessor.workingFolder
+ "/" //$NON-NLS-1$
+ ParameterAccessor.getParameter( request,
ParameterAccessor.PARAM_REPORT );
if ( !designFile.startsWith( "/" ) ) //$NON-NLS-1$
designFile = "/" + designFile; //$NON-NLS-1$
url = request.getSession( ).getServletContext( ).getResource(
designFile );
if ( url != null )
is = url.openStream( );
if ( is != null )
reportRunnable = ReportEngineService.getInstance( )
.openReportDesign( url.toString( ), is, options );
}
catch ( Exception e )
{
}
}
return reportRunnable;
} | [
"private IReportRunnable getReportRunnable(String name) throws EngineException {\n \tif (reports.containsKey(name)) {\n \t\treturn reports.get(name);\n \t}\n \tIReportRunnable r = null;\n \tFile reportFile = new File(reportFolder + File.separator + name.replace(\".rptdesign\", \"\") + \".rptdesign\")... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets called when a process joins the group. | public void processJoined(Process j); | [
"public void joinGroupMemberService() {\n //attemptingJoin = true;\n boolean result = initiateJoin();\n }",
"public void join() {\n\n // If wanting to join, tell GUIManager\n try {\n System.out.println(\"User joining...\");\n GUIManager.getInstanceGUIManager().cyclistJoin();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a m n matrix grid which is sorted in nonincreasing order both rowwise and columnwise. Return the number of negative numbers in grid. Example 1: Input: grid = [[4,3,2,1],[3,2,1,1],[1,1,1,2],[1,1,2,3]] Output: 8 Explanation: There are 8 negatives number in the matrix. Example 2: Input: grid = [[3,2],[1,0]] Output: 0 | public static int countNegatives(int[][] grid) {
int negative = 0;
for (int i = 0 ; i < grid.length ; i++){
for (int j = 0; j < grid.length ; j++){
if (grid[i][j] < 0){
negative++;
}
}
}
return negative;
} | [
"public static int countNeighboringMines(Cell[][] grid, int givenRow, int givenCol)\n {\n // TODO\n return 0;\n }",
"@Override\n public int getNumNeighboringMines(int row, int col) {\n int count = 0, rowStart = Math.max(row - 1, 0), rowFinish = Math.min(row + 1, grid.length - 1), colStart = Math... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Report booking by dishType. | public Iterable<BookingPerOption> showReportByMeal(MealType meal); | [
"public Iterable<BookingPerOption> showReportByDish(String dish);",
"public Iterable<BookingPerOption> showReportByDay(Calendar date);",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Booking> viewBookings(Date sDate, Date eDate, String roomType) {\n\t\tList<Booking> bookingsList = new ArrayList<>();\n\t\t\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
\u2190 The taken state of the Energy. If an Energy is taken, it will be hidden until shown() is run / When initialized, Energy will take in the hexColor and the player number of the player it belongs to Positions are set to a ranfom value with a 50px padding from the edges of the screen Since it is just created, the Energy will not have been taken Size is set to 20, arbitrarily | public Energy(int hexColor) {
super();
this.hexColor = hexColor;
plusOne = new PlusOne(hexColor);
plusOne.hide();
positionX = random(50, width - 50);
positionY = random(50, height - 50);
taken = false;
size = 20;
} | [
"public void updateColor(Entity e) {\n if (!colm.has(e))\n return;\n\n ColorComponent color = colm.get(e);\n if (color.color != color.oldColor) {\n if (color.color == 'x') {\n im.get(e).texRegion = ImageComponent.atlas.findRegion(\"PlayerShip\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Testing the setting of the properties filename when current state is set to disabled | @Test
public void setRuntimePropertiesFileNameWithDisabledStateTest() {
try {
runtimeConfigDAOPropertiesFile.setState(new State(State.DISABLED));
} catch (CannotSetStateException e) {
Assert.fail("Cannot set state for some reason...");
}
try {
runtimeConfigDAOPropertiesFile.setRuntimePropertiesFilename(runtimeConfigDAOPropertiesFile.getRuntimePropertiesFilename());
} catch (RuntimeConfigInitialisationException e) {
Assert.fail("The file should have been created OK.");
}
try {
Assert.assertEquals(true, runtimeConfigDAOPropertiesFile.getState().isDisabled());
} catch (StateNotFoundException e) {
Assert.fail("Cannot find state for some reason...");
}
} | [
"@Test\r\n public void setStateWhenFileNotExistTest() {\r\n try {\r\n deleteFile(runtimeConfigDAOPropertiesFile.getRuntimePropertiesFilename());\r\n\r\n // Perform the operation\r\n runtimeConfigDAOPropertiesFile.setState(new State(State.DISABLED));\r\n Assert.a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get the extension that is currently selected returns null if the extension is not known | public final String getCurrentExt() {
FileFilter filter = this.getFileFilter();
if (filter instanceof ExtensionFileFilter) {
return ((ExtensionFileFilter)filter).getExt();
}
return null;
} | [
"Extension getExtension();",
"public String getExtension() {\r\n return (String) get(\"extension\");\r\n }",
"@CheckForNull\n String getPreferredExtension();",
"public String getExtension() {\n\t\tString name = getName();\n\t\tint i = name.lastIndexOf('.');\n\t\tif (i == -1)\n\t\t\treturn null;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
performs a physical task. | private void performPhysicalTask() {
long millis = (long) ((100 - getAveragePhysicalScore()) * 100.0);
try {
Main.Log("Team " + getName() + " performing physical task for " + millis + " millis");
sleep(millis);
} catch (InterruptedException e) {
e.printStackTrace();
}
} | [
"public abstract void task();",
"void performTask(ClientTaskId taskId, Task<?> task);",
"void execute()\n throws TaskException;",
"protected abstract Version executeTaskLocal(Version theTask);",
"public interface UserTaskExecutor {\n\t\n\t/**\n\t * \n\t * \n\t * @param execTask task to execute \n\t *... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Empty response from origin with ContentEncoding: gzip Request does not support GZIP > filter should not fail in decoding the empty response stream | @Test
public void emptyGzipResponseFromOrigin() throws Exception {
ZuulProperties properties = new ZuulProperties();
properties.setSetContentLength(true);
SendResponseFilter filter = new SendResponseFilter(properties);
byte[] gzipData = new byte[] {};
RequestContext.getCurrentContext().setResponseGZipped(true);
RequestContext.getCurrentContext()
.setResponseDataStream(new ByteArrayInputStream(gzipData));
filter.run();
MockHttpServletResponse response = (MockHttpServletResponse) RequestContext
.getCurrentContext().getResponse();
assertThat(response.getHeader("Content-Length")).isNull();
assertThat(response.getHeader("Content-Encoding")).isNull();
assertThat(response.getContentAsByteArray()).isEqualTo(gzipData);
} | [
"@Test\n public void emptyGzipResponseFromOrigin() throws Exception {\n ZuulProperties properties = new ZuulProperties();\n properties.setSetContentLength(true);\n SendResponseFilter filter = new SendResponseFilter(properties);\n byte[] gzipData = new byte[]{ };\n RequestConte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table umajin.user_master | @Select({
"select",
"user_id, nickname, sex, age, birthday, regist_date, update_date, disable",
"from umajin.user_master",
"where user_id = #{user_id,jdbcType=INTEGER}"
})
@Results({
@Result(column="user_id", property="user_id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="nickname", property="nickname", jdbcType=JdbcType.VARCHAR),
@Result(column="sex", property="sex", jdbcType=JdbcType.INTEGER),
@Result(column="age", property="age", jdbcType=JdbcType.INTEGER),
@Result(column="birthday", property="birthday", jdbcType=JdbcType.DATE),
@Result(column="regist_date", property="regist_date", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_date", property="update_date", jdbcType=JdbcType.TIMESTAMP),
@Result(column="disable", property="disable", jdbcType=JdbcType.INTEGER)
})
UserMaster selectByPrimaryKey(Integer user_id); | [
"@SelectProvider(type=UserMasterSqlProvider.class, method=\"selectByExample\")\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the index of a pipe based upon its suffix. | private int getPipeIndex(String pipeArgNameSuffix) {
int pipeIndex;
// If there is no suffix, then it is the default pipe 0.
// Otherwise we must check the suffix.
if (pipeArgNameSuffix.length() <= 0) {
pipeIndex = 0;
} else {
String indexString;
// Validate that the suffix begins with a '.' character.
if (pipeArgNameSuffix.indexOf('.') != 0) {
throw new OsmosisRuntimeException(
"Task " + taskId
+ " contains a pipe definition without '.' between prefix and suffix."
);
}
// The remaining suffix must be a number defining the index.
indexString = pipeArgNameSuffix.substring(1);
// Ensure the index exists.
if (indexString.length() <= 0) {
throw new OsmosisRuntimeException(
"Task " + taskId
+ " contains a pipe definition without an index after the '.'."
);
}
// Parse the suffix string into a number.
try {
pipeIndex = Integer.parseInt(indexString);
} catch (NumberFormatException e) {
throw new OsmosisRuntimeException("Task " + taskId + " has a pipe with an incorrect index suffix.");
}
}
return pipeIndex;
} | [
"public int getIndex() {\n return -1 + Integer.parseInt(this.command.replaceAll(\"[\\\\D]\", \"\"));\n }",
"public static int lookupComponentIndex(ComponentToken token) {\r\n\t\tif (!(token.getCommand() instanceof SubCommandProvider)) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\tSubCommandProvider scp = (SubCo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a decoy of the malevolent mob at the given location | public LivingEntity createDecoy(Location location)
{
// Spawn the mob to turn into a clone
MMobListener.setSpawnDenyFlag(true);
LivingEntity livingEntity = (LivingEntity) Common.spawnEntity(location, Common.getEntityType(entity));
MMobListener.setSpawnDenyFlag(false);
// Create the malevolent version of this mob and copy over attributes
MalevolentMob mob = MobHandler.makeMobMalevolent(livingEntity);
if (mob != null)
{
mob.setRole(getRole());
mob.setLevel(getLevel());
mob.role.isDecoy = true;
}
else
Log.log("Attempted to spawn a decoy, but failed to make it Malevolent!", Level.WARNING);
livingEntity.setMaxHealth(entity.getMaxHealth());
livingEntity.setHealth(entity.getHealth());
return livingEntity;
} | [
"public DELocation (Location loc) {\n this.worldname = loc.getWorld().getName();\n this.x = loc.getBlockX();\n this.y = loc.getBlockY();\n this.z = loc.getBlockZ();\n }",
"public Deer(boolean randomAge, Field field, Location location)\n {\n super(field, location);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
parse gameboard from server to game. | public static synchronized void parseBoard(Play play,Game game) {
synchronized (game) {
//clear
game.clear();
//build
ArrayList<String> board_data = play.getBoard();
for(int i=0;i<board_data.size();i++) {
String record = board_data.get(i);
StringTokenizer fields = new StringTokenizer(record, ",");
char type = fields.nextToken().charAt(0);
int id = Integer.parseInt( fields.nextToken() );
double lat = Double.parseDouble( fields.nextToken() );
double lon = Double.parseDouble( fields.nextToken() );
double alt = Double.parseDouble( fields.nextToken() );
Point3D location = new Point3D(lat,lon,alt);
double speed_weight_lat = Double.parseDouble( fields.nextToken() );
double radius_lon = 0;
if(fields.hasMoreTokens())//fruit case
radius_lon = Double.parseDouble( fields.nextToken() );
switch (type) {
case 'M':
Me me = new Me(id, location, (int)speed_weight_lat, (int)radius_lon);
game.setMe(me);
break;
case 'F':
Fruit fruit = new Fruit(id, location, (int)speed_weight_lat);
game.addFruit(fruit);
break;
case 'G':
Ghost ghost = new Ghost(id, location, (int)speed_weight_lat,(int)radius_lon);
game.addGhost(ghost);
break;
case 'P':
Packman packman = new Packman(id, location, (int)speed_weight_lat, (int)radius_lon);
game.addPackman(packman);
break;
case 'B':
Point3D location2 = new Point3D(speed_weight_lat,radius_lon,0);
Box box = new Box(id, location, location2);
game.addBox(box);
break;
default:
break;
}
}
}
} | [
"List<LeaderboardEntryBean> parseLeaderboard() throws IOException;",
"private void processConnection() throws IOException{\n\n\t\t//Displays own game board\n\t\tProject_Main.Main_Thread.game.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tProject_Main.Main_Thread.game.setSize(600, 425);\n\t\tProject_Main.Mai... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'linearity' field. | public void setLinearity(java.lang.Integer value) {
this.linearity = value;
} | [
"public org.openrtb.common.api.Video.Builder setLinearity(java.lang.Integer value) {\n validate(fields()[1], value);\n this.linearity = value;\n fieldSetFlags()[1] = true;\n return this; \n }",
"public java.lang.Integer getLinearity() {\n return linearity;\n }",
"public java.lang.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Creates a new ranking with 10 entries | public Ranking() {
this.rankingSize = 10;
this.rankingMap = new LinkedHashMap<String, Integer>();
this.minimumScore = 0;
} | [
"private void updateRanking() {\n String rank = \"99\";\n String name = \"John Doe\";\n String co = \"0\";\n String pc = \"0\";\n String pb = \"99\";\n\n for (int row = 0; row < database.getRankingTableSize(); row++) {\n //TODO: extract data\n data... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set the main shell icon to its default | public void resetShellIcon() {
GDE.display.asyncExec(new Runnable() {
public void run() {
GDE.shell.setImage(SWTResourceManager.getImage(GDE.IS_MAC ? "gde/resource/DataExplorer_MAC.png" : "gde/resource/DataExplorer.png")); //$NON-NLS-1$ //$NON-NLS-2$
}
});
} | [
"public void setDefaultIcon (int resource){\r\n\t\tmDefaultIcon = resource;\r\n\t}",
"public void setMainIcon(IconReference ref);",
"WindowShell setIcon(String file);",
"public void setIcon(String defaultIcon)\n {\n myButton.setIcon(getIcon(defaultIcon));\n }",
"public void clearMainIcon();",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Funcion que carga las ofertas para este panel aniadiendolas al contenedor | public void cargarOfertas() {
coi.clearOfertas();
Controller c = gui.getController();
List<Integer> ofertas = c.ofertanteGetMisOfertas();
for (Integer id : ofertas) {
String estado = c.ofertaGetEstado(id);
if (estado.equals(GuiConstants.ESTADO_ACEPTADA) || estado.equals(GuiConstants.ESTADO_CONTRATADA)
|| estado.equals(GuiConstants.ESTADO_RESERVADA)) {
PanelOferta oferta = new PanelOferta(gui, id);
coi.addActiva(oferta);
} else if (estado.equals(GuiConstants.ESTADO_PENDIENTE) || estado.equals(GuiConstants.ESTADO_PENDIENTE)) {
PanelOferta oferta = new PanelOfertaEditable(gui, id);
coi.addPendiente(oferta);
} else if (estado.equals(GuiConstants.ESTADO_RETIRADA)) {
PanelOferta oferta = new PanelOferta(gui, id);
coi.addRechazada(oferta);
}
}
coi.repaint();
SwingUtilities.invokeLater(new Runnable() {
public void run() {
scrollPane.getHorizontalScrollBar().setValue(0);
scrollPane.getVerticalScrollBar().setValue(0);
}
});
} | [
"public void iniciarComponentes(){\n\n crearPanel();\n colocarBotones();\n \n }",
"public PanelInformesYEstadisticas() {\r\n\t\tinitComponents();\r\n\t\t//Util.personaSinResultados(lbSinResultados, true);\r\n\t}",
"private void cargarTablaDivisas() {\n\n //REINICIALIZAR TODA LA INFO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs an EclipseLog which uses the specified Writer to log messages to | public EclipseLog(Writer writer) {
if (writer == null)
// log to System.err by default
this.writer = logForStream(System.err);
else
this.writer = writer;
} | [
"public EclipseLog() {\n \t\tthis((Writer) null);\n \t}",
"public void setWriter(Writer log);",
"void setLogWriter(PrintWriter writer) throws ResourceException;",
"@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = \"RV_RETURN_VALUE_IGNORED_BAD_PRACTICE\",\n justification = \"Return value for file... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method: testGet() Description: Test of get method, of class NumericArrayList. | @Test
public void testGet()
{
try {
assertEquals(money2, list1.get(1));
assertEquals(money3, list1.get(2));
assertEquals(null, list1.get(15));
} catch (InvalidIndexException ex) {
Logger.getLogger(NumericArrayListTest.class.getName()).log(Level.SEVERE, null, ex);
}
} | [
"@Test\n public void testGet() \n {\n try {\n assertEquals(6.0, list1.get(0), 0.0);\n assertEquals(4.0, list1.get(1), 0.0);\n } catch (InvalidIndexException ex) {\n Logger.getLogger(DoubleArrayListTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
to set the AccessNetworkChargingIdentifierValue AVP a potential existing AVP will be deleted | public void setAccessNetworkChargingIdentifierValue(AccessNetworkChargingIdentifierValue _accessNetworkChargingIdentifier) {
this.setSingleAVP(_accessNetworkChargingIdentifier);
} | [
"void setChargingMethod(int value);",
"void setAgregate(com.hps.july.persistence.StorageCard anAgregate) throws java.rmi.RemoteException;",
"void secondarySetAgregate(com.hps.july.persistence.StorageCard anAgregate) throws java.rmi.RemoteException;",
"@Test\n public void modifySubscriptionChargingMethod4Su... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Encodes a Map as a JSON object | private void encodeJSONObject(Map map, StringBuffer sb) {
Iterator itr = map.keySet().iterator();
sb.append("{");
Object key = null;
while(itr.hasNext()) {
key = itr.next();
write(key, sb);
sb.append(':');
write(map.get(key), sb);
sb.append(',');
}
/* remove the trailing comma if the object has any items*/
if(key != null)
sb.deleteCharAt(sb.length()-1);
sb.append("}");
} | [
"public static String convertMapToJson(Map<String, Object> map) throws IOException {\n ObjectMapper objectMap = new ObjectMapper();\n StringWriter sw = new StringWriter();\n JsonGenerator gen = objectMap.getJsonFactory().createJsonGenerator(sw);\n gen.writeStartObject();\n handleM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Counts the number of items in the catalog whose descriptions contain a given substring. | int countItems(String d) {
int c = 0;
for (Item i : catalog) {
if (i.description.contains(d))
c++;
}
return c;
} | [
"int getCatalogueStrCount();",
"public int countBydescricao(String descricao);",
"public static int substringCount(String s, String substring) {\n \tint num = 0;\n \twhile(s.contains(substring)) {\n \t\ts = s.substring(s.indexOf(substring) + substring.length());\n \t\tnum++;\n \t}\n return... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Manually enables the selected coursefeed. This routine is called from /coursefeeds/jsp/cp/editActions.jsp. | @Deprecated
public void enableCourseFeed(ActionRequest request, ActionResponse response)
throws Exception {
Long feedId = ParamUtil.getLong(request, "feedRefId");
FeedReference feedRef = FeedReferenceLocalServiceUtil.getFeedReference(feedId);
feedRef.setRemoved(false);
feedRef.setRemovedDate(null);
feedRef.setRemovedReason(null);
// updateFeedReference also updates the enabled/disabled state of courses
FeedReferenceLocalServiceUtil.updateFeedReference(feedRef, true);
// subscribe to any hubs
if (!feedRef.getPshb().equals("")) {
String hubs[] = feedRef.getPshb().split(",");
for (String hub : hubs) {
mPushSubscriber.subscribe(hub, feedRef.getHref());
}
}
response.setRenderParameter("feedCur", request.getParameter("feedCur"));
response.setRenderParameter("feedDelta", request.getParameter("feedDelta"));
response.setRenderParameter("feedRedirect", request.getParameter("feedRedirect"));
response.setRenderParameter("feedRefId", feedId.toString());
response.setRenderParameter("feedTabs", request.getParameter("feedTabs"));
} | [
"public JavascriptGenerator updateCourseOfferings()\n {\n log.debug(\"updateCourseOfferings()\");\n super.updateCourseOfferings();\n return updateAssignments().refresh(idFor.get(\"coursePane\"));\n }",
"public void \n doEdited() \n {\n pConfirmButton.setEnabled(true);\n pApplyBu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Modifie le texte de la zone de texte | public void modifierZoneTexte(String texte) {
champTexte.setText(texte);
zoneIcar.setMotif(texte);
} | [
"public void modifierZoneAffichage(String texte) {\r\n\t\tzoneAffichage.setText(texte);\r\n\t}",
"@Override\n\t\t\t\t\t\t\tpublic void modifyText(ModifyEvent event1) {\n\t\t\t\t\t\t\t\titem.setText(col, text.getText());\n\n\t\t\t\t\t\t\t}",
"public void setTexte(Text texte) {\n this.texte = texte;\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the Card of Color c and Rank r. | public static Card of(Card.Color c, Card.Rank r) {
return new Card(PackedCard.pack(c, r));
} | [
"public static int pack(Card.Color c, Card.Rank r) {\r\n // Packs the card's rank's ordinal on 4 bits and its color's ordinal on\r\n // 2 bits\r\n return Bits32.pack(r.ordinal(), RANK_SIZE, c.ordinal(), COLOR_SIZE);\r\n }",
"public Card(int s, int r){\n suit = s;\n rank = r;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'field280' field | public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField280() {
field280 = null;
fieldSetFlags()[280] = false;
return this;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField232() {\n field232 = null;\n fieldSetFlags()[232] = false;\n return this;\n }",
"private void clearFields() {\r\n\t\tmCardNoValue1.setText(\"\");\r\n\t\tmCardNoValue1.setHint(\"-\");\r\n\t\tmCardNoValue2.setText(\"\");\r\n\t\tm... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
READSITES reads all sites, sort, and compute xmin, xmax, ymin, ymax. | public void readsites() {
int i;
nsites = 0;
sites = new Site[4000];
while (in.hasNextLine()) {
String line = in.nextLine();
StringTokenizer token = new StringTokenizer(line);
sites[nsites] = new Site();
sites[nsites].coord.x = Float.valueOf(token.nextToken());
sites[nsites].coord.y = Float.valueOf(token.nextToken());
sites[nsites].sitenbr = nsites;
sites[nsites].refcnt = 0;
nsites += 1;
if (nsites % 4000 == 0) {
Site[] tempSites = new Site[sites.length];
System.arraycopy(sites, 0, tempSites, 0, sites.length);
sites = new Site[nsites + 4000];
System.arraycopy(tempSites, 0, sites, 0, sites.length);
}
}
// Trimm trailing empty slots.
Site[] temp = new Site[nsites];
System.arraycopy(sites, 0, temp, 0, nsites);
sites = null;
sites = new Site[nsites];
System.err.println("sites length = " + sites.length);
System.arraycopy(temp, 0, sites, 0, sites.length);
Site t = new Site();
QuickSort qsort = new QuickSort(t);
qsort.sort(sites);
xmin = sites[0].coord.x;
xmax = sites[0].coord.x;
for (i = 1; i < nsites; i += 1) {
if (sites[i].coord.x < xmin)
xmin = sites[i].coord.x;
if (sites[i].coord.x > xmax)
xmax = sites[i].coord.x;
}
ymin = sites[0].coord.y;
ymax = sites[nsites - 1].coord.y;
} | [
"private double[] analyzeRange() {\n double ymin = DEFAULT_VALUE;\n double ymax = -1 * DEFAULT_VALUE;\n double xmin = DEFAULT_VALUE;\n double xmax = -1 * DEFAULT_VALUE;\n final double[] rangePixels = new double[NUMBER_VALUES_RANGE];\n for (int i = Graph.LAT_MIN; i <= Graph.LAT_MAX; i++) {\n f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads the segment content from the element and fixes any missing sub locType attributes and sub id values. | private String getSegmentValue(Element p_root)
{
StringBuffer result = new StringBuffer();
Element seg = p_root.element("seg");
// TODO for all formats: strip the TMX 1.4 <hi> element.
seg = removeHiElements(seg);
if (m_tmxLevel == ImportUtil.TMX_LEVEL_1)
{
// Level 1: discard any embedded TMX tags.
result.append(EditUtil.encodeXmlEntities(seg.getText()));
}
else if (m_tmxLevel == ImportUtil.TMX_LEVEL_TRADOS_RTF ||
m_tmxLevel == ImportUtil.TMX_LEVEL_TRADOS_HTML)
{
// Trados TMX: converted to native GXML in analysis phase,
// this is a no-op.
result.append(EditUtil.encodeXmlEntities(seg.getText()));
}
else
{
// Level 2 and native: preserve embedded TMX tags.
try
{
// First, ensure we have all G-TMX attributes (i, x, type)
seg = validateSegment(p_root, seg);
// Thu May 15 18:15:26 2003 CvdL
// For now, strip out all sub segments.
seg = removeSubElements(seg);
result.append(ImportUtil.getInnerXml(seg));
}
catch (Throwable ex)
{
// On error, import as level 1.
result.append(EditUtil.encodeXmlEntities(seg.getText()));
}
}
return result.toString();
} | [
"void parseContent()\n\t{\n\t\tFile[] segmentFolders = new File(readDataFolder + \"segments/\").listFiles();\n\t\tfor(File folder: segmentFolders)\n\t\t\tparseSegment(folder.getName());\n\t}",
"private void segment() throws Exception {\r\n char first = data[off];\r\n\r\n if(first == '/') {\r\n t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is the constructor of the QuizScreen class which sets up the dimensions, background colour, initial buttons, the pane, where it starts off (location) in the screen, and also adds a window listener. | public QuizScreen() {
super("Quiz Screen");
pane.setPreferredSize(new Dimension(850,400));
pane.setBackground(new Color(114,222,149));
layoutz = new SpringLayout();
pane.setLayout(layoutz);
add(pane);
pack();
setLocationRelativeTo(null);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent windowEvent) {
done = true;
}
});
initLabels();
loadQuizScreen();
setVisible(true);
} | [
"public QuizUi() {\n super(FXML);\n this.logic = GlobalState.getInstance().getLogic();\n this.responsePopUp = GlobalState.getInstance().getResponsePopUp();\n\n flashcardSetListPanel = new FlashcardSetListPanel();\n flashcardSetListPanelPlaceholder.getChildren().add(flashcardSetLis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets user cnt halfyear. | public String getUserCntHalfyear( ) {
return this.userCntHalfyear;
} | [
"public void setUserCntHalfyear(String userCntHalfyear) {\n\t\tthis.userCntHalfyear = userCntHalfyear;\n\t}",
"public int getUpperYear()\r\n {\r\n return getInt(UpperYear_, 0);\r\n }",
"int getYears();",
"Integer getTHunYear();",
"public int getFullYearsCount() {\r\n int ifreq = m_freq.intValue(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True if has "agenthost" attribute | public boolean isSetAgenthost()
{
synchronized (monitor())
{
check_orphaned();
return get_store().find_attribute_user(AGENTHOST$6) != null;
}
} | [
"public boolean isSetAgentName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(AGENTNAME$20) != null;\n }\n }",
"public boolean isSetHost() {\r\n return this.host != null;\r\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sets the int employee ID | public void setEmployeeID(int employeeID) {
this.employeeID = employeeID;
} | [
"private void setEmployeeID() {\n try {\n employeeID = userModel.getEmployeeID(Main.getCurrentUser());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public void setEmployeeId(Number value) {\r\n setAttributeInternal(EMPLOYEEID, value);\r\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__SitProp__OSituationNameAssignment_1_2" $ANTLR start "rule__SitProp__IntervalsAssignment_1_4" InternalSymboleoide.g:10452:1: rule__SitProp__IntervalsAssignment_1_4 : ( ruleInterval ) ; | public final void rule__SitProp__IntervalsAssignment_1_4() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalSymboleoide.g:10456:1: ( ( ruleInterval ) )
// InternalSymboleoide.g:10457:2: ( ruleInterval )
{
// InternalSymboleoide.g:10457:2: ( ruleInterval )
// InternalSymboleoide.g:10458:3: ruleInterval
{
before(grammarAccess.getSitPropAccess().getIntervalsIntervalParserRuleCall_1_4_0());
pushFollow(FOLLOW_2);
ruleInterval();
state._fsp--;
after(grammarAccess.getSitPropAccess().getIntervalsIntervalParserRuleCall_1_4_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__SitProp__IntervalsAssignment_2_4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:10486:1: ( ( ruleInterval ) )\n // InternalSymboleoide.g:10487:2: ( ruleInterval )\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for the EditorBarajasGUI_botGuardar_mouseAdapter object | EditorBarajasGUI_botGuardar_mouseAdapter(EditorBarajasGUI adaptee) {
this.adaptee = adaptee;
} | [
"EditorBarajasGUI_botGuardarComo_mouseAdapter(EditorBarajasGUI adaptee) {\n\t\tthis.adaptee = adaptee;\n\t}",
"EditorBarajasGUI_botAyuda_mouseAdapter(EditorBarajasGUI adaptee) {\n\t\tthis.adaptee = adaptee;\n\t}",
"EditorBarajasGUI_botCargar_mouseAdapter(EditorBarajasGUI adaptee) {\n\t\tthis.adaptee = adaptee;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parcours l'ensemble des pinguins vivants pour determiner si ils sont finalement seuls Met la variable estSeul a True des pinguins dans ce cas | public Boolean setPinguinsSeuls(Partie partie) {
//System.out.print("setPinguinsSeuls");
for (Pinguin p : super.getPinguinNonIsole()) {
if (Plateau.getNbJoueurIceberg(Plateau.getCasesIceberg(p.getPosition())) == 1) {
p.setEstSeul(true);
} else {
boolean estSeul = true;
CaseCritique cc = JoueurIA.estIlot(p.getPosition(), partie.getPlateau());
if (cc != null) {
//System.out.println(cc);
p.getPosition().setCoulee(true);
ArrayList<Case> iceberg = partie.getPlateau().getCasesIcebergLimiteCassure(cc.getIlot1().get(0));
int nbJoueur = Plateau.getNbJoueurIceberg(iceberg);
int poidsIlot1 = Plateau.getPoidsIceberg(iceberg);
if (nbJoueur != 0) {
poidsIlot1 = poidsIlot1 / nbJoueur;
}
iceberg = partie.getPlateau().getCasesIcebergLimiteCassure(cc.getIlot2().get(0));
nbJoueur = Plateau.getNbJoueurIceberg(iceberg);
int poidsIlot2 = Plateau.getPoidsIceberg(iceberg);
if (nbJoueur != 0) {
poidsIlot2 = poidsIlot2 / nbJoueur;
}
ArrayList<Joueur> joueursIlot1 = Plateau.getJoueursIceberg(partie.getPlateau().getCasesIcebergLimiteCassure(cc.getIlot1().get(0)));
ArrayList<Joueur> joueursIlot2 = Plateau.getJoueursIceberg(partie.getPlateau().getCasesIcebergLimiteCassure(cc.getIlot2().get(0)));
//Si l'ilot est interressant
if (poidsIlot1 > poidsIlot2) {
//Si l'ilot1 a deja une presence du joueur, personne n'ira sur cet ilot
if (joueursIlot1.size() == 1 && joueursIlot1.get(0) == p.getGeneral()) {
p.setCasesInterdites(partie.getPlateau().getCasesIcebergLimiteCassure(cc.getIlot1().get(0)));
//Si il n'y a personne sur cet ilot
} else if (joueursIlot1.isEmpty()) {
p.setEstSeul(true);
}
} else if (poidsIlot2 > poidsIlot1) {
//Si l'ilot2 a deja une presence du joueur, personne n'ira sur cet ilot
if (joueursIlot2.size() == 1 && joueursIlot2.get(0) == p.getGeneral()) {
p.setCasesInterdites(partie.getPlateau().getCasesIcebergLimiteCassure(cc.getIlot2().get(0)));
//Si il n'y a personne sur cet ilot
} else if (joueursIlot2.isEmpty()) {
p.setEstSeul(true);
}
} else {
if (joueursIlot1.isEmpty() || joueursIlot1.size() == 1 && joueursIlot1.get(0) == p.getGeneral() && joueursIlot2.size() > 0) {
for (Case c : cc.getIlot2()) {
if (c.getPinguin() == null && (joueursIlot2.size() > 1 || joueursIlot2.size() == 1 && !joueursIlot2.contains(this))) {
estSeul = false;
}
}
} else if (joueursIlot2.isEmpty() && joueursIlot2.size() == 1 && joueursIlot2.get(0) == p.getGeneral() && joueursIlot1.size() > 0) {
for (Case c : cc.getIlot1()) {
if (c.getPinguin() == null && (joueursIlot1.size() > 1 || joueursIlot1.size() == 1 && !joueursIlot1.contains(this))) {
estSeul = false;
}
}
}
p.setEstSeul(estSeul);
}
p.getPosition().setCoulee(false);
}
}
}
//System.out.println(" - OK");
return this.pinguinsSontSeuls();
} | [
"public Boolean pinguinsSontSeuls() {\r\n boolean sontSeuls = true;\r\n for (Pinguin p : super.getPinguinsVivants()) {\r\n sontSeuls = sontSeuls && p.estSeul();\r\n }\r\n return sontSeuls;\r\n }",
"@Override\n public boolean estVide()\n {\n return this.taille... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Update Auction data / params.put("auction_id", bundleAuctionId); params.put("vehicle_ids", stringVehicleIds); params.put("status", SaveActivate); params.put("ShowHide", ShowHide); params.put("NoVehicle", stringNoofVehicle); | public void UpdateAuction(int auction_id, String auctionTitleUpdate, String startDateUpdate, String startTimeUpdate,
String endDateUpdate, String endTimeUpdate, String specialClausesIDUpdate, String vehicle_ids,
String status, String ShowHide, String NoVehicle) {
//JSON to Gson conversion
Gson gson = new GsonBuilder()
.setLenient()
.create();
try {
if (mConnectionDetector.isConnectedToInternet()) {
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(mContext.getString(R.string.base_url))
.addConverterFactory(GsonConverterFactory.create(gson))
.client(initLog().build())
.build();
ServiceApi serviceApi = retrofit.create(ServiceApi.class);
Call<String> mUpdateAuction = serviceApi._autokattaUpdateAuctionCreation(auction_id, auctionTitleUpdate, startDateUpdate,
startTimeUpdate, endDateUpdate, endTimeUpdate, specialClausesIDUpdate, vehicle_ids, status,
ShowHide, NoVehicle);
mUpdateAuction.enqueue(new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
mNotifier.notifyString(response.body());
}
@Override
public void onFailure(Call<String> call, Throwable t) {
mNotifier.notifyError(t);
}
});
} else
CustomToast.customToast(mContext, mContext.getString(R.string.no_internet));
} catch (Exception e) {
e.printStackTrace();
}
} | [
"public void updateBusinessData(Map<String,Object> params) throws Exception;",
"@Test\n public void testUpdate_AUCTION() throws Bid4WinException\n {\n // Création de la situation de départ\n AUCTION auction = this.add(this.createAuction());\n\n AUCTION result = this.getById(auction.getId());\n asser... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the bytesize of the give bitmap | @TargetApi(Build.VERSION_CODES.KITKAT)
public static int byteSizeOf(Bitmap bitmap) {
int size = 0;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
size = bitmap.getAllocationByteCount();
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) {
size = bitmap.getByteCount();
} else {
size = bitmap.getRowBytes() * bitmap.getHeight();
}
return size;
} | [
"public static int getBitmapSize(Bitmap bitmap) {\n\t\t// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) {\n\t\t// return bitmap.getByteCount();\n\t\t// }\n\t\t// Pre HC-MR1\n\t\treturn bitmap.getRowBytes() * bitmap.getHeight();\n\t}",
"@TargetApi(12)\n public static int getBitmapSize(Bitmap bit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a list of all the gadgets in the game | public static List<Gadget> getAllGadgets() {
List<Gadget> gadgets = new ArrayList<Gadget>();
gadgets.add(new AutoRepairSystem());
gadgets.add(new FiveExtraCargo());
gadgets.add(new NavigatingSystem());
gadgets.add(new TargetingSystem());
gadgets.add(new CloakingDevice());
return gadgets;
} | [
"public List<Gadget> getGadgetList() {\n List<Gadget> gadgets = new ArrayList<>();\n orders.entrySet().stream().forEach((s) -> s.getValue().forEach((s1) -> gadgets.add(s1)));\n return gadgets;\n }",
"public List<Gadget> getGadgets(){\n\t \t\t\t\r\n\t \t\t\tList<Gadget> gadgets = new ArrayL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of RegBean | public RegBean() {
Conversation c;
c.
} | [
"public RegistrationBean() {\n }",
"public RegistroBean() {\r\n }",
"public RegistrarBean() {\n \n }",
"Register createRegister();",
"private FactoryBean() {\n this.brand = \"Factory\";\n this.name = \"Bean from factory\";\n this.birthdate = 201501071;\n }",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Process a Jar path. | void processJar(String path) {
try {
int fileCount = new JarProcessor(new EntityFileProcessor(""), CLASS_EXT).process(path);
log.info("Loaded " + fileCount + " Entities from " + path);
} catch (IOException e) {
log.error("Error while searching classpath for entities", e);
}
} | [
"Path mainJar();",
"private static String getJarPath() {\r\n\t\tSystem.out.println(\"Please enter jar path\");\r\n\t\tString jar = scanner.next();\r\n\t\tlogger.info(\"JAR:\" + jar);\r\n\t\treturn jar;\r\n\t}",
"private void processJar(JarFile jf) throws Exception {\n\t\tfor (Enumeration<JarEntry> e = jf.entrie... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method sets the Part object's name. | public void setPartName(String partName) {
this.partName = new SimpleStringProperty(partName);
} | [
"public final void setPartName(java.lang.String partname)\r\n\t{\r\n\t\tsetPartName(getContext(), partname);\r\n\t}",
"public final void setPartName(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String partname)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.PartName.toString(), ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get flag whether Baritus should try to populate the form bean. Setting this flag to false, and thus letting Baritus skip population and validation can be usefull when you link commands within the same request and want to reuse the allready populated form bean without doing population and validation as well. BEWARE that this is also skips population of request attributes etc. that were set by the controllers earlier in the command stack. ALSO note that if this flag is false, Baritus will consider population to be succesfull, even though the population of the prior control might not have been. | public boolean isPopulateAndValidate()
{
return populateAndValidate;
} | [
"protected void processPopulate(HttpServletRequest request,\n HttpServletResponse response,\n ActionForm form,\n ActionMapping mapping)\n throws ServletException\n {\n if(form != null)\n {\n if(m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by Apache iBATIS ibator. This method returns the value of the database column V_RP_DY_ROUTE.DEVICES | public Integer getDevices() {
return devices;
} | [
"java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Device> \n getDevicesList();",
"java.util.List<yandex.cloud.api.iot.devices.v1.DeviceOuterClass.Device> \n getDevicesList();",
"public java.util.List<com.google.ads.googleads.v14.enums.DeviceEnum.Device> getDevicesList() {\n return new co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
deal with response data and do last | private void dealUnionResponse(int lastCmd, int status, byte[] data) {
switch (lastCmd) {
case BTC_AUTH:
CLog.i(TAG, "has BTC_AUTH");
mHandler.removeMessages(SEND_BUFFER_ORDER);
mHandler.sendEmptyMessage(SEND_BUFFER_ORDER);
try {
for (int i = 0; i < mISyncDataCallbacks.size(); i++) {
mISyncDataCallbacks.get(i)
.onDeviceBind(device.getAddress());
}
Log.i(TAG,
"mISyncDataCallback size:"
+ mISyncDataCallbacks.size());
} catch (Exception e) {
e.printStackTrace();
}
break;
case BTC_CONNECT:
CLog.i(TAG, "receive BTC_CONNECT, BIGAN TO ATR");
if (null != data && data.length == 2) {
curSsc = ((data[0] & 0xff) << 8) + (data[1] & 0xff);
curSsc = UnionPayResponseHelper.dealSsc(curSsc);
writeUnionPayCmdToDevice(BTC_ATR, null);
} else {
Log.e(TAG, "err get ssc");
responseUnionCallback(BTC_SSC_ERROR, null);
}
break;
case BTC_ATR:
isSEATR = true;
CLog.i(TAG, "receive BTC_ATR res");
updateSESyncTime();
stop();
responseUnionCallback(BTC_IO_OK, data);
break;
case BTC_APDU:
CLog.i(TAG, "receive BTC_APDU res");
// writeUnionPayCmdToDevice(BTC_DISCONNECT, null);
stop();
updateSESyncTime();
responseUnionCallback(status, data);
break;
case BTC_DISCONNECT:
CLog.i(TAG, "has BTC_DISCONNECT");
setSEATR(false);
stop();
responseUnionCallback(status, data);
break;
case BTC_UNBIND:
Log.i(TAG, "has BTC_UNBIND");
stop();
try {
for (int i = 0; i < mISyncDataCallbacks.size(); i++) {
mISyncDataCallbacks.get(i).onDeviceUnBind(
device.getAddress());
}
} catch (Exception e) {
e.printStackTrace();
}
case BTC_INFO:
stop();
responseUnionCallback(BTC_IO_OK, data);
if (null != data && data.length > 12) {
int offset = 2;
String mainVersion = CommonUtils.getHexString(data[offset]);
String secondVersion = CommonUtils
.getHexString(data[offset + 1]);
String version = mainVersion + "." + secondVersion;
offset += 2;
String manuCode = CommonUtils.getHexString(data[offset]);
offset += 1;
String product_num = CommonUtils.getHexString(data[offset])
+ CommonUtils.getHexString(data[offset + 1])
+ CommonUtils.getHexString(data[offset + 2]);
offset += 3;
String liushui_num = CommonUtils.getHexString(data[offset])
+ CommonUtils.getHexString(data[offset + 1])
+ CommonUtils.getHexString(data[offset + 2])
+ CommonUtils.getHexString(data[offset + 3]);
String id = manuCode + "-" + product_num + "-" + liushui_num;
try {
for (int i = 0; i < mISyncDataCallbacks.size(); i++) {
mISyncDataCallbacks.get(i).onGetVersionAndId(version,
id);
}
} catch (Exception e) {
e.printStackTrace();
}
}
break;
case BTC_IDLE:
CLog.d(TAG, "BTC_IDLE OK");
stop();
break;
}
} | [
"public abstract HTTPResponse finish();",
"public void endResponse() throws IOException {\n out.println();\n //out.println(\"--End\");\n out.flush();\n endedLastResponse = true;\n }",
"public void setLastResponse(String tmp) {\n this.lastResponse = tmp;\n }",
"void doRespond(Call call) throws... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface which defines method signature for validation purpose | public interface Validator {
/**
* Method signature for the yak validation purpose
*/
void validateYak(Yak yak) throws YakShopException;
/**
* Method signature for validating the days
*/
void validateDays(int days) throws YakShopException;
} | [
"public interface Validator<T> {\r\n \r\n /**\r\n * Valide l'objet en paramètre.\r\n * Appel à effectuer à chaque début de traitement \"critique\".\r\n * @param object \r\n */\r\n void validate(T object) throws IllegalArgumentException;\r\n}",
"public interface GeometryValidator {\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implements the constructor: Annotation() Direct superclasses: metadslx.languages.soal.NamedElement All superclasses: metadslx.languages.soal.NamedElement | public void Annotation(Annotation _this) {
this.NamedElement(_this);
} | [
"protected AnnotationBasedFactory(String elementName) {\n this.annotationType = Reflection.reflect().genericType(\"A\").in(this);\n this.elementName = elementName;\n }",
"public AnnotationBasedFactory(Class<A> annotationType, String elementName) {\n this.annotationType = annotationType;\n this.elemen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
generate a mapping axiom from a table of a database | public List<OBDAMappingAxiom> getMapping(DatabaseRelationDefinition table, String baseUri) {
OBDADataFactory dfac = OBDADataFactoryImpl.getInstance();
DirectMappingAxiomProducer dmap = new DirectMappingAxiomProducer(baseUri, dfac);
List<OBDAMappingAxiom> axioms = new ArrayList<>();
axioms.add(dfac.getRDBMSMappingAxiom("MAPPING-ID"+ currentMappingIndex, dfac.getSQLQuery(dmap.getSQL(table)), dmap.getCQ(table)));
currentMappingIndex++;
Map<String, List<Function>> refAxioms = dmap.getRefAxioms(table);
for (Map.Entry<String, List<Function>> e : refAxioms.entrySet()) {
OBDASQLQuery sqlQuery = dfac.getSQLQuery(e.getKey());
List<Function> targetQuery = e.getValue();
axioms.add(dfac.getRDBMSMappingAxiom("MAPPING-ID"+ currentMappingIndex, sqlQuery, targetQuery));
currentMappingIndex++;
}
return axioms;
} | [
"private void createAttributeMappingTable() {\n\t\tString table;\n\t\tString sql;\n\t\t\n\t\tConnectionManager.initParametersFromFile();\n\t\t\n\t\tfor (Feature feature : featureInstanceVectorListMap.keySet()) {\n\t\t\t\n\t\t\ttable \t= \"SIGNATURE_DISCOVERY_\" + feature.toString() + \"_MAPPING\";\n\t\t\t\n\t ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ShiftExpression__Group__1" $ANTLR start "rule__ShiftExpression__Group__1__Impl" InternalReflex.g:8344:1: rule__ShiftExpression__Group__1__Impl : ( ( rule__ShiftExpression__Group_1__0 ) ) ; | public final void rule__ShiftExpression__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalReflex.g:8348:1: ( ( ( rule__ShiftExpression__Group_1__0 )* ) )
// InternalReflex.g:8349:1: ( ( rule__ShiftExpression__Group_1__0 )* )
{
// InternalReflex.g:8349:1: ( ( rule__ShiftExpression__Group_1__0 )* )
// InternalReflex.g:8350:2: ( rule__ShiftExpression__Group_1__0 )*
{
if ( state.backtracking==0 ) {
before(grammarAccess.getShiftExpressionAccess().getGroup_1());
}
// InternalReflex.g:8351:2: ( rule__ShiftExpression__Group_1__0 )*
loop54:
do {
int alt54=2;
int LA54_0 = input.LA(1);
if ( (LA54_0==67) ) {
int LA54_2 = input.LA(2);
if ( (synpred101_InternalReflex()) ) {
alt54=1;
}
}
else if ( (LA54_0==68) ) {
int LA54_3 = input.LA(2);
if ( (synpred101_InternalReflex()) ) {
alt54=1;
}
}
switch (alt54) {
case 1 :
// InternalReflex.g:8351:3: rule__ShiftExpression__Group_1__0
{
pushFollow(FOLLOW_68);
rule__ShiftExpression__Group_1__0();
state._fsp--;
if (state.failed) return ;
}
break;
default :
break loop54;
}
} while (true);
if ( state.backtracking==0 ) {
after(grammarAccess.getShiftExpressionAccess().getGroup_1());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__ShiftExpression__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:8337:1: ( rule__ShiftExpression__Group__1__Impl )\n // InternalReflex.g:8338:2: rule__ShiftExpression__Group__1__I... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an ImageProcessor for the specified slice, were 1<=n<=nslices. Returns null if the stack is empty. | @Override
public ImageProcessor getProcessor(int n) {
if (n < 1 || n > layers.size()) return null;
// Create a flat image on the fly with everything on it, and return its processor.
final Layer layer = layers.get(n-1);
final Loader loader = layer.getProject().getLoader();
Long cid;
synchronized (id_cache) {
cid = id_cache.get(layer.getId());
if (null == cid) {
cid = loader.getNextTempId();
id_cache.put(layer.getId(), cid);
}
}
ImageProcessor ip;
synchronized (cid) {
ImagePlus imp = loader.getCachedImagePlus(cid);
if (null == imp || null == imp.getProcessor() || null == imp.getProcessor().getPixels()) {
ip = loader.getFlatImage(layer, this.roi, this.scale, this.c_alphas, this.type, this.clazz, null).getProcessor();
if (invert) ip.invert();
loader.cacheImagePlus(cid, new ImagePlus("", ip));
} else ip = imp.getProcessor();
}
return ip;
} | [
"public synchronized ImageProcessor getProcessor(int n) {\n if (frameInfos==null || frameInfos.size()==0 || raFilePath==null)\n return null;\n if (n<1 || n>frameInfos.size())\n throw new IllegalArgumentException(\"Argument out of range: \"+n);\n Object pixels = null;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the college capacity map. | private Map<String, Integer> getCollegeCapacityMap() {
Map<String, Integer> capacityMap = new HashMap<String, Integer>();
List<College> collegeList = CollegeInMemoryDao.getInstance()
.getCollegesList();
for (College college : collegeList) {
capacityMap.put(college.getId(), college.getSeatsAvailable());
}
return capacityMap;
} | [
"com.cantor.drop.aggregator.model.CFTrade.Capacity getCapacity();",
"public int getCapacity() {\n\t\treturn mCapcity;\n\t}",
"public java.util.List<LicenseCapacity> getCapacities() {\n if (capacities == null) {\n capacities = new com.amazonaws.internal.ListWithAutoConstructFlag<LicenseCapaci... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Devuelve la posicion del jugador en la cancha. | public PosicionJugador getPosicion() {
return posicion;
} | [
"public void setPosicion(PosicionJugador posicion) {\n\t\tthis.posicion = posicion;\n\t}",
"public int getPositionJ(){\r\n\t\t\r\n\t\treturn j;\r\n\t\t\r\n\t}",
"public int getPosicao() {\n return posicao;\n }",
"private void enviarPosicion() {\n juego.getUbicacionPersonaje().setPosX(x);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'field951' field. | public void setField951(java.lang.CharSequence value) {
this.field951 = value;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField951(java.lang.CharSequence value) {\n validate(fields()[951], value);\n this.field951 = value;\n fieldSetFlags()[951] = true;\n return this; \n }",
"public void setField961(java.lang.CharSequence value) {\n this.field961 ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required bool field0 = 1; | boolean getField0(); | [
"void boolField(String name, boolean isDefined, boolean value);",
"boolean hasField0();",
"boolean getRequiredField();",
"public void setRequired(boolean tmp) {\n this.required = tmp;\n }",
"private boolean validateFieldOfStudy(){\r\n return true;\r\n }",
"public boolean hasField1() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleReponse" $ANTLR start "entryRuleEBoolean" InternalQcm.g:415:1: entryRuleEBoolean returns [String current=null] : iv_ruleEBoolean= ruleEBoolean EOF ; | public final String entryRuleEBoolean() throws RecognitionException {
String current = null;
AntlrDatatypeRuleToken iv_ruleEBoolean = null;
try {
// InternalQcm.g:415:48: (iv_ruleEBoolean= ruleEBoolean EOF )
// InternalQcm.g:416:2: iv_ruleEBoolean= ruleEBoolean EOF
{
newCompositeNode(grammarAccess.getEBooleanRule());
pushFollow(FOLLOW_1);
iv_ruleEBoolean=ruleEBoolean();
state._fsp--;
current =iv_ruleEBoolean.getText();
match(input,EOF,FOLLOW_2);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
} | [
"public final EObject entryRuleBooleanExp() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBooleanExp = null;\n\n\n try {\n // InternalDOcl.g:3244:51: (iv_ruleBooleanExp= ruleBooleanExp EOF )\n // InternalDOcl.g:3245:2: iv_ruleBooleanExp= ruleBo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Changes Hero's state to armed and symbol to A. | public void armed()
{
this.armed=true;
this.symbol='A';
} | [
"public Hero() {\n\t\tsuper();\n\t\tthis.symbol = 'H';\n\t}",
"public void makeHero()\r\n { \r\n maxHealth = 100;\r\n health = maxHealth;\r\n }",
"public void setHero(String name){\n if (currentHero != null) {\n currentHero.disableListeners();\n }\n for(Abst... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper function to update the Event record fluctuating boolean with a comparison of the defined threshold and the absolute value of the difference between current temp and the Event recorded temp | public void calculateFluctuating(DecimalFormat df, Double threshold, Double thisTemp) {
if (threshold != null && threshold.compareTo(Math.abs(Double.valueOf(df.format(thisTemp - this.temperature)))) < 0) {
this.fluctuating = false;
}
} | [
"private void threshold_is_reached() {\n threshold = 1.0;\n\n //Given there are 2 inputs\n multiplicity = 2;\n setup(multiplicity);\n\n //Given inputs are 0.5 and 0.5\n ins.get(0).setSignal(Signal.of(0.5));\n ins.get(1).setSignal(Signal.of(0.500000000000001));\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the first newsletter in the ordered set where issueNumber = &63;. | public Newsletter findByIssueNumber_First(
long issueNumber, OrderByComparator<Newsletter> orderByComparator)
throws NoSuchNewsletterException; | [
"public Newsletter fetchByIssueNumber_First(\n\t\tlong issueNumber, OrderByComparator<Newsletter> orderByComparator);",
"public java.util.List<Newsletter> findByIssueNumber(\n\t\tlong issueNumber, int start, int end);",
"public java.util.List<Newsletter> findByIssueNumber(\n\t\tlong issueNumber, int start, int ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates user from result set db | private User createUser(ResultSet rs) throws SQLException {
User user = null;
if(rs.getInt("IS_ADMIN") == 1) {
user = new Administrator(
rs.getString("FIRST_NAME"),
rs.getString("LAST_NAME"),
rs.getString("ADDRESS"),
rs.getString("ZIP_CODE"),
rs.getString("STATE"),
rs.getString("USERNAME"),
rs.getString("PASSWORD"),
rs.getString("EMAIL"),
rs.getString("SSN")
);
} else {
user = new Customer(
rs.getString("FIRST_NAME"),
rs.getString("LAST_NAME"),
rs.getString("ADDRESS"),
rs.getString("ZIP_CODE"),
rs.getString("STATE"),
rs.getString("USERNAME"),
rs.getString("PASSWORD"),
rs.getString("EMAIL"),
rs.getString("SSN")
);
}
return user;
} | [
"private MiniUser createUserFromResultSet(ResultSet rs) {\n MiniUser creator = null;\n try {\n while (rs.next()) {\n int id = rs.getInt(\"ID\");\n String firstName = rs.getString(\"first_name\");\n String lastName = rs.getString(\"last_name\");\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Matches given tokens ans returns the corresponding score. | double getScore(IToken tk1, IToken tk2); | [
"public List<StringScore> scoreTokens(List<String> tokens) {\n final String[] postags = posAnalyzer.tagSentence(tokens.toArray(new String[0]));\n final List<StringScore> newScores = new ArrayList<>();\n for (int i = 0; i < tokens.size(); i++) {\n String token = tokens.get(i);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implements the operation to stop a virtual machine. Stop virtual machine. | void stop(String resourceGroupName, String virtualMachineName); | [
"void stop(String resourceGroupName, String virtualMachineName, StopVirtualMachineOptions body);",
"void stop(String resourceGroupName, String virtualMachineName, StopVirtualMachineOptions body, Context context);",
"void stop(TestContext testContext, VirtualResource virtualResource,\n VirtualResource... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the box the current square belongs to | public Box getBox() {
//we compute the coordinates of the top left square
//of the box by integer division
return new Box((rowIndex/3)*3, (colIndex/3)*3);
} | [
"public Box getBox(Position position)\n {\n return boxes[position.getX()][position.getY()];\n }",
"Square getCurrentPosition();",
"private Box findBox(int x) {\n\t\tArrayList<BoxLogic> local = CurrentState.getCurrentListOfBoxLogic();\n\t\treturn local.get(x - 1).getBox();\n\t}",
"@Override\n publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the gdi attribute. | public void setGdi(boolean value); | [
"public void setG(int gValue){\n\t\tthis.g=gValue;\n\t}",
"public void setGi(java.math.BigInteger gi)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Specifies that the keys may not appear more than once. All variants of this method operate on keys postpercent decoding. | public QueryClassifierBuilder mayNotRepeatKeys(String... keys) {
return mayNotRepeatKeys(Arrays.asList(keys));
} | [
"@Test\n\tpublic void setOfKeysIsRejectedIfAnyEntryIsMissing() {\n\t\tfor (String keyToRemove : serializedMap.keySet()) {\n\t\t\tSet<String> keysWithHole = new HashSet<String>(serializedMap.keySet());\n\t\t\tkeysWithHole.remove(keyToRemove);\n\n\t\t\tassertFalse(\"A keyset without \" + keyToRemove + \" must be refu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new JTextField with a specified columns count. | public static JTextField createTextField(int columns) {
final JTextField textField = new JTextField(columns);
initFormWidget(textField);
initTextField(textField);
return textField;
} | [
"public JTextField(int columns) {\n this(null, null, columns);\n }",
"public static JTextField createTextField() {\n return createTextField(20);\n }",
"public void createTextFields ()\n\t{\n\t\t// textField - Instance of JTextField \n\t\ttextField = new JTextField (); \n\t\ttextField.setBoun... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an ITypes object with the sum between an ITypes object's parameter and an Int object's parameter. As default returns a NullType object; | @Override
public ITypes addingAnInt(Int i) {
return FlyweightNull.getFNull().createNull();
} | [
"@Override\n public ITypes sum(ITypes n) {\n return FlyweightNull.getFNull().createNull();\n }",
"@Override\n public IntType addToInt(IntType IntType) {\n int int1 = IntType.getValue();\n int int2 = this.asInt().getValue();\n return TypeFactory.getIntType(int1 + int2);\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value to productTypeId field. | public void setProductTypeId(long productTypeId) {
this.productTypeId = productTypeId;
} | [
"public void setProductTypeId(final Integer productTypeId) {\n this.productTypeId = productTypeId;\n }",
"public void setProductTypeId(Integer productTypeId) {\r\n this.productTypeId = productTypeId;\r\n }",
"public void setProductTypeId(long productTypeId) {\n _app.setProductTypeId(p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set language suggestion list | void setLanguagesSuggestion(ArrayList<String> languages) {
MultiWordSuggestOracle oracle = (MultiWordSuggestOracle) languagesBox.getSuggestOracle();
for(int i = 0; i < languages.size(); i++){
oracle.add(languages.get(i));
}
} | [
"void setCountrySuggestion(ArrayList<String> countries){\n\t\tMultiWordSuggestOracle oracle = (MultiWordSuggestOracle) countriesBox.getSuggestOracle();\n\t\t\n\t\tfor(int i = 0; i < countries.size(); i++){\n\t\t\toracle.add(countries.get(i));\n\t\t}\n\t}",
"private void setLanguages(){\n Set<String>langs= ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a Terrain from a node in a map's ini file | public Terrain(Preferences node) {
background = new Sprite("terrains/"+node.get("background", "grass.png"));
encounterRate = Integer.valueOf(node.get("rate", "10")).intValue();
formations = new ArrayList<Formation>();
try {
for (String s : node.keys())
if (s.startsWith("formation"))
{
Formation f = new Formation();
for (String e : node.get(s, s).split(","))
f.add(e);
if (f.size() > 0)
formations.add(f);
}
} catch (BackingStoreException e) {
e.printStackTrace();
}
} | [
"public static Terrain load(File mapFile) throws FileNotFoundException {\n\n Reader in = new FileReader(mapFile);\n JSONTokener jtk = new JSONTokener(in);\n JSONObject jsonTerrain = new JSONObject(jtk);\n\n int width = jsonTerrain.getInt(\"width\");\n int depth = jsonTerrain.getIn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Configures current session settings for batch update mode. | @Override
public void setBatchUpdateMode(boolean batchMode)
{
SessionFactory sessionFactory = persistencyResources.getSessionFactory();
Session currentSession = sessionFactory.getCurrentSession();
HibernateUtils.setBatchUpdateMode(currentSession, batchMode);
} | [
"public void setBatch(Boolean batch) {\n\t\tthis.batch = batch;\n\t\tthis.handleConfig(\"batch\", batch);\n\t}",
"public void \n setBatchMode()\n {\n pIsBatchMode = true; \n }",
"protected void resetSessionOptions() {\n putSessionCustomOpts(KbartCustomOptions.getDefaultOptions());\n }",
"private vo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the amount of time the renderer waits for loading an external image before giving up and examining the other images in the Graphic object | public static long getImageLoadingTimeout() {
return ImageLoader.getTimeout();
} | [
"private static void waitOnImage(Image image)\n {\n ImageIcon icon = new ImageIcon(image);\n while (icon.getImageLoadStatus() == MediaTracker.LOADING)\n {\n Thread.yield();\n }\n if (icon.getImageLoadStatus() != MediaTracker.COMPLETE)\n {\n LOGGER.l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If you are the Owner, deletes the space. | public void deleteSpace(){
//TODO: need to pop-up a confirmation dialogue
/*try {
this.muc.destroy(null, null);
} catch (XMPPException e) {
Log.d(TAG, "Unable to destroy Space!");
}*/
Collection<User> users = this.space.getAllParticipants().values();
for (User u : users) {
try {
if(!u.getUsername().equals(MainApplication.user_primary.getUsername()))
this.space.getKickoutController().kickoutUser(u, Network.DEFAULT_KICKOUT);
} catch (XMPPException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
this.space.getMUC().leave();
//end experiment
if(space.equals(Space.getMainSpace())){
Space.setMainSpace(null);
}
} | [
"protected void removeFromSpace() {\r\n // assert spaceId == null: \"This geom is already not in any Space\";\r\n\r\n Ode.dSpaceRemove( spaceId, geomId );\r\n spaceId = Ode.getPARENTSPACEID_ZERO();\r\n this.space = null;\r\n\r\n }",
"@Override\n public void delete(Owner owner) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the existing available IP address. | K8sIpam removeAvailableIp(String ipamId); | [
"public void unsetIPAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(IPADDRESS$8, 0);\n }\n }",
"public void deregisterIPAddress(Inet4Address address) {\n\t\tusedAddresses.remove(address);\n\t}",
"public void deleteIP(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field718' field | public java.lang.CharSequence getField718() {
return field718;
} | [
"public java.lang.CharSequence getField718() {\n return field718;\n }",
"java.lang.String getField1371();",
"java.lang.String getField1700();",
"java.lang.String getField1978();",
"public java.lang.CharSequence getField7() {\n return field7;\n }",
"java.lang.String getField1571();",
"java.lang.S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
merchant resource for the store | @ApiModelProperty(required = true, value = "merchant resource for the store")
@JsonProperty("merchant")
public EntityInfo getMerchant() {
return merchant;
} | [
"public String getMerchant() {\n return merchant;\n }",
"public Long getMerchantStoreId() {\n return merchantStoreId;\n }",
"public String getMerchantReference() {\n return this.merchantReference;\n }",
"public String getMerchantNo();",
"@Valid\n @JsonProperty(\"store\")\n publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests wether the given file only contains ASCII characters if interpreted by reading bytes (16 bit). This does not mean that the file is really an ASCII text file. It just might be viewed with an editor showing only valid ASCII characters. | public static boolean isAllASCII(final File f) throws IOException {
return FileUtil.isAllASCII(new FileInputStream(f));
} | [
"public static boolean isAllASCII(final InputStream in) throws IOException {\n boolean ret = true;\n int read = -1;\n do {\n read = in.read();\n if (read > 0x7F) {\n ret = false;\n break;\n }\n\n } while (read != -1);\n return ret;\n }",
"public static boolean isAllAsc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Save the given template to to S3. | SourceBundle saveTempalteToS3(String stackName, String tempalte) {
try {
String bucket = configuration.getConfigurationBucket();
String key = "templates/" + stackName + "-" + UUID.randomUUID() + ".json";
byte[] bytes = tempalte.getBytes("UTF-8");
ByteArrayInputStream input = new ByteArrayInputStream(bytes);
ObjectMetadata metadata = new ObjectMetadata();
metadata.setContentLength(bytes.length);
s3Client.putObject(new PutObjectRequest(bucket, key, input, metadata));
return new SourceBundle(bucket, key);
} catch (IOException e) {
throw new RuntimeException(e);
}
} | [
"public FXProjectTemplateSaver(FXProjectTemplates template){\n this.toSave = template;\n }",
"public PSTemplate save(PSTemplate template, String siteId) throws PSDataServiceException;",
"public PSTemplate save(PSTemplate template, String siteId, String pageId) throws PSDataServiceException;",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set accessor for persistent attribute: id_rango | public void setId_rango(java.lang.Integer newId_rango); | [
"public java.lang.Integer getId_rango();",
"public void setId(int idNuevo)\n { \n this.id = idNuevo;\n }",
"public void setId() {\n this.id = id;\r\n }",
"public void setId(int newId) { \n id = newId; \n }",
"String getIdAttribute();",
"private void setId()\n {\n\tth... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the biDirectional value for this TextStyle. | public com.cognos.developer.schemas.raas.Returns__by__Order__Method___x002d__Prompted__Chart.TextStyleBiDirectional getBiDirectional() {
return biDirectional;
} | [
"public TextStyle2D getTextStyle() {\r\n return textStyle;\r\n }",
"JavaValue getBidiDir();",
"TextDirection textDirection();",
"public void setBiDirectional(com.cognos.developer.schemas.raas.Returns__by__Order__Method___x002d__Prompted__Chart.TextStyleBiDirectional biDirectional) {\r\n this.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the attachment type. | public AttachmentType getAttachmentType() {
return attachmentType;
} | [
"public String getAttachmentType() {\n return attachmentType;\n }",
"public @Nullable String getAttachmentType() {\n return attachmentType;\n }",
"@Schema(description = \"Attachment type such as video, picture\")\r\n\r\n\tpublic String getAttachmentType() {\r\n\t\treturn attachmentType;\r\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets array of all "organisationUnitLevel" element | void setOrganisationUnitLevelArray(org.dhis2.ns.schema.dxf2.OrganisationUnitLevelDocument.OrganisationUnitLevel[] organisationUnitLevelArray); | [
"void setOrganisationUnitLevelArray(int i, org.dhis2.ns.schema.dxf2.OrganisationUnitLevelDocument.OrganisationUnitLevel organisationUnitLevel);",
"void setOrganisationUnitLevels(org.dhis2.ns.schema.dxf2.OrganisationUnitLevelsDocument.OrganisationUnitLevels organisationUnitLevels);",
"org.dhis2.ns.schema.dxf2.Or... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves the Dead Peer Detection(DPD) delay in seconds Use "second" because smaller unit does not make sense to a DPD delay. | @SuppressLint("MethodNameUnits")
@IntRange(from = IKE_DPD_DELAY_SEC_MIN, to = IKE_DPD_DELAY_SEC_MAX)
public int getDpdDelaySeconds() {
return mDpdDelaySec;
} | [
"public String getdDelay() {\n return dDelay;\n }",
"public int getDelayTime()\n\t{\n\t\treturn delayTime;\n\t}",
"public int getDelay() \r\n\t{\r\n\t\treturn delay;\r\n\t}",
"public float getDelay() {\n\t\treturn delay;\n\t}",
"public Stopwatch getDelay() {\n\t\treturn delay;\n\t}",
"public int... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find xpath elements with 'textarea', 'input' | public WebElement getXpathElements(String XPlocator, String XPtype) {
XPtype = XPtype.toLowerCase();
if (XPtype.equals("textarea")) {
System.out.println("Element found with textarea: " + XPlocator);
return this.driver.findElement(By.xpath(XPlocator));
}
else if (XPtype.equals("input")) {
System.out.println("Element found with input: " + XPlocator);
return this.driver.findElement(By.xpath(XPlocator));
}
// add more locator types here
else
System.out.println("Locator type not supported");
return null;
} | [
"public SelenideElement searchByUser() {\n return formPageRoot().$(By.xpath(\"//input[@type='text']\"));\n }",
"public void enterTextInToInput(String xpath, String text) {\r\n WebElement input = webDriver.findElement(By.xpath(xpath));\r\n try {\r\n input.clear();\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test creating record with wrong distance | @Test(expectedExceptions = DataAccessException.class)
public void testCreateWrongDistance() {
ActivityRecord record = new ActivityRecord();
record.setActivity(sportActivity);
record.setDistance(-5);
record.setTime(Long.MIN_VALUE);
record.setUser(user);
recordDao.create(record);
} | [
"@Test(expectedExceptions = DataAccessException.class)\r\n public void testUpdateWrongDistance() {\r\n ActivityRecord record = setActivityRecord();\r\n recordDao.create(record);\r\n assertNotNull(recordDao.findActivityRecord(record.getId()));\r\n\r\n record.setDistance(-5);\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |