query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
/ Like safe_vgetc(), but loop to handle K_IGNORE. Also ignore scrollbar events. /private | static int plain_vgetc()
{
int c;
do
{
c = safe_vgetc();
} while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
return c;
} | [
"static int safe_vgetc()\n {\n int c = vgetc();\n if (c == NUL)\n c = get_keystroke();\n return c;\n }",
"static int vgetc()\n {\n int c;\n\n /*\n * If a character was put back with vungetc, it was already processed.\n * Return it directly.\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests handling of errors in clearProperty(). | @Test
public void testClearPropertyError() throws ConfigurationException {
setUpErrorConfig().clearProperty("key1");
checkErrorListener(ConfigurationErrorEvent.WRITE, ConfigurationEvent.CLEAR_PROPERTY, "key1", null);
} | [
"boolean clearProperty(String tcProperty);",
"@Test\n public void givenMongoExceptionWhenClearThenReturnFalse() {\n doReturn(mongoCollection).when(state).getMongoCollection();\n doThrow(new MongoException(\"failed\")).when(mongoCollection).drop();\n assertThat(state.clear(), is(equalTo(fal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Collects a list of native rules that are available in BUILD files as top level functions and in BZL files as methods of the native package. | private List<RuleDocumentation> collectNativeRules(
String productName, String provider, List<String> inputDirs, String blackList)
throws NoSuchMethodException, InvocationTargetException, IllegalAccessException,
BuildEncyclopediaDocException, ClassNotFoundException, IOException {
ProtoFileBuil... | [
"public List<RuleDocumentation> getNativeRules() {\n return nativeRules;\n }",
"public LinkedHashMap<String, ArrayList<Rule>> getAllLanguageRules () {\r\n \t\treturn langRules;\r\n \t}",
"@Test\n public void javaInfo_setNativeLibraries() throws Exception {\n ruleBuilder().build();\n scratch.file(\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleXOtherOperatorExpression" $ANTLR start "ruleXOtherOperatorExpression" InternalDsl.g:4634:1: ruleXOtherOperatorExpression returns [EObject current=null] : (this_XAdditiveExpression_0= ruleXAdditiveExpression ( ( ( ( () ( ( ruleOpOther ) ) ) )=> ( () ( ( ruleOpOther ) ) ) ) ( (lv_rightOperand_3_0= ru... | public final EObject ruleXOtherOperatorExpression() throws RecognitionException {
EObject current = null;
EObject this_XAdditiveExpression_0 = null;
EObject lv_rightOperand_3_0 = null;
enterRule();
try {
// InternalDsl.g:4637:28: ( (this_XAdditiveEx... | [
"public final EObject ruleXOtherOperatorExpression() throws RecognitionException {\n EObject current = null;\n\n EObject this_XAdditiveExpression_0 = null;\n\n EObject lv_rightOperand_3_0 = null;\n\n\n enterRule(); \n \n try {\n // ../org.xtext.scripting/src... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the list of base amounts related to the given products in the given price lists. | public Collection<BaseAmount> getBaseAmounts(final Collection<Product> products,
final List<String> plGuids, final BaseAmountDataSource baseAmountDataSource) {
return getBaseAmounts(plGuids, getBaseAmountObjectGuids(products), baseAmountDataSource);
} | [
"public Collection<BaseAmount> getBaseAmounts(final Product product, final List<String> plGuids, final BaseAmountDataSource baseAmountDataSource) {\n\t\treturn getBaseAmounts(plGuids, getBaseAmountObjectGuids(product), baseAmountDataSource);\n\t}",
"Collection <BaseAmountDTO> getBaseAmounts(String priceListGuid, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.kitty_protos.W2G_SendKitty w2gSendKitty = 2; | boolean hasW2GSendKitty(); | [
"kitty_protos.WorldMessageOuterClass.W2G_SendKitty getW2GSendKitty();",
"private void setW2GSendKitty(kitty_protos.WorldMessageOuterClass.W2G_SendKitty value) {\n if (value == null) {\n throw new NullPointerException();\n }\n w2GSendKitty_ = value;\n \n }",
"kitty_protos.WorldMes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this test ensures setting one pixel doen't affect another pixel and not other line. | @Test
public void correctPixelIsTransparent() {
final int width = 90;
final int height = 30;
for (int ySet = 0; ySet < height; ySet++) {
for (int xSet = 0; xSet < width; xSet++) {
final Dimension dimension = new Dimension(width, height);
final Col... | [
"@Test\n public void setPixelTest() {\n\tPicture a = new PictureImpl(10, 15);\n\tCoordinate c1 = new Coordinate(5, 7);\n\tCoordinate c2 = new Coordinate(8, 11);\n\tPixel p1 = new ColorPixel(0.4, 0.3, 0.6);\n\tPixel p2 = new GrayPixel(0.7);\n\n\ta.setPixel(c1, p1);\n\ta.setPixel(c2, p2);\n\n\tassertEquals(p1, a.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get maximum number of free exclusive executors to keep | public int getMaxFreeExclusiveExecutorsCount() {
return mMaxFreeExclusiveExecutorsCount;
} | [
"public int getFreeExclusiveExecutorsCount() {\n mExecuteLock.lock();\n try {\n return mFreeExecutors.size();\n\n } finally {\n mExecuteLock.unlock();\n }\n }",
"int getExecutorLargestPoolSize();",
"Integer getMaxConcurrentJobInstanceCount();",
"int getExec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the auto lock time, min 60 seconds, max 7200 seconds (2 hours) | public void setAutoLockTime(int seconds)
{
if(seconds >= 59 && seconds <= 7200)
m_iAutoLockTime = seconds;
} | [
"void setLockTimeout(int seconds);",
"public void setTime(){\n \tDatabaseManager.getDBM().setLockedTime(cal); \n }",
"public void setAutolocktime(String autolocktime) {\n this.autolocktime = autolocktime == null ? null : autolocktime.trim();\n }",
"public void setLockTime(Date value) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The request builder for the DeviceComplianceScriptDeviceState | public DeviceComplianceScriptDeviceStateRequestBuilder(final String requestUrl, final IBaseClient client, final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
super(requestUrl, client, requestOptions);
} | [
"@Nullable\n protected UserExperienceAnalyticsDeviceScopeTriggerDeviceScopeActionParameterSetBuilder(){}",
"DeviceState createDeviceState();",
"public DeviceHealthScriptDeviceStateCollectionPage(@Nonnull final DeviceHealthScriptDeviceStateCollectionResponse response, @Nonnull final DeviceHealthScriptDevi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prepares an airline sql statement to insert an airline into the database | private static PreparedStatement prepareInsertAirlineSql(DataPoint currentPoint, PreparedStatement preparedStatement, Connection currentConnection) {
AirlinePoint airline = (AirlinePoint) currentPoint;
int id = airline.getAirlineID();
String name = airline.getAirlineName();
String alias ... | [
"private static String createAirlineTable() {\n String sql = \"CREATE TABLE AIRLINE \" +\n \"(ID INTEGER PRIMARY KEY NOT NULL constraint invalid_id check (ID > 0),\" +\n \" NAME VARCHAR(40) NOT NULL,\" +\n \" ALIAS VARCHAR(40),\" +\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses the given decimal string into a decimal value | public static double parseDecimalString(String decString) throws IllegalNumberFormat {
try {
return Double.parseDouble(decString);
} catch (NumberFormatException e) {
throw new IllegalNumberFormat(decString);
}
} | [
"private void parseDecimalBAT(String str) throws NumberFormatException\n {\n // The value.\n long theValue;\n\n // Try to parse the string as a decimal long.\n try {\n theValue = Long.parseLong(str);\n } catch (NumberFormatException e) {\n throw new Number... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter of the player's private objective | public void setPrivateObjective(PrivateObjective myPrivateObjective) {
this.myPrivateObjective = myPrivateObjective;
} | [
"public void setObjective(String objective) {\r\n\t\tthis.objective = objective;\r\n\t}",
"@Override\n\tpublic void setPoint(ObstacleBase o, Player player) {\n\t\t\tint point = o.getValue() * DESTROY;\n\t\t\tplayer.setScore(player.getScore() + point);\n\t}",
"public void setObjective(String s) {\r\n\t\tthis.cur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads the request headers. | static Headers readHeaders(InputStream in) throws IOException {
Headers headers = new Headers();
String line;
while (!(line = readLine(in, false)).isEmpty()) {
String[] parts = line.split(":", 2);
if (parts.length != 2) {
throw new WebException(StatusCode.BAD_REQUEST, "invalid request header: " + line);... | [
"public Header[] getRequestHeaders();",
"public HttpHeaders getRequestHeaders() {\n\t\treturn this.request.getHeaders();\n\t}",
"public Map<String, String> getRequestHeaders();",
"Map<String, String> getHeaders();",
"protected void readHeaders(Object connection) throws IOException\n\t{\n\t}",
"protected v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get Instance method to return the Instance of StockOrderManager | public static StockOrderManager getInstance()
{
/*
* if StockOrderManager instance is null,then create the instance of
* StockOrderManager.
*/
if (stockOrderManager == null)
{
// Instance will be created only first time of this method calls.
stockOrderManager = new StockOrderManager();
}
retur... | [
"public static ZOrderManager getInstance () {\n if (instance == null) {\n instance = new ZOrderManager();\n }\n return instance;\n }",
"public static SalesOrderDataSingleton getInstance()\n {\n // Return the instance\n return instance;\n }",
"public static ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get type index of the tile | public int getIndex() {
char typeLetter = tileType.charAt(tileType.length() - 5);
//If index is greater than 5 then return a random index number within 5
if (typeLetter - 'A' > 5) {
return (int) (Math.random() + 6);
}
//return index number
return typeLe... | [
"public int tileType(){\n\t\treturn this.type;\n\t}",
"private int findIndexContainingType(TileType type) {\n for (int x = 0; x < getWidth(); x++) {\n for (int y = 0; y < getHeight(); y++) {\n if (getTileType(x, y) == type) {\n return twoDimIndexToOneDimIndex(x,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new Proxy uri with a value. | public ProxyUri(String s) {
this();
value = s;
} | [
"public ProxyUri() {\n this.number = 35;\n this.formatter = StringFormatter.getInstance();\n this.minSize = 1;\n this.maxSize = 1034;\n }",
"URI createURI();",
"void setProxyUri(String uri);",
"private UriValues(){}",
"public URI() {\n }",
"public UriBuilder(final URI uri)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column category.code_alt_category | public String getCodeAltCategory() {
return codeAltCategory;
} | [
"public void setCodeAltCategory(String codeAltCategory) {\r\n this.codeAltCategory = codeAltCategory == null ? null : codeAltCategory.trim();\r\n }",
"public String getCodeCategory() {\r\n return codeCategory;\r\n }",
"public String getCategoryCode() {\r\n return categoryCode;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
NB: dir must be a key of FOLDERTYPES | public static String getFolderType(String dir) {
return FOLDERTYPES.get(dir);
} | [
"public void setDir(String dir)\r\n {\r\n this.dir = dir;\r\n }",
"public folderize() {\n }",
"private String searchPath(Directory dir, String list, String name, Object type) {\n Iterator<Directory> allSubDir = dir.getSubdirectories();\n list += appendItems(dir, name, type);\n // Base C... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True if has "titleTypeCode" element | public boolean isSetTitleTypeCode()
{
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(TITLETYPECODE$0) != 0;
}
} | [
"boolean isNilTitle();",
"boolean isSetTypeCode();",
"public java.lang.String getTitleTypeCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Animate CardView background between colors. | public static void animateBetweenColors(final CardView viewToAnimateItBackground, final int colorFrom, final int colorTo, final long durationInMs) {
ValueAnimator colorAnimation = ValueAnimator.ofObject(new ArgbEvaluator(), colorFrom, colorTo);
colorAnimation.addUpdateListener(animator -> viewToAnimateI... | [
"private void animateBackgroundColor(int color) {\n ObjectAnimator colorAnim = ObjectAnimator.ofInt(mRightContainer, \"backgroundColor\",\n mRulerView.getAccentColor(), color);\n colorAnim.setEvaluator(new ArgbEvaluator());\n colorAnim.setDuration(RulerView.ANIMATION_DURATION);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If the current data trace file is not yet set (and no_dtrace is not true), then set it. The value of the DTRACEFILE environment variable is used; if that environment variable is not set, then the argument to this method is used instead. | public static void setDtraceMaybe(String default_filename) {
// System.out.println("setDtraceMaybe(" + default_filename + "); old = " + dtrace);
if ((dtrace == null) && !no_dtrace) {
// Jeremy used "daikon.dtrace.filename".
String filename = System.getProperty("DTRACEFILE", default_filename);
... | [
"@VisibleForTesting\n void maybeSetTraceParameter() {\n String traceParameter = Config.getTraceParameter();\n if (Strings.emptyToNull(traceParameter) != null) {\n setTraceParameter(traceParameter);\n }\n }",
"public static void setTraceFilename(String traceFilename) {\n UIManager.put(Ra... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
UPDATE tourdatabase.empresa SET id = 7, nombre = 'ctyyuui', email = 'rdtfgy', telefono = 567, nit = 098, username = 'nm', password = 'oty', nodecuenta = 7 WHERE id = 1; | public int updateEmpresaRows(int p_iId, String p_strNombre, String p_strEmail, int p_iTelefono, String p_strNit,
String p_strUsername, String p_strPassword, String p_strNodeCuenta)
{
DatabaseX database = getDatabase();
String strSql = "UPDATE tourdatabase.empresa SET nombre = '"+p_strNo... | [
"public void alterar(int id) {\r\n\t\ttry {\r\n\t\t\tbd.getConnection();\r\n\t\t\tString nome, apelido, mascote;\r\n\t\t\tsmt = bd.conn.createStatement();\r\n\t\t\t\r\n\t\t\tutil.p2(\"Nome da Equipe: \"); \r\n\t\t\tnome = dados.nextLine();\r\n\t\t\t\t\t\r\n\t\t\tutil.p2(\"Apelido: \"); \r\n\t\t\tapelido = dados.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column TRANSACTION_DETAIL.accountOrigin | public String getAccountOrigin() {
return accountOrigin;
} | [
"public void setAccountOrigin(String accountOrigin) {\n this.accountOrigin = accountOrigin;\n }",
"public String getBankOrigin() {\n return bankOrigin;\n }",
"public Long getOriginAirportId() {\n return origin.getId();\n }",
"public java.lang.String getOrigin() {\n\t\treturn _per... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Hash map containing text and numbers in enumeration. heroinePlayerEnum = Value to associate. heroinePlayerKey = Key associated with texture region used with asset manager and textureRegions hash map. | private HeroinePlayerEnum(int heroinePlayerEnum, String heroinePlayerKey)
{
// The constructor sets the values for each enumeration.
this.heroinePlayerEnum = heroinePlayerEnum;
this.heroinePlayerKey = heroinePlayerKey;
} | [
"public static HeroinePlayerEnum valueOf(int heroinePlayer) \n {\n // The function converts the passed numeric value to its corresponding text.\n return (HeroinePlayerEnum) heroinePlayerMap.get(heroinePlayer);\n }",
"public int getValue() \n {\n return heroine... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
We need to preview the event due to a GWT bug. | @Override
public void onBrowserEvent(com.google.gwt.user.client.Event event)
{
if (!previewEvent(event)) {
return;
}
adjuster.onBeforeBrowserEvent((Event) event);
super.onBrowserEvent(event);
adjuster.onBrowserEvent((Event) event);
} | [
"private static native boolean previewEventImpl() /*-{\n var isCancelled = false; \n for (var i = 0; i < $wnd.__gwt_globalEventArray.length; i++) {\n if (!$wnd.__gwt_globalEventArray[i]()) {\n isCancelled = true;\n }\n }\n return !isCancelled;\n }-*/;",
"protected void previewStarted... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
int32 kittyLevel = 2; | private void setKittyLevel(int value) {
kittyLevel_ = value;
} | [
"int getKittyLevel();",
"@java.lang.Override\n public int getKittyLevel() {\n return kittyLevel_;\n }",
"int getProtectionLevelValue();",
"public int getLevelCap();",
"int getXlCandyMinPlayerLevel();",
"long getLevel();",
"int getWantedLevel();",
"int getRAIDbLevel();",
"public int getBon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle the removal of a workspace in the repository. | protected void removeWorkspace( String workspaceName ) {
} | [
"void workspaceRemoved( String workspaceName );",
"public void deleteWorkspace(String name);",
"void deleteRegistryModel(String registryName, String workspace);",
"@RequirePOST\n public HttpResponse doDoWipeOutWorkspace() throws IOException, ServletException, InterruptedException {\n checkPermission... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Draws a filled rectangle that is aligned along the image axis inside the image. All bands are filled with the same value. | public static void fillRectangle(InterleavedI16 image, int value, int x0, int y0, int width, int height) {
// concurrent isn't faster in benchmark results
// if( runConcurrent(image) ) {
// ImplImageMiscOps_MT.fillRectangle(image, value, x0, y0, width, height);
// } else {
ImplImageMiscOps.fillRectangle(image, v... | [
"public void fillRect(int x, int y, int width, int height);",
"public static void fillRectangle(InterleavedF32 image, float value, int x0, int y0, int width, int height) {\n//\t\tconcurrent isn't faster in benchmark results\n//\t\tif( runConcurrent(image) ) {\n//\t\t\tImplImageMiscOps_MT.fillRectangle(image, valu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo do facade que acessa o getCommentAuthor de Gerenciado de Comentario. | public String getCommentAuthor(String idComentario) throws FileNotFoundException, ArgumentInvalidException, PersistenceException{
return gerenteComentario.getCommentAuthor(idComentario);
} | [
"Reference getAuthor();",
"public Long getCommentAuthor() {\n return commentAuthor;\n }",
"@Override\n\tpublic java.lang.String getAuthor() {\n\t\treturn _macroscopeDocument.getAuthor();\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public entity.User getAuthor();",
"public String getAuthor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the expression for the surface to the given expression. If expression uses more than two intervals, just two of the intervals will be used as the parameters. | public void setExpression( IntervalExpression expression ) {
super.setExpression(expression);
} | [
"public void setExpression(Object expression);",
"public void setExpression(Expression expressionIn) {\n this.expression = expressionIn;\n }",
"private void setExpression() {\r\n\r\n //*******************************SHOULD EDIT?****************************************\r\n Element firstEl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the attribute value for DepartmentId, using the alias name DepartmentId. | public Integer getDepartmentId() {
return (Integer)getAttributeInternal(DEPARTMENTID);
} | [
"public Number getDepartmentId() {\r\n return (Number)getAttributeInternal(DEPARTMENTID);\r\n }",
"public String getDepartmentId()\n {\n return get(DEPARTMENTID);\n }",
"@Override\n public java.lang.String getDepartmentId() {\n return _entityDepartment.getDepartmentId();\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Mapped the service "filter post by Category" on the page to method | public void filterPostsByCategor(String category){
} | [
"@RequestMapping(method = RequestMethod.GET, value = \"/posts/{categoryId}\")\n public String showPostsByCategoryPage(@PathVariable(\"categoryId\") String categoryId, ModelMap modelMap) {\n List<Post> posts = postService.getByAttributeId(Long.parseLong(categoryId), \"category\", \"categoryId\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the value of idVenta | public String getIdVenta() {
return idVenta;
} | [
"public int getIdVenta() {\r\n return idVenta;\r\n }",
"public int getIdDetalle_Ventaf() {\n return idDetalle_Ventaf;\n }",
"public String getIdVehiculo() {\n return this.idVehiculo;\n }",
"public void setIdVenta(Integer idVenta) {\r\n this.idVenta = idVenta;\r\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of persistentSituation method, of class SituationEventDAOImp. | @Test
public void testPersistentSituation2(){
System.out.println("persistentSituation");
SituationEvents objSituationEvents = null;
SituationEventDAOImp instance = new SituationEventDAOImp();
instance.persistentSituation(objSituationEvents);
// TODO review the generated test code and remove the de... | [
"@Test\n public void testPersistentSituation(){\n System.out.println(\"persistentSituation\");\n SituationEvents objSituationEvents = null;\n SituationEventDAOImp instance = new SituationEventDAOImp();\n instance.persistentSituation(objSituationEvents);\n // TODO review the generated test code and r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetch a title for user to comment, rate or view | @RequestMapping(value = "/title/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public UserTitleUpdateDTO fetchTitleForViewing(@PathVariable("id") String titleId, HttpServletRequest request) {
try {
UserTitleUpdateDTO dto = new UserTitleUpdateDTO();
HttpSession session = request... | [
"public String getUserTitle() {\n\t\treturn userTitle;\n\t}",
"public Todo fetchByURLTitle(String urlTitle);",
"String getTitle();",
"private String getReviewer(){\n try{\n wholeUserList= DataBase.readList(MovieGoner.class);\n for (MovieGoner a: wholeUserList){\n if... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set the approaching elevator | public void setApprocahingElevator(int id){
this.approachingElevator = id;
} | [
"public void setElevator(Elevator elevator){\r\n\t\tthis.elevator = elevator;\r\n\t}",
"public void setElevator(double elevator) {\n send(\"flight/elevator \", String.valueOf(elevator));\n }",
"public void manualElevator() {\r\n this.manualElevator(1);\r\n }",
"public void setElevator(doub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loop through the current set of House objects and collect those House objects where the pebbles attribute matches the parameter value. | public HouseSet filterPebbles(int value)
{
HouseSet result = new HouseSet();
for (House obj : this)
{
if (value == obj.getPebbles())
{
result.add(obj);
}
}
return result;
} | [
"public HouseSet filterHouseAcross(Object value)\n {\n ObjectSet neighbors = new ObjectSet();\n\n if (value instanceof Collection)\n {\n neighbors.addAll((Collection<?>) value);\n }\n else\n {\n neighbors.add(value);\n }\n \n HouseSet answer = new House... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a message protocol category enumerated value from a given string value. Example: MessageProtocolCategory.fromString("Batch"); | @SuppressWarnings("nls")
@Override
public Enum<? extends IMessageProtocolCategory> fromString(String value)
{
if (value == null || value.trim().length() == 0)
{
throw new InvalidArgumentException("Message protocol category cannot be null or empty!");
}
for (MessageProtocolCategory element : MessageProtoc... | [
"Enum<? extends ICommandGroupType> fromString(String value);",
"public static ChannelType fromString(String type) {\n\t\treturn stringToEnum.get(type);\n\t}",
"public static ItemCategoryEnum valueOf(int itemCategory) \n {\n // The function converts the passed numeric value to its corresponding... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deposit Collections, DataSets and MetadatFiles in an archive and retrieve them from the DCS archive. The interface is based on per deposit identifiers. A deposit identifier corresponds to a particular deposit attempt. | public interface ArchiveService {
/**
* For each pending deposit, check the archive and update the status.
*
* @throws ArchiveServiceException
*/
void pollArchive() throws ArchiveServiceException;
/**
* Deposit a collection into the archive. If the collection shares the same id as... | [
"String deposit(String deposit_id, DataItem ds)\n throws ArchiveServiceException;",
"String deposit(String deposit_id, MetadataFile mf)\n throws ArchiveServiceException;",
"public ArchiveSearchResult<DataItem> retrieveDataSet(String deposit_id)\n throws ArchiveServiceException;"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the methods (if any) that should be skipped during the performance test. | public List<String> getMethodsToSkip()
{
return methodsToSkip;
} | [
"public Set<String> getFailingTestMethodsBecauseOfInfiniteLoopGuard() {\n\t\tSet<String> methods = new HashSet<>();\n\t\tfor (ITestResult testResult : this) {\n\t\t\tmethods.addAll(testResult.getFailingByInfiniteLoopGuardTestMethods());\n\t\t}\n\t\treturn methods;\n\t}",
"public Set<String> getFailingTestMethods(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a LUIS Composite Entity from a JSON object | public LUISCompositeEntity(JSONObject JSONcompositeEntity) {
parentType = JSONcompositeEntity.optString("parentType");
value = JSONcompositeEntity.optString("value");
children = new ArrayList<>();
JSONArray JSONcompositeEntityChildren = JSONcompositeEntity.optJSONArray("children");
... | [
"public BusinessEntity(JSONObject jsonObject) {\n loadFromJSONObject(jsonObject);\n }",
"public BusinessEntity(String json) {\n this.loadFromJSONObject(getJSONObject(json));\n }",
"@Override\n public X fromJson(EntityManager em, JSONValue jsonValue) {\n final ErraiEntityManager eem = (Er... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Init method of all servlets inheriting from AbstractXMLServlets. It calls super.init(Config) as a first step. | @Override
public void init() throws ServletException {
super.init();
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("\n>>>> In init of AbstractXMLServlet <<<<");
}
initValues();
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("End of init AbstractXMLServlet")... | [
"public void init() throws ServletException {\n\t\tSystem.out.println(this.getServletName() + \" IS INSTANTIATED!\");\n\t\tsuper.init();\n\t}",
"public void init() throws ServletException {\r\n\r\n\t}",
"public void init() throws ServletException {\r\n\t\t// Put your code here\r\n\t}",
"public void init( Serv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Create a GATT connection with the reader. And detect the connected reader once service list is available. | private boolean connectReader() {
BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
if (bluetoothManager == null) {
Log.w(TAG, "Unable to initialize BluetoothManager.");
updateConnectionState(BluetoothReader.STATE_DISCONNECTED);
... | [
"public void connect() {\n\t\tif (bluetoothDevice != null) {\n\t\t\tif (mBluetoothGatt != null) {\n\t\t\t\tmBluetoothGatt.disconnect();\n\t\t\t\tmBluetoothGatt.close();\n\t\t\t\tmBluetoothGatt = null;\n\t\t\t}\n\t\t\tmBluetoothGatt = bluetoothDevice.connectGatt(this.context, false,\n\t\t\t\t\tgattCallback);\n\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves the Minor revision of the PSOC of the connected Engine. | public native int getPSOCMinorRev() throws DecoderException; | [
"public int getMinorVersion() {\n return minorVersion;\n }",
"public int getVerMinor() {\n return verMinor;\n }",
"public int getMinorVersion() {\n\t\treturn minor;\n\t}",
"public int getMinorVersionNumber() {\n\treturn minorVersionNumber ;\n }",
"public synchronized int getMinorVersi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prikazuje podatke o mjernim postajama. | public void prikaziPostaje() {
List<MjernaPostaja> filtriranePostaje = new ArrayList<MjernaPostaja>();
if (postajeFilterTextField.getText().isEmpty() == false) {
filtriranePostaje = listaPostaja.stream()
.filter(m -> m.getNaziv().toLowerCase().contains(postajeFilterTextField.getText().toLowerCase()))
... | [
"public void napuniFormuSaPodacima()\r\n\t{\r\n\t KlijentVO kl=this.glavni.getOznaceni();\r\n\t\t// prvo postavljanje osnovih podataka o klijentu\r\n\t\tif (kl.getSifra().intValue()!=DAO.NEPOSTOJECA_SIFRA)\r\n\t\t{\r\n\t\tthis.jlImePrezime.setText(kl.getIme()+\" \"+kl.getPrezime());\r\n\t\tthis.jlAdresa.setText(kl.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the osDisk property: Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines]( | public StorageProfile withOsDisk(OSDisk osDisk) {
this.osDisk = osDisk;
return this;
} | [
"public void setDisk(int value) {\n this.disk = value;\n }",
"public void setDisk(Disk disk) {\n this.disk = disk;\n }",
"public void setDisk(Double disk){\n\t\tthis.disk = disk;\n\t}",
"public void setOs(Byte os) {\n this.os = os;\n }",
"public void setDiskSize(Long DiskSize) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get same moduleNo list | private List<SameModuleRepairForEntity> getSameModuleNoList() {
// parameter
SameModuleRepairForEntity entity = new SameModuleRepairForEntity();
return baseMapper.selectList(this.getSqlId("getSameModuleNoList"), entity);
} | [
"private static ArrayList<Module> getUniqueModules(List<PastPaper> papers){\n ArrayList<Module> modules = new ArrayList<>();\n for(int i=0;i<papers.size();i++){\n boolean alreadyPresent = false;\n String potentialNewModuleCode = papers.get(i).getModuleID();\n for(int j... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Starts the game. If the render thread has not started, it is started right before the game is started. | public void startGame() {
//Start the rendering first
getRenderer().startRendering();
//Start the game thread after that.
getGameThread().start();
} | [
"private synchronized void start() {\n if (running)\n return;\n running = true;\n gameThread = new Thread(this);\n gameThread.start();\n }",
"public synchronized void start() {\n\t\tif(isRunning) return; //If the game is already running, exit method\n\t\tisRunning = true;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the serviceId value for this MonthFeeQueryVO. | public void setServiceId(java.lang.String serviceId) {
this.serviceId = serviceId;
} | [
"void setServiceId(java.lang.String serviceId);",
"public void setIdService( Long idService ) {\n this.idService = idService;\n }",
"public void setServiceId(int value) {\n this.serviceId = value;\n }",
"public OracleConnectOptions setServiceId(String serviceId) {\n this.serviceId = serviceId... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
prints the results of the toString to a target file. if file exits, append the result. Otherwise, create the file and print. | public void printToFIle(String filepath)
{
PrintWriter outputStream = null;
try
{
outputStream = new PrintWriter(new FileOutputStream(filepath, true));
}
catch(FileNotFoundException e)
{
System.out.println("ERROR: "
+ "could not print results. Target directory doese not exist.");
... | [
"@Override\n public void writeToFile() {\n try {\n String joinOutput = \" \";\n FileWriter f = new FileWriter(Driver.outFile);\n for (int i = 0; i < Driver.entireOutput.size(); i++) {\n joinOutput = joinOutput + Driver.entireOutput.get(i);\n j... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form SPLASH | public SPLASH() {
initComponents();
} | [
"public Form_Splash() {\n Utilidades.mudaLookAndFeel(Utilidades.WINDOWS);\n setImageIcon();\n initComponents();\n this.fecharESC(itemFechar);\n carregarSistema();\n }",
"public void createNew() {\n\t\tchooseTemplateScreen = new ChooseTemplate(con,primaryStage);\n\t\tchooseTem... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the original thrown object. If the exception is JavaScriptException, gets the object wrapped by a JavaScriptException. We have to do this reflectively, since the JavaScriptException object is from an arbitrary classloader. If the object is not a JavaScriptException, or is not from the given ClassLoader, or the exce... | static Object getThrownObject(ClassLoader cl, Object exception) {
if (exception.getClass().getClassLoader() != cl) {
return exception;
}
Exception caught;
try {
Class<?> javaScriptExceptionClass = Class.forName(
"com.google.gwt.core.client.JavaScriptException", true, cl);
i... | [
"protected static RuntimeException createJavaScriptException(ClassLoader cl,\n Object exception, String message) {\n Exception caught;\n try {\n Class<?> javaScriptExceptionClass = Class.forName(\n \"com.google.gwt.core.client.JavaScriptException\", true, cl);\n Constructor<?> ctor = j... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the Font Size attribute | public void setFontsize(String val) {
_fontSize = val;
} | [
"public void setFontSize(int size){\n this.size = size;\n createFont();\n }",
"public void setFontSize(int fontSize);",
"public void setTextSize(int textSize)\n {\n this.textSize = textSize;\n }",
"public void setTextSize(int textSize) {\n\t\tthis.textSize = textSize;\n\t}",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the snmp version view. | public String getSnmpVersionView() {
return snmpVersionView;
} | [
"public String get_snmpversion()\r\n\t{\r\n\t\treturn this.snmpversion;\r\n\t}",
"public ViewObjectImpl getMajorLOV() {\n return (ViewObjectImpl)findViewObject(\"MajorLOV\");\n }",
"public String getVmVersion() {\r\n return _rtb.getVmVersion();\r\n }",
"com.google.appengine.v1.VersionView getVie... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ |\/| _ _|_ |_ _ _| _ | | (/_ |_ | | (_) (_| _> This method adds the action listener to mySizes elements. | private void addListeners(final IceCreamShopFrame.PriceChanger theListener) {
mySizes.addActionListener(theListener);
} | [
"@Override\n public void actionPerformed(ActionEvent e) {\n System.out.println(\"I was clicked\");\n setSize(getWidth() + 10, getHeight() + 10);\n }",
"public void setSize(float size) {\n\t\tthis.size = dpToPx(size);\n\t\trequestLayout();\n\t\tLOGGER.trace(\"Set the Action Button size to: {}\", getSize())... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Attempt to complete join group phase. We do not complete the join group phase if this is the initial rebalance. | private CoordinatorResult<Void, Record> maybeCompleteJoinPhase(GenericGroup group) {
if (group.isInState(PREPARING_REBALANCE) &&
group.hasAllMembersJoined() &&
group.previousState() != EMPTY
) {
return completeGenericGroupJoin(group);
}
return EMPTY_R... | [
"private CoordinatorResult<Void, Record> completeGenericGroupJoin(\n GenericGroup group\n ) {\n timer.cancel(genericGroupJoinKey(group.groupId()));\n String groupId = group.groupId();\n\n Map<String, GenericGroupMember> notYetRejoinedDynamicMembers =\n group.notYetRejoinedM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes all the e s trial shot datas where playerId = &63; and createDate = &63; from the database. | public void removeByG_TrialShotDataByDate(long playerId, Date createDate)
throws SystemException {
for (ESTrialShotData esTrialShotData : findByG_TrialShotDataByDate(
playerId, createDate)) {
remove(esTrialShotData);
}
} | [
"public void deleteAllPlayers(){\n\n String sqlQuery = \"DELETE * FROM csc480data.player_table; \";\n Statement aStatement = null;\n try {\n Connection connection = DriverManager.getConnection(dbAddress, dbUser, dbPass);\n aStatement = connection.createStatement();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
updateStoneView =============================== updateCircularPit =============================== Update the pit view to circular shape style | public void updateCircularPit(){
for(int i = 0; i < 6; i++){
pitSetA.get(i).setNumStones(pModel.getNumStones());
pitSetA.get(i).setPitShape(new CircularPit());
pitSetA.get(i).setPitColor(Color.DARK_GRAY);
pitSetA.get(i).repaint();
pitSetB.get(i).setNumStones(pModel.getNumStones());
pitSetB... | [
"public void setView(Circle view) {\n\t\tthis.view = view;\n\t}",
"private void initCircularView() {\n profileImage.setBorderColor(getResources().getColor(R.color.white));\n profileImage.setBorderWidth(5);\n }",
"public void updateConicalView();",
"private void updateCircles() {\n int ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds lock to the set of locks currently held by the thread | public void addHeldLock(int lock) {
heldLocks.add(Index.valueOf(lock));
if (DEBUG)
RaceDetector.printDebug(this.toString() + " held locks: "
+ printHeldLocks());
} | [
"public void addLock(Lock lock) {\n if (nlocks == locks.length) {\n // need room for more locks\n Lock[] newArray = new Lock[locks.length + ALLOC_LOCKS];\n System.arraycopy(locks, 0, newArray, 0, locks.length);\n locks = newArray;\n }\n locks[nlocks++... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Builds response and sets it as out message on given Camel exchange. | private void buildOutMessage(Exchange exchange, Message message) {
org.apache.camel.Message reply = exchange.getOut();
for (Map.Entry<String, Object> header : message.getHeaders().entrySet()) {
if (!header.getKey().startsWith(MessageHeaders.PREFIX)) {
reply.setHeader(header.g... | [
"public void process(Exchange exchange) throws Exception {\n Response response = exchange.getIn().getHeader(RestletConstants.RESTLET_RESPONSE, Response.class);\n\n response.setStatus(Status.SUCCESS_OK);\n response.setEntity(\"<response>ru.testproj... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the current size of the game object as a Dimension object. | public final Dimension getSize(){
return (Dimension)size.clone();
} | [
"public Dimension getSize()\n {\n return canvas.getSize();\n }",
"public Dimension getSize() {\n\t\treturn windowSize;\n\t}",
"int getCurrentDimension() {\n if (!playerExists())\n return lastdim;\n return game.h.m;\n }",
"public Point2D.Float getSize() {\r\n\t\treturn ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Switch to default content | public void switchToDefaultContent(){
SeleniumUtilModified.switchToDefaultContent(driver);
} | [
"public void switchToDefaultContent(){\n\t\tSeleniumUtil.switchToDefaultContent(driver);\n\t}",
"public void switchToDefaultContent() {\n\t\tdriver.switchTo().defaultContent();\n\t}",
"public static void switchToDefaultContentWindow() {\n\t\tdriver.switchTo().defaultContent();\n\t}",
"public void switchToDefa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the last entry. | public IndexEntry getLastEntry()
{
List<IndexEntry> entries = getChildEntries();
if ( entries.size() == 0 )
{
return null;
}
return entries.get( entries.size() - 1 );
} | [
"public String getLastEntry() {\r\n return lastEntry;\r\n }",
"public FeedEntry getLastEntry();",
"public Object getLast() \n\t{\n\t\treturn get(-1);\n\t}",
"public A getLast() {\n return get(high - 1);\n }",
"public Item getLast() {\n return items[size - 1];\n }",
"public LogEntry... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the string that is used as the name for the explanation of a suggestion that holds the URL to the corresponding Netspeak page. | public String getNetspeakUrlName() {
return "NetspeakUrl"; // TODO: parameter
} | [
"java.lang.String getSuggestion();",
"String getSuggestionText2Url();",
"public String getSuggestion() {\n return suggestion;\n }",
"java.lang.String getNoun();",
"public String getSuggestion() {\n return suggestion;\n }",
"public String getSuggestionAltLabel() {\n return suggestionAltLab... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verify goals Edit link is not present after the Game Plan is completed | public boolean verifyGoalsEditLinkIsNotPresent(){
SeleniumUtil.sleep(3);
boolean isPresent = false;
new WebDriverWait(driver, 5).until(ExpectedConditions.invisibilityOfElementLocated(goalsEditLink));
if(SeleniumUtil.isElementDisplayed(goalsEditLink, driver))
{
isPresent = false;
}
else{... | [
"public boolean verifyGoalsEditLinkIsNotPresent(){\n\t\tSeleniumUtil.sleep(3);\n\t\tboolean isPresent = false;\n\t\tnew WebDriverWait(driver, 5).until(ExpectedConditions.invisibilityOfElementLocated(goalsEditLink));\n\t\tif(SeleniumUtil.isElementDisplayed(goalsEditLink, driver))\n\t\t{\n\t\t\tisPresent = false;\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method clears the provided menu by removing all of its items. | private void clearMenu(Menu menu) {
for (MenuItem item : menu.getItems()) {
item.dispose();
}
} | [
"public void clearItems() {\n menu.clearItems();\n }",
"public void clear() {\r\n menuItems.clear();\r\n }",
"public void clearMenuItems() {\n menuItemNames.clear();\n menuItemPrices.clear();\n }",
"public void clearMenuItems() {\n selectedMenuItem = null;\n tab... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__TaskDefinitionRepository__NameAssignment_1" $ANTLR start "rule__TaskDefinitionRepository__TasksAssignment_3" InternalTaskDefinition.g:3132:1: rule__TaskDefinitionRepository__TasksAssignment_3 : ( ruleTaskDefinition ) ; | public final void rule__TaskDefinitionRepository__TasksAssignment_3() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalTaskDefinition.g:3136:1: ( ( ruleTaskDefinition ) )
// InternalTaskDefinition.g:3137:2: ( ruleTaskDefinition )
... | [
"public final void rule__TaskDefinitionRepository__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTaskDefinition.g:971:1: ( ( ( rule__TaskDefinitionRepository__TasksAssignment_3 )* ) )\n // InternalTaskDefi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Menu to view information about the status of a reservation. Is it checked in, checked out, or canceled? | private static void reservationStatusMenu() throws FileNotFoundException
{
Reservation reservation = null;
// print a blank line followed by menu title
System.out.println("= = = = = = = = = = = = = = = = = = = = = = = =");
System.out.println(" RESERVATION STATUS MEN... | [
"private void availStatusMenu() {\n\t\tSystem.out.println(\"\\n+-----------------------------+\");\n\t\tSystem.out.println(\"| Select availability status: |\");\n\t\tSystem.out.println(\"| 1. Vacant |\");\n\t\tSystem.out.println(\"| 2. Occupied |\");\n\t\tSystem.out.println(\"| 3. ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
converts the String to an ApplicationId or null if conversion failed | private static ApplicationId parseApplicationId(String appIdStr) {
try {
return ApplicationId.fromString(appIdStr);
} catch (IllegalArgumentException e) {
return null;
}
} | [
"java.lang.String getApplicationId();",
"public String getApplicationId();",
"String applicationId();",
"public String getApplicationID();",
"private String extractApplicationId(String clientId) {\n // Grab the digits before the -.\n int idx = clientId.indexOf(\"-\");\n return (idx > 0)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a list of all creatures in play belonging to this player. | public List<Creature> getCreatures() {
List<Creature> creatures = new LinkedList<Creature>();
for(Permanent permanent : permanentsInPlay) {
if(permanent instanceof Creature) {
creatures.add((Creature)permanent);
}
}
return creatures;
} | [
"public List<Card> getCreaturesInPlay() {\n return CardLists.filter(getCardsIn(ZoneType.Battlefield), Presets.CREATURES);\n }",
"@Override\n public CreatureCard[] getCreaturesInHand() {\n return ArrayUtils.filterCreatures(getCardsInHand());\n }",
"public List<PlayerInstance> getAllPlayers... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the vector value for this ConstraintType. | public void setVector(nvo_coords.CoordsType vector) {
this.vector = vector;
} | [
"public void setVectorValue(float[] value) {\n if (value == null) {\n throw new IllegalArgumentException(\"value must not be null\");\n }\n if (value.length != type.vectorDimension()) {\n throw new IllegalArgumentException(\n \"value length \" + value.length + \" must match field dimensi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Appends a query string namevalue pair to a URL and adds the CSRF protection token | public static String getUrlWithQueryStrWithCsrf(WizardContext context, String url, String queryStrKey, String value)
{
// Get the URL without CSRF token.
String rootUrl = getUrlWithQueryStr(url, queryStrKey, value);
// For URL with CSRF token.
String finalUrl = getUrlWithQuery... | [
"String addCSRFToken(String href);",
"public String addCSRFToken(String href) {\n log.debug(\"Inside addCSRFToken\");\n User user = ESAPI.authenticator().getCurrentUser();\n log.debug(\"what is the user:::\" + user);\n\n String token = CSRF_TOKEN_NAME + \"=\" + user.getCSRFToken();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests remove when item to remove is null | @Test(expected = NullPointerException.class)
public void testRemoveNull(){
test.remove(null);
} | [
"@Test(expected=VendingMachineException.class)\n\tpublic void removeNullItemTest() {\n\t\tvendingMachine.removeItem(VendingMachine.A_CODE);\n\t}",
"@Test\n void testRemoveReturnsNull() {\n MyList l = new MyList();\n l.put(\"key\", \"value\");\n\n assertEquals(null, l.remove(\"another key\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns number of "renderingPreferences" element | public int sizeOfRenderingPreferencesArray()
{
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(RENDERINGPREFERENCES$4);
}
} | [
"Integer getRenderCount();",
"public int getNumberActiveElements() {\n\t\topenLock();\n\t\tint out = drawList.values().size();\n\t\tcloseLock();\n\t\treturn out;\n\t}",
"int getElementCount();",
"Long getNumberOfElement();",
"public int getNumberOfElementValuePairs() {\n\t\treturn numberOfElementValuePairs ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Run method : When not end of file Invoke readLineFromFile() Check if prime number Store in results | public void run() {
log.writeMessage("Run has been called.", Logger.DebugLevel.THREAD_RUN);
String currentLine = fileProc.readLineFromFile();
int check;
while (currentLine != null){
try{
check = Integer.parseInt(currentLine);
if (prime.primeChe... | [
"public GF1() throws IOException {\n String fileLine = null;\n int arrayCounter = 0;\n\n try {\n br = new BufferedReader(new FileReader(INPUT_FILE));\n fw = new FileWriter(OUTPUT_FILE);\n while ((fileLine = br.readLine()) != null) {\n // takes the... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
~ methods Compares this object to the specified object. The result is true if and only if the argument is not null, is a EComponent object, and contains the same values, field by field, as this EComponent. | @Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (TkComponent.class.isAssignableFrom(obj.getClass())) {
TkComponent<?> another = (TkComponent<?>) obj;
// =========================================================
// Compare pro... | [
"public boolean equals(ComponentDescription otherComponent){\r\n boolean result = true;\r\n ComponentDescription c1 = this;\r\n ComponentDescription c2 = otherComponent;\r\n \r\n if (! c1.id.equals(c2.id) || ! c1.classname.equals(c2.classname) || ! c1.hostaddress.equals(c2.hostaddress)){\r\n res... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
adds inner list adapters to inner adapter list and sets listeners for thos adapters. | private void populateInnerAdapterList() {
this.innerAdapters = new HashMap<>();
for (int i = 0; i < this.itemCardArrayList.size(); i++) {
ItemCard parentCard = itemCardArrayList.get(i);
TaskList taskList = this.userTaskList.get(i);
List<Task> tasks = taskList.getTaskL... | [
"private void connectListeners() {\n\t\tcurrencyAdapter =\n\t\t\t\tnew ArrayAdapter<String>(\n\t\t\t\t\t\tthis, \n\t\t\t\t\t\tandroid.R.layout.simple_spinner_dropdown_item,\n\t\t\t\t\t\texchangeRates.getCurrencyList()\n\t\t\t\t\t\t);\n\t\t\n\t\tfromSpinner.setAdapter(currencyAdapter);\n\t\ttoSpinner.setAdapter(curr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the lastConnectionTime property. | long getLastConnectionTime(); | [
"public long getLastConnectTime()\n {\n return _lastConnectionTime;\n }",
"public long getConnectionTime() {\n return _connectionTime;\n }",
"public int getLastTime() {\n return lastTime_;\n }",
"public Integer getLastSendTime() {\n return lastSendTime;\n }",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor mobile broker can be created via configuration file or directly | public MobileBroker(String myName, String myBrokerIP, int myBrokerPort) {
super(myName, getLocalIP(), -1);
if (this.myIP.equals("")) {
log.writeToLog("Does not have correct IP address " + this.myIP, true);
this.myIP = "localhost";
}
this.myBrokerIP = myBro... | [
"public MTSBroker(String brokerPort)\n {\n logger.debug(\"Creating MTSBroker instance.\");\n\n // Initialize the broker\n this.brokerPort = brokerPort;\n }",
"private static DatacenterBroker createBroker(){\n\n\t\tDatacenterBroker broker = null;\n\t\ttry {\n\t\t\tbroker = new Datacenter... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
transpose the matrix formed by vector 4 and vector 10 where the vectors are columns | public void transpose_4_10() {
final double t = y_4;
y_4 = x_10;
x_10 = t;
} | [
"public void transpose_10_4() {\n final double t = y_10;\n y_10 = x_4;\n x_4 = t;\n }",
"public MathVector transpose() {\n\t\t// A new array is built and the number of columns becomes the number of rows or vice versa.\n\t\t// The values from the first array are then assigned to their corresponding locat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Advances to next monkey in List of monkeys. | public static int nextMonkeyAndResize(Monkey monkey, List<Monkey> ml) {
int next = monkey.nextMonkey();
if (next > ml.size()) {
int zarg = addMoreMonkeys(next, ml);
}
return next;
} | [
"public int nextMonkey() {\n if (monkeyNumber % 2 == 0) {\n return monkeyNumber / 2;\n } else {\n return (monkeyNumber * 3) + 1;\n }\n }",
"public void nextPlayer(){\n int indexCurrPlayer = getPlayers().indexOf(currPlayer);\n currPlayer = getPlayers().get((indexCurrPlayer + 1) % ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ unpairs currently paired slave with salve id being arg: one of 0 1 2; 0 is for remote | public int UnpairSlave (int arg)
{
// context check
if (m_context == 0) return ReconBLE.ERR_NO_SESSION; // no BLE session
int status = BLENative.unpairSlave(m_context, arg);
if (status == ReconBLE.ERR_SUCCESS)
{
// remove BLE.RIB as well
File rib = new File(ReconBLE.BLE_PATH);
if (rib.exis... | [
"@LatchUnpair(latchId = LatchIdFromSessionFactory.class)\n public static Result unpair() {\n // Get the unpairing status from notation output argument \"status\"\n String status = (String) Http.Context.current().args.get(\"status\");\n\n Form<PairingKey> filledForm = pairingKeyForm.bindFromR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if the value is a valid annotation type. | public static boolean isValid(String value) {
try {
validChecker = Annotation.valueOf(value.toUpperCase());
return true;
} catch (IllegalArgumentException e) {
if (getAlias(value) != null) {
return true;
}
return false;
... | [
"boolean isAnnotationType();",
"boolean isSupportedTypeAnnotation();",
"private static boolean isValidAnnotationType(String typeName) {\n Set<String> validTypes = new HashSet<>(Arrays.asList(\n \"String\", \"int\", \"double\", \"float\", \"short\", \"long\", \"byte\", \"char\", \"boolean\"));\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 rotationForcePercent = 16; | public int getRotationForcePercent() {
return rotationForcePercent_;
} | [
"int getRotationForcePercent();",
"public int getRotationForcePercent() {\n return rotationForcePercent_;\n }",
"boolean hasRotationForcePercent();",
"public boolean hasRotationForcePercent() {\n return ((bitField0_ & 0x00004000) == 0x00004000);\n }",
"public void setRotation(float rotation)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Open and display the about dialog, using the given IRCConfiguration. | public AboutDialog(IRCConfiguration config)
{
displayAboutPage(config);
} | [
"public void about() {\n \tString info = \"This SQL Database GUI Program was coded by Miles Jordan.\\nEach database and table are \"\n \t\t\t+ \"displayed to the left.\\nSQL code can be typed in to the text editor.\\nYour selected rows\"\n \t\t\t+ \"and the status and error logs are displayed as well.\";\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns and uses the current token; it had better be equal to tok. If it is not, then a warning message is printed. Calling useToken() multiple times steps through the tokens in the input. | public Token useToken(String tok) {
// If the next token is not what it should be, print a warning message.
Token t = curToken;
if (!t.equals(tok)) {
System.out.println("Line " + input.lineno() +
": Expected \"" + tok + "\" but saw \"" +
t.toString() +... | [
"Token current();",
"private Token token(final TermToken tt) {\n return tt.hasLexicalToken() ? tt.token().token() : null;\n }",
"Token nextToken() throws TokenizerException;",
"public Token currentToken()\n\t{\t\t\n\t\tif(this.token == null)\n\t\t\tthis.createToken();\n\t\t\n\t\treturn this.token;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Below method will be used to get the inverted index reverse | @Override
public int getInvertedReverseIndex(int rowId) {
return invertedIndexReverse[rowId];
} | [
"public abstract PostingIndex<?> getInvertedIndex();",
"public Index invert() {\n \t\tint n=length();\n \t\tIndex ni=new Index(n);\n \t\tfor (int i=0; i<n; i++) {\n \t\t\tni.set(this.get(i), i);\n \t\t}\n \t\treturn ni;\n \t}",
"public InvertedIndex() {\n\t\tthis.invertedIndex = new TreeMap<>();\n\t\tthis.count... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the invite button enabled. | protected void setInviteButtonEnabled(boolean enabled) {
setRightButtonEnabled(enabled);
} | [
"public void enableSend(){\n \tsendButton.setEnabled(true);\n }",
"public void enableSending() \n {\n sendButton.setEnabled(true);\n stressButton.setEnabled(true);\n }",
"public void setBuyAssetButtonStatus(boolean value)\r\n\t{//value==true -> enable button, otherwise -> disable butto... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the risk model | public ModelRisk getRiskModel() {
if (this.riskModel == null) {
this.riskModel = new ModelRisk();
}
return riskModel;
} | [
"String getRisk();",
"public RiskType getRiskType() {\n return riskType;\n }",
"public double getRisk() {\r\n\t\treturn this.beta * this.getValue();\r\n\t}",
"public Set<ModelRiskBasedCriterion> getRiskBasedModel() {\n if (this.riskBasedModel == null) {\n this.riskBasedModel = new HashSe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the taskActualEffort value for this RemoteRelease. | public java.lang.Integer getTaskActualEffort() {
return taskActualEffort;
} | [
"public void setTaskActualEffort(java.lang.Integer taskActualEffort) {\n this.taskActualEffort = taskActualEffort;\n }",
"public java.lang.Integer getTaskEstimatedEffort() {\n return taskEstimatedEffort;\n }",
"public Double getEstimatedEffort() {\n\t\treturn estimatedEffort;\n\t}",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
clear the document's cache | void clearDocCache(){
docMainCache.invalidateAll();
docOptionalCache.invalidateAll();
docListCache.invalidateAll();
} | [
"public void clearCache();",
"public void clearCache() {\n\t\tthis.file.delete();\n\t}",
"private void clearCache() {\n }",
"public void clear() {\n cache.clear();\n }",
"public void clearCache() {\n memoryCache.clear();\n fileCache.clear();\n }",
"public void clear() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
public setter An eBay member's review of the product. | public void setReview(List<ReviewType> review) {
this.review = review;
} | [
"public void setReviews(){\n \tthis.reviews = reviews;\n }",
"public String getReview() {\n\t\treturn review;\n\t}",
"public String toString() {\n return review;\n }",
"public AggregationReview getReview() {\n return review;\n }",
"public void setCountReview(int countReview) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the content spans of grid count of this view | public void setContentSpan(int span) {
if(span < 1) return;
if(mContentWrapper.getLayoutManager() == null) return;
RecyclerView.LayoutManager lManager = mContentWrapper.getLayoutManager();
if(lManager instanceof GridLayoutManager) {
((GridLayoutManager) lManager).setSpanCoun... | [
"int getSpanCountOfGridMode();",
"public void setNumberOfXGridLines(int xGrid) {xGridLines = xGrid;}",
"private void setSpanCount(int spanCount){\r\n if(spanCount == mSpanCount)\r\n return;\r\n if(spanCount < 2)\r\n throw new IllegalArgumentException(\"Span count ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if this form is a part of another form. | public abstract boolean partOf(Form other); | [
"boolean isAuxForm();",
"Boolean isFormReference();",
"public boolean isForm();",
"public boolean isFormVisible() {\n return formAnimator == null || !formAnimator.isRolledUp();\n }",
"boolean isVisibleInForm();",
"private boolean hasFormsAssigned(CollectableGenericObjectWithDependants clct) {\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method that stops timer also gets the elapsed time | public void stop(){
// check for timer that isn't running
if(!isRunning){
return;
}
isRunning = false;
long endTime = System.currentTimeMillis();
elapsedTime += endTime - startTime;
} | [
"public void stop() {timer.stop();}",
"private void stopTimer()\n {\n m_stopTime = System.currentTimeMillis();\n m_recordingCompleteTime = (m_stopTime - m_startTime)/1000;\n }",
"public synchronized long stop () {\r\n long t = elapsed();\r\n pause();\r\n reset();\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets a field in class, can override access constraints if requested to do so. | public void setFieldWithAccess(Class<?> targetClass, String whichField, boolean setAccess) throws Exception {
Object targetInstance = targetClass.newInstance();
Field field = targetClass.getDeclaredField(whichField);
if (setAccess) {
field.setAccessible(true);
}
// Not checking for type errors in this test... | [
"public void setField(FIELD theField);",
"public FieldInstruction setField(BCField field) {\n if (field == null)\n return setFieldIndex(0);\n return setField(field.getDeclarer().getName(), field.getName(),\n field.getTypeName());\n }",
"protected abstract void setFieldValu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Save notification and set id to passed notification | Notification saveNotification(Notification notification); | [
"void save(Notification notification);",
"void save(NotificationProperty notificationProperty);",
"public void setIdNotification( int nIdNotification )\r\n {\r\n _nIdNotification = nIdNotification;\r\n }",
"public void createNotification(Notification notification);",
"@Test\n public void set... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function is responsible for loading associations for the given entity e.g. when viewing an order, we load the customer so that customer can be shown on the customer tab within viewOrder.xhtml | public void loadAssociations() {
if (atcDrug.getDrug() != null) {
drugAction.setInstance(getInstance().getDrug());
}
if (atcDrug.getParent() != null) {
parentAction.setInstance(getInstance().getParent());
}
initListSubcategories();
} | [
"public void loadAssociations() {\r\n\r\n\t\tif (tenantInfo.getRealEstateProperty() != null) {\r\n\t\t\trealEstatePropertyAction.setInstance(getInstance()\r\n\t\t\t\t\t.getRealEstateProperty());\r\n\t\t}\r\n\r\n\t}",
"public void loadAssociations() {\n\n\t\tinitListSettingNames();\n\n\t\taddDefaultAssociations();... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
for unfriend, delete data from friends nodes delete from, sender >> receiver > values | private void unfriendPerson() {
friendsDatabaseReference.child(senderID).child(receiver_userID).removeValue()
.addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if (... | [
"private void declineFriendRequest() {\n friendRequestReference.child(senderID).child(receiver_userID).removeValue()\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |